@mseep/open-computer-use 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coderabbit.yaml +25 -0
- package/.dockerignore +95 -0
- package/.env.example +137 -0
- package/.githooks/pre-commit +68 -0
- package/.github/CODEOWNERS +125 -0
- package/.github/ISSUE_TEMPLATE/adr-proposal.md +41 -0
- package/.github/ISSUE_TEMPLATE/bug-report.md +49 -0
- package/.github/ISSUE_TEMPLATE/component-proposal.md +38 -0
- package/.github/ISSUE_TEMPLATE/config.yml +15 -0
- package/.github/ISSUE_TEMPLATE/dependency-proposal.md +59 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
- package/.github/ISSUE_TEMPLATE/nfr-proposal.md +44 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +15 -0
- package/.github/codeql/codeql-config.yml +11 -0
- package/.github/codeql/extensions/security-models/python-sanitizers.model.yml +17 -0
- package/.github/codeql/extensions/security-models/qlpack.yml +7 -0
- package/.github/dependabot.yml +23 -0
- package/.github/security-exceptions.yml +23 -0
- package/.github/workflows/build.yml +420 -0
- package/.github/workflows/codeql.yml +33 -0
- package/.github/workflows/contracts-lint.yml +90 -0
- package/.github/workflows/docs-lint.yml +151 -0
- package/.github/workflows/helm.yml +131 -0
- package/.github/workflows/identity-lint.yml +30 -0
- package/.github/workflows/release-chart.yml +177 -0
- package/.github/workflows/release.yml +95 -0
- package/.github/workflows/security.yml +332 -0
- package/.github/workflows/stale.yml +31 -0
- package/.github/workflows/supply-chain.yml +242 -0
- package/.gitleaks.toml +53 -0
- package/.markdownlint.yaml +51 -0
- package/.semgrepignore +85 -0
- package/.vale/styles/Architecture/ap13-data-class-substrate.yml +12 -0
- package/.vale/styles/Architecture/banned-phrases.yml +23 -0
- package/.vale/styles/Architecture/banned-vocab.yml +23 -0
- package/.vale/styles/Architecture/marketing-tone.yml +19 -0
- package/.vale.ini +18 -0
- package/CHANGELOG.md +411 -0
- package/CLAUDE.md +218 -0
- package/CONTRIBUTING.md +82 -0
- package/Dockerfile +676 -0
- package/LICENSE +98 -0
- package/LICENSE-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/NOTICE +36 -0
- package/README.md +516 -0
- package/SECURITY.md +45 -0
- package/THIRD-PARTY-LICENSES.md +14 -0
- package/apt-packages.txt +108 -0
- package/computer-use-server/.dockerignore +13 -0
- package/computer-use-server/Dockerfile +44 -0
- package/computer-use-server/README.md +84 -0
- package/computer-use-server/app.py +1544 -0
- package/computer-use-server/bin/list-subagent-models +449 -0
- package/computer-use-server/cli-defaults/README.md +31 -0
- package/computer-use-server/cli-defaults/codex.json +7 -0
- package/computer-use-server/cli-defaults/opencode.json +18 -0
- package/computer-use-server/cli_adapters/__init__.py +46 -0
- package/computer-use-server/cli_adapters/claude.py +163 -0
- package/computer-use-server/cli_adapters/codex.py +163 -0
- package/computer-use-server/cli_adapters/opencode.py +169 -0
- package/computer-use-server/cli_adapters/result.py +34 -0
- package/computer-use-server/cli_runtime.py +316 -0
- package/computer-use-server/context_vars.py +24 -0
- package/computer-use-server/docker_manager.py +1100 -0
- package/computer-use-server/docs_html.py +12 -0
- package/computer-use-server/mcp_resources.py +170 -0
- package/computer-use-server/mcp_tools.py +1430 -0
- package/computer-use-server/requirements.txt +17 -0
- package/computer-use-server/security.py +50 -0
- package/computer-use-server/skill_manager.py +664 -0
- package/computer-use-server/static/browser-viewer.js +445 -0
- package/computer-use-server/static/chart.umd.js +14 -0
- package/computer-use-server/static/docs.html +203 -0
- package/computer-use-server/static/github-dark.min.css +10 -0
- package/computer-use-server/static/github.min.css +10 -0
- package/computer-use-server/static/highlight.min.js +1213 -0
- package/computer-use-server/static/highlightjs-line-numbers.min.js +1 -0
- package/computer-use-server/static/icons.js +74 -0
- package/computer-use-server/static/jszip.min.js +13 -0
- package/computer-use-server/static/katex/auto-render.min.js +1 -0
- package/computer-use-server/static/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/computer-use-server/static/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/computer-use-server/static/katex/katex.min.css +1 -0
- package/computer-use-server/static/katex/katex.min.js +1 -0
- package/computer-use-server/static/locale.js +242 -0
- package/computer-use-server/static/mammoth.browser.min.js +21 -0
- package/computer-use-server/static/marked.min.js +6 -0
- package/computer-use-server/static/mermaid.min.js +2811 -0
- package/computer-use-server/static/pdf.min.js +22 -0
- package/computer-use-server/static/pdf.worker.min.js +22 -0
- package/computer-use-server/static/pptxviewjs.min.js +1 -0
- package/computer-use-server/static/preact-htm.min.js +1 -0
- package/computer-use-server/static/preview.css +1030 -0
- package/computer-use-server/static/preview.js +1522 -0
- package/computer-use-server/static/xlsx.full.min.js +22 -0
- package/computer-use-server/static/xterm-addon-fit.min.js +2 -0
- package/computer-use-server/static/xterm-addon-web-links.min.js +2 -0
- package/computer-use-server/static/xterm.css +218 -0
- package/computer-use-server/static/xterm.min.js +2 -0
- package/computer-use-server/system_prompt.py +761 -0
- package/computer-use-server/uploads.py +82 -0
- package/contracts/README.md +53 -0
- package/contracts/audit/audit-fanin.asyncapi.yaml +407 -0
- package/contracts/exec/exec-channel.schema.json +240 -0
- package/contracts/mcp/2025-06-18/ocu-constraints.schema.json +178 -0
- package/contracts/storage/file-artifact-api.schema.json +390 -0
- package/contracts/storage/file-ops.schema.json +217 -0
- package/contracts/storage/mount-config.schema.json +197 -0
- package/cron/Dockerfile +15 -0
- package/cron/cleanup-quick.sh +21 -0
- package/cron/cleanup.sh +127 -0
- package/data/outputs/.gitkeep +0 -0
- package/data/uploads/.gitkeep +0 -0
- package/docker-compose.test.yml +54 -0
- package/docker-compose.webui.yml +77 -0
- package/docker-compose.yml +96 -0
- package/docs/CLOUD.md +29 -0
- package/docs/COMPARISON.md +128 -0
- package/docs/DOCKER.md +469 -0
- package/docs/DYNAMIC-SKILLS.md +77 -0
- package/docs/FEATURES.md +100 -0
- package/docs/INSTALL.md +111 -0
- package/docs/KNOWN-BUGS.md +86 -0
- package/docs/MCP.md +320 -0
- package/docs/SCREENSHOTS.md +39 -0
- package/docs/SKILLS-USER-GUIDE.md +86 -0
- package/docs/SKILLS.md +483 -0
- package/docs/TERMINAL-TAB.md +56 -0
- package/docs/architecture/02-trust-boundaries.md +224 -0
- package/docs/architecture/03-c4-context.md +61 -0
- package/docs/architecture/04-bounded-contexts.md +119 -0
- package/docs/architecture/05-c4-container.md +88 -0
- package/docs/architecture/06-threat-model.md +172 -0
- package/docs/architecture/08-contracts.md +105 -0
- package/docs/architecture/MANIFESTO.md +38 -0
- package/docs/architecture/PROCESS.md +64 -0
- package/docs/architecture/README.md +37 -0
- package/docs/architecture/adr/0000-template.md +65 -0
- package/docs/architecture/adr/0001-layer-0-gate-legacy-exclusion.md +75 -0
- package/docs/architecture/adr/0002-session-view-descriptor.md +57 -0
- package/docs/architecture/adr/0003-sandbox-runtime-tier-ladder.md +63 -0
- package/docs/architecture/adr/0004-operator-authentication-substrate.md +63 -0
- package/docs/architecture/adr/0005-egress-credential-delivery-envoy-sds.md +62 -0
- package/docs/architecture/adr/0006-egress-forward-proxy-substrate.md +65 -0
- package/docs/architecture/adr/0007-egress-auth-mechanism.md +72 -0
- package/docs/architecture/adr/0008-session-egress-attribution.md +59 -0
- package/docs/architecture/adr/0009-audit-pipeline-pluggable-by-contract.md +76 -0
- package/docs/architecture/adr/0010-storage-backend-pluggable-adapter.md +60 -0
- package/docs/architecture/adr/0011-storage-egress-lane.md +67 -0
- package/docs/architecture/adr/0012-implementation-language.md +67 -0
- package/docs/architecture/adr/0020-sandbox-image-provisioning.md +82 -0
- package/docs/architecture/adr/README.md +53 -0
- package/docs/architecture/compliance/.gitkeep +0 -0
- package/docs/architecture/components/00-overview.md +42 -0
- package/docs/architecture/components/0000-template.md +50 -0
- package/docs/architecture/components/01-mcp-gateway.md +80 -0
- package/docs/architecture/components/02-control-operator-api.md +80 -0
- package/docs/architecture/components/04-storage-broker.md +104 -0
- package/docs/architecture/components/05-session-sandbox.md +93 -0
- package/docs/architecture/components/06-egress-trust-edge.md +95 -0
- package/docs/architecture/components/07-audit-pipeline.md +110 -0
- package/docs/architecture/diagrams/.gitkeep +0 -0
- package/docs/architecture/diagrams/02-trust-boundaries.mmd +111 -0
- package/docs/architecture/diagrams/06-threat-model.mmd +41 -0
- package/docs/architecture/diagrams/08-contracts.mmd +47 -0
- package/docs/architecture/diagrams/c4-container.mmd +59 -0
- package/docs/architecture/diagrams/c4-context.mmd +46 -0
- package/docs/architecture/glossary.md +172 -0
- package/docs/architecture/manifesto/.gitkeep +0 -0
- package/docs/architecture/manifesto/01-audience-and-buyer.md +57 -0
- package/docs/architecture/manifesto/02-nfrs.md +325 -0
- package/docs/architecture/manifesto/03-non-negotiables.md +35 -0
- package/docs/architecture/manifesto/04-non-goals.md +23 -0
- package/docs/architecture/manifesto/05-licensing-posture.md +61 -0
- package/docs/architecture/manifesto/06-starter-mode-policy.md +49 -0
- package/docs/architecture/manifesto/07-governance.md +60 -0
- package/docs/architecture/primitives-backlog.md +51 -0
- package/docs/architecture.svg +117 -0
- package/docs/claude-code-gateway.md +173 -0
- package/docs/cli-config-templates.md +240 -0
- package/docs/data-flow.svg +72 -0
- package/docs/demo-landing-page.gif +0 -0
- package/docs/demo-qwen-trending.gif +0 -0
- package/docs/dynamic-skills.svg +77 -0
- package/docs/file-flow.svg +126 -0
- package/docs/future-architecture/README.md +152 -0
- package/docs/future-architecture/adr/0001-control-plane-language-go.md +80 -0
- package/docs/future-architecture/adr/0002-guest-agent-language-go.md +84 -0
- package/docs/future-architecture/adr/0003-docker-poc-first-then-k8s.md +37 -0
- package/docs/future-architecture/adr/0004-pluggable-runtime-via-runtimeclass.md +34 -0
- package/docs/future-architecture/adr/0005-mcp-as-control-plane-gateway.md +34 -0
- package/docs/future-architecture/adr/0006-no-agpl-no-bsl-dependencies.md +41 -0
- package/docs/future-architecture/adr/0007-superseded-by-future-architecture.md +37 -0
- package/docs/future-architecture/adr/0008-internal-grpc-external-rest-mcp.md +106 -0
- package/docs/future-architecture/adr/0009-external-protocol-dialects.md +94 -0
- package/docs/future-architecture/adr/0010-lambda-as-inspiration-not-runtime.md +86 -0
- package/docs/future-architecture/adr/0011-kata-as-first-class-dind-runtime.md +84 -0
- package/docs/future-architecture/antipatterns.md +552 -0
- package/docs/future-architecture/architecture/01-layers.md +109 -0
- package/docs/future-architecture/architecture/02-layer4-control-plane.md +122 -0
- package/docs/future-architecture/architecture/03-layer3-providers.md +174 -0
- package/docs/future-architecture/architecture/04-layer2-runtimes.md +114 -0
- package/docs/future-architecture/architecture/04b-credential-broker.md +153 -0
- package/docs/future-architecture/architecture/05-layer1-guest-agent.md +138 -0
- package/docs/future-architecture/architecture/06-storage.md +134 -0
- package/docs/future-architecture/architecture/07-security.md +194 -0
- package/docs/future-architecture/architecture/08-networking.md +149 -0
- package/docs/future-architecture/architecture/09-templates.md +122 -0
- package/docs/future-architecture/architecture/10-observability.md +121 -0
- package/docs/future-architecture/design-notes.md +72 -0
- package/docs/future-architecture/gaps.md +281 -0
- package/docs/future-architecture/phase-template.md +123 -0
- package/docs/future-architecture/references.md +225 -0
- package/docs/future-architecture/research/01-kata-containers.md +100 -0
- package/docs/future-architecture/research/02-e2b-infra.md +133 -0
- package/docs/future-architecture/research/03-coder.md +115 -0
- package/docs/future-architecture/research/04-cloud-hypervisor.md +99 -0
- package/docs/future-architecture/research/05-firecracker.md +114 -0
- package/docs/future-architecture/research/06-agent-sandbox.md +142 -0
- package/docs/future-architecture/research/07-chromedp.md +78 -0
- package/docs/future-architecture/research/08-microsandbox.md +78 -0
- package/docs/future-architecture/research/09-agentbox.md +135 -0
- package/docs/future-architecture/research/10-sysbox.md +100 -0
- package/docs/future-architecture/research/11-firecracker-containerd.md +93 -0
- package/docs/future-architecture/research/12-docker-socket-proxy.md +59 -0
- package/docs/future-architecture/research/14-e2b-desktop-and-surf.md +107 -0
- package/docs/future-architecture/research/18-open-webui-terminals-observed.md +135 -0
- package/docs/future-architecture/research/bank-buyer.md +96 -0
- package/docs/future-architecture/research/enthusiast-audience.md +106 -0
- package/docs/future-architecture/research/proof-uipath-anthropic-2026-05.md +76 -0
- package/docs/future-architecture/research/widemoat-thesis-advisor.md +124 -0
- package/docs/future-architecture/roadmap.md +438 -0
- package/docs/kata-runtime.md +267 -0
- package/docs/kubernetes.md +86 -0
- package/docs/logo.png +0 -0
- package/docs/multi-cli.md +161 -0
- package/docs/openwebui-filter.md +134 -0
- package/docs/roadmap/implementation-roadmap.md +104 -0
- package/docs/sandbox-contents.svg +229 -0
- package/docs/screenshots/01-create-document.png +0 -0
- package/docs/screenshots/02-file-preview.png +0 -0
- package/docs/screenshots/03-browser-viewer.png +0 -0
- package/docs/screenshots/04-sub-agent-terminal.png +0 -0
- package/docs/screenshots/05-chat-overview.png +0 -0
- package/docs/screenshots/06-sub-agent-dashboard.png +0 -0
- package/docs/screenshots/07-frontend-design-skill.png +0 -0
- package/docs/screenshots/08-pptx-skill.png +0 -0
- package/docs/screenshots/09-skill-creator.png +0 -0
- package/docs/screenshots/10-data-chart.png +0 -0
- package/docs/shared-browser.svg +102 -0
- package/docs/system-prompt.md +113 -0
- package/docs/terminal-flow.svg +69 -0
- package/examples/helm/README.md +20 -0
- package/examples/helm/standalone/values.yaml +49 -0
- package/examples/helm/with-open-webui/README.md +99 -0
- package/examples/helm/with-open-webui/values-computer-use.yaml +32 -0
- package/examples/helm/with-open-webui/values-open-webui.yaml +67 -0
- package/fonts/NotoEmoji-Regular.ttf +0 -0
- package/helm/computer-use-server/.helmignore +17 -0
- package/helm/computer-use-server/Chart.yaml +32 -0
- package/helm/computer-use-server/README.md +211 -0
- package/helm/computer-use-server/templates/NOTES.txt +66 -0
- package/helm/computer-use-server/templates/_helpers.tpl +115 -0
- package/helm/computer-use-server/templates/configmap-dind-init.yaml +82 -0
- package/helm/computer-use-server/templates/configmap.yaml +18 -0
- package/helm/computer-use-server/templates/deployment.yaml +248 -0
- package/helm/computer-use-server/templates/ingress.yaml +38 -0
- package/helm/computer-use-server/templates/networkpolicy.yaml +50 -0
- package/helm/computer-use-server/templates/pdb.yaml +16 -0
- package/helm/computer-use-server/templates/pvc-data.yaml +20 -0
- package/helm/computer-use-server/templates/pvc-skills-cache.yaml +20 -0
- package/helm/computer-use-server/templates/pvc-user-data.yaml +20 -0
- package/helm/computer-use-server/templates/pvc-var-lib-docker.yaml +27 -0
- package/helm/computer-use-server/templates/secret.yaml +23 -0
- package/helm/computer-use-server/templates/service.yaml +22 -0
- package/helm/computer-use-server/templates/serviceaccount.yaml +15 -0
- package/helm/computer-use-server/templates/tests/test-health.yaml +23 -0
- package/helm/computer-use-server/values.schema.json +183 -0
- package/helm/computer-use-server/values.yaml +297 -0
- package/lychee.toml +36 -0
- package/openwebui/Dockerfile +52 -0
- package/openwebui/README.md +38 -0
- package/openwebui/functions/README.md +48 -0
- package/openwebui/functions/computer_link_filter.py +487 -0
- package/openwebui/init.sh +305 -0
- package/openwebui/patches/README.md +44 -0
- package/openwebui/patches/fix_artifacts_auto_show.py +441 -0
- package/openwebui/patches/fix_attached_files_position.py +87 -0
- package/openwebui/patches/fix_large_tool_args.py +156 -0
- package/openwebui/patches/fix_large_tool_results.py +289 -0
- package/openwebui/patches/fix_preview_url_detection.py +230 -0
- package/openwebui/patches/fix_skip_embedding_chat_files.py +229 -0
- package/openwebui/patches/fix_skip_rag_files_native_fc.py +100 -0
- package/openwebui/patches/fix_tool_loop_errors.py +510 -0
- package/package.json +39 -0
- package/requirements.txt +112 -0
- package/scripts/check-config.sh +141 -0
- package/scripts/docs-lint/ai-slop-detector.sh +202 -0
- package/scripts/docs-lint/architecture-tree-whitelist.sh +131 -0
- package/scripts/docs-lint/ascii-diagram-detector.sh +58 -0
- package/scripts/docs-lint/front-matter-validator.sh +97 -0
- package/scripts/docs-lint/gitignored-ref-detector.sh +122 -0
- package/scripts/docs-lint/identity-email-detector.sh +48 -0
- package/scripts/docs-lint/test-linters.sh +354 -0
- package/scripts/docs-lint/wc-budget.sh +61 -0
- package/scripts/githooks/pre-push +75 -0
- package/server.json +13 -0
- package/settings-wrapper/Dockerfile +9 -0
- package/settings-wrapper/README.md +119 -0
- package/settings-wrapper/app.py +113 -0
- package/settings-wrapper/requirements.txt +2 -0
- package/settings-wrapper/skills.json +25 -0
- package/skills/README.md +46 -0
- package/skills/examples/algorithmic-art/SKILL.md +405 -0
- package/skills/examples/algorithmic-art/templates/generator_template.js +223 -0
- package/skills/examples/algorithmic-art/templates/viewer.html +601 -0
- package/skills/examples/artifacts-builder/SKILL.md +74 -0
- package/skills/examples/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/skills/examples/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/skills/examples/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills/examples/canvas-design/LICENSE.txt +202 -0
- package/skills/examples/canvas-design/SKILL.md +130 -0
- package/skills/examples/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/examples/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/examples/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/examples/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/examples/copy-editing/SKILL.md +447 -0
- package/skills/examples/copy-editing/evals/evals.json +89 -0
- package/skills/examples/copy-editing/references/plain-english-alternatives.md +394 -0
- package/skills/examples/internal-comms/LICENSE.txt +202 -0
- package/skills/examples/internal-comms/SKILL.md +32 -0
- package/skills/examples/internal-comms/examples/3p-updates.md +47 -0
- package/skills/examples/internal-comms/examples/company-newsletter.md +65 -0
- package/skills/examples/internal-comms/examples/faq-answers.md +30 -0
- package/skills/examples/internal-comms/examples/general-comms.md +16 -0
- package/skills/examples/mcp-builder/SKILL.md +328 -0
- package/skills/examples/mcp-builder/reference/evaluation.md +602 -0
- package/skills/examples/mcp-builder/reference/mcp_best_practices.md +915 -0
- package/skills/examples/mcp-builder/reference/node_mcp_server.md +916 -0
- package/skills/examples/mcp-builder/reference/python_mcp_server.md +752 -0
- package/skills/examples/mcp-builder/scripts/connections.py +151 -0
- package/skills/examples/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/examples/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/examples/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/examples/product-marketing-context/SKILL.md +241 -0
- package/skills/examples/product-marketing-context/evals/evals.json +85 -0
- package/skills/examples/single-cell-rna-qc/SKILL.md +175 -0
- package/skills/examples/single-cell-rna-qc/references/scverse_qc_guidelines.md +186 -0
- package/skills/examples/single-cell-rna-qc/scripts/qc_analysis.py +232 -0
- package/skills/examples/single-cell-rna-qc/scripts/qc_core.py +233 -0
- package/skills/examples/single-cell-rna-qc/scripts/qc_plotting.py +235 -0
- package/skills/examples/skill-creator/SKILL.md +355 -0
- package/skills/examples/skill-creator/references/output-patterns.md +82 -0
- package/skills/examples/skill-creator/references/workflows.md +28 -0
- package/skills/examples/skill-creator/scripts/init_skill.py +303 -0
- package/skills/examples/skill-creator/scripts/package_skill.py +110 -0
- package/skills/examples/skill-creator/scripts/quick_validate.py +95 -0
- package/skills/examples/slack-gif-creator/SKILL.md +254 -0
- package/skills/examples/slack-gif-creator/core/easing.py +234 -0
- package/skills/examples/slack-gif-creator/core/frame_composer.py +176 -0
- package/skills/examples/slack-gif-creator/core/gif_builder.py +269 -0
- package/skills/examples/slack-gif-creator/core/validators.py +136 -0
- package/skills/examples/slack-gif-creator/requirements.txt +4 -0
- package/skills/examples/social-content/SKILL.md +278 -0
- package/skills/examples/social-content/evals/evals.json +92 -0
- package/skills/examples/social-content/references/platforms.md +170 -0
- package/skills/examples/social-content/references/post-templates.md +177 -0
- package/skills/examples/social-content/references/reverse-engineering.md +195 -0
- package/skills/examples/theme-factory/SKILL.md +59 -0
- package/skills/examples/theme-factory/theme-showcase.pdf +0 -0
- package/skills/examples/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/examples/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/examples/theme-factory/themes/desert-rose.md +19 -0
- package/skills/examples/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/examples/theme-factory/themes/golden-hour.md +19 -0
- package/skills/examples/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/examples/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/examples/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/examples/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/examples/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/examples/web-artifacts-builder/LICENSE.txt +202 -0
- package/skills/examples/web-artifacts-builder/SKILL.md +74 -0
- package/skills/examples/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/skills/examples/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/skills/examples/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills/examples/writing-skills/SKILL.md +655 -0
- package/skills/examples/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/examples/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/examples/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/examples/writing-skills/persuasion-principles.md +187 -0
- package/skills/examples/writing-skills/render-graphs.js +168 -0
- package/skills/examples/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/public/describe-image/SKILL.md +105 -0
- package/skills/public/describe-image/scripts/describe.py +389 -0
- package/skills/public/doc-coauthoring/SKILL.md +375 -0
- package/skills/public/docx/LICENSE.txt +30 -0
- package/skills/public/docx/SKILL.md +199 -0
- package/skills/public/docx/docx-js.md +350 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/public/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/public/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/public/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/public/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/public/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/public/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/public/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/public/docx/ooxml/scripts/pack.py +159 -0
- package/skills/public/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/public/docx/ooxml/scripts/validate.py +69 -0
- package/skills/public/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/public/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/public/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/public/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/public/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/public/docx/ooxml.md +632 -0
- package/skills/public/docx/scripts/__init__.py +1 -0
- package/skills/public/docx/scripts/document.py +1292 -0
- package/skills/public/docx/scripts/templates/comments.xml +3 -0
- package/skills/public/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/public/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/public/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/public/docx/scripts/templates/people.xml +3 -0
- package/skills/public/docx/scripts/utilities.py +374 -0
- package/skills/public/file-reading/LICENSE.txt +30 -0
- package/skills/public/file-reading/SKILL.md +350 -0
- package/skills/public/frontend-design/LICENSE.txt +177 -0
- package/skills/public/frontend-design/SKILL.md +42 -0
- package/skills/public/gitlab-explorer/SKILL.md +174 -0
- package/skills/public/gitlab-explorer/references/git-commands.md +323 -0
- package/skills/public/gitlab-explorer/references/glab-commands.md +282 -0
- package/skills/public/gitlab-explorer/scripts/check_gitlab_auth.sh +109 -0
- package/skills/public/pdf/FORMS.md +205 -0
- package/skills/public/pdf/REFERENCE.md +612 -0
- package/skills/public/pdf/SKILL.md +364 -0
- package/skills/public/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/public/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/public/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/public/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/public/pdf/scripts/create_validation_image.py +41 -0
- package/skills/public/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/public/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/public/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/public/pdf-reading/LICENSE.txt +30 -0
- package/skills/public/pdf-reading/REFERENCE.md +196 -0
- package/skills/public/pdf-reading/SKILL.md +305 -0
- package/skills/public/playwright-cli/SKILL.md +278 -0
- package/skills/public/playwright-cli/references/request-mocking.md +87 -0
- package/skills/public/playwright-cli/references/running-code.md +232 -0
- package/skills/public/playwright-cli/references/session-management.md +169 -0
- package/skills/public/playwright-cli/references/storage-state.md +275 -0
- package/skills/public/playwright-cli/references/test-generation.md +88 -0
- package/skills/public/playwright-cli/references/tracing.md +139 -0
- package/skills/public/playwright-cli/references/video-recording.md +43 -0
- package/skills/public/pptx/LICENSE.txt +30 -0
- package/skills/public/pptx/SKILL.md +484 -0
- package/skills/public/pptx/css.md +335 -0
- package/skills/public/pptx/html2pptx.md +893 -0
- package/skills/public/pptx/html2pptx.tgz +0 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/public/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/public/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/public/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/public/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/public/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/public/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/public/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/public/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/public/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/public/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/public/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/public/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/public/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/public/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/public/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/public/pptx/ooxml.md +427 -0
- package/skills/public/pptx/scripts/inventory.py +1020 -0
- package/skills/public/pptx/scripts/rearrange.py +231 -0
- package/skills/public/pptx/scripts/replace.py +385 -0
- package/skills/public/pptx/scripts/thumbnail.py +450 -0
- package/skills/public/skill-creator/SKILL.md +356 -0
- package/skills/public/skill-creator/references/output-patterns.md +82 -0
- package/skills/public/skill-creator/references/workflows.md +28 -0
- package/skills/public/skill-creator/scripts/init_skill.py +303 -0
- package/skills/public/skill-creator/scripts/package_skill.py +110 -0
- package/skills/public/skill-creator/scripts/quick_validate.py +95 -0
- package/skills/public/sub-agent/SKILL.md +186 -0
- package/skills/public/sub-agent/references/security-review.md +153 -0
- package/skills/public/sub-agent/references/usage.md +207 -0
- package/skills/public/sub-agent/scripts/list_subagent_models.sh +22 -0
- package/skills/public/test-driven-development/SKILL.md +371 -0
- package/skills/public/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/public/webapp-testing/LICENSE.txt +202 -0
- package/skills/public/webapp-testing/SKILL.md +96 -0
- package/skills/public/webapp-testing/examples/console_logging.py +35 -0
- package/skills/public/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/public/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/public/webapp-testing/scripts/with_server.py +106 -0
- package/skills/public/xlsx/LICENSE.txt +30 -0
- package/skills/public/xlsx/SKILL.md +316 -0
- package/skills/public/xlsx/preview_data.py +93 -0
- package/skills/public/xlsx/recalc.py +178 -0
- package/tests/README.md +42 -0
- package/tests/fixtures/cli/claude_v0.9.2.0_argv.json +46 -0
- package/tests/fixtures/cli/claude_v0.9.2.0_stdout.json +32 -0
- package/tests/fixtures/cli/codex_run.jsonl +4 -0
- package/tests/fixtures/cli/opencode_run.jsonl +6 -0
- package/tests/integration/README.md +56 -0
- package/tests/integration/conftest.py +280 -0
- package/tests/integration/pytest.ini +13 -0
- package/tests/integration/test_mcp_auth.py +85 -0
- package/tests/integration/test_mcp_tools.py +101 -0
- package/tests/integration/test_workspace_lifecycle.py +125 -0
- package/tests/orchestrator/mock_llm_server.py +343 -0
- package/tests/orchestrator/test_cli_adapters.py +566 -0
- package/tests/orchestrator/test_cli_adapters_live.py +527 -0
- package/tests/orchestrator/test_cli_runtime.py +451 -0
- package/tests/orchestrator/test_docker_manager.py +302 -0
- package/tests/orchestrator/test_dynamic_instructions.py +69 -0
- package/tests/orchestrator/test_mcp_resources.py +140 -0
- package/tests/orchestrator/test_mcp_tools.py +224 -0
- package/tests/orchestrator/test_passthrough_isolation.py +201 -0
- package/tests/orchestrator/test_readme_in_container.py +76 -0
- package/tests/orchestrator/test_render_cache.py +84 -0
- package/tests/orchestrator/test_runtime_cli_endpoint.py +108 -0
- package/tests/orchestrator/test_single_user_mode.py +212 -0
- package/tests/orchestrator/test_startup_warnings.py +123 -0
- package/tests/orchestrator/test_sub_agent_dispatch.py +327 -0
- package/tests/orchestrator/test_subagent_claude_compat.py +367 -0
- package/tests/orchestrator/test_system_prompt_endpoint.py +191 -0
- package/tests/orchestrator/test_tool_descriptions.py +52 -0
- package/tests/orchestrator/test_view_image.py +201 -0
- package/tests/patches/conftest.py +30 -0
- package/tests/patches/fixtures/__init__.py +10 -0
- package/tests/patches/fixtures/middleware_v0.9.1.py +5057 -0
- package/tests/patches/fixtures/middleware_v0.9.2.py +5120 -0
- package/tests/patches/fixtures/retrieval_v0.9.1.py +2684 -0
- package/tests/patches/fixtures/retrieval_v0.9.2.py +2700 -0
- package/tests/patches/test_fix_attached_files_position.py +118 -0
- package/tests/patches/test_fix_large_tool_args.py +130 -0
- package/tests/patches/test_fix_large_tool_results.py +531 -0
- package/tests/patches/test_fix_skip_embedding_chat_files.py +160 -0
- package/tests/patches/test_fix_skip_rag_files_native_fc.py +120 -0
- package/tests/patches/test_fix_tool_loop_errors.py +128 -0
- package/tests/security/test_path_traversal_app.py +132 -0
- package/tests/security/test_path_traversal_docker.py +36 -0
- package/tests/security/test_path_traversal_settings.py +87 -0
- package/tests/security/test_safe_path_util.py +166 -0
- package/tests/security/test_xss_preview.py +46 -0
- package/tests/test-default-model-resolution.py +136 -0
- package/tests/test-docker-image.sh +358 -0
- package/tests/test-list-subagent-models.sh +421 -0
- package/tests/test-mcp-endpoint-live.sh +92 -0
- package/tests/test-mcp-native-surface.sh +213 -0
- package/tests/test-no-cyrillic.sh +135 -0
- package/tests/test-opencode-error-mapping.py +130 -0
- package/tests/test-pr88-skills.sh +305 -0
- package/tests/test-project-structure.sh +202 -0
- package/tests/test-single-user-mode.sh +269 -0
- package/tests/test-skill-no-hardcoded-models.sh +65 -0
- package/tests/test-subagent-cli-surface.py +137 -0
- package/tests/test-subagent-runtime.sh +109 -0
- package/tests/test_codex_toml_converter.py +204 -0
- package/tests/test_default_resolver_no_legacy_global.py +159 -0
- package/tests/test_filter.py +648 -0
- package/tests/test_init_sh_unchanged.sh +49 -0
- package/tests/test_opencode_alias_map_drop.py +144 -0
- package/tests/test_requirements.py +91 -0
- package/tests/test_subagent_docstring.py +193 -0
- package/tests/test_tools.py +34 -0
- package/vendor/extract-text/README.md +46 -0
- package/vendor/extract-text/extract-text +0 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
|
|
2
|
+
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
|
|
3
|
+
|
|
4
|
+
# 06 — kubernetes-sigs/agent-sandbox (CRD base for `KubernetesProvider`)
|
|
5
|
+
|
|
6
|
+
> Source: [kubernetes-sigs/agent-sandbox](https://github.com/kubernetes-sigs/agent-sandbox). Google-backed, SIG Apps, v1alpha1.
|
|
7
|
+
> Direct base for [Phase 5](../roadmap.md#phase-5--helm-hardening--kubernetesprovider) `KubernetesProvider`.
|
|
8
|
+
|
|
9
|
+
## 1. CRD shapes & field semantics
|
|
10
|
+
|
|
11
|
+
### `Sandbox` — core singleton workload
|
|
12
|
+
|
|
13
|
+
- **Where.** `api/v1alpha1/sandbox_types.go:129-244`.
|
|
14
|
+
- **Fields.**
|
|
15
|
+
- `podTemplate` (required) — embeds `corev1.PodSpec` + optional labels/annotations.
|
|
16
|
+
- `volumeClaimTemplates[]` — dynamically provisioned PVCs; merged into `Pod.Spec.Volumes`.
|
|
17
|
+
- `replicas` — binary (0/1) for suspend/resume.
|
|
18
|
+
- `service` — bool; auto-creates headless Service.
|
|
19
|
+
- `lifecycle.shutdownTime` — absolute expiry; `lifecycle.shutdownPolicy` ∈ {Delete, Retain}.
|
|
20
|
+
- **Status.** Conditions: `Ready`, `Suspended`, `Finished`. `serviceFQDN`, `podIPs[]`.
|
|
21
|
+
|
|
22
|
+
### `SandboxTemplate` — reusable blueprint
|
|
23
|
+
|
|
24
|
+
- **Where.** `extensions/api/v1alpha1/sandboxtemplate_types.go:73-154`.
|
|
25
|
+
- **Fields.** Inherits Sandbox fields, plus:
|
|
26
|
+
- `networkPolicyManagement` ∈ {Managed, Unmanaged}.
|
|
27
|
+
- `networkPolicy` — custom Ingress/Egress; **if omitted → "Secure by Default"** (Sandbox Router ingress only, no internal egress).
|
|
28
|
+
- `envVarsInjectionPolicy` ∈ {Allowed, Overrides, Disallowed} — gates whether a Claim can inject env vars.
|
|
29
|
+
- **No status subresource** — read-only template.
|
|
30
|
+
|
|
31
|
+
### `SandboxClaim` — user-facing claim
|
|
32
|
+
|
|
33
|
+
- **Where.** `extensions/api/v1alpha1/sandboxclaim_types.go:124-194`.
|
|
34
|
+
- **Fields.**
|
|
35
|
+
- `sandboxTemplateRef.name` (required, same namespace).
|
|
36
|
+
- `lifecycle` (mirrors Sandbox + `ttlSecondsAfterFinished`).
|
|
37
|
+
- `warmpool` ∈ {none, default, named-pool} — default attempts adoption from warm pool.
|
|
38
|
+
- `additionalPodMetadata` — labels/annotations propagated; restricted domains (`kubernetes.io`, `k8s.io`, `agents.x-k8s.io` forbidden).
|
|
39
|
+
- `env[]` — gated by template's `envVarsInjectionPolicy`.
|
|
40
|
+
- **Status.** Mirrors Sandbox + claim-specific (`Ready`, `Expired`, `Finished`).
|
|
41
|
+
|
|
42
|
+
### `SandboxWarmPool` — pre-warmed reservoir
|
|
43
|
+
|
|
44
|
+
- **Where.** `extensions/api/v1alpha1/sandboxwarmpool_types.go:31-107`.
|
|
45
|
+
- **Fields.** `replicas` (HPA-compatible), `sandboxTemplateRef`, `updateStrategy.type` ∈ {Recreate, OnReplenish}.
|
|
46
|
+
- **Status.** `replicas`, `readyReplicas`, `selector` (label for pool member discovery).
|
|
47
|
+
|
|
48
|
+
## 2. Controller reconciliation patterns
|
|
49
|
+
|
|
50
|
+
### Sandbox controller
|
|
51
|
+
|
|
52
|
+
- **Where.** `controllers/sandbox_controller.go:82-100`.
|
|
53
|
+
- **Behaviors.**
|
|
54
|
+
- Tracks pod via controllerRef + `agents.x-k8s.io/pod-name` annotation when adopted from pool.
|
|
55
|
+
- Volume merging — PVC-backed volumes from `volumeClaimTemplates` override by name (StatefulSet-like).
|
|
56
|
+
- Lifecycle: polls `shutdownTime` expiry, deletes Pod+Service per `shutdownPolicy`.
|
|
57
|
+
- Service provisioning — headless Service with same name.
|
|
58
|
+
- Finalizers cascade Pod/PVC deletion.
|
|
59
|
+
|
|
60
|
+
### SandboxClaim controller
|
|
61
|
+
|
|
62
|
+
- **Where.** `extensions/controllers/sandboxclaim_controller.go:140-282`.
|
|
63
|
+
- **Critical patterns.**
|
|
64
|
+
- **Fast-path warm-pool adoption before template lookup** — minimizes cold-start latency.
|
|
65
|
+
- Lazy template validation — requeue without error if missing (no log spam).
|
|
66
|
+
- Synchronous metadata validation (reject if bad labels).
|
|
67
|
+
- **Namespace isolation enforced** — no cross-namespace adoption.
|
|
68
|
+
- Tracks `observedTime` per claim UID — measures cold-start.
|
|
69
|
+
- Dual timers: `shutdownTime` (absolute) and `ttlSecondsAfterFinished` (relative to Finished condition).
|
|
70
|
+
- NetworkPolicy reconciliation is **non-blocking** — continues if fetch fails.
|
|
71
|
+
|
|
72
|
+
### SandboxWarmPool controller
|
|
73
|
+
|
|
74
|
+
- **Where.** `extensions/controllers/sandboxwarmpool_controller.go:63-120`.
|
|
75
|
+
- **Behaviors.** Lists by hash label; creates/deletes to match `replicas`. `Recreate` deletes stale immediately; `OnReplenish` waits for adoption.
|
|
76
|
+
|
|
77
|
+
### SandboxTemplate controller
|
|
78
|
+
|
|
79
|
+
- **Where.** `extensions/controllers/sandboxtemplate_controller.go:52-100`.
|
|
80
|
+
- **Behaviors.** Creates/updates **single shared NetworkPolicy** per template (not per pod). NP name = `<template.Name>-network-policy`. Secure Default = ingress only from Sandbox Router, egress to public internet excluding RFC1918 + metadata server.
|
|
81
|
+
|
|
82
|
+
## 3. RuntimeClass integration
|
|
83
|
+
|
|
84
|
+
- **Mechanism.** **No explicit CRD field** — `podTemplate.spec.runtimeClassName` is passed through to Pod for kubelet resolution.
|
|
85
|
+
- **Examples.** `examples/kata-gke-sandbox/README.md:42-60` uses `runtimeClassName: kata-qemu`. `examples/quickstart/gvisor.md:45-55` uses `runtimeClassName: gvisor`.
|
|
86
|
+
- **Per-tenant tiering.** Different templates → different runtimes. **No dynamic per-claim override** in the core API.
|
|
87
|
+
- **For us.** Aligns with [ADR-0004](../adr/0004-pluggable-runtime-via-runtimeclass.md). We propagate `SandboxTemplate.runtime_class` into the embedded `podTemplate.spec.runtimeClassName`. If we need per-claim override (e.g. session tier), we add a custom mutation (admission webhook or template selection in L4).
|
|
88
|
+
|
|
89
|
+
## 4. NetworkPolicy assumptions ⚠️
|
|
90
|
+
|
|
91
|
+
- **Single shared NP per template** — pod selector via hash label `agents.x-k8s.io/sandbox-template-ref-hash`.
|
|
92
|
+
- **Secure Default details (when `networkPolicy` omitted):**
|
|
93
|
+
- Ingress: only from Sandbox Router.
|
|
94
|
+
- Egress: public internet, **excluding RFC1918 + metadata server** (no cluster DNS by default).
|
|
95
|
+
- ⚠ **Sidecars (Istio, monitoring) on separate ports must be explicitly allowed** in custom rules.
|
|
96
|
+
- **Operators must add cluster-DNS allowance** — easy to miss.
|
|
97
|
+
- **For us.** Phase 5 must add custom NetworkPolicy that allows kube-dns + our egress-proxy svc + Sandbox Router ingress. Document the sidecar caveat loudly in our Helm `values.yaml`.
|
|
98
|
+
|
|
99
|
+
## 5. RBAC model
|
|
100
|
+
|
|
101
|
+
- **Where.** `k8s/rbac.generated.yaml:1-60` (core) + `k8s/extensions-rbac.generated.yaml:1-88` (extensions).
|
|
102
|
+
- **Core controller.** ClusterRole `agent-sandbox-controller` — sandboxes (+ status, finalizers), pods, PVCs, services, events, leases (leader-elect).
|
|
103
|
+
- **Extensions controller.** Adds CRDs (sandboxclaims, templates, warmpools + status/finalizers), Pod patching (adoption), NetworkPolicy CRUD.
|
|
104
|
+
- **Verbs.** Standard CRUD set.
|
|
105
|
+
- **For us.** Reuse as-is via Helm.
|
|
106
|
+
|
|
107
|
+
## 6. Status subresource design
|
|
108
|
+
|
|
109
|
+
- **Conditions** — `metav1.Condition` (type, status, reason, message, observedGeneration).
|
|
110
|
+
- **Sandbox.** `Ready` (DependenciesReady/NotReady/SandboxSuspended) | `Suspended` (PodTerminated/PodNotTerminated) | `Finished` (PodSucceeded/PodFailed).
|
|
111
|
+
- **`serviceFQDN`** — controller-flag `--cluster-domain` configurable.
|
|
112
|
+
- **`podIPs[]`** — direct from Pod status, mirrored for fast L4 routing (matches our cross-cutting pattern 9: app-layer routing, not ClientIP).
|
|
113
|
+
|
|
114
|
+
## 7. Webhooks
|
|
115
|
+
|
|
116
|
+
- **None.** All validation is synchronous in controllers + OpenAPI schema (kubebuilder markers).
|
|
117
|
+
- **For us.** Defer admission webhooks; add later only if cross-resource validation is needed.
|
|
118
|
+
|
|
119
|
+
## 8. Project maturity signals
|
|
120
|
+
|
|
121
|
+
- **Version.** v1alpha1 (pre-beta). Roadmap mentions Beta/GA as future.
|
|
122
|
+
- **Governance.** kubernetes-sigs project; SIG Apps; CLA; OWNERS file. Auto-stale 30 d, auto-close 15 d. AI-assisted first-pass review (Copilot).
|
|
123
|
+
- **Adoption.** No explicit prod-user list. Kata + gVisor examples lean GKE. Backed by Google + community.
|
|
124
|
+
- **Release cadence.** Manual via `RELEASE.md`; no release tags in shallow clone.
|
|
125
|
+
- **For us.** Vendor the CRDs **with our own copy under version control** (Phase 5 research). Don't blindly track upstream main during alpha.
|
|
126
|
+
|
|
127
|
+
## 9. Skip notes
|
|
128
|
+
|
|
129
|
+
- **No per-claim RuntimeClass override** — different templates needed.
|
|
130
|
+
- **No webhook validation** — sync in controllers.
|
|
131
|
+
- **Sidecars need explicit NP rules.**
|
|
132
|
+
- **No dynamic cluster-domain discovery** — operator sets controller flag.
|
|
133
|
+
|
|
134
|
+
## Phase-5 implementation checklist
|
|
135
|
+
|
|
136
|
+
1. Vendor `Sandbox`/`SandboxTemplate`/`SandboxClaim`/`SandboxWarmPool` types under our own CRD group (or upstream `agents.x-k8s.io` directly — decide in `phase-5-research.md`).
|
|
137
|
+
2. Map our `SandboxProvider.spawn(template, ctx)` → create `SandboxClaim`; watch `Ready` condition.
|
|
138
|
+
3. Use Secure-Default NetworkPolicy + override to allow our egress-proxy svc + kube-dns.
|
|
139
|
+
4. Per-tenant template = per-tenant RuntimeClass (sysbox / gVisor / kata-ch).
|
|
140
|
+
5. Warm pool: `SandboxWarmPool` with `replicas` driven by L4 demand prediction.
|
|
141
|
+
6. Fast-path adoption is a controller-internal optimization — our L4 just sees fast `Ready`.
|
|
142
|
+
7. App-layer session routing — L4 reads `Status.sandbox.podIPs[0]` from Claim, forwards HTTP directly.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
|
|
2
|
+
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
|
|
3
|
+
|
|
4
|
+
# 07 — chromedp (Go direct-CDP client)
|
|
5
|
+
|
|
6
|
+
> Source: [chromedp/chromedp](https://github.com/chromedp/chromedp).
|
|
7
|
+
> Candidate for Phase 7 (Go guest agent — drives Chromium in-sandbox) and Phase 6 (L4 — tunnels CDP frames from user UI to sandbox).
|
|
8
|
+
|
|
9
|
+
## 1. CDP transport — single WebSocket, session-multiplexed
|
|
10
|
+
|
|
11
|
+
- **Where.** `conn.go:42-142`.
|
|
12
|
+
- **What.** One WebSocket per browser (`gobwas/ws`), JSON marshalling with reused encoder/decoder buffers. Session ID multiplexing handles multi-tab.
|
|
13
|
+
- **Constraint.** Chrome doesn't support frame fragmentation; single frame max 100 MiB.
|
|
14
|
+
- **Why for us.** Phase 7 — efficient single-conn model exactly matches our agent's "one Chromium, many targets".
|
|
15
|
+
|
|
16
|
+
## 2. Action / task model — minimal `Action` interface
|
|
17
|
+
|
|
18
|
+
- **Where.** `chromedp.go:718-743`.
|
|
19
|
+
- **What.** `type Action interface { Do(context.Context) error }`. Executor bound via context value. `Tasks` is `[]Action` — trivially composable for sequential workflows.
|
|
20
|
+
- **Why for us.** Phase 7 — sub-agent flows (login → navigate → click → screenshot) are sequential `Tasks`. No DSL invention needed.
|
|
21
|
+
|
|
22
|
+
## 3. Event subscriptions — synchronous, context-scoped
|
|
23
|
+
|
|
24
|
+
- **Where.** `chromedp.go:786-836`.
|
|
25
|
+
- **What.** `ListenTarget`, `ListenBrowser` — callbacks invoked synchronously per event. Cancellation tied to ctx.
|
|
26
|
+
- **Footgun.** Blocking I/O inside a listener **deadlocks the CDP loop**. Listeners must be fast-and-async (channel-send only).
|
|
27
|
+
- **Why for us.** Phase 7. Document the non-blocking rule in our agent codebase loudly.
|
|
28
|
+
|
|
29
|
+
## 4. Screenshot — pull-based; live screencast = raw CDP
|
|
30
|
+
|
|
31
|
+
- **Where.** `screenshot.go:106-162`.
|
|
32
|
+
- **What.** `CaptureScreenshot` is on-demand. For ≥10 fps live streaming, **chromedp doesn't help directly** — call `Page.startScreencast` via raw CDP commands and subscribe to `Page.screencastFrame`.
|
|
33
|
+
- **Why for us.** Phase 7. For Computer Use we need the screencast path — chromedp gives us the wire (CDP target, message routing) but the screencast loop is custom.
|
|
34
|
+
|
|
35
|
+
## 5. Input synthesis — clicks, keys, scroll
|
|
36
|
+
|
|
37
|
+
- **Where.** `input.go:28-94, 166-192`.
|
|
38
|
+
- **What.** Mouse clicks at coords or DOM nodes; keyboard via key encoding; viewport scroll honors device pixel ratio and modifiers.
|
|
39
|
+
- **Why for us.** Phase 7. Direct fit for Computer Use action-injection — saves us writing our own CDP `Input.dispatchMouseEvent` wrappers.
|
|
40
|
+
|
|
41
|
+
## 6. Browser lifecycle — pluggable Allocator
|
|
42
|
+
|
|
43
|
+
- **Where.** `allocate.go`, `chromedp.go:122-220`.
|
|
44
|
+
- **What.** `Allocator` interface abstracts launching. `ExecAllocator` runs a local Chromium process. **Context ownership rule:** cancel parent → close browser; cancel child → close tab only. Multi-tab via context inheritance.
|
|
45
|
+
- **Why for us.** Phase 7 — we own Chromium launch flags (sandbox off inside microVM, screencast on). Allocator pattern keeps that clean.
|
|
46
|
+
|
|
47
|
+
## 7. Pooling & routing — single conn, session-mux
|
|
48
|
+
|
|
49
|
+
- **Where.** `browser.go:38-90, 269-337`.
|
|
50
|
+
- **What.** One conn per browser; messages routed by session-ID. Sufficient for "one browser per sandbox" — our case.
|
|
51
|
+
- **Why for us.** Phase 7 = direct fit. Phase 6 = **NOT directly usable** because L4 multiplexes many users' CDP across many sandboxes — that's a gateway, not a chromedp use case.
|
|
52
|
+
|
|
53
|
+
## 8. Errors & cancellation — context-driven
|
|
54
|
+
|
|
55
|
+
- **Where.** `errors.go`, `browser.go:182-240`.
|
|
56
|
+
- **What.** Small set of domain-specific errors. Cancellation via standard ctx. **No built-in retry, no transparent reconnect.**
|
|
57
|
+
- **Why for us.** Phase 7 — wrap with our own retry + reconnect for crashed-Chromium recovery.
|
|
58
|
+
|
|
59
|
+
## 9. Trade-off vs raw CDP
|
|
60
|
+
|
|
61
|
+
- **chromedp wins.** Action composition, input synthesis, multi-tab management, browser lifecycle.
|
|
62
|
+
- **Raw CDP wins.** Screencast streaming, custom Target subscription, lowest-latency frame paths, smaller dependency footprint.
|
|
63
|
+
- **Verdict for Phase 7.** Use **chromedp for control** (clicks, navigate, screenshots, DOM); use **raw CDP for screencast** (`Page.startScreencast` directly on the WS). chromedp exposes the conn for this hybrid use.
|
|
64
|
+
- **Verdict for Phase 6.** Don't use chromedp in L4. L4 is a CDP **proxy** — it shouldn't parse CDP messages, just shovel WebSocket frames.
|
|
65
|
+
|
|
66
|
+
## Phase-7 implementation checklist
|
|
67
|
+
|
|
68
|
+
1. `chromedp.NewContext(parent)` — one per sandbox session.
|
|
69
|
+
2. Launch flags: `--no-sandbox` (we are inside microVM), `--remote-debugging-port=...` (or use chromedp's own allocator).
|
|
70
|
+
3. Action composition for `bash`/`python`/`view`/`click`/`type` MCP tools.
|
|
71
|
+
4. **Custom screencast loop** — bypass chromedp Action API; subscribe to `Page.screencastFrame` events; forward binary to caller over WS at `/v1/cdp` or `/v1/screencast`.
|
|
72
|
+
5. Listener discipline — channel-send only, no blocking I/O.
|
|
73
|
+
6. Restart logic — chromedp gives none; we add reconnect + Chromium relaunch on crash.
|
|
74
|
+
|
|
75
|
+
## Verdict
|
|
76
|
+
|
|
77
|
+
- **Phase 7 agent:** adopt for control plane (clicks/navigate/etc); raw CDP for screencast.
|
|
78
|
+
- **Phase 6 L4:** skip — use opaque WS proxy.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
|
|
2
|
+
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
|
|
3
|
+
|
|
4
|
+
# 08 — microsandbox (single-node microVM daemon)
|
|
5
|
+
|
|
6
|
+
> Source: [microsandbox/microsandbox](https://github.com/microsandbox/microsandbox). Rust, libkrun-based, single-node.
|
|
7
|
+
> Reference for Phase 2 (HTTP pool-manager sidecar shape) and the optional DirectCHProvider analog (Phase 9+).
|
|
8
|
+
|
|
9
|
+
## 1. REST/SDK surface — sandbox lifecycle
|
|
10
|
+
|
|
11
|
+
- **Where.** `crates/microsandbox/lib/sandbox/mod.rs:95-150`.
|
|
12
|
+
- **What.** Builder pattern: `builder() → create() / create_detached() → start() → stop() / kill()`. State persisted in SQLite. Status enum: `Running | Draining | Paused | Stopped | Crashed`.
|
|
13
|
+
- **Why for us.** Phase 2 — direct template for our pool-manager HTTP API. Status enum especially — we'd add `Idle` (in pool) and `Leased` (assigned to session).
|
|
14
|
+
|
|
15
|
+
## 2. Guest-agent wire protocol — CBOR over virtio-serial
|
|
16
|
+
|
|
17
|
+
- **Where.** `crates/protocol/lib/message.rs:46-70`.
|
|
18
|
+
- **What.** Binary framing: `[len: u32 BE][id: u32 BE][flags: u8][CBOR(...)]`. Message types: `Ready`, `ExecRequest`/`ExecStdout`/`ExecExited`, `FsRequest`/`FsResponse`, `Shutdown`. u32 correlation IDs.
|
|
19
|
+
- **Why for us.** Phase 7 — useful comparison vs our HTTP+WS+vsock path. CBOR's binary efficiency is nice but HTTP+WS already wins us tool ecosystem (curl, devtools, easy debugging). Adopt the **correlation-ID pattern** for our streaming exec; skip the wire format.
|
|
20
|
+
|
|
21
|
+
## 3. VMM abstraction — pluggable backends
|
|
22
|
+
|
|
23
|
+
- **Where.** `crates/runtime/lib/vm.rs:1-50`.
|
|
24
|
+
- **What.** Trait-based VMM backend. Microsandbox uses **libkrun (macOS-only)**; the trait is portable to Firecracker / QEMU / crosvm.
|
|
25
|
+
- **Why for us.** Phase 9 — sets the template for our `Hypervisor` trait if we ever build a DirectCH/DirectFC provider. We **substitute libkrun with CH** as primary.
|
|
26
|
+
|
|
27
|
+
## 4. CLI ↔ daemon — relay socket + reconnect
|
|
28
|
+
|
|
29
|
+
- **Where.** `crates/cli/lib/commands/create.rs`.
|
|
30
|
+
- **What.** Thin CLI spawns VMs as **detached child processes**; agent relay socket for CLI ↔ sandbox IPC (CBOR). Sandboxes persist in SQLite — CLI can reconnect post-exit.
|
|
31
|
+
- **Why for us.** Phase 2 — we want a **persistent HTTP daemon** rather than CLI-spawned subprocesses (matches Docker socket replacement goal). Useful: the reconnect-via-DB pattern for crash recovery.
|
|
32
|
+
|
|
33
|
+
## 5. Project layout — Rust workspace, mappable to Go modules
|
|
34
|
+
|
|
35
|
+
- **Where.** Repo `Cargo.toml` workspace.
|
|
36
|
+
- **What.** `microsandbox` (SDK) | `cli` | `protocol` (shared host↔guest) | `runtime` (guest) | `network` | `filesystem` | `image` | `db`.
|
|
37
|
+
- **Why for us.** Phase 2/6 Go layout. Map directly:
|
|
38
|
+
- `microsandbox` → `pkg/sandboxmgr` (SDK / library).
|
|
39
|
+
- `cli` → `cmd/sandboxctl`.
|
|
40
|
+
- `protocol` → `pkg/agentproto` (shared).
|
|
41
|
+
- `runtime` → `cmd/agent`.
|
|
42
|
+
- `network` / `filesystem` / `image` / `db` → `internal/*`.
|
|
43
|
+
- Compare with [coder's layout](./03-coder.md) §10 — both converge on the same shape, different language.
|
|
44
|
+
|
|
45
|
+
## 6. Network model — smoltcp + policy
|
|
46
|
+
|
|
47
|
+
- **Where.** `crates/network/lib/lib.rs`.
|
|
48
|
+
- **What.** In-process **smoltcp** networking stack with policy enforcement (advanced). Per-sandbox IPs + per-rule egress.
|
|
49
|
+
- **Why for us.** Phase 2 — **simpler approach**: TAP/TUN + iptables. Defer smoltcp until we have a strong reason (full userspace stack isolation in microVM).
|
|
50
|
+
|
|
51
|
+
## 7. Image / template format
|
|
52
|
+
|
|
53
|
+
- **Where.** `crates/image/lib/lib.rs`.
|
|
54
|
+
- **What.** Standard OCI pulling + EROFS (read-only, compressed) base + ext4 writable overlay. Content-addressed layer cache. Snapshot export/import for fast clones.
|
|
55
|
+
- **Why for us.** Phase 3 — EROFS as the read-only base for skill blobs is interesting (vs our planned squashfs). Worth comparing in `phase-3-research.md`.
|
|
56
|
+
|
|
57
|
+
## 8. Persistence — SQLite (read/write pool split)
|
|
58
|
+
|
|
59
|
+
- **Where.** `crates/db/lib/pool.rs`.
|
|
60
|
+
- **What.** SQLite + WAL mode; **separate read pool (multi-conn) + write pool (single-conn)**. SeaORM ORM. Migrations versioned in code.
|
|
61
|
+
- **Tables.** `sandbox`, `run`, `image_ref`, `layer`, `manifest`, `volume`, `sandbox_metric`.
|
|
62
|
+
- **Why for us.** Phase 2 pool-manager sidecar — **SQLite is enough** for single-node PoC. The read/write pool split is a smart pattern even at SQLite scale.
|
|
63
|
+
- **Phase 6.** Move to Postgres for HA L4 control plane (matches [coder's pattern](./03-coder.md) §7).
|
|
64
|
+
|
|
65
|
+
## Adoption priorities
|
|
66
|
+
|
|
67
|
+
| Phase | Take | Skip / substitute |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| 2 | Lifecycle state enum; correlation-IDs; SQLite r/w pool split; reconnect-via-DB | smoltcp networking (use TAP+iptables); CBOR wire (use HTTP+WS) |
|
|
70
|
+
| 3 | EROFS base for read-only mounts (compare with squashfs) | OCI layer extraction internals — too coupled to libkrun |
|
|
71
|
+
| 6 | Crate layout → Go module layout | libkrun integration |
|
|
72
|
+
| 8 | VMM trait pattern | libkrun backend (substitute CH/FC) |
|
|
73
|
+
|
|
74
|
+
## Skip notes
|
|
75
|
+
|
|
76
|
+
- libkrun is **macOS-first**; for Linux production we go CH / FC.
|
|
77
|
+
- Microsandbox is **beta**; don't treat as production reference, treat as design reference.
|
|
78
|
+
- No multi-node coordination — we add etcd / Postgres in Phase 6+.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
|
|
2
|
+
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
|
|
3
|
+
|
|
4
|
+
# 09 — Michaelliv/agentbox (egress proxy reference)
|
|
5
|
+
|
|
6
|
+
> Source: [Michaelliv/agentbox](https://github.com/Michaelliv/agentbox). Python asyncio reference for JWT-allowlist egress proxy. Companion blog: https://michaellivs.com/blog/sandboxed-execution-environment/.
|
|
7
|
+
> Direct input for [Phase 8](../roadmap.md).
|
|
8
|
+
|
|
9
|
+
## 1. JWT — HS256, allow-list as comma-delimited claim
|
|
10
|
+
|
|
11
|
+
- **Where.** `agentbox/sandbox_manager.py:133-165`.
|
|
12
|
+
- **Shape.**
|
|
13
|
+
```text
|
|
14
|
+
Header: {"typ":"JWT","alg":"HS256"}
|
|
15
|
+
Payload: {
|
|
16
|
+
"iss":"sandbox-egress-control",
|
|
17
|
+
"session_id":"uuid",
|
|
18
|
+
"tenant_id":"optional",
|
|
19
|
+
"allowed_hosts":"pypi.org,github.com,*.example.com",
|
|
20
|
+
"exp": now + 4h
|
|
21
|
+
}
|
|
22
|
+
Signature: HMAC-SHA256(header.payload, signing_key)
|
|
23
|
+
```
|
|
24
|
+
- **Why for us (Phase 8 MVP).** Stateless; proxy verifies signature + expiry, no DB round-trip. 4-hour `exp` matches our session-lifetime cap (cross-cutting pattern 16).
|
|
25
|
+
- **Production note.** HS256 = shared symmetric key — works when proxy + L4 are colocated. For untrusted-host scenarios switch to **RS256** with public-key distribution (proxy only needs the public key).
|
|
26
|
+
|
|
27
|
+
## 2. Allowlist matching — wildcard suffix + port stripping
|
|
28
|
+
|
|
29
|
+
- **Where.** `agentbox/egress_proxy.py:130-151`.
|
|
30
|
+
- **Semantics.**
|
|
31
|
+
- Exact match: `"github.com" == "github.com"`.
|
|
32
|
+
- Wildcard suffix: `"*.github.io"` matches `"user.github.io"` AND `"github.io"` itself.
|
|
33
|
+
- Port stripped: `"pypi.org:443"` → `"pypi.org"`.
|
|
34
|
+
- **Footguns.**
|
|
35
|
+
- No IP-literal blocking (allowlist is hostname-only).
|
|
36
|
+
- `*.com` matches **any** `.com` — relies on admin discipline.
|
|
37
|
+
- No double-wildcard (`**.example.com` not supported).
|
|
38
|
+
- **Port to Go.** `strings.HasSuffix`. Add RFC-1123 validation to reject malformed entries.
|
|
39
|
+
|
|
40
|
+
## 3. CONNECT proxy (HTTPS) — bidirectional pipe
|
|
41
|
+
|
|
42
|
+
- **Where.** `agentbox/egress_proxy.py:153-222`.
|
|
43
|
+
- **Flow.** Client `CONNECT host:port HTTP/1.1` → proxy verifies host + token → `200 Connection Established` → two asyncio tasks pipe 8KB chunks both ways until EOF.
|
|
44
|
+
- **Why for us.** Phase 8 — HTTPS is opaque to L7 inspection; CONNECT is the only practical path.
|
|
45
|
+
- **Production gaps.** No timeout on pipe (slow upload hangs forever). No bytes-transferred audit. No rate-limit. Exceptions silently close (no detail to client).
|
|
46
|
+
|
|
47
|
+
## 4. HTTP proxy (non-HTTPS) — Host-header filter + header sanitization
|
|
48
|
+
|
|
49
|
+
- **Where.** `agentbox/egress_proxy.py:224-292`.
|
|
50
|
+
- **What.** Parses request URL (HTTP/1.1 absolute-form), validates host, strips `Host`, `Proxy-Authorization`, `Proxy-Connection`, forwards request body verbatim. Returns full response (no streaming — loaded in memory).
|
|
51
|
+
- **Why for us.** Phase 8 fallback for plaintext HTTP (rare but possible). Skip the in-memory load for production — use streaming.
|
|
52
|
+
|
|
53
|
+
## 5. Proxy auth wire format — `Basic base64(sandbox:jwt_<token>)`
|
|
54
|
+
|
|
55
|
+
- **Where.** `agentbox/egress_proxy.py:91-113`.
|
|
56
|
+
- **Container wire-up.**
|
|
57
|
+
```bash
|
|
58
|
+
HTTP_PROXY=http://sandbox:jwt_<token>@proxy_host:15004
|
|
59
|
+
HTTPS_PROXY=http://sandbox:jwt_<token>@proxy_host:15004
|
|
60
|
+
```
|
|
61
|
+
- **Why for us.** Phase 8 — sandbox just sets env vars; any HTTP client (curl, requests, urllib, npm, pip) picks it up automatically. The `jwt_` prefix distinguishes from password auth.
|
|
62
|
+
- **Production note.** Proxy URL over cleartext is a vulnerability across untrusted networks. Phase 8 MVP runs proxy on loopback; production puts proxy behind mTLS or a Unix socket if cross-network.
|
|
63
|
+
|
|
64
|
+
## 6. Session lifecycle — JWT on session create, no refresh
|
|
65
|
+
|
|
66
|
+
- **Where.** `agentbox/sandbox_manager.py:167-178` + `:254-320`.
|
|
67
|
+
- **Flow.** `CreateSession(allowed_hosts=[...])` → `_generate_proxy_jwt()` → `_generate_proxy_url()` → injected into container's `HTTP_PROXY`.
|
|
68
|
+
- **Why for us.** Phase 8 — token expires with session; no refresh needed at <1 K concurrent sessions.
|
|
69
|
+
- **Limitation.** Container outliving 4-hour token → silent network fails. For long sessions, add a `/refresh` endpoint that mints a new JWT from existing session_id.
|
|
70
|
+
|
|
71
|
+
## 7. Audit logging — stderr only, unstructured
|
|
72
|
+
|
|
73
|
+
- **Where.** `agentbox/egress_proxy.py:173, 256`.
|
|
74
|
+
- **Today.**
|
|
75
|
+
```python
|
|
76
|
+
logger.info(f"Proxying CONNECT to {host}:{port}")
|
|
77
|
+
logger.info(f"Proxying {request.method} to {url}")
|
|
78
|
+
logger.warning(f"Blocked CONNECT to {host}:{port}")
|
|
79
|
+
```
|
|
80
|
+
- **Gaps for our Phase 8.**
|
|
81
|
+
- No request ID / correlation across proxy + container.
|
|
82
|
+
- No bytes transferred / latency.
|
|
83
|
+
- `tenant_id` in JWT but **not logged** — we must add it for multi-tenant audit.
|
|
84
|
+
- Blocked = log host but not reason (typo vs. missing entry).
|
|
85
|
+
- **Target.** Structured JSON: `{ts, session_id, tenant_id, target, port, verdict, reason, bytes_out, latency_ms, jwt_id}` → ship to immutable audit sink (matches cross-cutting pattern 10).
|
|
86
|
+
|
|
87
|
+
## 8. Signing-key management — `secrets.token_hex(32)`, in-process
|
|
88
|
+
|
|
89
|
+
- **Where.** `agentbox/sandbox_manager.py:76-86`.
|
|
90
|
+
- **Today.** Auto-generated 256-bit hex if not provided via `SIGNING_KEY` env. Both manager + proxy must share it (loopback).
|
|
91
|
+
- **Gaps.** No rotation; no versioning (rotation invalidates all live tokens); symmetric key compromise = total proxy compromise.
|
|
92
|
+
- **Phase 4 + 9.** Source from our secret broker; rotate ≤ 90 d; consider RS256 + `kid` header for graceful rotation (old + new public keys overlap).
|
|
93
|
+
|
|
94
|
+
## 9. DNS — client-driven (proxy trusts container's resolution)
|
|
95
|
+
|
|
96
|
+
- **Where.** `agentbox/egress_proxy.py:176-177` — `asyncio.open_connection(host, port)` uses OS resolver.
|
|
97
|
+
- **Implication.** Allowlist is hostname-based. **DNS rebinding** theoretically possible but mitigated because the client is *inside our sandbox* (we control its resolv.conf).
|
|
98
|
+
- **For Phase 8 research.** Decide: trust container DNS (simpler) vs proxy-resolves-itself (defends against rebinding). E2B's three-port pattern ([`02-e2b-infra.md`](./02-e2b-infra.md) §6) is an orthogonal axis.
|
|
99
|
+
|
|
100
|
+
## 10. Streaming perf
|
|
101
|
+
|
|
102
|
+
- **Where.** `agentbox/egress_proxy.py:191-205`. 8 KB chunks, `await writer.drain()` for backpressure.
|
|
103
|
+
- **Scale.** Single Python process handles ~1 K concurrent CONNECT tunnels. Per-tunnel saturates network bandwidth. CPU mostly idle.
|
|
104
|
+
- **Go port wins.** Goroutines lighter than asyncio tasks → 10× concurrency. `io.Copy` (or `io.CopyBuffer` for chunk control). Add `TCP_NODELAY` for latency-sensitive paths.
|
|
105
|
+
|
|
106
|
+
## Porting checklist (Python → Go for production)
|
|
107
|
+
|
|
108
|
+
| Pattern | Today | Go equivalent | Production-ready? |
|
|
109
|
+
|---|---|---|---|
|
|
110
|
+
| JWT HS256 sign/verify | `hmac.new(..., sha256)` | `crypto/hmac` + `crypto/sha256` | ✓ (also add RS256) |
|
|
111
|
+
| JWT lib | manual b64 + check | `github.com/golang-jwt/jwt/v5` | ✓ |
|
|
112
|
+
| Wildcard match | `endswith` | `strings.HasSuffix` | ✓ |
|
|
113
|
+
| CONNECT tunnel | asyncio bidi | goroutine pair + `io.Copy` | ✓ (add timeout) |
|
|
114
|
+
| HTTP proxy | aiohttp | `httputil.ReverseProxy` | ✓ |
|
|
115
|
+
| Basic-auth parse | `base64.b64decode` | `encoding/base64` | ✓ |
|
|
116
|
+
| Session lifecycle | 4h, no refresh | Same + add `/refresh` | ✓ |
|
|
117
|
+
| Logging | stderr | `zap` / `slog` JSON | ⚠ add structured |
|
|
118
|
+
| Signing key | `secrets.token_hex` | `crypto/rand` | ✓ (rotate via KMS) |
|
|
119
|
+
| DNS | OS resolver | OS resolver (or `net.Resolver`) | ✓ |
|
|
120
|
+
|
|
121
|
+
## Production gaps to close in Phase 8
|
|
122
|
+
|
|
123
|
+
1. **Token refresh endpoint** for sessions > 4 h.
|
|
124
|
+
2. **Structured audit logging** → immutable sink with 90 d retention.
|
|
125
|
+
3. **Per-tenant rate limiting** (token bucket).
|
|
126
|
+
4. **RS256** alongside HS256.
|
|
127
|
+
5. **Timeouts** on CONNECT pipes.
|
|
128
|
+
6. **Graceful shutdown** that drains in-flight tunnels.
|
|
129
|
+
7. **mTLS or Unix socket** for proxy access — never cleartext across networks.
|
|
130
|
+
|
|
131
|
+
## Phase-9 strategy (locked)
|
|
132
|
+
|
|
133
|
+
- **MVP**: keep agentbox in place — Python, HS256, 4 h JWT, simple allowlist.
|
|
134
|
+
- **Port to Go** *after* MVP proves the JWT/allowlist semantics. Target: same wire format; bug-for-bug compatible token format so sandboxes don't have to change.
|
|
135
|
+
- **Compose with E2B's three-port firewall** (see [`02-e2b-infra.md`](./02-e2b-infra.md) §6) — they're complementary: agentbox authorizes (who can egress where); E2B-style firewall filters protocols (no protocol confusion on non-HTTP ports).
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
|
|
2
|
+
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
|
|
3
|
+
|
|
4
|
+
# 10 — sysbox (default L2 for internal/trusted tier)
|
|
5
|
+
|
|
6
|
+
> Source: [nestybox/sysbox](https://github.com/nestybox/sysbox). User-namespace + procfs/sysfs emulation.
|
|
7
|
+
> Already used by our current Helm chart (`RuntimeClass: sysbox-runc`). [Phase 5](../roadmap.md#phase-5--helm-hardening--kubernetesprovider) formalizes it as the default L2.
|
|
8
|
+
|
|
9
|
+
## 1. Installation — `sysbox-deploy-k8s` DaemonSet
|
|
10
|
+
|
|
11
|
+
- **Where.** `sysbox-k8s-manifests/sysbox-install.yaml:42-181`. Image `registry.nestybox.com/nestybox/sysbox-deploy-k8s:v0.7.0`.
|
|
12
|
+
- **What.** Auto-installs binaries (`sysbox-runc`, `sysbox-fs`, `sysbox-mgr`) on labeled nodes; configures containerd/CRI-O; registers RuntimeClass. Tolerates `sysbox-runtime: not-running` during install; relabels `sysbox-runtime: running` post-success. Rolling update.
|
|
13
|
+
- **Why for us.** Phase 5 — direct analog to [kata-deploy](./01-kata-containers.md#5-kata-deploy-daemonset--installcleanup-probes-node-affinity). Bundle into Helm dependencies.
|
|
14
|
+
- **Footgun.** Requires privileged init container (unavoidable — patches systemd units and kernel modules). Pre-2.0.5 containerd → falls back to CRI-O; mandate **containerd v2.0.5+** to skip that path.
|
|
15
|
+
|
|
16
|
+
## 2. RuntimeClass — `sysbox-runc`
|
|
17
|
+
|
|
18
|
+
- **Where.** `sysbox-install.yaml:173-180`.
|
|
19
|
+
- **What.** `node.k8s.io/v1` RuntimeClass; handler = `sysbox-runc`. `nodeSelector: sysbox-runtime: running` pins pods to installed nodes.
|
|
20
|
+
- **K8s ≥ v1.30 + containerd ≥ v2.0.5.** Supports formal user-namespace via `pod.spec.hostUsers: false` (cleaner than CRI-O's annotation `io.kubernetes.cri-o.userns-mode: "auto:size=65536"`).
|
|
21
|
+
- **Why for us.** Phase 5 default template runtime.
|
|
22
|
+
- **Footgun.** Pre-1.30 clusters → fall back to CRI-O annotation; document separately.
|
|
23
|
+
|
|
24
|
+
## 3. What sysbox adds vs runc
|
|
25
|
+
|
|
26
|
+
- **Where.** `README.md:19-62`, `design.md:1-45`, `dind.md:23-129`.
|
|
27
|
+
- **Key gains.**
|
|
28
|
+
- **User-namespace isolation** — root inside container = `nobody:nogroup` on host.
|
|
29
|
+
- **procfs / sysfs virtualization** — FUSE-mounted by `sysbox-fs`; hides host resources; container-local sysctl.
|
|
30
|
+
- **Immutable rootfs mounts** — prevents mount-escape tricks.
|
|
31
|
+
- **DinD without `--privileged`** — inner Docker daemon runs unprivileged.
|
|
32
|
+
- **For us.** Phase 5 internal tier — VM-class isolation without VM cost, ~50 ms cold start, ~5 MB RAM overhead.
|
|
33
|
+
- **NOT enough alone for untrusted.** Kernel CVEs still apply → pair with kata-ch (Phase 9).
|
|
34
|
+
|
|
35
|
+
## 4. Component triad — `sysbox-runc`, `sysbox-fs`, `sysbox-mgr`
|
|
36
|
+
|
|
37
|
+
- **Where.** `design.md:13-46`.
|
|
38
|
+
- **What.**
|
|
39
|
+
- **`sysbox-runc`** — OCI runtime fork; per create/start/delete; gRPC client to sysbox-mgr.
|
|
40
|
+
- **`sysbox-fs`** — FUSE daemon; emulates `/proc`, `/sys`; resident for container lifetime.
|
|
41
|
+
- **`sysbox-mgr`** — stateful daemon; allocates per-container UID ranges from `/etc/subuid`, `/etc/subgid`; coordinates cgroup limits.
|
|
42
|
+
- **For us.** Monitoring must track all three. gRPC failures between them are the failure mode. DaemonSet handles restart in k8s; on bare metal use `Restart=always` + throttling.
|
|
43
|
+
|
|
44
|
+
## 5. systemd-in-container — works out of the box
|
|
45
|
+
|
|
46
|
+
- **Where.** `design.md:198-225`, `dind.md:103-129`.
|
|
47
|
+
- **What.** sysbox detects PID 1 = systemd and: allows `/proc/sys` writes (normally user-ns-blocked), auto-mounts cgroup v2, whitelists mount/umount. `command: ["/sbin/init"]` just works.
|
|
48
|
+
- **For us.** Phase 5 — relevant if a template ever bundles multiple services. Use Nestybox-provided Ubuntu Jammy/Focal systemd-docker images as base.
|
|
49
|
+
|
|
50
|
+
## 6. License — Apache 2.0 (CE only)
|
|
51
|
+
|
|
52
|
+
- **Where.** `README.md:198-211`, `install-k8s.md:154-297` (EE marked DEPRECATED).
|
|
53
|
+
- **What.** **Sysbox CE** = Apache 2.0. **Sysbox-EE** deprecated since May 2022 (Docker acquired Nestybox). EE distribution stopped.
|
|
54
|
+
- **For us.** Compatible with our license policy ([ADR-0006](../adr/0006-no-agpl-no-bsl-dependencies.md)). Support is community / GitHub issues / Slack.
|
|
55
|
+
|
|
56
|
+
## 7. Known CVEs (kernel-shared caveats)
|
|
57
|
+
|
|
58
|
+
- **Where.** `security-cve.md:1-169`.
|
|
59
|
+
- **Critical four.**
|
|
60
|
+
|
|
61
|
+
| CVE | Affects | Fix |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| CVE-2022-0185 (user-ns escape) | Kernel < 5.16 | Kernel ≥ 5.16 |
|
|
64
|
+
| CVE-2022-0847 (Dirty Pipe) | Kernel < 5.16.11 / 5.15.25 / 5.10.102 | Patched kernel |
|
|
65
|
+
| CVE-2022-0811 (CRI-O sysctl) | `sysbox-deploy-k8s` < v0.5.1 | DaemonSet ≥ v0.5.1 |
|
|
66
|
+
| CVE-2024-21626 (runc fd leak) | **NOT affected** — sysbox has user-ns fallback | — |
|
|
67
|
+
|
|
68
|
+
- **For us.** Phase 5 — gate sysbox templates on `kernel-version: >=5.16` node label. Annual CVE audit.
|
|
69
|
+
- **Why this is acceptable.** sysbox is OS-virtualization, not VM-isolation. We accept the trade-off for **internal trusted** tier; eliminate it via kata-ch for **untrusted** (Phase 9).
|
|
70
|
+
|
|
71
|
+
## 8. Containerd vs CRI-O integration
|
|
72
|
+
|
|
73
|
+
- **Where.** `install-k8s.md:90-108`.
|
|
74
|
+
- **What.** K8s ≥ 1.30 + containerd ≥ 2.0.5 → OCI runtime spec, drops `sysbox-runc` into `/usr/bin/`, updates `config.toml`. Older → falls back to **customized CRI-O** (heavier, requires kubelet restart).
|
|
75
|
+
- **For us.** **Mandate K8s ≥ 1.30 + containerd ≥ 2.0.5** in Helm pre-install hook. Hard requirement, not soft recommendation.
|
|
76
|
+
|
|
77
|
+
## 9. Performance
|
|
78
|
+
|
|
79
|
+
- **Where.** `README.md:324-340`, `dind.md:199-204`.
|
|
80
|
+
- **What.** Cold start ~50 ms (vs runc 30 ms). RAM overhead ~5 MB / pod (vs runc 2 MB, gVisor 15–25 MB). CPU overhead negligible. Inner-container network has slight overhead due to extra bridge.
|
|
81
|
+
- **For us.** Phase 5 SLO budgets — 50 ms pod-spawn is fine. 5 MB × 1000 pods = 5 GB host RAM (acceptable).
|
|
82
|
+
|
|
83
|
+
## 10. Operator footguns
|
|
84
|
+
|
|
85
|
+
| Don't | Why | Do |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| Mount host `/var/lib/docker` into container | Breaks isolation; concurrent cache violations | Let inner Docker manage its own |
|
|
88
|
+
| Configure inner Docker with userns-remap | Not supported; redundant with sysbox user-ns | Leave default |
|
|
89
|
+
| Share inner Docker data-root across containers | Lock contention → failures | sysbox-mgr errors out anyway |
|
|
90
|
+
| Skip `hostUsers: false` (or CRI-O annotation) | Pod runs root w/o user-ns — half the security gone | Always set it |
|
|
91
|
+
| Run on kernel < 5.4 | Sysbox unsupported | Kernel ≥ 5.16 (for CVEs above) |
|
|
92
|
+
|
|
93
|
+
## Adoption checklist for Phase 5
|
|
94
|
+
|
|
95
|
+
1. Add `sysbox-deploy-k8s` DaemonSet to Helm chart (or document as prereq).
|
|
96
|
+
2. Helm pre-install hook: validate `kubectl version ≥ 1.30` + containerd ≥ 2.0.5 + kernel ≥ 5.16 on a sample of nodes.
|
|
97
|
+
3. Default template: `runtimeClassName: sysbox-runc`, `hostUsers: false`.
|
|
98
|
+
4. Document footguns in `values.yaml` comments.
|
|
99
|
+
5. Plan kernel ≥ 5.16 enforcement via node label + scheduler taint (Phase 5 acceptance).
|
|
100
|
+
6. Phase 9: layer kata-ch beside sysbox for untrusted tier.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: FSL-1.1-Apache-2.0 -->
|
|
2
|
+
<!-- Copyright (c) 2025 Open Computer Use Contributors -->
|
|
3
|
+
|
|
4
|
+
# 11 — firecracker-containerd (FC via containerd + COW snapshotter)
|
|
5
|
+
|
|
6
|
+
> Source: [firecracker-microvm/firecracker-containerd](https://github.com/firecracker-microvm/firecracker-containerd). AWS's containerd integration for Firecracker.
|
|
7
|
+
> Relevant for [Phase 9](../roadmap.md) (kata-fc alternative path) and [Phase 10](../roadmap.md#phase-10--snapshotrestore--multi-region) (COW snapshotting for fast cold-start / warm pool).
|
|
8
|
+
|
|
9
|
+
## 1. Demux snapshotter — out-of-VM proxy ⭐
|
|
10
|
+
|
|
11
|
+
- **Where.** `snapshotter/README.md`; `snapshotter/demux/snapshotter.go` (Prepare:109, Commit:145, Remove:159, Usage:77); `snapshotter/app/service.go`; cache: `snapshotter/demux/cache/cache.go`.
|
|
12
|
+
- **What.** containerd snapshotter plugin that proxies snapshot ops (Prepare/Commit/Remove/Mounts) **over vsock** to remote snapshotters running **inside** the microVM. In-VM snapshotter resolves via `GET /address?namespace={vmid}` → vsock socket path + metrics port.
|
|
13
|
+
- **Why for Phase 10.** **The** enabler for COW rootfs and warm-pool cold-start. Workflow:
|
|
14
|
+
1. Prepare snapshot from parent (immutable base image) → CoW view.
|
|
15
|
+
2. Commit on container exit → releases snapshot resources.
|
|
16
|
+
3. All I/O through in-VM snapshotter for block-level dedup.
|
|
17
|
+
- **For us.** Reference for our snapshot strategy in Phase 10 — even if we go with Cloud Hypervisor primary, this is the **architectural pattern** for "snapshotter inside the VM, control plane outside".
|
|
18
|
+
|
|
19
|
+
## 2. vsock + TTRPC agent ↔ shim handshake
|
|
20
|
+
|
|
21
|
+
- **Where.** Shim: `runtime/service.go` (vmReady channel, `agentClient taskAPI.TaskService` at line 138, vsock port allocation 74–76). Agent: `agent/service.go` (TaskService wrapping runc 46–72). Proto: `proto/firecracker.proto` (CreateVM, PauseVM, ResumeVM, StopVM, GetVMInfo, SetMetadata). Dial pattern: `runtime/service.go:~607` (`vsock.DialContext`).
|
|
22
|
+
- **What.**
|
|
23
|
+
1. **VM bootstrap** — `CreateVM` spins up FC, waits for agent on vsock (vmReady channel).
|
|
24
|
+
2. **Task routing** — Create/Exec/Delete/Kill from shim → agent over ttrpc-vsock.
|
|
25
|
+
3. **Port allocation** — per-container unique vsock I/O port (min 11000, allocated at runtime/service.go 432–443).
|
|
26
|
+
4. Agent **wraps `runc.New()`** (agent/service.go:99) — forwards containerd task API directly. Containers-in-VMs transparent to the containerd control plane.
|
|
27
|
+
- **Why for us.** Phase 9 — exact model for how a host-side shim talks to an in-VM agent. We adopt the **bootstrap timing + vsock port lifecycle** pattern; we **skip TTRPC** in favor of HTTP+WS (per ADR direction).
|
|
28
|
+
|
|
29
|
+
## 3. Control API — VM lifecycle ≠ task lifecycle
|
|
30
|
+
|
|
31
|
+
- **Where.** `proto/firecracker.proto` (CreateVMRequest, CreateVMResponse), `firecracker-control/service.go`, `runtime/service.go`.
|
|
32
|
+
- **What.** Two-layer API:
|
|
33
|
+
- **VM lifecycle** (control plugin) — long-lived, multi-container.
|
|
34
|
+
- **Task lifecycle** (V2 runtime shim) — per-container, short-lived.
|
|
35
|
+
- **Reuse pattern**: orchestrator calls `CreateVM` once per workload group → VMID reused for N task creates → mounts different drives per task → **`ExitAfterAllTasksDeleted: true`** auto-cleans the VM when last task exits.
|
|
36
|
+
- **vs Kata.** Kata creates 1 VM per pod (1:1). firecracker-containerd reuses 1 VM across M tasks (1:M) → much higher density for short-lived workloads.
|
|
37
|
+
- **For us.** Phase 9 — **interesting alternative** to the per-session VM model. Trade-off: 1:M reuse → less per-session isolation. Use only for tightly-related batches inside same tenant; never across tenants.
|
|
38
|
+
|
|
39
|
+
## 4. Drive mounting — pre-allocated stubs + dynamic updates
|
|
40
|
+
|
|
41
|
+
- **Where.** `proto/firecracker.proto` (RootDrive, DriveMounts, ContainerCount); `runtime/service.go:CreateContainerStubs()`; `agent/drive_handler.go` (in-VM mount handler, MountDrive TTRPC).
|
|
42
|
+
- **What.** Firecracker has **no hot-plug**. Workaround:
|
|
43
|
+
1. Runtime pre-allocates N stub drive files on VM creation (`ContainerCount`).
|
|
44
|
+
2. At task-creation, runtime updates `FirecrackerConfig.Drives[i].Path` to actual container image **while VM runs**.
|
|
45
|
+
3. CoW via the demux snapshotter (§1) — each container's rootfs is a unique snapshot.
|
|
46
|
+
- **For us.** Phase 10 warm-pool insight: even Firecracker's no-hot-plug limit can be worked around with **pre-allocation**. One VM with 32 stub drives = 32 sequential containers without reboot.
|
|
47
|
+
|
|
48
|
+
## 5. Network setup — TC redirect + CNI chain
|
|
49
|
+
|
|
50
|
+
- **Where.** `docs/networking.md` (rationale 62–110), `runtime/service.go:1031-1046` (NetworkInterfaces).
|
|
51
|
+
- **What.** Linux Traffic Control U32 filter redirects packets between VM's TAP device ↔ veth in a CNI-configured netns. CNI chain: `[ptp (veth) → tc-redirect-tap (redirect veth ↔ tap)]`.
|
|
52
|
+
- **Why.**
|
|
53
|
+
- **TC redirect** = ~10–20 % CPU savings vs bridge.
|
|
54
|
+
- **Chained CNI** = composable policy (DNS via host-local IPAM, internet via `ipMasq=true`).
|
|
55
|
+
- **Per-VM netns isolation** = multi-tenant ready.
|
|
56
|
+
- **No VM IP needed** — TC redirect lets guest see same MAC/IP as veth → DHCP-free boot.
|
|
57
|
+
- **For us.** Phase 9 — reference network pattern when wiring kata-fc templates; documents how CNI chains compose under Firecracker.
|
|
58
|
+
|
|
59
|
+
## 6. Metrics & logging — FIFOs + HTTP discovery for snapshotter
|
|
60
|
+
|
|
61
|
+
- **Where.** `proto/firecracker.proto:40-41` (LogFifoPath, MetricsFifoPath); `docs/logging.md` (per-library log levels); `snapshotter/README.md` (Prometheus `GET /metrics/{port}`).
|
|
62
|
+
- **What.** FC metrics + logs → named pipes (FIFOs). Snapshotter metrics discovered via HTTP resolver. Per-library log levels (`firecracker:debug`, `firecracker-containerd:error`, etc.).
|
|
63
|
+
- **For us.** Phase 10 warm-pool health — drain FIFOs periodically; alert on stall. Use snapshotter metrics for CoW efficiency (snapshot count, dedup ratio).
|
|
64
|
+
|
|
65
|
+
## 7. Task lifecycle — cleanup-stack pattern
|
|
66
|
+
|
|
67
|
+
- **Where.** `agent/service.go` (`execCleanups` map 50–51, `addCleanup`/`doCleanup` 132–150); `runtime/service.go`.
|
|
68
|
+
- **What.** Each Create registers rollback handlers; on failure or Delete, run in **reverse order**. Multi-container per VM works because `ExitAfterAllTasksDeleted` is checked before VM shutdown.
|
|
69
|
+
- **For us.** Phase 9 — clean pattern for "any step of sandbox-create fails → unwind cleanly". Same shape as E2B's multi-resource rollback ([`02-e2b-infra.md`](./02-e2b-infra.md) §4).
|
|
70
|
+
|
|
71
|
+
## 8. When to pick this over kata-fc?
|
|
72
|
+
|
|
73
|
+
| Dimension | firecracker-containerd | kata-fc |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| VM : task | 1 : M | 1 : 1 |
|
|
76
|
+
| Cold start | CoW via demux snapshotter | devmapper snapshots |
|
|
77
|
+
| Network setup | Manual CNI + TC redirect | Kata handles CNI |
|
|
78
|
+
| Warm pool fit | **Excellent** | Good |
|
|
79
|
+
| Boot latency | ~100 ms | 200–400 ms |
|
|
80
|
+
| K8s native | Indirect (containerd) | Direct (RuntimeClass) |
|
|
81
|
+
|
|
82
|
+
**Use firecracker-containerd when** workload is many-short-tasks-per-VM (serverless-shaped); snapshotter-driven cold-start matters; want containerd API without k8s overhead; need <100 ms cold start via VM reuse.
|
|
83
|
+
|
|
84
|
+
**Use kata-fc when** target is Kubernetes (CRI-standard, RuntimeClass); 1 VM : 1 pod is acceptable; want mature ecosystem.
|
|
85
|
+
|
|
86
|
+
**Our default = kata-fc** (Phase 9). firecracker-containerd is on the table for a future high-density tier where a single trusted-tenant batch can share one VM (rare; doesn't match Computer Use's per-session model).
|
|
87
|
+
|
|
88
|
+
## Phase-10 takeaways
|
|
89
|
+
|
|
90
|
+
1. **Demux snapshotter** is the architectural pattern for fast cold start — *snapshotter lives inside the VM, control plane outside*. Adapt to Cloud Hypervisor + virtio-fs in our snapshot pipeline.
|
|
91
|
+
2. **Pre-allocated stub drives** work around hypervisor hot-plug limits — useful template-design knowledge.
|
|
92
|
+
3. **Cleanup-stack pattern** standardizes rollback across our spawn pipelines.
|
|
93
|
+
4. **FIFOs drain in real time** — observability pipeline must keep up.
|