📦 Add ARM64 edge release and operator manifests

This commit is contained in:
eust-w 2026-08-20 19:47:43 +08:00
parent 37f5804510
commit f93654df06
58 changed files with 3302 additions and 273 deletions

View File

@ -16,8 +16,8 @@
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:bedd671-poc-fanyu-orbbec-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"metadata": "operator.json",
"name": "数据合并",
"operatorId": "operator-builtin-merge",
@ -59,12 +59,14 @@
"requiresGpu": false
},
"runtimeDependencies": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"runtimeHandler": "builtin_merge",
"runtimeSource": "backend/operators/builtin/merge/operator.py",

View File

@ -1,11 +1,8 @@
{
"acceptance": {
"fixtureContract": "tests/acceptance/fixture_contract.json",
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresChainedWorkflow": true,
"requiresChineseWorkflowAcceptance": true,
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
@ -18,23 +15,24 @@
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:builtin",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"metadata": "operator.json",
"name": "ms-swift SFT 数据集导出",
"operatorId": "operator-builtin-ms-swift-dataset-export",
"operatorSlug": "ms_swift_dataset_export",
"preferredSlug": "ms_swift_dataset_export",
"pythonImport": "operator-repos/builtin/ms_swift_dataset_export/src/operator.py:run",
"releaseManifest": "release.json",
"releaseSchemaVersion": "droboticflow.operator.release/v1",
"pythonImport": "backend.operators.builtin.ms_swift_dataset_export.operator:run",
"repositoryId": "builtin/ms_swift_dataset_export",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": false,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
@ -64,17 +62,23 @@
"requiresGpu": false
},
"runtimeDependencies": [
"annotations-manifest-json"
"accepted-annotation-revisions",
"real-video-files",
"ffmpeg",
"jsonl"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"annotations-manifest-json"
"accepted-annotation-revisions",
"real-video-files",
"ffmpeg",
"jsonl"
],
"runtimeHandler": "builtin_ms_swift_dataset_export",
"runtimeSource": "operator-repos/builtin/ms_swift_dataset_export/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/ms_swift_dataset_export",
"sourceRoot": "backend/operators/builtin/ms_swift_dataset_export",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -16,8 +16,8 @@
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:6d6858c-poc-fanyu-v3-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"metadata": "operator.json",
"name": "成品打包",
"operatorId": "operator-builtin-package",
@ -59,12 +59,22 @@
"requiresGpu": false
},
"runtimeDependencies": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"runtimeHandler": "builtin_result_package",
"runtimeSource": "backend/operators/builtin/package/operator.py",

View File

