跳到主要内容

文件 · 命令参考

qzx auditWorkspace

作用

创建带内容指纹的确定性计划,用于审查可能的清理操作而不改变工作区。

命令成熟度:Alpha

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

行为与内置保护

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

此操作直接执行

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

无需网络即可运行

设计为无需提权即可运行

审计绝不会修改工作区内容。默认完全只读;plan_file 可明确创建一个按内容寻址的 JSON 计划,且绝不覆盖现有文件。构件、日志、备份、命名模式、链接、特殊条目和重组建议仅供审查。

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

准确语法

qzx auditWorkspace [path] [categories] [max_files] [plan_file] --json

参数

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

名称类型必填默认值描述
pathstr"."要审计的工作区目录
categoriesstr"build,temp,artifacts,duplicates,reorganizations"逗号分隔的类别:build、temp、artifacts、duplicates 和 reorganizations
max_filesint15000要检查的非目录条目最大数量
plan_filestr未声明用于保存计划的可选新 JSON 文件;绝不覆盖现有文件

输入示例

qzx auditWorkspace .

检查当前工作区且不写入任何文件

qzx auditWorkspace . --categories build,temp,duplicates --plan-file qzx-repair-plan.json

保存 build、临时项和重复项计划,供 repairWorkspace 后续验证

要获得完整结构化载荷,请添加 --json: qzx auditWorkspace [path] [categories] [max_files] [plan_file] --json

实测输出示例

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

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

{
    "success": true,
    "status": "complete",
    "message": "Workspace audit complete: 1 executable cleanup action(s) and 0 review-only finding(s), totaling 28 recoverable byte(s). Plan saved to 'C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\repair-workspace\\plan.json'.",
    "details": {
        "path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\repair-workspace\\workspace",
        "workspace_unchanged": true,
        "plan_file": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\repair-workspace\\plan.json",
        "plan": {
            "schema_version": 1,
            "root": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\repair-workspace\\workspace",
            "categories": [
                "build",
                "temp",
                "artifacts",
                "duplicates",
                "reorganizations"
            ],
            "max_files": 15000,
            "scan_complete": true,
            "scanned_files": 1,
            "scanned_directories": 0,
            "ignored_paths": [],
            "scan_errors": [],
            "actions": [
                {
                    "category": "temp",
                    "kind": "delete_file",
                    "path": "debug.tmp",
                    "reason": "Temporary editor or tool output selected for explicit cleanup.",
                    "executable": true,
                    "size_bytes": 28,
                    "fingerprint": {
                        "type": "file",
                        "size_bytes": 28,
                        "sha256": "a4be5b5eeff332365000a7d71223443e63df5d51a58fdb60aa682b8b01d22266"
                    },
                    "id": "act-76685ad35f1fd085e962"
                }
            ],
            "summary": {
                "total_actions": 1,
                "executable_actions": 1,
                "review_only_actions": 0,
                "recoverable_bytes": 28,
                "category_counts": {
                    "build": 0,
                    "temp": 1,
                    "artifacts": 0,
                    "duplicates": 0,
                    "reorganizations": 0
                }
            },
            "plan_id": "plan-70b0f1e9ef689794bc9423b4e17812fad340a3316bb5ddf912c29483aa6d05b5"
        }
    },
    "meta": {
        "command": "auditWorkspace",
        "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": 31.418,
        "schema_version": 1
    }
}
查看 JSON 结果契约
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
        "success",
        "message",
        "meta"
    ],
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string"
        },
        "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
        },
        "details": {
            "oneOf": [
                {
                    "type": "object",
                    "properties": {
                        "path": [],
                        "workspace_unchanged": {
                            "type": "boolean"
                        },
                        "plan_file": [],
                        "plan": []
                    },
                    "additionalProperties": true
                },
                {
                    "type": "object",
                    "properties": {
                        "path": []
                    },
                    "additionalProperties": true
                },
                {
                    "type": "object",
                    "properties": {
                        "path": [],
                        "plan": [],
                        "plan_file": []
                    },
                    "additionalProperties": true
                }
            ]
        },
        "error": [],
        "error_code": {
            "type": "string"
        },
        "status": {
            "type": "string"
        }
    },
    "additionalProperties": true
}

错误与限制

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

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

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

证据与来源

测试
未找到与模块同名的专用测试文件;这并不能证明完全没有测试覆盖。
文档渠道
开发文档 0.2.2.0.9 · main · sha256:cfba936e39931c286ca23add0ae546693db17d8b316e7cbc3891d26642d9b7e8
可用性
0.2.2.0.9 或更早

继续探索

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

浏览所有 QZX 命令