跳到主要内容

文件 · 命令参考

qzx repairWorkspace

作用

验证 auditWorkspace 保存的计划,并仅应用未发生变化的已选清理操作。

命令成熟度:Alpha

可用于真实使用和反馈,但其接口与行为仍可能继续演进。 这是当前开发 checkout 的评估。未来每个不可变发布标签都会保留该版本中包含的准确评估。 可在 PyPI 0.2.2.0.9 使用。文档对应 alpha checkout 0.2.2.0.9。

行为与内置保护

实际模式会应用你请求的更改

提供预览

无需调用原生程序即可运行

无需网络即可运行

使用你当前的权限;结果可能有所不同

默认行为是预览。真实修复要求 auditWorkspace 保存的完整计划、明确的可执行操作标识符、未发生变化的内容指纹、dry_run=false、apply=true,以及带故障保护的工作区备份。所选条目会在清理前隔离到同一工作区内的 staging;仅供审查的发现永远不能应用。

QZX 会在实际更改前创建恢复文件;只有在你明确决定故意跳过它时才使用 --dangerously-bypass-approvals-and-sandbox/--yolo。

此安全分类由 OpenAI GPT-5.6 Sol 于 2026-09-05 对照实现摘要 sha256:dd5295cd267097ab0e54e7cb7e02105099db87446652192be1d31fad5da527e5 审阅。

准确语法

qzx repairWorkspace [path] [plan_file] [action_ids] [dry_run] [apply] --json

参数

滑动或使用横向滚动条查看所有列。

名称类型必填默认值描述
pathstr"."与已保存计划对应的工作区目录
plan_filestr未声明由 auditWorkspace 创建的 JSON 计划
action_idsstr未声明操作员已审阅的可执行操作标识符,以逗号分隔
dry_runbooltrue验证并预览,不改变工作区
applyboolfalse明确授权所选操作;要求 dry_run=false

输入示例

qzx repairWorkspace . --plan-file qzx-repair-plan.json

验证已保存计划并列出可执行操作

qzx repairWorkspace . --plan-file qzx-repair-plan.json --action-ids act-123,act-456 --dry-run false --apply

备份工作区、重新验证两个操作并应用

要获得完整结构化载荷,请添加 --json: qzx repairWorkspace [path] [plan_file] [action_ids] [dry_run] [apply] --json

实测输出示例

使用 Windows 11 上的 QZX 0.2.2.0.9 捕获;退出码 0。依赖主机的值和耗时可能不同。

示例命令: qzx repairWorkspace ../artifacts/qzx-evidence/repair-workspace/workspace --plan-file ../artifacts/qzx-evidence/repair-workspace/plan.json --json

{
    "success": true,
    "status": "preview",
    "message": "Repair plan 'plan-70b0f1e9ef689794bc9423b4e17812fad340a3316bb5ddf912c29483aa6d05b5' is valid and unchanged. 1 executable action(s) are available; 0 selected. Nothing was changed.",
    "details": {
        "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\repair-workspace\\workspace",
        "plan_file": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\repair-workspace\\plan.json",
        "plan_id": "plan-70b0f1e9ef689794bc9423b4e17812fad340a3316bb5ddf912c29483aa6d05b5",
        "dry_run_mode": true,
        "apply_requested": false,
        "workspace_unchanged": true,
        "selected_actions": [],
        "executable_actions": [
            {
                "category": "temp",
                "executable": true,
                "fingerprint": {
                    "sha256": "a4be5b5eeff332365000a7d71223443e63df5d51a58fdb60aa682b8b01d22266",
                    "size_bytes": 28,
                    "type": "file"
                },
                "id": "act-76685ad35f1fd085e962",
                "kind": "delete_file",
                "path": "debug.tmp",
                "reason": "Temporary editor or tool output selected for explicit cleanup.",
                "size_bytes": 28
            }
        ],
        "review_only_actions": []
    },
    "meta": {
        "command": "repairWorkspace",
        "command_maturity": {
            "stage": "alpha",
            "label": "Alpha",
            "sequence": 2,
            "public_executable": true,
            "stability": "interface_may_change",
            "summary": "Available for real use and feedback while its interface and behavior can still evolve.",
            "promotion_review_required": false,
            "assessment_scope": "development_checkout"
        },
        "duration_ms": 8.58,
        "schema_version": 1
    }
}
查看 JSON 结果契约
{
    "type": "object",
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string"
        },
        "status": {
            "type": "string",
            "enum": [
                "preview",
                "applied",
                "rolled_back",
                "recovery_required",
                "cleanup_incomplete"
            ]
        },
        "error_code": {
            "type": "string"
        },
        "error": {
            "type": "string"
        },
        "details": {
            "type": "object",
            "additionalProperties": true
        },
        "meta": {
            "type": "object",
            "required": [
                "command",
                "command_maturity",
                "duration_ms",
                "schema_version"
            ],
            "properties": {
                "command": {
                    "type": "string"
                },
                "command_maturity": {
                    "type": "object",
                    "required": [
                        "stage",
                        "label",
                        "sequence",
                        "public_executable",
                        "stability",
                        "summary",
                        "promotion_review_required",
                        "assessment_scope"
                    ],
                    "properties": {
                        "stage": {
                            "type": "string"
                        },
                        "label": {
                            "type": "string"
                        },
                        "sequence": {
                            "type": "integer"
                        },
                        "public_executable": {
                            "type": "boolean"
                        },
                        "stability": {
                            "type": "string"
                        },
                        "summary": {
                            "type": "string"
                        },
                        "promotion_review_required": {
                            "type": "boolean"
                        },
                        "assessment_scope": {
                            "type": "string"
                        },
                        "note": {
                            "type": "string"
                        },
                        "review": {
                            "type": "object",
                            "required": [
                                "reviewed_on",
                                "rationale",
                                "evidence"
                            ],
                            "properties": {
                                "reviewed_on": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "rationale": {
                                    "type": "string"
                                },
                                "evidence": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "replacement": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "additionalProperties": true
                },
                "duration_ms": {
                    "type": "number"
                },
                "schema_version": {
                    "type": "integer"
                }
            },
            "additionalProperties": true
        }
    },
    "additionalProperties": true,
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "required": [
        "message",
        "meta",
        "success"
    ]
}

错误与限制

公开契约要求失败时返回 success=false 和具有描述性的 message。此目录尚未为每个命令声明专门的错误分类;请检查结果,不要推断不存在的错误码。

QZX 仍处于 alpha 阶段。可选依赖、权限和主机能力可能影响结果。

证据流程:已捕获并通过摘要验证。

证据与来源

文档渠道
开发文档 0.2.2.0.9 · main · sha256:cfba936e39931c286ca23add0ae546693db17d8b316e7cbc3891d26642d9b7e8
可用性
0.2.2.0.9 或更早

继续探索

这些命令同样属于 文件 类别。对比它们,选择最适合解决任务的操作。

浏览所有 QZX 命令