@ -0,0 +1,88 @@
{
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification@sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"metadata": "operator.json",
"name": "Qwen3-VL 标签裁片持续训练与多标签分类",
"operatorId": "operator-builtin-qwen-label-crop-classification",
"operatorSlug": "qwen_label_crop_classification",
"preferredSlug": "qwen_label_crop_classification",
"pythonImport": "backend.operators.builtin.qwen_label_crop_classification.operator:run",
"repositoryId": "builtin/qwen_label_crop_classification",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_qwen_label_crop_classification",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-qwen-label-crop-classification",
"operatorSlug": "qwen_label_crop_classification",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",
"accepted-annotation-dataset"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",
"accepted-annotation-dataset"
],
"runtimeHandler": "builtin_qwen_label_crop_classification",
"runtimeSource": "operator-repos/builtin/qwen_label_crop_classification/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "backend/operators/builtin/qwen_label_crop_classification",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -0,0 +1,88 @@
{
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization@sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"metadata": "operator.json",
"name": "Qwen3-VL 200秒时间区间定位",
"operatorId": "operator-builtin-qwen-temporal-localization",
"operatorSlug": "qwen_temporal_localization",
"preferredSlug": "qwen_temporal_localization",
"pythonImport": "backend.operators.builtin.qwen_temporal_localization.operator:run",
"repositoryId": "builtin/qwen_temporal_localization",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_qwen_temporal_localization",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-qwen-temporal-localization",
"operatorSlug": "qwen_temporal_localization",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"runtimeHandler": "builtin_qwen_temporal_localization",
"runtimeSource": "operator-repos/builtin/qwen_temporal_localization/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "backend/operators/builtin/qwen_temporal_localization",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -0,0 +1,79 @@
{
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "VIDEO",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"metadata": "operator.json",
"name": "视频人脸脱敏",
"operatorId": "operator-builtin-video-face-blur",
"operatorSlug": "video_face_blur",
"preferredSlug": "video_face_blur",
"pythonImport": "backend.operators.builtin.video_face_blur.operator:run",
"repositoryId": "builtin/video_face_blur",
"runtimeContract": {
"acceptance": {
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_video_face_blur",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-video-face-blur",
"operatorSlug": "video_face_blur",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 0,
"recommendedGpuType": "",
"requiresGpu": false
},
"runtimeDependencies": [
"ffmpeg",
"opencv",
"video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"ffmpeg",
"opencv",
"video-files"
],
"runtimeHandler": "builtin_video_face_blur",
"runtimeSource": "backend/operators/builtin/video_face_blur/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "backend/operators/builtin/video_face_blur",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -0,0 +1,88 @@
{
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection@sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"metadata": "operator.json",
"name": "WiLoR需求链有效行为检测(Qwen3-VL)",
"operatorId": "operator-builtin-wilor-valid-event-detection",
"operatorSlug": "wilor_valid_event_detection",
"preferredSlug": "wilor_valid_event_detection",
"pythonImport": "backend.operators.builtin.wilor_valid_event_detection.operator:run",
"repositoryId": "builtin/wilor_valid_event_detection",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_wilor_valid_event_detection",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-wilor-valid-event-detection",
"operatorSlug": "wilor_valid_event_detection",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"runtimeHandler": "builtin_wilor_valid_event_detection",
"runtimeSource": "operator-repos/builtin/wilor_valid_event_detection/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "backend/operators/builtin/wilor_valid_event_detection",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -0,0 +1,18 @@
# S100 边缘接入边界
已验证 S100 为 `aarch64 Linux`,且没有 Docker、Kubernetes 或 k3s。因此此目录交付的是 **ARM64 edge remote-control/client package**,不是把 Droboticflow API、Worker、Qwen、Headpose 或 WiLoR 误标为可在 S100 本机运行的完整平台。
```text
S100 (aarch64, systemd)
└─ drosync CLI + drosync-daemon (linux-arm64)
├─ scoped auth / mapping / plan / sync
└─ HTTPS control + presigned BOS transfer → 外部 x86_64/GPU control plane
├─ API / Worker / Mongo / BOS / PVC
├─ Qwen3-VL temporal / valid-event / LoRA (1 GPU serially)
├─ Headpose service
└─ WiLoR service
```
`FANYU_S100_MODE=edge_remote` 和 `FANYU_DROSYNC_PLATFORM=linux-arm64` 是 bundle/preflight 接受的唯一组合。`full_local` 或任何尝试在 S100 本机部署 x86_64/GPU 镜像的配置都会失败关闭。完整平台仍在已验证的 x86_64 GPU 控制面运行;S100 运行无 GUI 的原生 ARM64 CLI/daemon 和 systemd 单元。
该 bundle 包含真实数据上传 daemon,但不包含凭据,也不让边缘端绕过平台授权直接写任意 BOS 路径。管理员必须在控制面创建限定 Space/prefix/action 的 drosync Key/Secret;S100 用 `0600` Secret 文件完成首次认证,再创建本地采集目录 mapping。交叉编译和包结构不等于板端运行:若 S100 离线,板端 `version/auth/doctor/plan/sync` 证据仍应标为待补。

View File

@ -0,0 +1,17 @@
# 泛宇 v5 S100 私有化部署包
该目录是 v5 的私有化部署交接入口,不包含凭据、模型权重或伪造 image digest。它交付经过交叉编译和 ABI 校验的 ARM64 `drosync` CLI/daemon,负责 S100 到外部控制面的真实数据入口;它不是把 x86_64/GPU 平台伪装成本机可运行包。
部署前必须提供四类真实交付物:
1. 由 CI/Kaniko 发布的 digest-pinned 镜像:`video-face-blur`、`qwen-temporal-localization`、`wilor-valid-event-detection`、`ms-swift-dataset-export`、`qwen-label-crop-classification`。
2. PVC 中的 Qwen3-VL-8B-Instruct 固定 revision 快照和由 `scripts/verify_qwen3vl_model_manifest.py` 生成的两个 manifest 文件。
3. 已就绪的 Headpose/WiLoR 服务以及 v5 供应商工作组 ID。
4. 每个 Qwen/LoRA 节点的一张可调度 GPU;工作流已将 Qwen 推理串行化,不需要占用 GSStudio/HoloBrain GPU。
5. `linux-arm64` 的 drosync DEB 和 portable tar;bundle builder 会校验文件 SHA-256、DEB `Architecture: arm64`、两个 AArch64 ELF、systemd installer,并拒绝 GUI 或其他 ABI。
使用 [values.env.example](values.env.example) 作为非敏感配置模板。bundle builder 只接受真实 digest-pinned image 值和实际 ARM64 包哈希,并为五个 v5 独立算子生成随包携带的 `operator-releases/*/release.json`、`edge-artifacts/*` 和总 `SHA256SUMS`;它不会从 pending-build catalog 推断或伪造 release。先安装 portable tar(或 DEB),再用一次性 Secret 完成 `drosync auth` 和采集目录 mapping;凭据不得进入 bundle。将平台侧 secret 注入现有 Droboticflow deployment 机制后,运行 POC 的真实左相机 smoke。运行失败时应保留失败 Run、Kubernetes Job、模型 manifest 校验结果和 artifact lineage;不得改为默认标签或空包来使验收“通过”。
v5 的包前验收为一个供应商隔离的聚合任务。只有确认后,系统才会释放训练和逐最终切片 MP4 打包;S100 上不应启用历史的 post-package reject acceptance 作为 v5 替代。`drosync` 只承担边缘采集数据入口;API、Worker、Qwen、Headpose、WiLoR、Mongo 和 BOS/PVC 仍在外部控制面。
本次 ARM64 产物已完成交叉测试、ELF/DEB/portable 结构验证。最终打包时 S100 网络离线,因此“复制到板端并执行 `drosync --json version`”必须在链路恢复后补做;不得把交叉验证写成板端运行证据。

View File

@ -0,0 +1,28 @@
# No secrets belong in this file. Inject credentials via the platform secret store.
FANYU_V5_ANNOTATION_WORKGROUP_ID=
FANYU_HEADPOSE_API_BASE_URL=
FANYU_HEADPOSE_SERVICE_IMAGE_ID=
FANYU_HEADPOSE_MODEL_SHA256=
FANYU_HEADPOSE_LICENSE_ID=
FANYU_QWEN_MODEL_ROOT=/workspace/models/Qwen3-VL-8B-Instruct
FANYU_QWEN_MODEL_REVISION=0c351dd01ed87e9c1b53cbc748cba10e6187ff3b
FANYU_QWEN_MODEL_MANIFEST=/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json
FANYU_QWEN_MODEL_MANIFEST_SHA256=
FANYU_QWEN_GPU_LIMIT=1
FANYU_KUBECONFIG_CONTEXT=
FANYU_MONGO_URI_REF=secret://
FANYU_BOS_CONNECTION_REF=secret://
FANYU_WORKSPACE_PVC=
FANYU_QWEN_MODEL_PVC=
FANYU_NODE_ARCH=aarch64
FANYU_V5_IMAGE_ARCH=amd64
FANYU_DROSYNC_PLATFORM=linux-arm64
FANYU_DROSYNC_DEB_SHA256=
FANYU_DROSYNC_PORTABLE_SHA256=
FANYU_IMAGE_MERGE=registry.example/merge@sha256:
FANYU_IMAGE_PACKAGE=registry.example/package@sha256:
FANYU_IMAGE_VIDEO_FACE_BLUR=registry.example/video-face-blur@sha256:
FANYU_IMAGE_QWEN_TEMPORAL=registry.example/qwen-temporal@sha256:
FANYU_IMAGE_QWEN_VALID_EVENT=registry.example/qwen-valid-event@sha256:
FANYU_IMAGE_MS_SWIFT_EXPORT=registry.example/ms-swift-export@sha256:
FANYU_IMAGE_QWEN_TRAIN=registry.example/qwen-train@sha256:

View File

@ -23,6 +23,26 @@ sudo systemctl enable --now drosync.service
The portable tarball contains all three binaries and a user systemd unit. Validate the detached GPG signature and SHA-256 before extraction.
## Ubuntu 22.04 ARM64 / RDK S100
Use only the `linux-arm64` DEB or portable tar. These packages contain the CLI
and daemon, omit the desktop GUI and identify themselves as
`releasePlatform=linux-arm64`.
The headless build deliberately does not depend on the desktop D-Bus keyring.
Configure a writable token file in the daemon environment before authenticating:
```bash
sudo install -d -o drosync -g drosync -m 0700 /var/lib/drosync
sudo install -o drosync -g drosync -m 0600 /dev/null /var/lib/drosync/token
printf '%s\n' 'DROSYNC_SECRET_FILE=/var/lib/drosync/token' | sudo tee /etc/drosync/environment >/dev/null
```
`drosync auth` then writes the returned bearer token through a same-directory
0600 temporary file, `fsync` and atomic rename. Missing `DROSYNC_SECRET_FILE`,
unsafe parent permissions, symlinks, special files or non-0600 files fail
closed. The package and environment file never contain the token itself.
## macOS 13+ arm64
Install the notarized `.pkg`. It installs `/Applications/drosync.app`, `/usr/local/bin/drosync`, a LaunchAgent, and a LaunchDaemon definition. Enable only the per-user agent or the administrator-managed daemon:

View File

@ -519,8 +519,8 @@
],
"description": "将多个 JSON 输入合并成统一结果。",
"id": "operator-builtin-merge",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:bedd671-poc-fanyu-orbbec-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"inputs": [
{
"description": "左输入",
@ -581,7 +581,8 @@
"requiresGpu": false
},
"runtimeDependencies": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
@ -2276,8 +2277,8 @@
}
],
"id": "operator-builtin-package",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:6d6858c-poc-fanyu-v3-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"inputs": [
{
"description": "切片与人工标注结果",
@ -2354,7 +2355,12 @@
"requiresGpu": false
},
"runtimeDependencies": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
@ -12240,8 +12246,8 @@
}
],
"id": "operator-builtin-video-face-blur",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:builtin",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:d8c2e6f4770146cfd1f887556942c4b0c793132e01dfb00346a06f3630f9a2e1",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"inputs": [
{
"description": "标准化数据集 manifest 或视频文件清单",
@ -12261,7 +12267,7 @@
"type": "json"
}
],
"publicationStatus": "draft",
"publicationStatus": "published",
"runtimeContract": {
"acceptance": {
"requiresArtifactChecksum": true,
@ -12319,43 +12325,165 @@
},
"category": "AI",
"containerArgs": [],
"containerCommand": ["python", "/app/backend/operator-runner/main.py"],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"description": "对真实左相机视频按最多 200 秒窗口执行 Qwen3-VL 零样本时序定位;没有 CUDA、不可变模型 revision、模型哈希或真实帧时直接失败。真实推理可返回空 segments,但仍必须输出带完整 provenance 的非空 manifest。",
"hyperparams": [
{"key": "MODEL_PATH", "value": "/workspace/models/Qwen3-VL-8B-Instruct", "description": "只读的本地 Qwen3-VL-8B-Instruct 快照目录", "type": "string"},
{"key": "MODEL_REVISION", "value": "0c351dd01ed87e9c1b53cbc748cba10e6187ff3b", "description": "锁定的 Qwen3-VL-8B-Instruct revision", "type": "string"},
{"key": "MODEL_MANIFEST_PATH", "value": "/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json", "description": "逐 shard SHA/大小均经过校验的模型 manifest", "type": "string"},
{"key": "WINDOW_SECONDS", "value": "200", "description": "每个真实 Qwen3-VL 推理窗口最大秒数", "type": "number"},
{"key": "STRIDE_SECONDS", "value": "180", "description": "窗口步长(与 200 秒窗口形成 20 秒重叠)", "type": "number"},
{"key": "OVERLAP_SECONDS", "value": "20", "description": "相邻时序窗口的重叠秒数", "type": "number"},
{"key": "FPS", "value": "1", "description": "真实视频采样率", "type": "number"},
{"key": "MAX_FRAMES", "value": "96", "description": "每个窗口实际解码并输入模型的最大帧数(不超过 96)", "type": "number"},
{"key": "MERGE_GAP_SECONDS", "value": "2", "description": "跨重叠窗口同标签区间合并阈值", "type": "number"},
{"key": "REQUIRE_NON_EMPTY_RESULT", "value": "false", "description": "验收 fixture 可设为 true;正常视频允许真实空结果", "type": "boolean"},
{"key": "MAX_NEW_TOKENS", "value": "512", "description": "模型生成上限", "type": "number"},
{"key": "TAXONOMY_22_JSON", "value": "", "description": "必填:22 类版本化 taxonomy JSON", "type": "json"}
{
"description": "只读的本地 Qwen3-VL-8B-Instruct 快照目录",
"key": "MODEL_PATH",
"type": "string",
"value": "/workspace/models/Qwen3-VL-8B-Instruct"
},
{
"description": "锁定的 Qwen3-VL-8B-Instruct revision",
"key": "MODEL_REVISION",
"type": "string",
"value": "0c351dd01ed87e9c1b53cbc748cba10e6187ff3b"
},
{
"description": "逐 shard SHA/大小均经过校验的模型 manifest",
"key": "MODEL_MANIFEST_PATH",
"type": "string",
"value": "/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json"
},
{
"description": "每个真实 Qwen3-VL 推理窗口最大秒数",
"key": "WINDOW_SECONDS",
"type": "number",
"value": "200"
},
{
"description": "窗口步长(与 200 秒窗口形成 20 秒重叠)",
"key": "STRIDE_SECONDS",
"type": "number",
"value": "180"
},
{
"description": "相邻时序窗口的重叠秒数",
"key": "OVERLAP_SECONDS",
"type": "number",
"value": "20"
},
{
"description": "真实视频采样率",
"key": "FPS",
"type": "number",
"value": "1"
},
{
"description": "每个窗口实际解码并输入模型的最大帧数(不超过 96)",
"key": "MAX_FRAMES",
"type": "number",
"value": "96"
},
{
"description": "跨重叠窗口同标签区间合并阈值",
"key": "MERGE_GAP_SECONDS",
"type": "number",
"value": "2"
},
{
"description": "验收 fixture 可设为 true;正常视频允许真实空结果",
"key": "REQUIRE_NON_EMPTY_RESULT",
"type": "boolean",
"value": "false"
},
{
"description": "模型生成上限",
"key": "MAX_NEW_TOKENS",
"type": "number",
"value": "512"
},
{
"description": "必填:22 类版本化 taxonomy JSON",
"key": "TAXONOMY_22_JSON",
"type": "json",
"value": ""
}
],
"id": "operator-builtin-qwen-temporal-localization",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:pending-build",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization@sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"inputs": [
{"id": "in-1", "name": "video", "type": "json", "transmission": "bus", "description": "真实已脱敏左相机视频或其 manifest"},
{"id": "validEvents", "name": "validEvents", "type": "json", "transmission": "bus", "description": "上游真实有效行为结果;用于串行 GPU 调度和时序定位上下文"}
{
"description": "真实已脱敏左相机视频或其 manifest",
"id": "in-1",
"name": "video",
"transmission": "bus",
"type": "json"
},
{
"description": "上游真实有效行为结果;用于串行 GPU 调度和时序定位上下文",
"id": "validEvents",
"name": "validEvents",
"transmission": "bus",
"type": "json"
}
],
"name": "Qwen3-VL 200秒时间区间定位(真实)",
"outputs": [{"id": "out-1", "name": "temporalPrelabels", "type": "json", "transmission": "bus", "description": "带模型/视频 provenance 的真实时序预标"}],
"publicationStatus": "draft",
"resources": {"cpuLimit": "4", "memoryLimit": "32Gi", "gpuLimit": "1", "gpuType": "NVIDIA A800 80GB"},
"outputs": [
{
"description": "带模型/视频 provenance 的真实时序预标",
"id": "out-1",
"name": "temporalPrelabels",
"transmission": "bus",
"type": "json"
}
],
"publicationStatus": "published",
"resources": {
"cpuLimit": "4",
"gpuLimit": "1",
"gpuType": "NVIDIA A800 80GB",
"memoryLimit": "32Gi"
},
"runtimeContract": {
"acceptance": {"allowsEmptyResultList": true, "forbidsFallback": true, "requiresArtifactChecksum": true, "requiresGpuEvidence": true, "requiresModelProvenance": true, "requiresNonEmptyManifest": true, "requiresNonEmptyOutput": false, "requiresRealFixture": true},
"artifacts": {"requiresChecksum": true, "requiresLineage": true, "requiresManifest": true},
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_qwen_temporal_localization",
"imagePolicy": {"allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, "independentFinalImage": true},
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-qwen-temporal-localization",
"operatorSlug": "qwen_temporal_localization",
"parameters": {"commandWrapperAllowed": false, "controlledScriptAllowed": false, "source": "hyperparams", "structured": true},
"resources": {"minGpuCount": 1, "recommendedGpuType": "NVIDIA A800 80GB", "requiresGpu": true},
"runtimeDependencies": ["qwen3-vl-8b-instruct", "transformers", "torch-cuda", "opencv", "real-video-files"],
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeHandler": "builtin_qwen_temporal_localization",
@ -12364,40 +12492,164 @@
"type": "builtin"
},
{
"acceptance": {"hardcodedOutputAccepted": false, "mockOnlyAccepted": false, "requiresGpuEvidence": true, "requiresNonEmptyProvenance": true, "requiresRealInputs": true, "shallowOnlyAccepted": false, "simulationOnlyAccepted": false},
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"requiresGpuEvidence": true,
"requiresNonEmptyProvenance": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": ["python", "/app/backend/operator-runner/main.py"],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"description": "保留 WiLoR 需求链中的有效行为检测节点名称以兼容工作流;实际使用真实 Qwen3-VL 零样本视频推理定位有效店内行为,不调用或冒充 WiLoR hand-pose inference。真实推理可返回空 events,但仍必须输出带完整 provenance 的非空 manifest。",
"hyperparams": [
{"key": "MODEL_PATH", "value": "/workspace/models/Qwen3-VL-8B-Instruct", "description": "只读的本地 Qwen3-VL-8B-Instruct 快照目录", "type": "string"},
{"key": "MODEL_REVISION", "value": "0c351dd01ed87e9c1b53cbc748cba10e6187ff3b", "description": "锁定的 Qwen3-VL-8B-Instruct revision", "type": "string"},
{"key": "MODEL_MANIFEST_PATH", "value": "/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json", "description": "逐 shard SHA/大小均经过校验的模型 manifest", "type": "string"},
{"key": "WINDOW_SECONDS", "value": "5", "description": "有效行为判断窗口秒数", "type": "number"},
{"key": "STRIDE_SECONDS", "value": "5", "description": "有效行为窗口步长", "type": "number"},
{"key": "FPS", "value": "1", "description": "每 5 秒窗口的真实视频采样率", "type": "number"},
{"key": "MAX_FRAMES", "value": "5", "description": "每个 5 秒窗口实际解码帧数上限", "type": "number"},
{"key": "MIN_EVENT_OVERLAP", "value": "0.5", "description": "保留有效行为的正重叠语义阈值", "type": "number"},
{"key": "MERGE_GAP_SECONDS", "value": "0", "description": "相邻正事件窗口合并阈值", "type": "number"},
{"key": "REQUIRE_NON_EMPTY_RESULT", "value": "false", "description": "验收 fixture 可设为 true;正常视频允许真实 0 结果", "type": "boolean"},
{"key": "MAX_NEW_TOKENS", "value": "256", "description": "模型生成上限", "type": "number"}
{
"description": "只读的本地 Qwen3-VL-8B-Instruct 快照目录",
"key": "MODEL_PATH",
"type": "string",
"value": "/workspace/models/Qwen3-VL-8B-Instruct"
},
{
"description": "锁定的 Qwen3-VL-8B-Instruct revision",
"key": "MODEL_REVISION",
"type": "string",
"value": "0c351dd01ed87e9c1b53cbc748cba10e6187ff3b"
},
{
"description": "逐 shard SHA/大小均经过校验的模型 manifest",
"key": "MODEL_MANIFEST_PATH",
"type": "string",
"value": "/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json"
},
{
"description": "有效行为判断窗口秒数",
"key": "WINDOW_SECONDS",
"type": "number",
"value": "5"
},
{
"description": "有效行为窗口步长",
"key": "STRIDE_SECONDS",
"type": "number",
"value": "5"
},
{
"description": "每 5 秒窗口的真实视频采样率",
"key": "FPS",
"type": "number",
"value": "1"
},
{
"description": "每个 5 秒窗口实际解码帧数上限",
"key": "MAX_FRAMES",
"type": "number",
"value": "5"
},
{
"description": "保留有效行为的正重叠语义阈值",
"key": "MIN_EVENT_OVERLAP",
"type": "number",
"value": "0.5"
},
{
"description": "相邻正事件窗口合并阈值",
"key": "MERGE_GAP_SECONDS",
"type": "number",
"value": "0"
},
{
"description": "验收 fixture 可设为 true;正常视频允许真实 0 结果",
"key": "REQUIRE_NON_EMPTY_RESULT",
"type": "boolean",
"value": "false"
},
{
"description": "模型生成上限",
"key": "MAX_NEW_TOKENS",
"type": "number",
"value": "256"
}
],
"id": "operator-builtin-wilor-valid-event-detection",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:pending-build",
"inputs": [{"id": "in-1", "name": "video", "type": "json", "transmission": "bus", "description": "真实已脱敏左相机视频或 manifest"}],
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection@sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"inputs": [
{
"description": "真实已脱敏左相机视频或 manifest",
"id": "in-1",
"name": "video",
"transmission": "bus",
"type": "json"
}
],
"name": "有效行为检测(真实 Qwen3-VL)",
"outputs": [{"id": "out-1", "name": "validEvents", "type": "json", "transmission": "bus", "description": "带真实 Qwen3-VL provenance 的有效行为区间"}],
"publicationStatus": "draft",
"resources": {"cpuLimit": "4", "memoryLimit": "32Gi", "gpuLimit": "1", "gpuType": "NVIDIA A800 80GB"},
"outputs": [
{
"description": "带真实 Qwen3-VL provenance 的有效行为区间",
"id": "out-1",
"name": "validEvents",
"transmission": "bus",
"type": "json"
}
],
"publicationStatus": "published",
"resources": {
"cpuLimit": "4",
"gpuLimit": "1",
"gpuType": "NVIDIA A800 80GB",
"memoryLimit": "32Gi"
},
"runtimeContract": {
"acceptance": {"allowsEmptyResultList": true, "forbidsFallback": true, "requiresArtifactChecksum": true, "requiresGpuEvidence": true, "requiresModelProvenance": true, "requiresNonEmptyManifest": true, "requiresNonEmptyOutput": false, "requiresRealFixture": true},
"artifacts": {"requiresChecksum": true, "requiresLineage": true, "requiresManifest": true},
"entrypoint": "/app/backend/operator-runner/main.py", "handler": "builtin_wilor_valid_event_detection",
"imagePolicy": {"allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, "independentFinalImage": true},
"operatorId": "operator-builtin-wilor-valid-event-detection", "operatorSlug": "wilor_valid_event_detection",
"parameters": {"commandWrapperAllowed": false, "controlledScriptAllowed": false, "source": "hyperparams", "structured": true},
"resources": {"minGpuCount": 1, "recommendedGpuType": "NVIDIA A800 80GB", "requiresGpu": true},
"runtimeDependencies": ["qwen3-vl-8b-instruct", "transformers", "torch-cuda", "opencv", "real-video-files"], "schemaVersion": "droboticflow.operator.runtime/v1"
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_wilor_valid_event_detection",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-wilor-valid-event-detection",
"operatorSlug": "wilor_valid_event_detection",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeHandler": "builtin_wilor_valid_event_detection",
"runtimeSource": "operator-repos/builtin/wilor_valid_event_detection/src/operator.py",
@ -12405,37 +12657,140 @@
"type": "builtin"
},
{
"acceptance": {"hardcodedOutputAccepted": false, "mockOnlyAccepted": false, "requiresRealInputs": true, "shallowOnlyAccepted": false, "simulationOnlyAccepted": false},
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "DATA",
"containerArgs": [],
"containerCommand": ["python", "/app/backend/operator-runner/main.py"],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"description": "将已通过最终验收的便利店切片、22 类语义真值和媒体引用导出为可供 ms-swift 真实 LoRA 训练的 JSONL;支持显式 accepted empty annotation 作为负样本,拒绝缺失标注语义或不可访问媒体。",
"hyperparams": [
{"key": "DATASET_NAME", "value": "fanyu-v5-accepted-22class", "description": "导出数据集名称", "type": "string"},
{"key": "EXPORT_MODE", "value": "classification", "description": "Qwen3-VL 22 类多标签训练样本格式", "type": "string"},
{"key": "WINDOW_SECONDS", "value": "200", "description": "训练裁片最长秒数", "type": "number"},
{"key": "STRIDE_SECONDS", "value": "180", "description": "长视频训练裁片步长", "type": "number"},
{"key": "TRAIN_RATIO", "value": "1.0", "description": "v5 真实一源 smoke 保证至少一个 train 样本", "type": "number"},
{"key": "VAL_RATIO", "value": "0", "description": "v5 smoke 验证集比例", "type": "number"},
{"key": "TEST_RATIO", "value": "0", "description": "v5 smoke 测试集比例", "type": "number"},
{"key": "REQUIRE_ACCEPTANCE", "value": "true", "description": "只接受最终验收确认后的标注", "type": "boolean"}
{
"description": "导出数据集名称",
"key": "DATASET_NAME",
"type": "string",
"value": "fanyu-v5-accepted-22class"
},
{
"description": "Qwen3-VL 22 类多标签训练样本格式",
"key": "EXPORT_MODE",
"type": "string",
"value": "classification"
},
{
"description": "训练裁片最长秒数",
"key": "WINDOW_SECONDS",
"type": "number",
"value": "200"
},
{
"description": "长视频训练裁片步长",
"key": "STRIDE_SECONDS",
"type": "number",
"value": "180"
},
{
"description": "v5 真实一源 smoke 保证至少一个 train 样本",
"key": "TRAIN_RATIO",
"type": "number",
"value": "1.0"
},
{
"description": "v5 smoke 验证集比例",
"key": "VAL_RATIO",
"type": "number",
"value": "0"
},
{
"description": "v5 smoke 测试集比例",
"key": "TEST_RATIO",
"type": "number",
"value": "0"
},
{
"description": "只接受最终验收确认后的标注",
"key": "REQUIRE_ACCEPTANCE",
"type": "boolean",
"value": "true"
}
],
"id": "operator-builtin-ms-swift-dataset-export",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:pending-build",
"inputs": [{"id": "in-1", "name": "acceptedAnnotations", "type": "json", "transmission": "bus", "description": "最终验收确认的注释/切片 manifest"}],
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"inputs": [
{
"description": "最终验收确认的注释/切片 manifest",
"id": "in-1",
"name": "acceptedAnnotations",
"transmission": "bus",
"type": "json"
}
],
"name": "ms-swift 已验收22类数据集导出",
"outputs": [{"id": "out-1", "name": "swiftDataset", "type": "json", "transmission": "bus", "description": "带输入/媒体哈希的真实 ms-swift JSONL manifest"}],
"publicationStatus": "draft",
"resources": {"cpuLimit": "2", "memoryLimit": "8Gi"},
"outputs": [
{
"description": "带输入/媒体哈希的真实 ms-swift JSONL manifest",
"id": "out-1",
"name": "swiftDataset",
"transmission": "bus",
"type": "json"
}
],
"publicationStatus": "published",
"resources": {
"cpuLimit": "2",
"memoryLimit": "8Gi"
},
"runtimeContract": {
"acceptance": {"allowsEmptyResultList": true, "forbidsFallback": true, "requiresArtifactChecksum": true, "requiresNonEmptyManifest": true, "requiresNonEmptyOutput": false, "requiresRealFixture": true},
"artifacts": {"requiresChecksum": true, "requiresLineage": true, "requiresManifest": true},
"entrypoint": "/app/backend/operator-runner/main.py", "handler": "builtin_ms_swift_dataset_export",
"imagePolicy": {"allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, "independentFinalImage": true},
"operatorId": "operator-builtin-ms-swift-dataset-export", "operatorSlug": "ms_swift_dataset_export",
"parameters": {"commandWrapperAllowed": false, "controlledScriptAllowed": false, "source": "hyperparams", "structured": true},
"resources": {"minGpuCount": 0, "recommendedGpuType": "", "requiresGpu": false},
"runtimeDependencies": ["jsonl", "accepted-annotation-revisions", "real-video-files"], "schemaVersion": "droboticflow.operator.runtime/v1"
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": false,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_ms_swift_dataset_export",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-ms-swift-dataset-export",
"operatorSlug": "ms_swift_dataset_export",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 0,
"recommendedGpuType": "",
"requiresGpu": false
},
"runtimeDependencies": [
"accepted-annotation-revisions",
"real-video-files",
"ffmpeg",
"jsonl"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeHandler": "builtin_ms_swift_dataset_export",
"runtimeSource": "operator-repos/builtin/ms_swift_dataset_export/src/operator.py",
@ -12443,42 +12798,176 @@
"type": "builtin"
},
{
"acceptance": {"hardcodedOutputAccepted": false, "mockOnlyAccepted": false, "requiresGpuEvidence": true, "requiresNonEmptyProvenance": true, "requiresRealInputs": true, "shallowOnlyAccepted": false, "simulationOnlyAccepted": false},
"acceptance": {
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"requiresGpuEvidence": true,
"requiresNonEmptyProvenance": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": ["python", "/app/backend/operator-runner/main.py"],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"description": "使用 ms-swift 对已验收的真实 22 类标注数据运行 Qwen3-VL LoRA 连续训练,必须产出 adapter、trainer state 和可复核 provenance。",
"hyperparams": [
{"key": "BASE_MODEL_PATH", "value": "/workspace/models/Qwen3-VL-8B-Instruct", "description": "只读的本地 Qwen3-VL-8B-Instruct 快照目录", "type": "string"},
{"key": "BASE_MODEL_REVISION", "value": "0c351dd01ed87e9c1b53cbc748cba10e6187ff3b", "description": "锁定的 Qwen3-VL-8B-Instruct revision", "type": "string"},
{"key": "MODEL_MANIFEST_PATH", "value": "/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json", "description": "逐 shard SHA/大小均经过校验的模型 manifest", "type": "string"},
{"key": "DATASET_JSONL", "value": "", "description": "可选明确的已验收 ms-swift JSONL;否则消费上游导出", "type": "string"},
{"key": "SWIFT_BIN", "value": "swift", "description": "镜像中的 ms-swift 命令", "type": "string"},
{"key": "EPOCHS", "value": "1", "description": "真实训练 epoch 数", "type": "number"},
{"key": "MAX_STEPS", "value": "1", "description": "真实 smoke 的最大训练 step", "type": "number"},
{"key": "BATCH_SIZE", "value": "1", "description": "训练 batch size", "type": "number"},
{"key": "LEARNING_RATE", "value": "0.00002", "description": "LoRA 学习率", "type": "number"},
{"key": "LORA_RANK", "value": "8", "description": "LoRA rank", "type": "number"}
,{"key": "TRAIN_TIMEOUT_SECONDS", "value": "3600", "description": "真实 swift sft 最长运行时间(最多 14400 秒)", "type": "number"}
,{"key": "MAX_LENGTH", "value": "8192", "description": "A800 smoke 最大 token 长度(仅在本地 swift 支持时启用)", "type": "number"}
,{"key": "MAX_VIDEO_FRAMES", "value": "96", "description": "A800 smoke 最大视频帧数(仅在本地 swift 支持时启用)", "type": "number"}
{
"description": "只读的本地 Qwen3-VL-8B-Instruct 快照目录",
"key": "BASE_MODEL_PATH",
"type": "string",
"value": "/workspace/models/Qwen3-VL-8B-Instruct"
},
{
"description": "锁定的 Qwen3-VL-8B-Instruct revision",
"key": "BASE_MODEL_REVISION",
"type": "string",
"value": "0c351dd01ed87e9c1b53cbc748cba10e6187ff3b"
},
{
"description": "逐 shard SHA/大小均经过校验的模型 manifest",
"key": "MODEL_MANIFEST_PATH",
"type": "string",
"value": "/workspace/models/Qwen3-VL-8B-Instruct/MODEL_MANIFEST.json"
},
{
"description": "可选明确的已验收 ms-swift JSONL;否则消费上游导出",
"key": "DATASET_JSONL",
"type": "string",
"value": ""
},
{
"description": "镜像中的 ms-swift 命令",
"key": "SWIFT_BIN",
"type": "string",
"value": "swift"
},
{
"description": "真实训练 epoch 数",
"key": "EPOCHS",
"type": "number",
"value": "1"
},
{
"description": "真实 smoke 的最大训练 step",
"key": "MAX_STEPS",
"type": "number",
"value": "1"
},
{
"description": "训练 batch size",
"key": "BATCH_SIZE",
"type": "number",
"value": "1"
},
{
"description": "LoRA 学习率",
"key": "LEARNING_RATE",
"type": "number",
"value": "0.00002"
},
{
"description": "LoRA rank",
"key": "LORA_RANK",
"type": "number",
"value": "8"
},
{
"description": "真实 swift sft 最长运行时间(最多 14400 秒)",
"key": "TRAIN_TIMEOUT_SECONDS",
"type": "number",
"value": "3600"
},
{
"description": "A800 smoke 最大 token 长度(仅在本地 swift 支持时启用)",
"key": "MAX_LENGTH",
"type": "number",
"value": "8192"
},
{
"description": "A800 smoke 最大视频帧数(仅在本地 swift 支持时启用)",
"key": "MAX_VIDEO_FRAMES",
"type": "number",
"value": "96"
}
],
"id": "operator-builtin-qwen-label-crop-classification",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:pending-build",
"inputs": [{"id": "in-1", "name": "acceptedDataset", "type": "json", "transmission": "bus", "description": "已验收 22 类 ms-swift 数据集 manifest"}],
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification@sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"inputs": [
{
"description": "已验收 22 类 ms-swift 数据集 manifest",
"id": "in-1",
"name": "acceptedDataset",
"transmission": "bus",
"type": "json"
}
],
"name": "Qwen3-VL 22类持续训练(真实 LoRA)",
"outputs": [{"id": "out-1", "name": "trainingReport", "type": "json", "transmission": "bus", "description": "真实 adapter、trainer state、metrics 和 provenance"}],
"publicationStatus": "draft",
"resources": {"cpuLimit": "4", "memoryLimit": "48Gi", "gpuLimit": "1", "gpuType": "NVIDIA A800 80GB"},
"outputs": [
{
"description": "真实 adapter、trainer state、metrics 和 provenance",
"id": "out-1",
"name": "trainingReport",
"transmission": "bus",
"type": "json"
}
],
"publicationStatus": "published",
"resources": {
"cpuLimit": "4",
"gpuLimit": "1",
"gpuType": "NVIDIA A800 80GB",
"memoryLimit": "48Gi"
},
"runtimeContract": {
"acceptance": {"allowsEmptyResultList": true, "forbidsFallback": true, "requiresArtifactChecksum": true, "requiresGpuEvidence": true, "requiresModelProvenance": true, "requiresNonEmptyManifest": true, "requiresNonEmptyOutput": false, "requiresRealFixture": true},
"artifacts": {"requiresChecksum": true, "requiresLineage": true, "requiresManifest": true},
"entrypoint": "/app/backend/operator-runner/main.py", "handler": "builtin_qwen_label_crop_classification",
"imagePolicy": {"allowsSharedBaseLayer": true, "forbidsSharedOperatorRunnerFinalImage": true, "independentFinalImage": true},
"operatorId": "operator-builtin-qwen-label-crop-classification", "operatorSlug": "qwen_label_crop_classification",
"parameters": {"commandWrapperAllowed": false, "controlledScriptAllowed": false, "source": "hyperparams", "structured": true},
"resources": {"minGpuCount": 1, "recommendedGpuType": "NVIDIA A800 80GB", "requiresGpu": true},
"runtimeDependencies": ["qwen3-vl-8b-instruct", "ms-swift", "peft", "torch-cuda", "accepted-annotation-dataset"], "schemaVersion": "droboticflow.operator.runtime/v1"
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_qwen_label_crop_classification",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-qwen-label-crop-classification",
"operatorSlug": "qwen_label_crop_classification",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",
"accepted-annotation-dataset"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeHandler": "builtin_qwen_label_crop_classification",
"runtimeSource": "operator-repos/builtin/qwen_label_crop_classification/src/operator.py",

View File

@ -1199,11 +1199,12 @@
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"dockerfile": "operator-repos/builtin/merge/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:bedd671-poc-fanyu-orbbec-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"operatorId": "operator-builtin-merge",
"operatorSlug": "merge",
"requiresGpu": false,
@ -1272,6 +1273,29 @@
"runtimeSource": "operator-repos/builtin/mongodb_write/src/operator.py",
"sourceRoot": "operator-repos/builtin/mongodb_write"
},
{
"baseImage": "${OPERATOR_BASE_IMAGE}",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"accepted-annotation-revisions",
"real-video-files",
"ffmpeg",
"jsonl"
],
"dockerfile": "operator-repos/builtin/ms_swift_dataset_export/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"operatorId": "operator-builtin-ms-swift-dataset-export",
"operatorSlug": "ms_swift_dataset_export",
"requiresGpu": false,
"runtimeHandler": "builtin_ms_swift_dataset_export",
"runtimeSource": "operator-repos/builtin/ms_swift_dataset_export/src/operator.py",
"sourceRoot": "operator-repos/builtin/ms_swift_dataset_export"
},
{
"baseImage": "${OPERATOR_GPU_BASE_IMAGE}",
"containerArgs": [],
@ -1346,11 +1370,16 @@
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"dockerfile": "operator-repos/builtin/package/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:6d6858c-poc-fanyu-v3-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"operatorId": "operator-builtin-package",
"operatorSlug": "package",
"requiresGpu": false,
@ -1424,6 +1453,56 @@
"runtimeSource": "operator-repos/builtin/pointcloud_summary/src/operator.py",
"sourceRoot": "operator-repos/builtin/pointcloud_summary"
},
{
"baseImage": "${OPERATOR_GPU_BASE_IMAGE}",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",
"accepted-annotation-dataset"
],
"dockerfile": "operator-repos/builtin/qwen_label_crop_classification/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification@sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"operatorId": "operator-builtin-qwen-label-crop-classification",
"operatorSlug": "qwen_label_crop_classification",
"requiresGpu": true,
"runtimeHandler": "builtin_qwen_label_crop_classification",
"runtimeSource": "operator-repos/builtin/qwen_label_crop_classification/src/operator.py",
"sourceRoot": "operator-repos/builtin/qwen_label_crop_classification"
},
{
"baseImage": "${OPERATOR_GPU_BASE_IMAGE}",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"dockerfile": "operator-repos/builtin/qwen_temporal_localization/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization@sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"operatorId": "operator-builtin-qwen-temporal-localization",
"operatorSlug": "qwen_temporal_localization",
"requiresGpu": true,
"runtimeHandler": "builtin_qwen_temporal_localization",
"runtimeSource": "operator-repos/builtin/qwen_temporal_localization/src/operator.py",
"sourceRoot": "operator-repos/builtin/qwen_temporal_localization"
},
{
"baseImage": "${OPERATOR_BASE_IMAGE}",
"containerArgs": [],
@ -1982,6 +2061,28 @@
"runtimeSource": "operator-repos/builtin/video_annotate/src/operator.py",
"sourceRoot": "operator-repos/builtin/video_annotate"
},
{
"baseImage": "${OPERATOR_BASE_IMAGE}",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"ffmpeg",
"opencv",
"video-files"
],
"dockerfile": "operator-repos/builtin/video_face_blur/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"operatorId": "operator-builtin-video-face-blur",
"operatorSlug": "video_face_blur",
"requiresGpu": false,
"runtimeHandler": "builtin_video_face_blur",
"runtimeSource": "operator-repos/builtin/video_face_blur/src/operator.py",
"sourceRoot": "operator-repos/builtin/video_face_blur"
},
{
"baseImage": "${OPERATOR_BASE_IMAGE}",
"containerArgs": [],
@ -2197,6 +2298,31 @@
"runtimeSource": "operator-repos/builtin/wilor_hand_pose/src/operator.py",
"sourceRoot": "operator-repos/builtin/wilor_hand_pose"
},
{
"baseImage": "${OPERATOR_GPU_BASE_IMAGE}",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"dependencyProfile": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"dockerfile": "operator-repos/builtin/wilor_valid_event_detection/Dockerfile",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection@sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"operatorId": "operator-builtin-wilor-valid-event-detection",
"operatorSlug": "wilor_valid_event_detection",
"requiresGpu": true,
"runtimeHandler": "builtin_wilor_valid_event_detection",
"runtimeSource": "operator-repos/builtin/wilor_valid_event_detection/src/operator.py",
"sourceRoot": "operator-repos/builtin/wilor_valid_event_detection"
},
{
"baseImage": "${OPERATOR_BASE_IMAGE}",
"containerArgs": [],

View File

@ -6,25 +6,25 @@
"verifiedAt": "",
"workflowId": ""
},
"builtAt": "2026-08-19T04:38:53Z",
"digest": "sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"environmentReleases": {
"poc": {
"digest": "sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:bedd671-poc-fanyu-orbbec-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"digest": "sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "bedd671-poc-fanyu-orbbec-20260819"
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:bedd671-poc-fanyu-orbbec-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"kanikoJob": "droboticflow-kaniko-op-merge-bedd671-poc-fanyu-orbbec-20260819",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"kanikoJob": "droboticflow-kaniko-op-merge-37f5804-poc-fanyu-v5-2026082019073",
"operatorId": "operator-builtin-merge",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "merge",
"sourceCommit": "bedd671f4954eef40fce2b006ab169b7b55e86af",
"sourceTreeSha256": "563e203c59ce7072fbac4dd4be6ae4d2f0d885f6418a5e603b39154fdebb721a",
"tag": "bedd671-poc-fanyu-orbbec-20260819"
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "feef5dfc13cc22ba65350165c772039ccc45e3461e5bbee9872b2b9dc1b8a450",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -19,8 +19,8 @@
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:bedd671-poc-fanyu-orbbec-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:e112776ea601f89d420fd61fc71ff4eaa333e06c2d9134df949f1d255d25ff5d",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-merge@sha256:6cd3b8eec4b6257c338cadcbca6f4ac9e8e951a25c4ffd0c3524c25d0ee13370",
"metadata": "operator.json",
"name": "数据合并",
"operatorId": "operator-builtin-merge",
@ -64,18 +64,20 @@
"requiresGpu": false
},
"runtimeDependencies": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"runtimeHandler": "builtin_merge",
"runtimeSource": "operator-repos/builtin/merge/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/merge",
"sourceTreeSha256": "563e203c59ce7072fbac4dd4be6ae4d2f0d885f6418a5e603b39154fdebb721a",
"sourceTreeSha256": "feef5dfc13cc22ba65350165c772039ccc45e3461e5bbee9872b2b9dc1b8a450",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -32,7 +32,8 @@
"requiresGpu": false
},
"runtimeDependencies": [
"json-artifacts"
"json-artifacts",
"bounded-upstream-manifests"
],
"runtimeSource": "src/operator.py",
"schemaVersion": "droboticflow.operator.runtime/v1",

View File

@ -6,25 +6,25 @@
"verifiedAt": "",
"workflowId": ""
},
"builtAt": "",
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"environmentReleases": {
"poc": {
"digest": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:builtin",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"digest": "sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "builtin"
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:builtin",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"kanikoJob": "",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"kanikoJob": "droboticflow-kaniko-op-ms-swift-dataset-export-37f5804-poc-fany",
"operatorId": "operator-builtin-ms-swift-dataset-export",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "ms_swift_dataset_export",
"sourceCommit": "316b493dba4d3d1a32366d43686656b36fd2d2a1",
"sourceTreeSha256": "db6c32cbbe8d5058148c695204ea0e4e24b5b5ecb784e2087c8a80173864616f",
"tag": "builtin"
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "343cffc7f4f381fd05ac98bff8d42911e19b42941aafe87990002970e4a28a65",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -19,8 +19,8 @@
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:builtin",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-ms-swift-dataset-export@sha256:1dcf99c913ecabb58d7c3f83f30a768937b1a1e9ddff41e377b75c5db546124c",
"metadata": "operator.json",
"name": "ms-swift SFT 数据集导出",
"operatorId": "operator-builtin-ms-swift-dataset-export",
@ -32,9 +32,12 @@
"repositoryId": "builtin/ms_swift_dataset_export",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": false,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
@ -64,17 +67,24 @@
"requiresGpu": false
},
"runtimeDependencies": [
"annotations-manifest-json"
"accepted-annotation-revisions",
"real-video-files",
"ffmpeg",
"jsonl"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"annotations-manifest-json"
"accepted-annotation-revisions",
"real-video-files",
"ffmpeg",
"jsonl"
],
"runtimeHandler": "builtin_ms_swift_dataset_export",
"runtimeSource": "operator-repos/builtin/ms_swift_dataset_export/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/ms_swift_dataset_export",
"sourceTreeSha256": "343cffc7f4f381fd05ac98bff8d42911e19b42941aafe87990002970e4a28a65",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -1,11 +1,13 @@
{
"acceptance": {
"allowsEmptyResultList": true,
"forbidsFallback": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": false,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
@ -33,9 +35,10 @@
"requiresGpu": false
},
"runtimeDependencies": [
"jsonl",
"accepted-annotation-revisions",
"real-video-files"
"real-video-files",
"ffmpeg",
"jsonl"
],
"runtimeSource": "src/operator.py",
"schemaVersion": "droboticflow.operator.runtime/v1",

View File

@ -6,25 +6,25 @@
"verifiedAt": "2026-08-19T12:53:30Z",
"workflowId": "workflow-3219b841fe7e97ea25e4ea9c60be30a4"
},
"builtAt": "2026-08-19T09:38:00Z",
"digest": "sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"environmentReleases": {
"poc": {
"digest": "sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:6d6858c-poc-fanyu-v3-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"digest": "sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "6d6858c-poc-fanyu-v3-20260819"
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:6d6858c-poc-fanyu-v3-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"kanikoJob": "df-build-op-package-6d6858c",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"kanikoJob": "droboticflow-kaniko-op-package-37f5804-poc-fanyu-v5-20260820190",
"operatorId": "operator-builtin-package",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "package",
"sourceCommit": "c28d5c7bef91c16b1c98bde083e1103f5814ef16",
"sourceTreeSha256": "b91d120ccd8daac2ff3ffe792c48ffc93ac60b56e84c2dfd671206f36668e126",
"tag": "6d6858c-poc-fanyu-v3-20260819"
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "982cf5ef0db0807bb5de145fd88204293fe84595b156c86db9a38a8390a32578",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -19,8 +19,8 @@
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:6d6858c-poc-fanyu-v3-20260819",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:6ec121e7a2d0b97a4230f687ce2f5ecdf9eae7535a4f5647d2ba4b0c27fcbaab",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-package@sha256:226c5827d5c4c81bfd975cd456858f2741b492ac02a8fd094db26a43ed1aa305",
"metadata": "operator.json",
"name": "成品打包",
"operatorId": "operator-builtin-package",
@ -64,18 +64,28 @@
"requiresGpu": false
},
"runtimeDependencies": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"runtimeHandler": "builtin_result_package",
"runtimeSource": "operator-repos/builtin/package/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/package",
"sourceTreeSha256": "b91d120ccd8daac2ff3ffe792c48ffc93ac60b56e84c2dfd671206f36668e126",
"sourceTreeSha256": "982cf5ef0db0807bb5de145fd88204293fe84595b156c86db9a38a8390a32578",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -32,7 +32,12 @@
"requiresGpu": false
},
"runtimeDependencies": [
"filesystem"
"ffmpeg",
"video-files",
"accepted-annotation-partitions",
"headpose-manifests",
"optional-handpose-manifests",
"qwen-training-provenance"
],
"runtimeSource": "src/operator.py",
"schemaVersion": "droboticflow.operator.runtime/v1",

View File

@ -0,0 +1,24 @@
{
"acceptance": {},
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"environmentReleases": {
"poc": {
"digest": "sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification@sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification@sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"kanikoJob": "droboticflow-kaniko-op-qwen-label-crop-class-efb9431a-37f5804-p",
"operatorId": "operator-builtin-qwen-label-crop-classification",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "qwen_label_crop_classification",
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "f2b2d6f0fd956d6d0d27e6bf31e435aba79e8e7a3a0616ed6b76b52a854305d6",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -0,0 +1,94 @@
{
"acceptance": {
"fixtureContract": "tests/acceptance/fixture_contract.json",
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresChainedWorkflow": true,
"requiresChineseWorkflowAcceptance": true,
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-label-crop-classification@sha256:87efd588a52d69c4ee24f0d6dfe9a844e807ca54a632486e926c56a839f65f22",
"metadata": "operator.json",
"name": "Qwen3-VL 标签裁片持续训练与多标签分类",
"operatorId": "operator-builtin-qwen-label-crop-classification",
"operatorSlug": "qwen_label_crop_classification",
"preferredSlug": "qwen_label_crop_classification",
"pythonImport": "operator-repos/builtin/qwen_label_crop_classification/src/operator.py:run",
"releaseManifest": "release.json",
"releaseSchemaVersion": "droboticflow.operator.release/v1",
"repositoryId": "builtin/qwen_label_crop_classification",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_qwen_label_crop_classification",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-qwen-label-crop-classification",
"operatorSlug": "qwen_label_crop_classification",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",
"accepted-annotation-dataset"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",
"accepted-annotation-dataset"
],
"runtimeHandler": "builtin_qwen_label_crop_classification",
"runtimeSource": "operator-repos/builtin/qwen_label_crop_classification/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/qwen_label_crop_classification",
"sourceTreeSha256": "f2b2d6f0fd956d6d0d27e6bf31e435aba79e8e7a3a0616ed6b76b52a854305d6",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -1,13 +1,13 @@
{
"acceptance": {
"allowsEmptyResultList": true,
"forbidsFallback": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresModelProvenance": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
@ -36,6 +36,7 @@
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"ms-swift",
"peft",
"torch-cuda",

View File

@ -0,0 +1,24 @@
{
"acceptance": {},
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"environmentReleases": {
"poc": {
"digest": "sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization@sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization@sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"kanikoJob": "droboticflow-kaniko-op-qwen-temporal-localiz-80a40b48-37f5804-p",
"operatorId": "operator-builtin-qwen-temporal-localization",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "qwen_temporal_localization",
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "3beac475fca84cd9417ca948c6de81bbd0574fa9997522faf0b3952c2347c52e",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -0,0 +1,94 @@
{
"acceptance": {
"fixtureContract": "tests/acceptance/fixture_contract.json",
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresChainedWorkflow": true,
"requiresChineseWorkflowAcceptance": true,
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-qwen-temporal-localization@sha256:23726d80f4cd5e71622d69f889a70e369c894f106ca279ec021e8d59f1bdeb41",
"metadata": "operator.json",
"name": "Qwen3-VL 200秒时间区间定位",
"operatorId": "operator-builtin-qwen-temporal-localization",
"operatorSlug": "qwen_temporal_localization",
"preferredSlug": "qwen_temporal_localization",
"pythonImport": "operator-repos/builtin/qwen_temporal_localization/src/operator.py:run",
"releaseManifest": "release.json",
"releaseSchemaVersion": "droboticflow.operator.release/v1",
"repositoryId": "builtin/qwen_temporal_localization",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_qwen_temporal_localization",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-qwen-temporal-localization",
"operatorSlug": "qwen_temporal_localization",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"runtimeHandler": "builtin_qwen_temporal_localization",
"runtimeSource": "operator-repos/builtin/qwen_temporal_localization/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/qwen_temporal_localization",
"sourceTreeSha256": "3beac475fca84cd9417ca948c6de81bbd0574fa9997522faf0b3952c2347c52e",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -1,13 +1,13 @@
{
"acceptance": {
"allowsEmptyResultList": true,
"forbidsFallback": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresModelProvenance": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
@ -36,9 +36,10 @@
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"transformers",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"runtimeSource": "src/operator.py",

View File

@ -0,0 +1,24 @@
{
"acceptance": {},
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"environmentReleases": {
"poc": {
"digest": "sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"kanikoJob": "droboticflow-kaniko-op-video-face-blur-37f5804-poc-fanyu-v5-202",
"operatorId": "operator-builtin-video-face-blur",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "video_face_blur",
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "9da7f039e698e8d8b5e52261ea6916c83e84e94cfcd4055282ac284a8ff4253c",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -0,0 +1,85 @@
{
"acceptance": {
"fixtureContract": "tests/acceptance/fixture_contract.json",
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresChainedWorkflow": true,
"requiresChineseWorkflowAcceptance": true,
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "VIDEO",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-video-face-blur@sha256:b47eaf73679d3b95cb4cbb33b47576c121d2cea873fd4a17ee8bdcc1b2b6814e",
"metadata": "operator.json",
"name": "视频人脸脱敏",
"operatorId": "operator-builtin-video-face-blur",
"operatorSlug": "video_face_blur",
"preferredSlug": "video_face_blur",
"pythonImport": "operator-repos/builtin/video_face_blur/src/operator.py:run",
"releaseManifest": "release.json",
"releaseSchemaVersion": "droboticflow.operator.release/v1",
"repositoryId": "builtin/video_face_blur",
"runtimeContract": {
"acceptance": {
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_video_face_blur",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-video-face-blur",
"operatorSlug": "video_face_blur",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 0,
"recommendedGpuType": "",
"requiresGpu": false
},
"runtimeDependencies": [
"ffmpeg",
"opencv",
"video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"ffmpeg",
"opencv",
"video-files"
],
"runtimeHandler": "builtin_video_face_blur",
"runtimeSource": "operator-repos/builtin/video_face_blur/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/video_face_blur",
"sourceTreeSha256": "9da7f039e698e8d8b5e52261ea6916c83e84e94cfcd4055282ac284a8ff4253c",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -0,0 +1,24 @@
{
"acceptance": {},
"builtAt": "2026-08-20T11:42:28Z",
"digest": "sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"environmentReleases": {
"poc": {
"digest": "sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection@sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}
},
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection@sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"kanikoJob": "droboticflow-kaniko-op-wilor-valid-event-det-c984445f-37f5804-p",
"operatorId": "operator-builtin-wilor-valid-event-detection",
"registry": "ccr-29eug8s3-pub.cnc.bj.baidubce.com",
"schemaVersion": "droboticflow.operator.release/v1",
"slug": "wilor_valid_event_detection",
"sourceCommit": "37f58045104ec54fcdaa0b3e52514d61f5961fe6",
"sourceTreeSha256": "81ae4ff7b8a9627ce3e51e65729d6d7d9ab42f7c7d642ef2ca865961900223e7",
"tag": "37f5804-poc-fanyu-v5-20260820190730"
}

View File

@ -0,0 +1,94 @@
{
"acceptance": {
"fixtureContract": "tests/acceptance/fixture_contract.json",
"hardcodedOutputAccepted": false,
"mockOnlyAccepted": false,
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
"requiresChainedWorkflow": true,
"requiresChineseWorkflowAcceptance": true,
"requiresPersistentWorkspaceEvidence": true,
"requiresRealInputs": true,
"shallowOnlyAccepted": false,
"simulationOnlyAccepted": false
},
"category": "AI",
"containerArgs": [],
"containerCommand": [
"python",
"/app/backend/operator-runner/main.py"
],
"containerEntrypoint": "backend/operator-runner/main.py",
"entrypoint": "src/operator.py",
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection:37f5804-poc-fanyu-v5-20260820190730",
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-valid-event-detection@sha256:73415ac23d21b89dce646af621bc40afd9ed696486bbcaccfd412667fc94fcf8",
"metadata": "operator.json",
"name": "WiLoR需求链有效行为检测(Qwen3-VL)",
"operatorId": "operator-builtin-wilor-valid-event-detection",
"operatorSlug": "wilor_valid_event_detection",
"preferredSlug": "wilor_valid_event_detection",
"pythonImport": "operator-repos/builtin/wilor_valid_event_detection/src/operator.py:run",
"releaseManifest": "release.json",
"releaseSchemaVersion": "droboticflow.operator.release/v1",
"repositoryId": "builtin/wilor_valid_event_detection",
"runtimeContract": {
"acceptance": {
"allowsEmptyResultList": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
"requiresLineage": true,
"requiresManifest": true
},
"entrypoint": "/app/backend/operator-runner/main.py",
"handler": "builtin_wilor_valid_event_detection",
"imagePolicy": {
"allowsSharedBaseLayer": true,
"forbidsSharedOperatorRunnerFinalImage": true,
"independentFinalImage": true
},
"operatorId": "operator-builtin-wilor-valid-event-detection",
"operatorSlug": "wilor_valid_event_detection",
"parameters": {
"commandWrapperAllowed": false,
"controlledScriptAllowed": false,
"source": "hyperparams",
"structured": true
},
"resources": {
"minGpuCount": 1,
"recommendedGpuType": "NVIDIA A800 80GB",
"requiresGpu": true
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"schemaVersion": "droboticflow.operator.runtime/v1"
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"runtimeHandler": "builtin_wilor_valid_event_detection",
"runtimeSource": "operator-repos/builtin/wilor_valid_event_detection/src/operator.py",
"schemaVersion": "droboticflow.operator.repository/v1",
"sourceRoot": "operator-repos/builtin/wilor_valid_event_detection",
"sourceTreeSha256": "81ae4ff7b8a9627ce3e51e65729d6d7d9ab42f7c7d642ef2ca865961900223e7",
"strictPocAcceptanceExternals": [],
"type": "builtin"
}

View File

@ -1,13 +1,13 @@
{
"acceptance": {
"allowsEmptyResultList": true,
"forbidsFallback": true,
"requiresArtifactChecksum": true,
"requiresFixtureChecksum": true,
"requiresGpuEvidence": true,
"requiresModelProvenance": true,
"requiresNonEmptyManifest": true,
"requiresNonEmptyOutput": false,
"requiresRealFixture": true
"requiresRealFixture": true,
"requiresWorkflowTransfer": true
},
"artifacts": {
"requiresChecksum": true,
@ -36,9 +36,10 @@
},
"runtimeDependencies": [
"qwen3-vl-8b-instruct",
"transformers",
"verified-local-model-manifest",
"torch-cuda",
"opencv",
"qwen-vl-utils",
"real-video-files"
],
"runtimeSource": "src/operator.py",

View File

@ -89,10 +89,10 @@ validate_boolean POC_KANIKO_CLEAN_CONTEXT "$POC_KANIKO_CLEAN_CONTEXT"
validate_boolean POC_KANIKO_BUILD_OPERATORS "$POC_KANIKO_BUILD_OPERATORS"
validate_boolean POC_KANIKO_BUILD_OPERATOR_BASES "$POC_KANIKO_BUILD_OPERATOR_BASES"
case "$POC_KANIKO_CONTEXT_SOURCE" in
worktree|head|git)
worktree|head|git|existing)
;;
*)
echo "ERROR: POC_KANIKO_CONTEXT_SOURCE must be worktree, head, or git." >&2
echo "ERROR: POC_KANIKO_CONTEXT_SOURCE must be worktree, head, git, or existing." >&2
exit 1
;;
esac
@ -459,7 +459,16 @@ cleanup_context() {
}
trap cleanup_context EXIT
if [[ "$POC_KANIKO_CONTEXT_SOURCE" != "git" ]]; then
if [[ "$POC_KANIKO_CONTEXT_SOURCE" == "existing" ]]; then
api_pod="$POC_KANIKO_CONTEXT_POD"
if [[ -z "$api_pod" ]]; then
api_pod="$(kubectl -n "$K8S_NAMESPACE" get pod -l app=droboticflow-api --field-selector=status.phase=Running -o jsonpath='{.items[0].metadata.name}')"
fi
if [[ -z "$api_pod" ]] || ! kubectl -n "$K8S_NAMESPACE" exec "$api_pod" -- test -f "$CONTEXT_DIR/Dockerfile.api"; then
echo "ERROR: existing Kaniko context is missing or unreadable: $CONTEXT_DIR" >&2
exit 1
fi
elif [[ "$POC_KANIKO_CONTEXT_SOURCE" != "git" ]]; then
api_pod="$POC_KANIKO_CONTEXT_POD"
if [[ -z "$api_pod" ]]; then
api_pod="$(kubectl -n "$K8S_NAMESPACE" get pod -l app=droboticflow-api --field-selector=status.phase=Running -o jsonpath='{.items[0].metadata.name}')"

View File

@ -0,0 +1,332 @@
#!/usr/bin/env python3
"""Build a deterministic, secret-free Fanyu v5 S100 edge deployment bundle."""
from __future__ import annotations
import argparse
import gzip
import hashlib
import io
import json
import os
import re
import shutil
import struct
import subprocess
import sys
import tarfile
from pathlib import Path
from urllib.parse import urlparse
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / "scripts"))
from verify_qwen3vl_model_manifest import REVISION, verify as verify_qwen_manifest
from operator_release_manifest import source_tree_sha256
REQUIRED_IMAGES = {
"FANYU_IMAGE_MERGE",
"FANYU_IMAGE_PACKAGE",
"FANYU_IMAGE_VIDEO_FACE_BLUR",
"FANYU_IMAGE_QWEN_TEMPORAL",
"FANYU_IMAGE_QWEN_VALID_EVENT",
"FANYU_IMAGE_MS_SWIFT_EXPORT",
"FANYU_IMAGE_QWEN_TRAIN",
}
IMAGE_TO_OPERATOR = {
"FANYU_IMAGE_MERGE": "merge",
"FANYU_IMAGE_PACKAGE": "package",
"FANYU_IMAGE_VIDEO_FACE_BLUR": "video_face_blur",
"FANYU_IMAGE_QWEN_TEMPORAL": "qwen_temporal_localization",
"FANYU_IMAGE_QWEN_VALID_EVENT": "wilor_valid_event_detection",
"FANYU_IMAGE_MS_SWIFT_EXPORT": "ms_swift_dataset_export",
"FANYU_IMAGE_QWEN_TRAIN": "qwen_label_crop_classification",
}
REQUIRED_VALUES = {
"FANYU_S100_MODE",
"FANYU_REMOTE_API_BASE_URL",
"FANYU_REMOTE_BOS_ENDPOINT",
"FANYU_V5_ANNOTATION_WORKGROUP_ID",
"FANYU_HEADPOSE_API_BASE_URL",
"FANYU_HEADPOSE_SERVICE_IMAGE_ID",
"FANYU_HEADPOSE_MODEL_SHA256",
"FANYU_HEADPOSE_LICENSE_ID",
"FANYU_KUBECONFIG_CONTEXT",
"FANYU_MONGO_URI_REF",
"FANYU_BOS_CONNECTION_REF",
"FANYU_WORKSPACE_PVC",
"FANYU_QWEN_MODEL_PVC",
"FANYU_QWEN_MODEL_ROOT",
"FANYU_QWEN_MODEL_MANIFEST_SHA256",
"FANYU_NODE_ARCH",
"FANYU_V5_IMAGE_ARCH",
"FANYU_DROSYNC_PLATFORM",
"FANYU_DROSYNC_DEB_SHA256",
"FANYU_DROSYNC_PORTABLE_SHA256",
*REQUIRED_IMAGES,
}
_COMMIT = re.compile(r"^[a-f0-9]{40}$")
_SHA256 = re.compile(r"^[a-f0-9]{64}$")
def parse_values(path: Path) -> dict[str, str]:
values: dict[str, str] = {}
for raw in path.read_text(encoding="utf-8").splitlines():
line = raw.strip()
if not line or line.startswith("#"):
continue
key, separator, value = line.partition("=")
if not separator or not key.strip():
raise RuntimeError(f"invalid values line: {raw}")
values[key.strip()] = value.strip()
return values
def _ar_entries(path: Path) -> dict[str, bytes]:
payload = path.read_bytes()
if not payload.startswith(b"!<arch>\n"):
raise RuntimeError("drosync DEB is not an ar archive")
entries: dict[str, bytes] = {}
offset = 8
while offset < len(payload):
header = payload[offset : offset + 60]
if len(header) != 60 or header[58:60] != b"`\n":
raise RuntimeError("drosync DEB has an invalid ar member header")
name = header[:16].decode("ascii", errors="strict").strip().rstrip("/")
try:
size = int(header[48:58].decode("ascii").strip())
except ValueError as exc:
raise RuntimeError("drosync DEB has an invalid ar member size") from exc
start = offset + 60
end = start + size
if end > len(payload):
raise RuntimeError("drosync DEB has a truncated ar member")
entries[name] = payload[start:end]
offset = end + (size % 2)
return entries
def _tar_member_bytes(archive: tarfile.TarFile, suffix: str) -> bytes:
matches = [member for member in archive.getmembers() if member.isfile() and member.name.endswith(suffix)]
if len(matches) != 1:
raise RuntimeError(f"edge artifact must contain exactly one {suffix}")
handle = archive.extractfile(matches[0])
if handle is None:
raise RuntimeError(f"cannot read {suffix} from edge artifact")
return handle.read()
def _require_aarch64_elf(payload: bytes, label: str) -> None:
if len(payload) < 20 or payload[:4] != b"\x7fELF" or payload[4] != 2 or payload[5] != 1:
raise RuntimeError(f"{label} must be a little-endian ELF64 binary")
if struct.unpack("<H", payload[18:20])[0] != 183:
raise RuntimeError(f"{label} must target AArch64")
def verify_drosync_artifacts(deb: Path, portable: Path, values: dict[str, str]) -> None:
if values["FANYU_DROSYNC_PLATFORM"] != "linux-arm64":
raise RuntimeError("FANYU_DROSYNC_PLATFORM must be linux-arm64")
for path, key in ((deb, "FANYU_DROSYNC_DEB_SHA256"), (portable, "FANYU_DROSYNC_PORTABLE_SHA256")):
if not path.is_file() or path.stat().st_size <= 0:
raise RuntimeError(f"missing drosync edge artifact: {path}")
expected = values[key].lower()
if not _SHA256.fullmatch(expected) or sha256(path) != expected:
raise RuntimeError(f"{key} does not verify {path.name}")
entries = _ar_entries(deb)
control_name = next((name for name in entries if name.startswith("control.tar")), "")
data_name = next((name for name in entries if name.startswith("data.tar")), "")
if not control_name or not data_name:
raise RuntimeError("drosync DEB must contain control and data archives")
with tarfile.open(fileobj=io.BytesIO(entries[control_name]), mode="r:*") as control_archive:
control = _tar_member_bytes(control_archive, "/control").decode("utf-8")
fields = dict(line.split(":", 1) for line in control.splitlines() if ":" in line)
if fields.get("Architecture", "").strip() != "arm64":
raise RuntimeError("drosync DEB Architecture must be arm64")
with tarfile.open(fileobj=io.BytesIO(entries[data_name]), mode="r:*") as data_archive:
names = [member.name for member in data_archive.getmembers()]
if any("drosync-gui" in name for name in names):
raise RuntimeError("headless S100 DEB must not contain drosync-gui")
_require_aarch64_elf(_tar_member_bytes(data_archive, "/drosync"), "DEB drosync")
_require_aarch64_elf(_tar_member_bytes(data_archive, "/drosync-daemon"), "DEB drosync-daemon")
with tarfile.open(portable, mode="r:gz") as portable_archive:
names = [member.name for member in portable_archive.getmembers()]
required_suffixes = ("/drosync", "/drosync-daemon", "/drosync-portable.service", "/install-systemd-portable.sh")
if any(not any(name.endswith(suffix) for name in names) for suffix in required_suffixes):
raise RuntimeError("portable drosync bundle is missing binaries or systemd installer")
if any("drosync-gui" in name for name in names):
raise RuntimeError("headless S100 portable bundle must not contain drosync-gui")
_require_aarch64_elf(_tar_member_bytes(portable_archive, "/drosync"), "portable drosync")
_require_aarch64_elf(_tar_member_bytes(portable_archive, "/drosync-daemon"), "portable drosync-daemon")
def current_source_commit(explicit: str) -> str:
value = explicit.strip()
if not value:
value = subprocess.run(
["git", "rev-parse", "HEAD"], cwd=ROOT, check=True, capture_output=True, text=True
).stdout.strip()
if not _COMMIT.fullmatch(value):
raise RuntimeError("--source-commit must be a full 40-character Git commit")
return value
def validate(
values: dict[str, str],
*,
verify_model: bool,
verified_model_manifest_sha256: str,
deb: Path,
portable: Path,
) -> str:
missing = sorted(key for key in REQUIRED_VALUES if not values.get(key, "").strip())
if missing:
raise RuntimeError("missing required S100 values: " + ", ".join(missing))
if values["FANYU_S100_MODE"] != "edge_remote":
raise RuntimeError("only FANYU_S100_MODE=edge_remote is deployable on ARM64 S100; full_local is fail-closed")
if values["FANYU_NODE_ARCH"].lower() not in {"aarch64", "arm64"} or values["FANYU_V5_IMAGE_ARCH"].lower() not in {"amd64", "x86_64"}:
raise RuntimeError("S100 must be ARM64 edge while the external control-plane images remain x86_64/amd64")
verify_drosync_artifacts(deb, portable, values)
for key in ("FANYU_REMOTE_API_BASE_URL", "FANYU_REMOTE_BOS_ENDPOINT", "FANYU_HEADPOSE_API_BASE_URL"):
parsed = urlparse(values[key])
if parsed.scheme not in {"http", "https"} or not parsed.netloc:
raise RuntimeError(f"{key} must be an absolute HTTP(S) URL")
for key in REQUIRED_IMAGES | {"FANYU_HEADPOSE_SERVICE_IMAGE_ID"}:
if "@sha256:" not in values[key] or len(values[key].rsplit("@sha256:", 1)[1]) != 64:
raise RuntimeError(f"{key} must be digest-pinned")
if values.get("FANYU_QWEN_MODEL_REVISION", REVISION) != REVISION:
raise RuntimeError("FANYU_QWEN_MODEL_REVISION must match the pinned Qwen3-VL revision")
expected_model_sha = values["FANYU_QWEN_MODEL_MANIFEST_SHA256"].lower()
if not _SHA256.fullmatch(expected_model_sha):
raise RuntimeError("FANYU_QWEN_MODEL_MANIFEST_SHA256 must be a SHA-256 digest")
if verify_model:
supplied = verified_model_manifest_sha256.strip().lower()
if supplied:
if not _SHA256.fullmatch(supplied) or supplied != expected_model_sha:
raise RuntimeError("verified model manifest SHA-256 does not match values.env")
return supplied
verified = verify_qwen_manifest(Path(values["FANYU_QWEN_MODEL_ROOT"]))
if verified != expected_model_sha:
raise RuntimeError("local Qwen manifest SHA-256 does not match values.env")
return verified
return "model-verification-skipped-by-explicit-test-flag"
def sha256(path: Path) -> str:
digest = hashlib.sha256()
with path.open("rb") as handle:
for block in iter(lambda: handle.read(1024 * 1024), b""):
digest.update(block)
return digest.hexdigest()
def copy(source: Path, destination: Path) -> None:
destination.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(source, destination)
def build(output: Path, values: dict[str, str], model_manifest_sha: str, deb: Path, portable: Path, source_commit: str) -> Path:
bundle = output / "fanyu-v5-s100-edge-bundle"
if bundle.exists():
shutil.rmtree(bundle)
bundle.mkdir(parents=True)
files = [
"deploy/fanyu-v5-s100/README.md",
"deploy/fanyu-v5-s100/ARCHITECTURE.md",
"docs/fanyu-v5-workflow.md",
"docs/drosync/installation.md",
"scripts/s100_edge_preflight.sh",
"scripts/verify_qwen3vl_model_manifest.py",
"tools/drosync/packaging/linux/PORTABLE-SYSTEMD-README.md",
"internal/api/builtin_operators_catalog.json",
]
for relative in files:
copy(ROOT / relative, bundle / relative)
release_dir = bundle / "operator-releases"
release_dir.mkdir()
for value_key, slug in sorted(IMAGE_TO_OPERATOR.items()):
image_id = values[value_key]
image = image_id.split("@sha256:", 1)[0]
digest = "sha256:" + image_id.rsplit("@sha256:", 1)[1]
release = {
"schemaVersion": "droboticflow.operator.release/v1",
"operatorId": "operator-builtin-" + slug.replace("_", "-"),
"slug": slug,
"sourceCommit": source_commit,
"sourceTreeSha256": source_tree_sha256(slug),
"image": image,
"imageId": image_id,
"digest": digest,
"environmentReleases": {"s100-edge": {"image": image, "imageId": image_id, "digest": digest}},
"acceptance": {"projectId": "", "workflowId": "", "runId": "", "artifactId": "", "verifiedAt": ""},
}
target = release_dir / slug / "release.json"
target.parent.mkdir(parents=True)
target.write_text(json.dumps(release, indent=2, sort_keys=True) + "\n", encoding="utf-8")
overrides = {
"schemaVersion": "droboticflow.fanyu-v5.s100-edge/v1",
"mode": "edge_remote",
"nodeArchitecture": values["FANYU_NODE_ARCH"],
"controlPlaneImageArchitecture": values["FANYU_V5_IMAGE_ARCH"],
"qwenModelRevision": values.get("FANYU_QWEN_MODEL_REVISION", REVISION),
"qwenModelManifestSha256": model_manifest_sha,
"sourceCommit": source_commit,
"drosync": {
"platform": values["FANYU_DROSYNC_PLATFORM"],
"deb": {"file": deb.name, "sha256": values["FANYU_DROSYNC_DEB_SHA256"]},
"portable": {"file": portable.name, "sha256": values["FANYU_DROSYNC_PORTABLE_SHA256"]},
},
"imageReleases": {key: values[key] for key in sorted(REQUIRED_IMAGES | {"FANYU_HEADPOSE_SERVICE_IMAGE_ID"})},
"externalReferences": {key: values[key] for key in sorted(REQUIRED_VALUES - REQUIRED_IMAGES - {"FANYU_HEADPOSE_SERVICE_IMAGE_ID"}) if key not in {"FANYU_QWEN_MODEL_ROOT"}},
}
(bundle / "operator-release-overrides.json").write_text(json.dumps(overrides, indent=2, sort_keys=True) + "\n", encoding="utf-8")
copy(deb, bundle / "edge-artifacts" / deb.name)
copy(portable, bundle / "edge-artifacts" / portable.name)
checksums = []
for path in sorted(candidate for candidate in bundle.rglob("*") if candidate.is_file()):
checksums.append(f"{sha256(path)} {path.relative_to(bundle).as_posix()}")
(bundle / "SHA256SUMS").write_text("\n".join(checksums) + "\n", encoding="utf-8")
archive = output / "fanyu-v5-s100-edge-bundle.tar.gz"
if archive.exists():
archive.unlink()
with archive.open("wb") as raw_archive:
with gzip.GzipFile(filename="", mode="wb", fileobj=raw_archive, mtime=0) as compressed:
with tarfile.open(fileobj=compressed, mode="w", format=tarfile.GNU_FORMAT) as handle:
for path in sorted(candidate for candidate in bundle.rglob("*") if candidate.is_file()):
info = handle.gettarinfo(str(path), arcname=(Path(bundle.name) / path.relative_to(bundle)).as_posix())
info.uid = 0
info.gid = 0
info.uname = ""
info.gname = ""
info.mtime = 0
with path.open("rb") as source:
handle.addfile(info, source)
(archive.with_suffix(archive.suffix + ".sha256")).write_text(f"{sha256(archive)} {archive.name}\n", encoding="utf-8")
return bundle
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--values", required=True, type=Path)
parser.add_argument("--output-dir", required=True, type=Path)
parser.add_argument("--drosync-deb", required=True, type=Path)
parser.add_argument("--drosync-portable", required=True, type=Path)
parser.add_argument("--source-commit", default="")
parser.add_argument("--verified-model-manifest-sha256", default="", help="digest from an independently verified remote preload Job")
parser.add_argument("--skip-model-verification", action="store_true", help="test-only; production bundle must verify the local model manifest")
args = parser.parse_args()
values = parse_values(args.values)
source_commit = current_source_commit(args.source_commit)
manifest_sha = validate(
values,
verify_model=not args.skip_model_verification,
verified_model_manifest_sha256=args.verified_model_manifest_sha256,
deb=args.drosync_deb,
portable=args.drosync_portable,
)
bundle = build(args.output_dir, values, manifest_sha, args.drosync_deb, args.drosync_portable, source_commit)
print(bundle)
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@ -15,6 +15,7 @@ from operator_release_manifest import load_release, release_image_reference, sou
CATALOG_PATH = ROOT / "internal" / "api" / "builtin_operators_catalog.json"
OPERATOR_ROOT = ROOT / "backend" / "operators" / "builtin"
OPERATOR_REPO_ROOT = ROOT / "operator-repos" / "builtin"
UNMIGRATED_HISTORICAL_REPOSITORIES = {"temporal_causal_eval"}
RUNTIME_DEPENDENCIES: dict[str, list[str]] = {
"action_state_quality_validate": ["json-jsonl-parquet-files", "pyarrow"],
@ -202,6 +203,8 @@ def expected_manifests() -> dict[pathlib.Path, dict[str, Any]]:
manifests: dict[pathlib.Path, dict[str, Any]] = {}
split_operator_ids: set[str] = set()
for metadata_path in sorted(OPERATOR_REPO_ROOT.glob("*/operator.json")):
if metadata_path.parent.name in UNMIGRATED_HISTORICAL_REPOSITORIES:
continue
metadata = load_json(metadata_path)
operator_id = metadata["id"]
if operator_id not in catalog_items:

View File

@ -14,6 +14,7 @@ from typing import Any
ROOT = pathlib.Path(__file__).resolve().parents[1]
UNMIGRATED_HISTORICAL_OPERATORS = {"temporal_causal_eval"}
RESULT_PREFIX = "DROBOTICFLOW_POC_OPERATOR_ACCEPTANCE="
DEFAULT_REQUIRED_EXTERNALS = "bos,mongo"
STAGE_HANDLERS = {
@ -109,6 +110,8 @@ def operator_inventory() -> list[str]:
builtin_root = ROOT / "backend" / "operators" / "builtin"
for metadata_path in sorted(builtin_root.glob("*/operator.json")):
slug = metadata_path.parent.name
if slug in UNMIGRATED_HISTORICAL_OPERATORS:
continue
metadata: dict[str, Any] = {}
try:
loaded_metadata = json.loads(metadata_path.read_text(encoding="utf-8"))
@ -158,8 +161,7 @@ def static_operator_layout() -> dict[str, Any]:
catalog_path = ROOT / "internal" / "api" / "builtin_operators_catalog.json"
# Historical source retained outside the active builtin catalog must not
# inflate strict current-operator coverage requirements.
unmigrated_historical = {"temporal_causal_eval"}
metadata_paths = sorted(path for path in operator_root.glob("*/operator.json") if path.parent.name not in unmigrated_historical)
metadata_paths = sorted(path for path in operator_root.glob("*/operator.json") if path.parent.name not in UNMIGRATED_HISTORICAL_OPERATORS)
sources: list[str] = []
repository_manifests: list[str] = []
repository_manifest_errors: list[str] = []

View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "${FANYU_S100_MODE:-}" != "edge_remote" ]]; then
echo "FANYU_S100_MODE=edge_remote is required; full local platform is unsupported on S100" >&2
exit 2
fi
case "$(uname -m)" in
aarch64|arm64) ;;
*) echo "S100 edge bundle requires ARM64; got $(uname -m)" >&2; exit 2 ;;
esac
for value in "${FANYU_REMOTE_API_BASE_URL:-}" "${FANYU_REMOTE_BOS_ENDPOINT:-}"; do
if [[ ! "$value" =~ ^https?:// ]]; then
echo "remote API/BOS endpoints must be absolute HTTP(S) URLs" >&2
exit 2
fi
done
if [[ "${FANYU_DROSYNC_PLATFORM:-}" != "linux-arm64" ]]; then
echo "FANYU_DROSYNC_PLATFORM=linux-arm64 is required" >&2
exit 2
fi
if ! command -v drosync >/dev/null 2>&1 || ! command -v drosync-daemon >/dev/null 2>&1; then
echo "drosync and drosync-daemon must be installed from the verified ARM64 bundle" >&2
exit 2
fi
drosync --json version | grep -q '"releasePlatform":"linux-arm64"'
curl --fail --silent --show-error --max-time 15 "${FANYU_REMOTE_API_BASE_URL%/}/api/health" >/dev/null
echo "S100 ARM64 drosync preflight passed; external x86_64/GPU control plane is reachable."

View File

@ -8,6 +8,7 @@ import sys
from operator_release_manifest import (
CATALOG_PATH,
OPERATOR_REPO_ROOT,
RELEASE_SCHEMA_VERSION,
ROOT,
dump_json,
image_digest,
@ -38,15 +39,21 @@ def update_single(args: argparse.Namespace, env: str) -> None:
if not slug:
raise SystemExit("--slug is required")
path = release_path(slug)
if not path.exists():
raise SystemExit(f"missing {path.relative_to(ROOT)}")
release = load_json(path)
operator_path = OPERATOR_REPO_ROOT / slug / "operator.json"
if not operator_path.is_file():
raise SystemExit(f"missing {operator_path.relative_to(ROOT)}")
# A first real publication has no trustworthy release.json to load yet.
# Start from an empty record and require the caller to supply the actual
# image and digest; subsequent publications preserve acceptance metadata.
release = load_json(path) if path.exists() else {}
image = args.image.strip() if args.image else str(release.get("image") or "").strip()
image_id = args.image_id.strip() if args.image_id else str(release.get("imageId") or "").strip()
digest = image_digest(image_id)
release.update(
{
"schemaVersion": RELEASE_SCHEMA_VERSION,
"operatorId": f"operator-builtin-{slug.replace('_', '-')}",
"slug": slug,
"sourceCommit": args.source_commit.strip() if args.source_commit else release.get("sourceCommit", ""),
"sourceTreeSha256": source_tree_sha256(slug),
"image": image,

View File

@ -246,7 +246,7 @@ def test_poc_kaniko_build_rejects_invalid_context_source(tmp_path):
)
assert result.returncode == 1
assert "POC_KANIKO_CONTEXT_SOURCE must be worktree, head, or git" in result.stderr
assert "POC_KANIKO_CONTEXT_SOURCE must be worktree, head, git, or existing" in result.stderr
assert not calls_path.exists()

View File

@ -0,0 +1,188 @@
from __future__ import annotations
import subprocess
import tempfile
import unittest
from pathlib import Path
import hashlib
import io
import json
import struct
import tarfile
ROOT = Path(__file__).resolve().parents[2]
VERIFY = ROOT / "scripts" / "verify_qwen3vl_model_manifest.py"
BUILD = ROOT / "scripts" / "build_fanyu_v5_s100_bundle.py"
def values_text(model_root: Path, deb_sha: str, portable_sha: str, model_sha: str, mode: str = "edge_remote") -> str:
digest = "registry.example/operator@sha256:" + "a" * 64
return "\n".join(
[
f"FANYU_S100_MODE={mode}",
"FANYU_REMOTE_API_BASE_URL=https://control.example",
"FANYU_REMOTE_BOS_ENDPOINT=https://bos.example",
"FANYU_V5_ANNOTATION_WORKGROUP_ID=vendor-a-left-camera",
"FANYU_HEADPOSE_API_BASE_URL=https://headpose.example",
f"FANYU_HEADPOSE_SERVICE_IMAGE_ID={digest}",
"FANYU_HEADPOSE_MODEL_SHA256=sha256:" + "b" * 64,
"FANYU_HEADPOSE_LICENSE_ID=MIT",
"FANYU_KUBECONFIG_CONTEXT=poc",
"FANYU_MONGO_URI_REF=secret://mongo/fanyu",
"FANYU_BOS_CONNECTION_REF=secret://bos/fanyu",
"FANYU_WORKSPACE_PVC=droboticflow-workspace",
"FANYU_QWEN_MODEL_PVC=qwen3vl-models",
f"FANYU_QWEN_MODEL_ROOT={model_root}",
f"FANYU_QWEN_MODEL_MANIFEST_SHA256={model_sha}",
"FANYU_QWEN_MODEL_REVISION=0c351dd01ed87e9c1b53cbc748cba10e6187ff3b",
"FANYU_NODE_ARCH=aarch64",
"FANYU_V5_IMAGE_ARCH=amd64",
"FANYU_DROSYNC_PLATFORM=linux-arm64",
f"FANYU_DROSYNC_DEB_SHA256={deb_sha}",
f"FANYU_DROSYNC_PORTABLE_SHA256={portable_sha}",
f"FANYU_IMAGE_VIDEO_FACE_BLUR={digest}",
f"FANYU_IMAGE_MERGE={digest}",
f"FANYU_IMAGE_PACKAGE={digest}",
f"FANYU_IMAGE_QWEN_TEMPORAL={digest}",
f"FANYU_IMAGE_QWEN_VALID_EVENT={digest}",
f"FANYU_IMAGE_MS_SWIFT_EXPORT={digest}",
f"FANYU_IMAGE_QWEN_TRAIN={digest}",
"",
]
)
def aarch64_elf() -> bytes:
payload = bytearray(64)
payload[:6] = b"\x7fELF\x02\x01"
payload[18:20] = struct.pack("<H", 183)
return bytes(payload)
def tar_bytes(mode: str, files: dict[str, bytes]) -> bytes:
target = io.BytesIO()
with tarfile.open(fileobj=target, mode=mode) as archive:
for name, payload in sorted(files.items()):
info = tarfile.TarInfo(name)
info.size = len(payload)
info.mode = 0o755 if name.endswith(("drosync", "drosync-daemon", ".sh")) else 0o644
info.mtime = 0
archive.addfile(info, io.BytesIO(payload))
return target.getvalue()
def ar_archive(entries: list[tuple[str, bytes]]) -> bytes:
payload = bytearray(b"!<arch>\n")
for name, content in entries:
header = (
f"{name + '/':<16}{0:<12}{0:<6}{0:<6}{'100644':<8}{len(content):<10}`\n"
).encode("ascii")
payload.extend(header)
payload.extend(content)
if len(content) % 2:
payload.extend(b"\n")
return bytes(payload)
def write_drosync_artifacts(root: Path) -> tuple[Path, Path, str, str]:
control = tar_bytes(
"w:xz",
{"./control": b"Package: drosync\nVersion: 1.0.0\nArchitecture: arm64\n"},
)
data = tar_bytes(
"w:xz",
{
"./usr/bin/drosync": aarch64_elf(),
"./usr/bin/drosync-daemon": aarch64_elf(),
"./lib/systemd/system/drosync.service": b"[Service]\nExecStart=/usr/bin/drosync-daemon\n",
},
)
deb = root / "drosync_1.0.0_arm64.deb"
deb.write_bytes(ar_archive([("debian-binary", b"2.0\n"), ("control.tar.xz", control), ("data.tar.xz", data)]))
portable = root / "drosync-1.0.0-linux-arm64.tar.gz"
portable.write_bytes(
tar_bytes(
"w:gz",
{
"drosync-1.0.0/drosync": aarch64_elf(),
"drosync-1.0.0/drosync-daemon": aarch64_elf(),
"drosync-1.0.0/drosync-portable.service": b"[Service]\n",
"drosync-1.0.0/install-systemd-portable.sh": b"#!/usr/bin/env bash\n",
},
)
)
digest = lambda path: hashlib.sha256(path.read_bytes()).hexdigest()
return deb, portable, digest(deb), digest(portable)
def write_qwen_snapshot(model: Path) -> None:
(model / "config.json").write_text(json.dumps({"model_type": "qwen3_vl"}), encoding="utf-8")
(model / "preprocessor_config.json").write_text(json.dumps({"processor_class": "Qwen3VLProcessor"}), encoding="utf-8")
shards = [f"model-{index:05d}-of-00004.safetensors" for index in range(1, 5)]
for index, name in enumerate(shards, start=1):
(model / name).write_bytes(f"small verified shard {index}".encode("utf-8"))
(model / "model.safetensors.index.json").write_text(
json.dumps({"metadata": {"total_size": sum((model / name).stat().st_size for name in shards)}, "weight_map": {f"model.layer.{index}": name for index, name in enumerate(shards)}}),
encoding="utf-8",
)
class TestFanyuV5S100Bundle(unittest.TestCase):
def test_builds_secret_free_arm64_edge_bundle_with_verified_model(self) -> None:
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
model = root / "model"
model.mkdir()
write_qwen_snapshot(model)
deb, portable, deb_sha, portable_sha = write_drosync_artifacts(root)
subprocess.run(["python3", str(VERIFY), "--model-root", str(model), "--write"], check=True, capture_output=True, text=True)
model_sha = hashlib.sha256((model / "MODEL_MANIFEST.json").read_bytes()).hexdigest()
values = root / "values.env"
values.write_text(values_text(model, deb_sha, portable_sha, model_sha), encoding="utf-8")
output = root / "out"
command = ["python3", str(BUILD), "--values", str(values), "--output-dir", str(output), "--drosync-deb", str(deb), "--drosync-portable", str(portable)]
result = subprocess.run(command, check=True, capture_output=True, text=True)
bundle = Path(result.stdout.strip())
self.assertTrue((bundle / "SHA256SUMS").is_file())
self.assertTrue((bundle / "edge-artifacts" / deb.name).is_file())
self.assertTrue((bundle / "edge-artifacts" / portable.name).is_file())
self.assertFalse((bundle / "scripts" / "fanyu_v5_connectivity_probe.py").exists())
self.assertTrue((bundle / "operator-releases" / "qwen_temporal_localization" / "release.json").is_file())
self.assertTrue((output / "fanyu-v5-s100-edge-bundle.tar.gz").is_file())
self.assertTrue((output / "fanyu-v5-s100-edge-bundle.tar.gz.sha256").is_file())
first_archive = (output / "fanyu-v5-s100-edge-bundle.tar.gz").read_bytes()
subprocess.run(command, check=True, capture_output=True, text=True)
self.assertEqual(first_archive, (output / "fanyu-v5-s100-edge-bundle.tar.gz").read_bytes())
overrides = (bundle / "operator-release-overrides.json").read_text(encoding="utf-8")
self.assertIn('"mode": "edge_remote"', overrides)
self.assertNotIn("mongodb://", overrides)
def test_fails_closed_for_full_local_s100_request(self) -> None:
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
deb, portable, deb_sha, portable_sha = write_drosync_artifacts(root)
values = root / "values.env"
values.write_text(values_text(root / "missing", deb_sha, portable_sha, "c" * 64, mode="full_local"), encoding="utf-8")
result = subprocess.run(["python3", str(BUILD), "--values", str(values), "--output-dir", str(root / "out"), "--drosync-deb", str(deb), "--drosync-portable", str(portable), "--skip-model-verification"], capture_output=True, text=True)
self.assertNotEqual(result.returncode, 0)
self.assertIn("edge_remote", result.stderr)
def test_accepts_matching_independently_verified_remote_model_digest(self) -> None:
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
deb, portable, deb_sha, portable_sha = write_drosync_artifacts(root)
model_sha = "d" * 64
values = root / "values.env"
values.write_text(values_text(root / "remote-pvc-only", deb_sha, portable_sha, model_sha), encoding="utf-8")
result = subprocess.run(
[
"python3", str(BUILD), "--values", str(values), "--output-dir", str(root / "out"),
"--drosync-deb", str(deb), "--drosync-portable", str(portable),
"--verified-model-manifest-sha256", model_sha,
],
check=True,
capture_output=True,
text=True,
)
self.assertTrue((Path(result.stdout.strip()) / "SHA256SUMS").is_file())

View File

@ -354,6 +354,7 @@ async fn execute(app: &App) -> Result<Value> {
"protocolVersion": PROTOCOL_VERSION,
"platform": drosync_platform::platform_name(),
"architecture": drosync_platform::architecture(),
"releasePlatform": drosync_platform::release_platform_key(),
})),
}
}

View File

@ -948,6 +948,9 @@ async fn dispatch(state: &mut StateStore, request: IpcRequest) -> IpcResponse {
"name": "drosync-daemon",
"version": env!("CARGO_PKG_VERSION"),
"protocolVersion": drosync_protocol_version(),
"platform": drosync_platform::platform_name(),
"architecture": drosync_platform::architecture(),
"releasePlatform": drosync_platform::release_platform_key(),
})),
_ => Err(anyhow!("unknown daemon command {}", request.command)),
};
@ -1006,14 +1009,25 @@ async fn handle_update(state: &mut StateStore, arguments: &Value) -> Result<Valu
"offeredVersion": release.version,
}));
}
let encoded_key = option_env!("DROSYNC_UPDATE_PUBLIC_KEY_BASE64")
.ok_or_else(|| anyhow!("client was built without DROSYNC_UPDATE_PUBLIC_KEY_BASE64"))?;
let expected_platform_key = drosync_platform::release_platform_key()
.ok_or_else(|| anyhow!("this client target has no supported signed-update platform key"))?;
let key_environment = drosync_platform::update_public_key_environment(expected_platform_key)
.unwrap_or("DROSYNC_UPDATE_PUBLIC_KEY_BASE64");
let encoded_key = drosync_platform::embedded_update_public_key().ok_or_else(|| {
anyhow!("client was built without {key_environment} or DROSYNC_UPDATE_PUBLIC_KEY_BASE64")
})?;
let public_key = drosync_updater::decode_public_key(encoded_key)?;
drosync_updater::verify_release(&release, &public_key)?;
let platform_key = response
.get("platformKey")
.and_then(Value::as_str)
.ok_or_else(|| anyhow!("update response omitted platformKey"))?;
if platform_key != expected_platform_key {
return Err(anyhow!(
"update response platformKey {platform_key} does not match this client target {expected_platform_key}"
));
}
drosync_updater::validate_release_platform(&release, platform_key)?;
let url = release
.artifacts
.get(platform_key)

View File

@ -7,11 +7,16 @@ rust-version.workspace = true
[dependencies]
directories.workspace = true
keyring.workspace = true
serde.workspace = true
thiserror.workspace = true
uuid.workspace = true
# RDK S100 is a headless Linux ARM64 target. Its systemd service receives a
# token through a restricted environment file or `DROSYNC_SECRET_FILE`, rather
# than pulling in a desktop D-Bus keyring implementation.
[target.'cfg(not(all(target_os = "linux", target_arch = "aarch64")))'.dependencies]
keyring.workspace = true
[dev-dependencies]
tempfile.workspace = true

View File

@ -3,7 +3,7 @@
use directories::ProjectDirs;
use serde::{Deserialize, Serialize};
use std::fs;
use std::io;
use std::io::{self, Write};
use std::path::{Path, PathBuf};
use thiserror::Error;
use uuid::Uuid;
@ -12,12 +12,19 @@ use uuid::Uuid;
pub enum PlatformError {
#[error("operating-system project directories are unavailable")]
DirectoriesUnavailable,
#[cfg(not(all(target_os = "linux", target_arch = "aarch64")))]
#[error("credential storage failed: {0}")]
Credential(#[from] keyring::Error),
#[error("DROSYNC_SECRET_FILE is required for headless Linux ARM64 credentials")]
HeadlessSecretFileRequired,
#[error("I/O error: {0}")]
Io(#[from] io::Error),
#[error("secret file permissions must be 0600")]
InsecureSecretPermissions,
#[error("secret file must be a regular file, not a symlink or special file")]
InvalidSecretFile,
#[error("secret-file parent directory must not be group- or world-writable")]
InsecureSecretDirectoryPermissions,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@ -42,6 +49,97 @@ pub fn architecture() -> &'static str {
}
}
/// Return the release-manifest key for an operating-system/architecture pair.
///
/// The control plane uses this value as the key in a signed client release
/// manifest. Keep it deliberately narrower than `std::env::consts`: an
/// unsupported target must not accidentally select a package built for a
/// different ABI.
#[must_use]
pub fn release_platform_key_for(
operating_system: &str,
target_architecture: &str,
) -> Option<&'static str> {
match (operating_system, target_architecture) {
("linux", "x86_64") => Some("linux-x86_64"),
("linux", "aarch64" | "arm64") => Some("linux-arm64"),
("macos", "aarch64" | "arm64") => Some("macos-arm64"),
("windows", "x86_64") => Some("windows-x86_64"),
_ => None,
}
}
/// Return the release-manifest key compiled into this client.
///
/// This is separate from the two device-registration fields (`platform` and
/// `architecture`), which remain wire-compatible with existing control-plane
/// versions and are combined there into the same key.
#[must_use]
pub fn release_platform_key() -> Option<&'static str> {
release_platform_key_for(std::env::consts::OS, std::env::consts::ARCH)
}
/// Return the environment variable that may pin a public update key for a
/// release platform. A generic `DROSYNC_UPDATE_PUBLIC_KEY_BASE64` remains a
/// backwards-compatible fallback.
#[must_use]
pub fn update_public_key_environment(platform_key: &str) -> Option<&'static str> {
match platform_key {
"linux-arm64" => Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_ARM64"),
"linux-x86_64" => Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_X86_64"),
"macos-arm64" => Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_MACOS_ARM64"),
"windows-x86_64" => Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_WINDOWS_X86_64"),
_ => None,
}
}
/// Choose the target-specific update key when one was embedded, otherwise use
/// the legacy generic key. This pure helper keeps the trust-key mapping
/// testable without exposing compile-time configuration as a runtime setting.
#[must_use]
pub fn select_update_public_key(
target_specific: Option<&'static str>,
legacy: Option<&'static str>,
) -> Option<&'static str> {
match target_specific {
Some(value) if !value.is_empty() => Some(value),
_ => legacy,
}
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
const TARGET_UPDATE_PUBLIC_KEY: Option<&str> =
option_env!("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_ARM64");
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
const TARGET_UPDATE_PUBLIC_KEY: Option<&str> =
option_env!("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_X86_64");
#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
const TARGET_UPDATE_PUBLIC_KEY: Option<&str> =
option_env!("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_MACOS_ARM64");
#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
const TARGET_UPDATE_PUBLIC_KEY: Option<&str> =
option_env!("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_WINDOWS_X86_64");
#[cfg(not(any(
all(target_os = "linux", target_arch = "aarch64"),
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "macos", target_arch = "aarch64"),
all(target_os = "windows", target_arch = "x86_64"),
)))]
const TARGET_UPDATE_PUBLIC_KEY: Option<&str> = None;
/// Return the Ed25519 public key embedded for this exact release target.
///
/// Build scripts populate the target-specific environment variable and also
/// preserve the legacy generic variable so previously configured CI continues
/// to produce compatible clients.
#[must_use]
pub fn embedded_update_public_key() -> Option<&'static str> {
select_update_public_key(
TARGET_UPDATE_PUBLIC_KEY,
option_env!("DROSYNC_UPDATE_PUBLIC_KEY_BASE64"),
)
}
pub fn paths() -> Result<Paths, PlatformError> {
let dirs = ProjectDirs::from("com", "drobotics", "drosync")
.ok_or(PlatformError::DirectoriesUnavailable)?;
@ -57,15 +155,44 @@ pub fn paths() -> Result<Paths, PlatformError> {
})
}
/// Parse an explicitly configured secret-file path without reading process
/// state. Keeping this small helper pure lets all target test suites exercise
/// the headless credential contract.
pub fn headless_secret_file_path(value: Option<&str>) -> Result<PathBuf, PlatformError> {
value
.map(str::trim)
.filter(|value| !value.is_empty())
.map(PathBuf::from)
.ok_or(PlatformError::HeadlessSecretFileRequired)
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
fn configured_headless_secret_file() -> Result<PathBuf, PlatformError> {
let value = std::env::var("DROSYNC_SECRET_FILE").ok();
headless_secret_file_path(value.as_deref())
}
#[cfg(not(all(target_os = "linux", target_arch = "aarch64")))]
pub fn save_credential(profile: &str, token: &str) -> Result<(), PlatformError> {
keyring::Entry::new("drosync", profile)?.set_password(token)?;
Ok(())
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
pub fn save_credential(_profile: &str, token: &str) -> Result<(), PlatformError> {
write_headless_secret(&configured_headless_secret_file()?, token)
}
#[cfg(not(all(target_os = "linux", target_arch = "aarch64")))]
pub fn load_credential(profile: &str) -> Result<String, PlatformError> {
Ok(keyring::Entry::new("drosync", profile)?.get_password()?)
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
pub fn load_credential(_profile: &str) -> Result<String, PlatformError> {
read_headless_secret(&configured_headless_secret_file()?)
}
pub fn load_runtime_credential(profile: &str) -> Result<String, PlatformError> {
if let Ok(value) = std::env::var("DROSYNC_TOKEN")
&& !value.trim().is_empty()
@ -80,11 +207,17 @@ pub fn load_runtime_credential(profile: &str) -> Result<String, PlatformError> {
load_credential(profile)
}
#[cfg(not(all(target_os = "linux", target_arch = "aarch64")))]
pub fn delete_credential(profile: &str) -> Result<(), PlatformError> {
keyring::Entry::new("drosync", profile)?.delete_credential()?;
Ok(())
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
pub fn delete_credential(_profile: &str) -> Result<(), PlatformError> {
delete_headless_secret(&configured_headless_secret_file()?)
}
pub fn load_or_create_device_id(profile: &str) -> Result<String, PlatformError> {
let paths = paths()?;
let safe_profile = profile
@ -115,14 +248,98 @@ pub fn load_or_create_device_id(profile: &str) -> Result<String, PlatformError>
pub fn read_headless_secret(path: &Path) -> Result<String, PlatformError> {
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
if fs::metadata(path)?.permissions().mode() & 0o077 != 0 {
return Err(PlatformError::InsecureSecretPermissions);
}
ensure_secure_secret_file(path)?;
}
Ok(fs::read_to_string(path)?.trim().to_owned())
}
#[cfg(unix)]
fn ensure_secure_secret_file(path: &Path) -> Result<(), PlatformError> {
use std::os::unix::fs::PermissionsExt;
let metadata = fs::symlink_metadata(path)?;
if !metadata.file_type().is_file() {
return Err(PlatformError::InvalidSecretFile);
}
if metadata.permissions().mode() & 0o777 != 0o600 {
return Err(PlatformError::InsecureSecretPermissions);
}
Ok(())
}
#[cfg(unix)]
fn ensure_secure_secret_parent(path: &Path) -> Result<&Path, PlatformError> {
use std::os::unix::fs::PermissionsExt;
let parent = path.parent().ok_or_else(|| {
io::Error::new(
io::ErrorKind::InvalidInput,
"secret file must have a parent directory",
)
})?;
let metadata = fs::metadata(parent)?;
if !metadata.is_dir() {
return Err(PlatformError::Io(io::Error::new(
io::ErrorKind::NotADirectory,
"secret-file parent is not a directory",
)));
}
if metadata.permissions().mode() & 0o022 != 0 {
return Err(PlatformError::InsecureSecretDirectoryPermissions);
}
Ok(parent)
}
/// Write a headless credential by atomically replacing a 0600 file in an
/// already-secure directory. The temporary file lives beside the destination,
/// so the final rename is atomic on the same filesystem.
#[cfg(unix)]
pub fn write_headless_secret(path: &Path, token: &str) -> Result<(), PlatformError> {
use std::fs::OpenOptions;
use std::os::unix::fs::OpenOptionsExt;
let parent = ensure_secure_secret_parent(path)?;
match fs::symlink_metadata(path) {
Ok(metadata) => {
if !metadata.file_type().is_file() {
return Err(PlatformError::InvalidSecretFile);
}
}
Err(error) if error.kind() == io::ErrorKind::NotFound => {}
Err(error) => return Err(error.into()),
}
let temporary = parent.join(format!(".drosync-credential-{}.tmp", Uuid::new_v4()));
let write_result = (|| -> Result<(), PlatformError> {
let mut file = OpenOptions::new()
.write(true)
.create_new(true)
.mode(0o600)
.open(&temporary)?;
file.write_all(token.trim().as_bytes())?;
file.write_all(b"\n")?;
file.sync_all()?;
drop(file);
fs::rename(&temporary, path)?;
secure_runtime_file(path)?;
fs::File::open(parent)?.sync_all()?;
Ok(())
})();
if write_result.is_err() {
let _ = fs::remove_file(&temporary);
}
write_result
}
#[cfg(unix)]
pub fn delete_headless_secret(path: &Path) -> Result<(), PlatformError> {
ensure_secure_secret_file(path)?;
fs::remove_file(path)?;
if let Some(parent) = path.parent() {
fs::File::open(parent)?.sync_all()?;
}
Ok(())
}
#[cfg(unix)]
pub fn secure_runtime_file(path: &Path) -> Result<(), PlatformError> {
use std::os::unix::fs::PermissionsExt;
@ -139,12 +356,18 @@ pub fn secure_runtime_file(_path: &Path) -> Result<(), PlatformError> {
#[cfg(all(test, unix))]
mod tests {
use super::{PlatformError, read_headless_secret, secure_runtime_file};
use super::{
PlatformError, delete_headless_secret, headless_secret_file_path, read_headless_secret,
release_platform_key_for, secure_runtime_file, select_update_public_key,
update_public_key_environment, write_headless_secret,
};
#[cfg(not(all(target_os = "linux", target_arch = "aarch64")))]
use keyring::credential::CredentialPersistence;
use std::fs;
use std::os::unix::fs::PermissionsExt;
use std::os::unix::net::UnixListener;
#[cfg(not(all(target_os = "linux", target_arch = "aarch64")))]
#[test]
fn operating_system_credential_store_is_persistent() {
assert!(matches!(
@ -163,9 +386,91 @@ mod tests {
read_headless_secret(&secret),
Err(PlatformError::InsecureSecretPermissions)
));
assert!(matches!(
delete_headless_secret(&secret),
Err(PlatformError::InsecureSecretPermissions)
));
fs::set_permissions(&secret, fs::Permissions::from_mode(0o600)).unwrap();
assert_eq!(read_headless_secret(&secret).unwrap(), "device-token");
fs::set_permissions(&secret, fs::Permissions::from_mode(0o400)).unwrap();
assert!(matches!(
read_headless_secret(&secret),
Err(PlatformError::InsecureSecretPermissions)
));
}
#[test]
fn headless_secret_path_requires_an_explicit_nonempty_value() {
assert!(matches!(
headless_secret_file_path(None),
Err(PlatformError::HeadlessSecretFileRequired)
));
assert!(matches!(
headless_secret_file_path(Some(" ")),
Err(PlatformError::HeadlessSecretFileRequired)
));
assert_eq!(
headless_secret_file_path(Some(" /var/lib/drosync/token ")).unwrap(),
std::path::PathBuf::from("/var/lib/drosync/token")
);
}
#[test]
fn headless_secret_atomic_write_read_and_delete_round_trip() {
let directory = tempfile::tempdir().unwrap();
fs::set_permissions(directory.path(), fs::Permissions::from_mode(0o700)).unwrap();
let secret = directory.path().join("token");
write_headless_secret(&secret, "first-token\n").unwrap();
assert_eq!(read_headless_secret(&secret).unwrap(), "first-token");
assert_eq!(
fs::metadata(&secret).unwrap().permissions().mode() & 0o777,
0o600
);
write_headless_secret(&secret, "second-token").unwrap();
assert_eq!(read_headless_secret(&secret).unwrap(), "second-token");
delete_headless_secret(&secret).unwrap();
assert!(!secret.exists());
}
#[test]
fn headless_secret_rejects_an_unsafe_parent_directory() {
let directory = tempfile::tempdir().unwrap();
fs::set_permissions(directory.path(), fs::Permissions::from_mode(0o777)).unwrap();
let secret = directory.path().join("token");
assert!(matches!(
write_headless_secret(&secret, "device-token"),
Err(PlatformError::InsecureSecretDirectoryPermissions)
));
}
#[cfg(all(target_os = "linux", target_arch = "aarch64"))]
#[test]
fn arm64_credential_store_round_trips_through_configured_secret_file() {
use super::{delete_credential, load_credential, save_credential};
let configured = std::env::var("DROSYNC_SECRET_FILE")
.expect("target test runner must provide DROSYNC_SECRET_FILE");
let secret = std::path::PathBuf::from(configured);
assert!(
!secret.exists(),
"target test secret file must start absent"
);
save_credential("default", "arm64-device-token").expect("atomically persist token");
assert_eq!(
load_credential("default").expect("load persisted token"),
"arm64-device-token"
);
assert_eq!(
fs::metadata(&secret).unwrap().permissions().mode() & 0o777,
0o600
);
delete_credential("default").expect("securely remove token");
assert!(!secret.exists());
}
#[test]
@ -179,4 +484,60 @@ mod tests {
0o600
);
}
#[test]
fn release_platform_keys_cover_supported_client_targets() {
assert_eq!(
release_platform_key_for("linux", "x86_64"),
Some("linux-x86_64")
);
assert_eq!(
release_platform_key_for("linux", "aarch64"),
Some("linux-arm64")
);
assert_eq!(
release_platform_key_for("linux", "arm64"),
Some("linux-arm64")
);
assert_eq!(
release_platform_key_for("macos", "aarch64"),
Some("macos-arm64")
);
assert_eq!(
release_platform_key_for("windows", "x86_64"),
Some("windows-x86_64")
);
assert_eq!(release_platform_key_for("linux", "i686"), None);
assert_eq!(release_platform_key_for("windows", "aarch64"), None);
}
#[test]
fn update_key_environment_is_platform_specific_with_legacy_fallback() {
assert_eq!(
update_public_key_environment("linux-arm64"),
Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_ARM64")
);
assert_eq!(
update_public_key_environment("linux-x86_64"),
Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_X86_64")
);
assert_eq!(
update_public_key_environment("macos-arm64"),
Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_MACOS_ARM64")
);
assert_eq!(
update_public_key_environment("windows-x86_64"),
Some("DROSYNC_UPDATE_PUBLIC_KEY_BASE64_WINDOWS_X86_64")
);
assert_eq!(update_public_key_environment("linux-riscv64"), None);
assert_eq!(
select_update_public_key(Some("target-key"), Some("legacy-key")),
Some("target-key")
);
assert_eq!(
select_update_public_key(None, Some("legacy-key")),
Some("legacy-key")
);
assert_eq!(select_update_public_key(Some(""), None), None);
}
}

View File

@ -2,6 +2,7 @@
use base64::Engine;
use drosync_protocol::ClientRelease;
use drosync_updater::validate_signed_release_matrix;
use ed25519_dalek::{Signer, SigningKey};
use std::error::Error;
use std::fs;
@ -23,38 +24,13 @@ fn signing_key() -> Result<SigningKey, Box<dyn Error>> {
}
}
fn validate(release: &ClientRelease) -> Result<(), Box<dyn Error>> {
if release.kind != "signed" {
return Err("automatic update manifests must use kind=signed".into());
}
let expected_percent = match release.channel.as_str() {
"canary" => 5,
"pilot" => 20,
"stable" => 100,
_ => return Err("channel must be canary, pilot or stable".into()),
};
if !release.paused && release.rollout_percent != expected_percent {
return Err("active rollout percentage does not match its channel".into());
}
for platform in ["windows-x86_64", "linux-x86_64", "macos-arm64"] {
if !release.artifacts.contains_key(platform) || !release.sha256.contains_key(platform) {
return Err(format!("manifest is missing the {platform} artifact or digest").into());
}
let digest = &release.sha256[platform];
if digest.len() != 64 || !digest.bytes().all(|value| value.is_ascii_hexdigit()) {
return Err(format!("invalid SHA-256 for {platform}").into());
}
}
Ok(())
}
fn main() -> Result<(), Box<dyn Error>> {
let manifest_path = std::env::args_os()
.nth(1)
.map(PathBuf::from)
.ok_or("usage: drosync-sign-manifest MANIFEST.json")?;
let mut release: ClientRelease = serde_json::from_slice(&fs::read(&manifest_path)?)?;
validate(&release)?;
validate_signed_release_matrix(&release)?;
release.signature.clear();
let signature = signing_key()?.sign(&serde_json::to_vec(&release)?);
release.signature = base64::engine::general_purpose::STANDARD.encode(signature.to_bytes());

View File

@ -7,6 +7,15 @@ use sha2::{Digest, Sha256};
use std::path::Path;
use thiserror::Error;
/// Every newly signed manifest carries this complete supported-client matrix so
/// its one Ed25519 signature cannot be replayed as a partial platform release.
pub const REQUIRED_RELEASE_PLATFORMS: [&str; 4] = [
"windows-x86_64",
"linux-x86_64",
"linux-arm64",
"macos-arm64",
];
#[derive(Debug, Error)]
pub enum UpdateError {
#[error("invalid Ed25519 public key")]
@ -27,6 +36,8 @@ pub enum UpdateError {
Install,
#[error("HTTPS is required for update downloads except on loopback")]
InsecureURL,
#[error("invalid signed update manifest: {0}")]
InvalidManifest(String),
}
pub fn decode_public_key(value: &str) -> Result<[u8; 32], UpdateError> {
@ -36,6 +47,124 @@ pub fn decode_public_key(value: &str) -> Result<[u8; 32], UpdateError> {
decoded.try_into().map_err(|_| UpdateError::InvalidKey)
}
fn valid_sha256(value: &str) -> bool {
value.len() == 64 && value.bytes().all(|character| character.is_ascii_hexdigit())
}
/// Validate the signed-update fields that every client must understand.
///
/// The updater accepts already-signed historical manifests that predate
/// `linux-arm64`, provided they contain a valid artifact for the running
/// target. New release publication uses [`validate_signed_release_matrix`] to
/// require the complete matrix.
pub fn validate_signed_release(release: &ClientRelease) -> Result<(), UpdateError> {
if release.kind != "signed" {
return Err(UpdateError::InvalidManifest(
"automatic updates require kind=signed".to_owned(),
));
}
let expected_percent = match release.channel.as_str() {
"canary" => 5,
"pilot" => 20,
"stable" => 100,
_ => {
return Err(UpdateError::InvalidManifest(
"channel must be canary, pilot or stable".to_owned(),
));
}
};
if !release.paused && release.rollout_percent != expected_percent {
return Err(UpdateError::InvalidManifest(
"active rollout percentage does not match its channel".to_owned(),
));
}
if release.artifacts.is_empty() {
return Err(UpdateError::InvalidManifest(
"manifest has no release artifacts".to_owned(),
));
}
for (platform, artifact) in &release.artifacts {
if artifact.is_empty() {
return Err(UpdateError::InvalidManifest(format!(
"manifest is missing the {platform} artifact"
)));
}
let digest = release
.sha256
.get(platform)
.map(String::as_str)
.unwrap_or_default();
if !valid_sha256(digest) {
return Err(UpdateError::InvalidManifest(format!(
"manifest has an invalid {platform} SHA-256"
)));
}
}
Ok(())
}
/// Validate the complete release matrix required for new signed releases.
pub fn validate_signed_release_matrix(release: &ClientRelease) -> Result<(), UpdateError> {
validate_signed_release(release)?;
for platform in REQUIRED_RELEASE_PLATFORMS {
let artifact = release
.artifacts
.get(platform)
.map(String::as_str)
.unwrap_or_default();
if artifact.is_empty() {
return Err(UpdateError::InvalidManifest(format!(
"manifest is missing the {platform} artifact"
)));
}
let digest = release
.sha256
.get(platform)
.map(String::as_str)
.unwrap_or_default();
if !valid_sha256(digest) {
return Err(UpdateError::InvalidManifest(format!(
"manifest has an invalid {platform} SHA-256"
)));
}
}
Ok(())
}
/// Validate that a signed manifest contains the artifact for this exact ABI.
pub fn validate_release_platform(
release: &ClientRelease,
platform_key: &str,
) -> Result<(), UpdateError> {
validate_signed_release(release)?;
if !REQUIRED_RELEASE_PLATFORMS.contains(&platform_key) {
return Err(UpdateError::InvalidManifest(format!(
"unsupported release platform {platform_key}"
)));
}
let artifact = release
.artifacts
.get(platform_key)
.map(String::as_str)
.unwrap_or_default();
if artifact.is_empty() {
return Err(UpdateError::InvalidManifest(format!(
"manifest is missing the {platform_key} artifact"
)));
}
let digest = release
.sha256
.get(platform_key)
.map(String::as_str)
.unwrap_or_default();
if !valid_sha256(digest) {
return Err(UpdateError::InvalidManifest(format!(
"manifest has an invalid {platform_key} SHA-256"
)));
}
Ok(())
}
pub async fn download_verified(
url: &str,
destination: &Path,
@ -145,6 +274,7 @@ pub async fn install_native_package(package: &Path) -> Result<(), UpdateError> {
}
pub fn verify_release(release: &ClientRelease, public_key: &[u8; 32]) -> Result<(), UpdateError> {
validate_signed_release(release)?;
let mut unsigned = release.clone();
unsigned.signature.clear();
let payload = serde_json::to_vec(&unsigned)?;
@ -169,7 +299,10 @@ pub fn verify_artifact(bytes: &[u8], expected_sha256: &str) -> Result<(), Update
#[cfg(test)]
mod tests {
use super::{verify_artifact, verify_release};
use super::{
REQUIRED_RELEASE_PLATFORMS, validate_release_platform, validate_signed_release,
validate_signed_release_matrix, verify_artifact, verify_release,
};
use base64::Engine;
use drosync_protocol::ClientRelease;
use ed25519_dalek::{Signer, SigningKey};
@ -185,14 +318,24 @@ mod tests {
channel: "canary".to_owned(),
protocol_version: "v1".to_owned(),
minimum_server_version: "1.0.0".to_owned(),
artifacts: BTreeMap::from([(
"linux-x86_64".to_owned(),
"https://downloads.example/drosync.deb".to_owned(),
)]),
sha256: BTreeMap::from([(
"linux-x86_64".to_owned(),
hex::encode(sha2::Sha256::digest(b"package")),
)]),
artifacts: REQUIRED_RELEASE_PLATFORMS
.into_iter()
.map(|platform| {
(
platform.to_owned(),
format!("https://downloads.example/{platform}.package"),
)
})
.collect::<BTreeMap<_, _>>(),
sha256: REQUIRED_RELEASE_PLATFORMS
.into_iter()
.map(|platform| {
(
platform.to_owned(),
hex::encode(sha2::Sha256::digest(b"package")),
)
})
.collect::<BTreeMap<_, _>>(),
signature: String::new(),
rollout_percent: 5,
paused: false,
@ -221,4 +364,17 @@ mod tests {
assert!(verify_release(&release, &public_key).is_err());
assert!(verify_artifact(b"tampered", &release.sha256["linux-x86_64"]).is_err());
}
#[test]
fn signed_manifest_requires_linux_arm64_and_exact_platform_key() {
let (mut release, _) = signed_release();
release.artifacts.remove("linux-arm64");
assert!(validate_signed_release(&release).is_ok());
assert!(validate_signed_release_matrix(&release).is_err());
let (release, _) = signed_release();
validate_release_platform(&release, "linux-arm64")
.expect("ARM64 package belongs to the signed release matrix");
assert!(validate_release_platform(&release, "linux-riscv64").is_err());
}
}

View File

@ -19,11 +19,26 @@ build_workspace() {
cargo build --manifest-path "$ROOT_DIR/Cargo.toml" --release --workspace
}
prepare_update_key() {
local platform_key="$1"
local specific_variable
case "$platform_key" in
linux-arm64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_ARM64" ;;
linux-x86_64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_X86_64" ;;
macos-arm64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_MACOS_ARM64" ;;
*) echo "unsupported preview update-key platform: $platform_key" >&2; exit 2 ;;
esac
local selected="${!specific_variable:-$DROSYNC_UPDATE_PUBLIC_KEY_BASE64}"
export DROSYNC_UPDATE_PUBLIC_KEY_BASE64="$selected"
export "$specific_variable=$selected"
}
build_macos_preview() {
[[ "$(uname -s)-$(uname -m)" == "Darwin-arm64" ]] || {
echo "macos-arm64 preview must be built on an Apple Silicon runner" >&2
exit 1
}
prepare_update_key macos-arm64
build_workspace
local app
local package_version
@ -58,11 +73,43 @@ build_linux_preview() {
echo "linux-x86_64 preview must be built on a Linux x86_64 runner" >&2
exit 1
}
prepare_update_key linux-x86_64
build_workspace
DROSYNC_OUTPUT_DIR="$OUTPUT_DIR" DROSYNC_VERSION="$VERSION" "$ROOT_DIR/packaging/linux/build-deb.sh"
DROSYNC_OUTPUT_DIR="$OUTPUT_DIR" DROSYNC_VERSION="$VERSION" "$ROOT_DIR/packaging/linux/build-portable.sh"
}
build_linux_arm64_preview() {
[[ "$(uname -s)-$(uname -m)" == "Linux-x86_64" ]] || {
echo "linux-arm64 preview must be cross-built on a Linux x86_64 runner" >&2
exit 1
}
prepare_update_key linux-arm64
local target="aarch64-unknown-linux-gnu"
local linker="${DROSYNC_AARCH64_LINKER:-aarch64-linux-gnu-gcc}"
local archiver="${DROSYNC_AARCH64_AR:-aarch64-linux-gnu-ar}"
command -v "$linker" >/dev/null || {
echo "missing ARM64 cross linker $linker (install gcc-aarch64-linux-gnu)" >&2
exit 1
}
command -v "$archiver" >/dev/null || {
echo "missing ARM64 archiver $archiver (install binutils-aarch64-linux-gnu)" >&2
exit 1
}
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$linker"
export CC_aarch64_unknown_linux_gnu="$linker"
export AR_aarch64_unknown_linux_gnu="$archiver"
cargo build --locked --manifest-path "$ROOT_DIR/Cargo.toml" --release --target "$target" \
-p drosync-cli -p drosync-daemon
local binary_dir="$ROOT_DIR/target/$target/release"
DROSYNC_OUTPUT_DIR="$OUTPUT_DIR" DROSYNC_VERSION="$VERSION" DROSYNC_PLATFORM_KEY=linux-arm64 \
DROSYNC_DEB_ARCH=arm64 DROSYNC_BINARY_DIR="$binary_dir" DROSYNC_INCLUDE_GUI=0 \
"$ROOT_DIR/packaging/linux/build-deb.sh"
DROSYNC_OUTPUT_DIR="$OUTPUT_DIR" DROSYNC_VERSION="$VERSION" DROSYNC_PLATFORM_KEY=linux-arm64 \
DROSYNC_BINARY_DIR="$binary_dir" DROSYNC_INCLUDE_GUI=0 \
"$ROOT_DIR/packaging/linux/build-portable.sh"
}
case "$TARGET" in
macos-arm64)
build_macos_preview
@ -70,8 +117,11 @@ case "$TARGET" in
linux-x86_64)
build_linux_preview
;;
linux-arm64)
build_linux_arm64_preview
;;
*)
echo "usage: $0 macos-arm64|linux-x86_64" >&2
echo "usage: $0 macos-arm64|linux-x86_64|linux-arm64" >&2
exit 2
;;
esac

View File

@ -2,16 +2,75 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
: "${DROSYNC_UPDATE_PUBLIC_KEY_BASE64:?set DROSYNC_UPDATE_PUBLIC_KEY_BASE64 from CI secrets}"
TARGET="${1:-}"
prepare_update_key() {
local platform_key="$1"
local specific_variable
case "$platform_key" in
linux-arm64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_ARM64" ;;
linux-x86_64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_LINUX_X86_64" ;;
macos-arm64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_MACOS_ARM64" ;;
windows-x86_64) specific_variable="DROSYNC_UPDATE_PUBLIC_KEY_BASE64_WINDOWS_X86_64" ;;
*) echo "unsupported update-key platform: $platform_key" >&2; exit 2 ;;
esac
local selected="${!specific_variable:-${DROSYNC_UPDATE_PUBLIC_KEY_BASE64:-}}"
if [[ -z "$selected" ]]; then
echo "set $specific_variable or DROSYNC_UPDATE_PUBLIC_KEY_BASE64 from CI secrets" >&2
exit 1
fi
# Keep the generic name populated for older targets while the platform crate
# embeds the more specific variable for newly built clients.
export DROSYNC_UPDATE_PUBLIC_KEY_BASE64="$selected"
export "$specific_variable=$selected"
}
require_linux_x86_64_builder() {
[[ "$(uname -s)-$(uname -m)" == "Linux-x86_64" ]] || {
echo "linux-arm64 cross builds require a Linux x86_64 builder" >&2
exit 1
}
}
build_linux_arm64_headless() {
require_linux_x86_64_builder
prepare_update_key linux-arm64
local target="aarch64-unknown-linux-gnu"
local linker="${DROSYNC_AARCH64_LINKER:-aarch64-linux-gnu-gcc}"
local archiver="${DROSYNC_AARCH64_AR:-aarch64-linux-gnu-ar}"
command -v "$linker" >/dev/null || {
echo "missing ARM64 cross linker $linker (install gcc-aarch64-linux-gnu)" >&2
exit 1
}
command -v "$archiver" >/dev/null || {
echo "missing ARM64 archiver $archiver (install binutils-aarch64-linux-gnu)" >&2
exit 1
}
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$linker"
export CC_aarch64_unknown_linux_gnu="$linker"
export AR_aarch64_unknown_linux_gnu="$archiver"
cargo build --locked --manifest-path "$ROOT_DIR/Cargo.toml" --release --target "$target" \
-p drosync-cli -p drosync-daemon
local binary_dir="$ROOT_DIR/target/$target/release"
DROSYNC_PLATFORM_KEY=linux-arm64 DROSYNC_DEB_ARCH=arm64 DROSYNC_BINARY_DIR="$binary_dir" \
DROSYNC_INCLUDE_GUI=0 "$ROOT_DIR/packaging/linux/build-deb.sh"
DROSYNC_PLATFORM_KEY=linux-arm64 DROSYNC_BINARY_DIR="$binary_dir" DROSYNC_INCLUDE_GUI=0 \
"$ROOT_DIR/packaging/linux/build-portable.sh"
}
case "$TARGET" in
linux-x86_64)
prepare_update_key linux-x86_64
cargo build --manifest-path "$ROOT_DIR/Cargo.toml" --release --workspace
"$ROOT_DIR/packaging/linux/build-deb.sh"
"$ROOT_DIR/packaging/linux/build-portable.sh"
;;
linux-arm64)
build_linux_arm64_headless
;;
macos-arm64)
[[ "$(uname -s)-$(uname -m)" == "Darwin-arm64" ]] || { echo "macos-arm64 must be built on an Apple Silicon runner" >&2; exit 1; }
prepare_update_key macos-arm64
cargo build --manifest-path "$ROOT_DIR/Cargo.toml" --release --workspace
"$ROOT_DIR/packaging/macos/build-pkg.sh"
;;
@ -20,7 +79,7 @@ case "$TARGET" in
exit 2
;;
*)
echo "usage: $0 linux-x86_64|macos-arm64|windows-x86_64" >&2
echo "usage: $0 linux-x86_64|linux-arm64|macos-arm64|windows-x86_64" >&2
exit 2
;;
esac

View File

@ -0,0 +1,21 @@
# drosync portable systemd bundle
This archive is an ABI-specific, no-container package for Linux systems with
systemd. It contains the CLI and daemon; `linux-arm64` builds deliberately omit
the desktop tray GUI so they can run on a headless S100.
Verify the adjacent SHA-256 file before extracting the archive. Then install it
as root:
```bash
sudo ./install-systemd-portable.sh --enable
```
The installer uses `/opt/drosync` by default, creates the restricted `drosync`
system account and `/var/lib/drosync`, writes `/etc/systemd/system/drosync.service`,
and does not store access credentials. Configure credentials through the CLI or
the existing `/etc/drosync/environment` / `DROSYNC_SECRET_FILE` mechanism.
Use `sudo ./uninstall-systemd-portable.sh` to stop and remove the service. The
uninstaller leaves `/var/lib/drosync` and `/etc/drosync` intact so sync state and
credentials are not deleted implicitly.

View File

@ -3,15 +3,56 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
VERSION="${DROSYNC_VERSION:-$(sed -n 's/^version = "\(.*\)"/\1/p' "$ROOT_DIR/Cargo.toml" | head -1)}"
ARCH="${DROSYNC_DEB_ARCH:-amd64}"
PLATFORM_KEY="${DROSYNC_PLATFORM_KEY:-}"
BINARY_DIR="${DROSYNC_BINARY_DIR:-$ROOT_DIR/target/release}"
if [[ -z "$PLATFORM_KEY" ]]; then
case "$(uname -m)" in
x86_64) PLATFORM_KEY="linux-x86_64" ;;
aarch64|arm64) PLATFORM_KEY="linux-arm64" ;;
*) echo "set DROSYNC_PLATFORM_KEY for this Linux architecture" >&2; exit 2 ;;
esac
fi
case "$PLATFORM_KEY" in
linux-x86_64)
DEFAULT_ARCH="amd64"
DEFAULT_INCLUDE_GUI=1
;;
linux-arm64)
DEFAULT_ARCH="arm64"
DEFAULT_INCLUDE_GUI=0
;;
*)
echo "unsupported Linux release platform: $PLATFORM_KEY" >&2
exit 2
;;
esac
ARCH="${DROSYNC_DEB_ARCH:-$DEFAULT_ARCH}"
INCLUDE_GUI="${DROSYNC_INCLUDE_GUI:-$DEFAULT_INCLUDE_GUI}"
OUTPUT_DIR="${DROSYNC_OUTPUT_DIR:-$ROOT_DIR/dist}"
PACKAGE_ROOT="$(mktemp -d)"
trap 'rm -rf "$PACKAGE_ROOT"' EXIT
for binary in drosync drosync-daemon; do
if [[ ! -x "$BINARY_DIR/$binary" ]]; then
echo "missing executable $BINARY_DIR/$binary; build CLI and daemon for $PLATFORM_KEY first" >&2
exit 1
fi
done
case "$INCLUDE_GUI" in
0|1) ;;
*) echo "DROSYNC_INCLUDE_GUI must be 0 or 1" >&2; exit 2 ;;
esac
if [[ "$INCLUDE_GUI" == 1 && ! -x "$BINARY_DIR/drosync-gui" ]]; then
echo "missing executable $BINARY_DIR/drosync-gui while DROSYNC_INCLUDE_GUI=1" >&2
exit 1
fi
mkdir -p "$PACKAGE_ROOT/DEBIAN" "$PACKAGE_ROOT/usr/bin" "$PACKAGE_ROOT/lib/systemd/system" "$PACKAGE_ROOT/usr/lib/systemd/user"
cp "$ROOT_DIR/target/release/drosync" "$PACKAGE_ROOT/usr/bin/drosync"
cp "$ROOT_DIR/target/release/drosync-daemon" "$PACKAGE_ROOT/usr/bin/drosync-daemon"
cp "$ROOT_DIR/target/release/drosync-gui" "$PACKAGE_ROOT/usr/bin/drosync-gui"
cp "$BINARY_DIR/drosync" "$PACKAGE_ROOT/usr/bin/drosync"
cp "$BINARY_DIR/drosync-daemon" "$PACKAGE_ROOT/usr/bin/drosync-daemon"
if [[ "$INCLUDE_GUI" == 1 ]]; then
cp "$BINARY_DIR/drosync-gui" "$PACKAGE_ROOT/usr/bin/drosync-gui"
fi
sed -e "s/^Version:.*/Version: $VERSION/" -e "s/^Architecture:.*/Architecture: $ARCH/" \
"$ROOT_DIR/packaging/linux/debian/control" >"$PACKAGE_ROOT/DEBIAN/control"
cp "$ROOT_DIR/packaging/linux/debian/postinst" "$PACKAGE_ROOT/DEBIAN/postinst"

