Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pyxis-harness-workspace

工作区提供者:工作区注册表与默认的 deepagents backend。

项 值
条目 workspace(base bundle)
插件 apply(函数插件)
提供 ctx.workspace(Workspaces)、ctx.backend
注入 tools
数据 记住的工作区:ctx.store

文件

文件 内容
__init__.py 导出
config.py Config
plugin.py apply:提供 ctx.workspace 与 ctx.backend
workspace.py Workspace、WorkspaceError、DEFAULT_WORKSPACE
registry.py Workspaces:打开、backend、最近使用、选择器、浏览
picker.py 系统文件夹对话框:Dialog、dialogs、run

默认工作区

项 契约
根目录 profile.documents 下的 default-workspace/:~/Documents/pyharness/<profile>/default-workspace/;不存在时创建
配置、环境变量、启动目录 不参与
<profile>/ 目录的其余内容 不在 agent 的文件工具范围内
没有 profile 的 harness 进程的当前目录

Backend

配置 backend agent 的文件工具
shell: false FilesystemBackend 工作区根上的 ls、read_file、write_file …
shell: true LocalShellBackend 同上,加 execute;需审批,shell_approval: false 时免审批

virtual_mode:agent 路径以 / 起始,/ = 根;路径不出根。

harness home 与根

关系 结果
home 在根之内 文件工具在 home 上被拒绝(读与写)
根在 home 之内 拒绝

Workspaces(ctx.workspace,registry.py)

成员 契约
default 配置的工作区(config.root);root、resolve … 委托给它
open(path) path 的已校验 Workspace;None 为默认工作区
backend_for(path, shell) 工作区的 backend,带缓存;shell=False 给出仅文件系统的 backend
recent() / remember / forget 会话用过的工作区;存于 ctx.store
rename(path, name) 工作区的显示名;None 恢复为目录名
browse(path) 一层目录:仅子目录;供应用内选择器使用
picker() native(本机的系统文件夹对话框)或 browse
pick(prompt) 依次尝试本机的对话框;所选的绝对路径,取消时 None;全部失败、无对话框或超时抛出 WorkspaceError
平台 对话框,按尝试顺序
macOS osascript choose folder
Windows PowerShell(powershell,否则 pwsh)的 FolderBrowserDialog;再是解释器自带的 Tk 对话框
Linux zenity、kdialog;有显示环境时
config.picker_command 只用这一条命令
对话框进程 结果
退出码 0,输出路径 选中
退出码 0,输出为空 取消
其他退出码,符合该对话框的取消特征(osascript 的 -128;zenity、kdialog 的退出码 1) 取消
其他退出码 失败:记入日志,尝试下一个对话框
全部失败 WorkspaceError 带各自的原因;页面显示原因并打开页面内的目录浏览器
Windows 契约
PowerShell -STA;$ErrorActionPreference = 'Stop',出错即以非零退出码结束
Tk 解释器自带;不依赖 PowerShell 与其执行策略
对话框的 owner 一个已显示的窗口:置顶、全透明、1×1、屏幕中央;任务栏按钮以提示语为标题
置顶 对话框打开后的第一秒内,owner 每 250 ms 重新置顶一次,共 4 次;它拥有的对话框随之置顶
未取得前台时 对话框仍在浏览器之前;点任务栏按钮转到对话框
输出 无 BOM 的 UTF-8;不另开控制台窗口

Workspace(workspace.py)

一个工作区:根目录、agent 路径解析、受保护路径。

成员 契约
resolve(path) agent 路径的真实路径;在根之外或在 home 之内 → ValueError
permissions() deepagents 的 FilesystemPermission 规则:拒绝受保护路径
describe() {root, name, virtual_mode, protected}

Metadata

Release files for pyxis-harness-workspace 0.1.1.dev8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxis-harness-workspace 0.1.1.dev8
File Size Uploaded Provenance Actions
pyxis_harness_workspace-0.1.1.dev8.tar.gz 10.5 kB Without provenance Details for pyxis_harness_workspace-0.1.1.dev8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyxis-harness-workspace 0.1.1.dev8
File Interpreter ABI Platform Actions
pyxis_harness_workspace-0.1.1.dev8-py3-none-any.whl Python 3 none any Details for pyxis_harness_workspace-0.1.1.dev8-py3-none-any.whl

Total release size: 26.0 kB

Release files / pyxis_harness_workspace-0.1.1.dev8.tar.gz

Download URL pyxis_harness_workspace-0.1.1.dev8.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
97445ffac188839d35df035015a432dba9770af6929663079ea9edc14ccfbbdb
BLAKE2b-256 checksum
How to use checksums
58f714c4ca0da977cb04e7139bc77208f37709760ececda2e17a1f67c3947793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pyxis_harness_workspace-0.1.1.dev8-py3-none-any.whl

Download URL pyxis_harness_workspace-0.1.1.dev8-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f3948b1d74463691922ee99a8aee5853830fa95dad0c1ff005c9875d08c23de
BLAKE2b-256 checksum
How to use checksums
750360cc4e7e9484f03e377e64caa79e0e706fad67f11cdddff6e4411a71a25f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pyxis-harness-workspace 0.1.1.dev8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page