View File

@ -4,14 +4,59 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
VERSION="${DROSYNC_VERSION:-1.0.0}"
OUTPUT_DIR="${DROSYNC_OUTPUT_DIR:-$ROOT_DIR/dist}"
PLATFORM_KEY="${DROSYNC_PLATFORM_KEY:-}"
BINARY_DIR="${DROSYNC_BINARY_DIR:-$ROOT_DIR/target/release}"
if [[ -z "$PLATFORM_KEY" ]]; then
case "$(uname -m)" in
x86_64) PLATFORM_KEY="linux-x86_64" ;;
aarch64|arm64) PLATFORM_KEY="linux-arm64" ;;
*) echo "set DROSYNC_PLATFORM_KEY for this Linux architecture" >&2; exit 2 ;;
esac
fi
case "$PLATFORM_KEY" in
linux-x86_64) DEFAULT_INCLUDE_GUI=1 ;;
linux-arm64) DEFAULT_INCLUDE_GUI=0 ;;
*) echo "unsupported Linux release platform: $PLATFORM_KEY" >&2; exit 2 ;;
esac
INCLUDE_GUI="${DROSYNC_INCLUDE_GUI:-$DEFAULT_INCLUDE_GUI}"
STAGE="$(mktemp -d)"
trap 'rm -rf "$STAGE"' EXIT
mkdir -p "$STAGE/drosync-$VERSION" "$OUTPUT_DIR"
cp "$ROOT_DIR/target/release/drosync" "$ROOT_DIR/target/release/drosync-daemon" "$ROOT_DIR/target/release/drosync-gui" "$STAGE/drosync-$VERSION/"
cp "$ROOT_DIR/packaging/linux/drosync-user.service" "$STAGE/drosync-$VERSION/"
tar -C "$STAGE" -czf "$OUTPUT_DIR/drosync-${VERSION}-linux-x86_64.tar.gz" "drosync-$VERSION"
sha256sum "$OUTPUT_DIR/drosync-${VERSION}-linux-x86_64.tar.gz" >"$OUTPUT_DIR/drosync-${VERSION}-linux-x86_64.tar.gz.sha256"
if [[ -n "${DROSYNC_GPG_SIGN_KEY:-}" ]]; then
gpg --batch --yes --local-user "$DROSYNC_GPG_SIGN_KEY" --detach-sign --armor "$OUTPUT_DIR/drosync-${VERSION}-linux-x86_64.tar.gz"
for binary in drosync drosync-daemon; do
if [[ ! -x "$BINARY_DIR/$binary" ]]; then
echo "missing executable $BINARY_DIR/$binary; build CLI and daemon for $PLATFORM_KEY first" >&2
exit 1
fi
done
case "$INCLUDE_GUI" in
0|1) ;;
*) echo "DROSYNC_INCLUDE_GUI must be 0 or 1" >&2; exit 2 ;;
esac
if [[ "$INCLUDE_GUI" == 1 && ! -x "$BINARY_DIR/drosync-gui" ]]; then
echo "missing executable $BINARY_DIR/drosync-gui while DROSYNC_INCLUDE_GUI=1" >&2
exit 1
fi
PACKAGE_NAME="drosync-$VERSION"
PACKAGE_ROOT="$STAGE/$PACKAGE_NAME"
mkdir -p "$PACKAGE_ROOT" "$OUTPUT_DIR"
cp "$BINARY_DIR/drosync" "$PACKAGE_ROOT/drosync"
cp "$BINARY_DIR/drosync-daemon" "$PACKAGE_ROOT/drosync-daemon"
if [[ "$INCLUDE_GUI" == 1 ]]; then
cp "$BINARY_DIR/drosync-gui" "$PACKAGE_ROOT/drosync-gui"
fi
cp "$ROOT_DIR/packaging/linux/drosync.service" "$PACKAGE_ROOT/drosync.service"
cp "$ROOT_DIR/packaging/linux/drosync-user.service" "$PACKAGE_ROOT/drosync-user.service"
cp "$ROOT_DIR/packaging/linux/drosync-portable.service" "$PACKAGE_ROOT/drosync-portable.service"
cp "$ROOT_DIR/packaging/linux/install-systemd-portable.sh" "$PACKAGE_ROOT/install-systemd-portable.sh"
cp "$ROOT_DIR/packaging/linux/uninstall-systemd-portable.sh" "$PACKAGE_ROOT/uninstall-systemd-portable.sh"
cp "$ROOT_DIR/packaging/linux/PORTABLE-SYSTEMD-README.md" "$PACKAGE_ROOT/README-systemd-portable.md"
chmod 0755 "$PACKAGE_ROOT/install-systemd-portable.sh" "$PACKAGE_ROOT/uninstall-systemd-portable.sh"
ARCHIVE="$OUTPUT_DIR/drosync-${VERSION}-${PLATFORM_KEY}.tar.gz"
tar --sort=name --mtime='@0' --owner=0 --group=0 --numeric-owner \
-C "$STAGE" -czf "$ARCHIVE" "$PACKAGE_NAME"
sha256sum "$ARCHIVE" >"$ARCHIVE.sha256"
if [[ -n "${DROSYNC_GPG_SIGN_KEY:-}" ]]; then
gpg --batch --yes --local-user "$DROSYNC_GPG_SIGN_KEY" --detach-sign --armor "$ARCHIVE"
fi

View File

@ -6,4 +6,5 @@ Architecture: amd64
Maintainer: D-Robotics <support@example.invalid>
Depends: ca-certificates, debsig-verify, libsecret-1-0
Description: Secure one-way local-to-BOS synchronization client
drosync provides a CLI, daemon, tray GUI, crash recovery, and signed updates.
drosync provides a CLI, daemon, crash recovery, and signed updates. Some
packages additionally include an optional tray GUI.

View File

@ -0,0 +1,24 @@
[Unit]
Description=drosync portable system synchronization daemon
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=@DROSYNC_INSTALL_ROOT@/drosync-daemon
Restart=on-failure
RestartSec=5
User=drosync
Group=drosync
Environment=HOME=/var/lib/drosync
Environment=XDG_DATA_HOME=/var/lib/drosync
Environment=XDG_CONFIG_HOME=/etc/drosync
EnvironmentFile=-/etc/drosync/environment
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths=/var/lib/drosync
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,71 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "${EUID:-$(id -u)}" -ne 0 ]]; then
echo "run this installer as root (for example: sudo ./install-systemd-portable.sh)" >&2
exit 1
fi
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
INSTALL_ROOT="/opt/drosync"
ENABLE=0
usage() {
echo "usage: $0 [--prefix /opt/drosync] [--enable]" >&2
}
while [[ $# -gt 0 ]]; do
case "$1" in
--prefix)
[[ $# -ge 2 ]] || { usage; exit 2; }
INSTALL_ROOT="$2"
shift 2
;;
--enable)
ENABLE=1
shift
;;
-h|--help)
usage
exit 0
;;
*)
usage
exit 2
;;
esac
done
case "$INSTALL_ROOT" in
/*) ;;
*) echo "--prefix must be an absolute path" >&2; exit 2 ;;
esac
for binary in drosync drosync-daemon; do
[[ -x "$SOURCE_DIR/$binary" ]] || {
echo "portable bundle is missing executable $binary" >&2
exit 1
}
done
if ! getent group drosync >/dev/null 2>&1; then
groupadd --system drosync
fi
if ! getent passwd drosync >/dev/null 2>&1; then
useradd --system --gid drosync --home-dir /var/lib/drosync --no-create-home --shell /usr/sbin/nologin drosync
fi
install -d -o drosync -g drosync -m 0700 /var/lib/drosync
install -d -m 0755 /etc/drosync "$INSTALL_ROOT"
install -m 0755 "$SOURCE_DIR/drosync" "$INSTALL_ROOT/drosync"
install -m 0755 "$SOURCE_DIR/drosync-daemon" "$INSTALL_ROOT/drosync-daemon"
if [[ -f "$SOURCE_DIR/drosync-gui" ]]; then
install -m 0755 "$SOURCE_DIR/drosync-gui" "$INSTALL_ROOT/drosync-gui"
fi
sed "s|@DROSYNC_INSTALL_ROOT@|$INSTALL_ROOT|g" "$SOURCE_DIR/drosync-portable.service" \
>/etc/systemd/system/drosync.service
chmod 0644 /etc/systemd/system/drosync.service
systemctl daemon-reload
if [[ "$ENABLE" == 1 ]]; then
systemctl enable --now drosync.service
fi
echo "installed drosync portable systemd bundle to $INSTALL_ROOT"

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "${EUID:-$(id -u)}" -ne 0 ]]; then
echo "run this uninstaller as root" >&2
exit 1
fi
INSTALL_ROOT="/opt/drosync"
if [[ "${1:-}" == "--prefix" ]]; then
[[ $# -eq 2 ]] || { echo "usage: $0 [--prefix /opt/drosync]" >&2; exit 2; }
INSTALL_ROOT="$2"
elif [[ $# -ne 0 ]]; then
echo "usage: $0 [--prefix /opt/drosync]" >&2
exit 2
fi
case "$INSTALL_ROOT" in
/*) ;;
*) echo "--prefix must be an absolute path" >&2; exit 2 ;;
esac
systemctl disable --now drosync.service >/dev/null 2>&1 || true
rm -f /etc/systemd/system/drosync.service
systemctl daemon-reload
rm -f "$INSTALL_ROOT/drosync" "$INSTALL_ROOT/drosync-daemon" "$INSTALL_ROOT/drosync-gui"
rmdir "$INSTALL_ROOT" 2>/dev/null || true
echo "uninstalled drosync portable systemd bundle from $INSTALL_ROOT"

View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
WORK_DIR="$(mktemp -d)"
trap 'rm -rf "$WORK_DIR"' EXIT
BIN_DIR="$WORK_DIR/bin"
OUTPUT_DIR="$WORK_DIR/dist"
VERSION="0.0.0-arm64-package-check"
mkdir -p "$BIN_DIR"
for binary in drosync drosync-daemon; do
printf '#!/bin/sh\nexit 0\n' >"$BIN_DIR/$binary"
chmod 0755 "$BIN_DIR/$binary"
done
DROSYNC_VERSION="$VERSION" \
DROSYNC_OUTPUT_DIR="$OUTPUT_DIR" \
DROSYNC_PLATFORM_KEY=linux-arm64 \
DROSYNC_BINARY_DIR="$BIN_DIR" \
DROSYNC_INCLUDE_GUI=0 \
"$ROOT_DIR/packaging/linux/build-portable.sh"
ARCHIVE="$OUTPUT_DIR/drosync-${VERSION}-linux-arm64.tar.gz"
CHECKSUM="$ARCHIVE.sha256"
[[ -f "$ARCHIVE" && -f "$CHECKSUM" ]]
sha256sum --check "$CHECKSUM"
CONTENTS="$WORK_DIR/contents.txt"
tar -tzf "$ARCHIVE" >"$CONTENTS"
PACKAGE_ROOT="drosync-$VERSION"
for path in \
"$PACKAGE_ROOT/drosync" \
"$PACKAGE_ROOT/drosync-daemon" \
"$PACKAGE_ROOT/drosync-portable.service" \
"$PACKAGE_ROOT/install-systemd-portable.sh" \
"$PACKAGE_ROOT/uninstall-systemd-portable.sh" \
"$PACKAGE_ROOT/README-systemd-portable.md"; do
grep -Fqx "$path" "$CONTENTS"
done
if grep -Fq "drosync-gui" "$CONTENTS"; then
echo "ARM64 portable package must not require or include drosync-gui" >&2
exit 1
fi
tar -xOf "$ARCHIVE" "$PACKAGE_ROOT/drosync-portable.service" \
| grep -Fqx 'ExecStart=@DROSYNC_INSTALL_ROOT@/drosync-daemon'
tar -xOf "$ARCHIVE" "$PACKAGE_ROOT/install-systemd-portable.sh" \
| grep -Fqx ' systemctl enable --now drosync.service'
bash -n "$ROOT_DIR/packaging/linux/build-portable.sh" \
"$ROOT_DIR/packaging/linux/install-systemd-portable.sh" \
"$ROOT_DIR/packaging/linux/uninstall-systemd-portable.sh"
echo "validated ARM64 no-GUI systemd portable package: $ARCHIVE"

View File

@ -26,11 +26,12 @@
"paused": { "type": "boolean" },
"artifacts": {
"type": "object",
"required": ["windows-x86_64", "linux-x86_64", "macos-arm64"],
"required": ["windows-x86_64", "linux-x86_64", "linux-arm64", "macos-arm64"],
"additionalProperties": { "type": "string", "format": "uri" }
},
"sha256": {
"type": "object",
"required": ["windows-x86_64", "linux-x86_64", "linux-arm64", "macos-arm64"],
"additionalProperties": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
},
"signature": { "type": "string", "contentEncoding": "base64" }