@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,141 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: FSL-1.1-Apache-2.0
|
|
3
|
+
# Copyright (c) 2025 Open Computer Use Contributors
|
|
4
|
+
#
|
|
5
|
+
# Pre-flight check for .env before `docker compose up`. Catches the common
|
|
6
|
+
# silent-fail misconfigurations (PUBLIC_BASE_URL default, half-enabled feature
|
|
7
|
+
# groups, weak passwords) at invocation time rather than in production.
|
|
8
|
+
#
|
|
9
|
+
# Usage: ./scripts/check-config.sh [path/to/.env]
|
|
10
|
+
# Exit 0 on clean config or only WARNs; exit 1 if any ERR is reported.
|
|
11
|
+
|
|
12
|
+
set -uo pipefail
|
|
13
|
+
|
|
14
|
+
ENV_FILE="${1:-.env}"
|
|
15
|
+
|
|
16
|
+
if [[ ! -f "$ENV_FILE" ]]; then
|
|
17
|
+
echo "ERROR: env file not found: $ENV_FILE" >&2
|
|
18
|
+
echo " Hint: cp .env.example .env && edit it" >&2
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Load .env into the current shell. `set -a` auto-exports; `|| true` around
|
|
23
|
+
# source protects against malformed lines triggering `set -u` aborts. We DO
|
|
24
|
+
# want `set -u` off temporarily because .env.example keeps many vars unset.
|
|
25
|
+
set +u
|
|
26
|
+
set -a
|
|
27
|
+
# shellcheck disable=SC1090
|
|
28
|
+
source "$ENV_FILE"
|
|
29
|
+
set +a
|
|
30
|
+
|
|
31
|
+
errors=0
|
|
32
|
+
warns=0
|
|
33
|
+
oks=0
|
|
34
|
+
|
|
35
|
+
section() {
|
|
36
|
+
printf '\n== %s ==\n' "$1"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
ok() { printf ' [OK] %s\n' "$1"; oks=$((oks + 1)); }
|
|
40
|
+
warn() { printf ' [WARN] %s\n' "$1"; warns=$((warns + 1)); }
|
|
41
|
+
err() { printf ' [ERR] %s\n' "$1"; errors=$((errors + 1)); }
|
|
42
|
+
|
|
43
|
+
echo "Config check for open-computer-use"
|
|
44
|
+
echo "=================================="
|
|
45
|
+
echo "Env file: $ENV_FILE"
|
|
46
|
+
|
|
47
|
+
# ----- REQUIRED -----
|
|
48
|
+
section "REQUIRED"
|
|
49
|
+
|
|
50
|
+
pbu="${PUBLIC_BASE_URL:-}"
|
|
51
|
+
# Strip a single trailing slash so `http://computer-use-server:8081/` still
|
|
52
|
+
# matches the internal default check below.
|
|
53
|
+
pbu="${pbu%/}"
|
|
54
|
+
if [[ -z "$pbu" ]]; then
|
|
55
|
+
err "PUBLIC_BASE_URL is unset (browser-reachable URL of the Computer Use server)"
|
|
56
|
+
elif [[ "$pbu" == "http://computer-use-server:8081" ]]; then
|
|
57
|
+
err "PUBLIC_BASE_URL is still the internal-DNS default — browser can't reach it"
|
|
58
|
+
else
|
|
59
|
+
ok "PUBLIC_BASE_URL = $pbu"
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
ap="${ADMIN_PASSWORD:-}"
|
|
63
|
+
case "$ap" in
|
|
64
|
+
""|admin|change-me)
|
|
65
|
+
warn "ADMIN_PASSWORD is weak/default ('$ap') — fine for local dev only" ;;
|
|
66
|
+
*)
|
|
67
|
+
ok "ADMIN_PASSWORD is set" ;;
|
|
68
|
+
esac
|
|
69
|
+
|
|
70
|
+
wsk="${WEBUI_SECRET_KEY:-}"
|
|
71
|
+
case "$wsk" in
|
|
72
|
+
""|change-me)
|
|
73
|
+
warn "WEBUI_SECRET_KEY is unset or placeholder — sessions won't survive restart" ;;
|
|
74
|
+
*)
|
|
75
|
+
ok "WEBUI_SECRET_KEY is set" ;;
|
|
76
|
+
esac
|
|
77
|
+
|
|
78
|
+
pg="${POSTGRES_PASSWORD:-openwebui}"
|
|
79
|
+
if [[ "$pg" == "openwebui" ]]; then
|
|
80
|
+
warn "POSTGRES_PASSWORD is still the default ('openwebui') — change for production"
|
|
81
|
+
else
|
|
82
|
+
ok "POSTGRES_PASSWORD is set"
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
if [[ -z "${MCP_API_KEY:-}" ]]; then
|
|
86
|
+
warn "MCP_API_KEY is empty — /mcp endpoints have no auth (fine for local dev)"
|
|
87
|
+
else
|
|
88
|
+
ok "MCP_API_KEY is set"
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
oak="${OPENAI_API_KEY:-}"
|
|
92
|
+
if [[ -z "$oak" || "$oak" == "sk-..." ]]; then
|
|
93
|
+
warn "OPENAI_API_KEY is empty/placeholder — the chat completion will not work"
|
|
94
|
+
else
|
|
95
|
+
ok "OPENAI_API_KEY is set"
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# ----- OPTIONAL FEATURE GROUPS (all-or-nothing) -----
|
|
99
|
+
section "OPTIONAL FEATURE GROUPS"
|
|
100
|
+
|
|
101
|
+
# Vision: VISION_API_KEY + VISION_API_URL + VISION_MODEL
|
|
102
|
+
vak="${VISION_API_KEY:-}"
|
|
103
|
+
vau="${VISION_API_URL:-}"
|
|
104
|
+
vmo="${VISION_MODEL:-}"
|
|
105
|
+
vision_set=0
|
|
106
|
+
for v in "$vak" "$vau" "$vmo"; do
|
|
107
|
+
if [[ -n "$v" ]]; then vision_set=$((vision_set + 1)); fi
|
|
108
|
+
done
|
|
109
|
+
case "$vision_set" in
|
|
110
|
+
0) ok "Vision: not configured (skipping group)" ;;
|
|
111
|
+
3) ok "Vision: all three set" ;;
|
|
112
|
+
*) err "Vision: partial config (only $vision_set/3 set) — set all three or none" ;;
|
|
113
|
+
esac
|
|
114
|
+
|
|
115
|
+
# MCP Tokens Wrapper: MCP_TOKENS_URL + MCP_TOKENS_API_KEY
|
|
116
|
+
mtu="${MCP_TOKENS_URL:-}"
|
|
117
|
+
mtk="${MCP_TOKENS_API_KEY:-}"
|
|
118
|
+
if [[ -z "$mtu" && -z "$mtk" ]]; then
|
|
119
|
+
ok "MCP Tokens: not configured (skipping group)"
|
|
120
|
+
elif [[ -n "$mtu" && -n "$mtk" ]]; then
|
|
121
|
+
ok "MCP Tokens: both configured"
|
|
122
|
+
else
|
|
123
|
+
err "MCP Tokens: partial config — set BOTH MCP_TOKENS_URL and MCP_TOKENS_API_KEY or neither"
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
# Anthropic sub-agent presence (single toggle, no pairing required)
|
|
127
|
+
if [[ -n "${ANTHROPIC_AUTH_TOKEN:-}" ]]; then
|
|
128
|
+
ok "Claude Code sub-agent: enabled"
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
# ----- SUMMARY -----
|
|
132
|
+
section "SUMMARY"
|
|
133
|
+
printf 'OK: %d WARN: %d ERR: %d\n' "$oks" "$warns" "$errors"
|
|
134
|
+
|
|
135
|
+
if [[ "$errors" -gt 0 ]]; then
|
|
136
|
+
echo
|
|
137
|
+
echo "Fix the [ERR] items above before running 'docker compose up'."
|
|
138
|
+
exit 1
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
exit 0
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: FSL-1.1-Apache-2.0
|
|
3
|
+
# Copyright (c) 2025 Open Computer Use Contributors
|
|
4
|
+
#
|
|
5
|
+
# AI-slop detector — patterns that flag AI-generated bloat.
|
|
6
|
+
#
|
|
7
|
+
# Complements vale (which checks banned vocab/phrases in prose). This script
|
|
8
|
+
# catches structural patterns vale can't see: TOCs in short docs, reflexive
|
|
9
|
+
# Conclusion sections, decorative dividers for one-paragraph content,
|
|
10
|
+
# stub headings, file openings that restate project scope.
|
|
11
|
+
#
|
|
12
|
+
# Exits 1 on any hit.
|
|
13
|
+
|
|
14
|
+
set -euo pipefail
|
|
15
|
+
|
|
16
|
+
ROOT="$(git rev-parse --show-toplevel)"
|
|
17
|
+
cd "$ROOT"
|
|
18
|
+
|
|
19
|
+
fail=0
|
|
20
|
+
|
|
21
|
+
# Scope: docs/architecture/, CLAUDE.md, README.md, CONTRIBUTING.md.
|
|
22
|
+
mapfile -d '' files < <(
|
|
23
|
+
find docs/architecture -name '*.md' -print0 2>/dev/null
|
|
24
|
+
printf '%s\0' CLAUDE.md README.md CONTRIBUTING.md 2>/dev/null
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
check() {
|
|
28
|
+
local file="$1" lines="$2"
|
|
29
|
+
|
|
30
|
+
# 1. File begins with "open-computer-use is …" (restating project scope).
|
|
31
|
+
if awk 'NR<=20 && /^[Oo]pen [Cc]omputer [Uu]se is /' "$file" | grep -q .; then
|
|
32
|
+
echo "FAIL: $file restates project scope in first 20 lines"
|
|
33
|
+
fail=1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# 2. Conclusion / Summary section in a short doc (< 1000 lines).
|
|
37
|
+
if (( lines < 1000 )) && grep -qE '^##+ (Conclusion|Summary|In conclusion|TL;DR)$' "$file"; then
|
|
38
|
+
echo "FAIL: $file has a Conclusion/Summary section in a doc shorter than 1000 lines"
|
|
39
|
+
fail=1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# 3. Table of Contents in a short doc (≤ 500 lines).
|
|
43
|
+
if (( lines <= 500 )) && grep -qE '^##+ (Table of [Cc]ontents|TOC|Contents)$' "$file"; then
|
|
44
|
+
echo "FAIL: $file has a TOC in a doc ≤ 500 lines (headings already navigate)"
|
|
45
|
+
fail=1
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# 4. Decorative emoji headers.
|
|
49
|
+
if grep -qE '^##+ [^A-Za-z0-9`<\(\[]' "$file"; then
|
|
50
|
+
if grep -nE '^##+ [^A-Za-z0-9`<\(\[]' "$file" | grep -v '^[0-9]*:##* [#]' > /dev/null; then
|
|
51
|
+
echo "WARN: $file may have decorative-character headings (manually verify)"
|
|
52
|
+
fi
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# 5. Stub headings (heading immediately followed by another heading or EOF).
|
|
56
|
+
awk '
|
|
57
|
+
/^##+ / {
|
|
58
|
+
cur=$0; line=NR
|
|
59
|
+
while ((getline next_line) > 0) {
|
|
60
|
+
if (next_line ~ /^[ \t]*$/) continue
|
|
61
|
+
if (next_line ~ /^##+ /) {
|
|
62
|
+
print FILENAME ":" line ": stub heading (no content before next heading): " cur
|
|
63
|
+
exit 1
|
|
64
|
+
}
|
|
65
|
+
break
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
' "$file" | grep . && fail=1 || true
|
|
69
|
+
|
|
70
|
+
# 6. Self-referential CI / doc-rules meta-noise. Reader does not need to be
|
|
71
|
+
# told about our line caps, vale lint, banned-vocab list, "diagrams budget"
|
|
72
|
+
# inside the doc itself. CLAUDE.md is the rule source; the doc carries
|
|
73
|
+
# content, not rules about itself.
|
|
74
|
+
if grep -nEi '(kept within the [^.]*budget|≤[0-9]+-line (form|cap|budget)|CLAUDE\.md (rules|conventions|line cap|inline-mermaid|Diagrams (budget|rules|inline))|preserve[sd]? .{0,40}(banned-vocab|vale lint)|the surrounding backticks preserve|against (our|the) (project )?banned-vocab)' "$file" > /dev/null; then
|
|
75
|
+
grep -nEi '(kept within the [^.]*budget|≤[0-9]+-line (form|cap|budget)|CLAUDE\.md (rules|conventions|line cap|inline-mermaid|Diagrams (budget|rules|inline))|preserve[sd]? .{0,40}(banned-vocab|vale lint)|the surrounding backticks preserve|against (our|the) (project )?banned-vocab)' "$file"
|
|
76
|
+
echo "FAIL: $file contains self-referential CI / doc-rules meta-noise"
|
|
77
|
+
fail=1
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# 7. "Holds in spirit" / "honest about" / "as a binding artifact for" —
|
|
81
|
+
# hedge phrasing that adds no factual content.
|
|
82
|
+
if grep -nEi '(hold[s]? in spirit|honest about (not )?being|the binding artifact for|is what the contract binds)' "$file" > /dev/null; then
|
|
83
|
+
grep -nEi '(hold[s]? in spirit|honest about (not )?being|the binding artifact for|is what the contract binds)' "$file"
|
|
84
|
+
echo "FAIL: $file contains hedge / pompous phrasing"
|
|
85
|
+
fail=1
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# 8. "the only X" / "is the only" boastful framing — superlative without a
|
|
89
|
+
# measurable referent. CLAUDE.md "no adjectives without measurable
|
|
90
|
+
# referent".
|
|
91
|
+
# Allowed: "is the only zone" / "is the only path" in legitimate context.
|
|
92
|
+
# Banned: "is the only plaintext segments and …" boastful style.
|
|
93
|
+
if grep -nEi '\b(is|are) the only [a-z]+ (and|listed|that)\b' "$file" > /dev/null; then
|
|
94
|
+
grep -nEi '\b(is|are) the only [a-z]+ (and|listed|that)\b' "$file"
|
|
95
|
+
echo "FAIL: $file contains boastful 'the only X' framing"
|
|
96
|
+
fail=1
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# 9. Triple parallel construction "X stay in Y; X' stay in Y'; X'' stay in Y''"
|
|
100
|
+
# pattern. AI loves three-clause parallelism. Looks for repeated verb
|
|
101
|
+
# three times in one line with semicolons.
|
|
102
|
+
if grep -nE '([A-Za-z]+) [a-z]+ in [^;]+; [A-Za-z]+ \1 [a-z]+ in [^;]+; [A-Za-z]+ \1 [a-z]+ in' "$file" > /dev/null; then
|
|
103
|
+
grep -nE '([A-Za-z]+) [a-z]+ in [^;]+; [A-Za-z]+ \1 [a-z]+ in [^;]+; [A-Za-z]+ \1 [a-z]+ in' "$file"
|
|
104
|
+
echo "FAIL: $file has triple-parallel 'X verbs in Y; X' verbs in Y'; …' construction"
|
|
105
|
+
fail=1
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
# 10. Triple negation "It does NOT X, it does NOT Y, it does NOT Z" pattern.
|
|
109
|
+
if grep -nEi 'does \*?\*?not\*?\*? [^.]+\. (it|It) does \*?\*?not\*?\*? [^.]+\. (it|It) does \*?\*?not\*?\*?' "$file" > /dev/null; then
|
|
110
|
+
grep -nEi 'does \*?\*?not\*?\*? [^.]+\. (it|It) does \*?\*?not\*?\*? [^.]+\. (it|It) does \*?\*?not\*?\*?' "$file"
|
|
111
|
+
echo "FAIL: $file has triple-negation 'It does not X. It does not Y. It does not Z' construction"
|
|
112
|
+
fail=1
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# 11. List-of-three "no X, no Y, no Z" inside parentheses.
|
|
116
|
+
if grep -nE '\(no [a-z-]+, no [a-z-]+, no [a-z-]+\)' "$file" > /dev/null; then
|
|
117
|
+
grep -nE '\(no [a-z-]+, no [a-z-]+, no [a-z-]+\)' "$file"
|
|
118
|
+
echo "FAIL: $file has list-of-three '(no X, no Y, no Z)' construction"
|
|
119
|
+
fail=1
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
# 12. "Reviewers copy this … workpapers" / "verbatim, not paraphrased"
|
|
123
|
+
# pompous audit-evidence framing. A draft doc cannot represent itself
|
|
124
|
+
# as a verbatim regulator-citation source. If a citation table needs
|
|
125
|
+
# to claim verbatim accuracy, the doc must back it with a verification
|
|
126
|
+
# trail; until then, the table is indicative.
|
|
127
|
+
if grep -nEi '(copy [^.]{0,40}workpapers|verbatim, not paraphrased|cite[^.]{0,40}verbatim)' "$file" > /dev/null; then
|
|
128
|
+
grep -nEi '(copy [^.]{0,40}workpapers|verbatim, not paraphrased|cite[^.]{0,40}verbatim)' "$file"
|
|
129
|
+
echo "FAIL: $file claims verbatim regulator-citation accuracy without a verification trail"
|
|
130
|
+
fail=1
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
# 13. "is the only" / "is unique in" superlatives without measurable
|
|
134
|
+
# evidence in the same sentence. Match the "X is the only Y" /
|
|
135
|
+
# "X is unique among Y" patterns.
|
|
136
|
+
if grep -nEi '\bis (the only|unique (among|in)) [a-z]+\b' "$file" > /dev/null; then
|
|
137
|
+
grep -nEi '\bis (the only|unique (among|in)) [a-z]+\b' "$file"
|
|
138
|
+
echo "FAIL: $file uses superlative 'is the only / unique' without measurable referent"
|
|
139
|
+
fail=1
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
# 14. Naming-denylist check. The architecture set states facts, never the
|
|
143
|
+
# research path that produced them. The denied-term pattern is supplied
|
|
144
|
+
# out-of-band via the LEXICON_DENYLIST environment variable (an
|
|
145
|
+
# extended-regex, case-insensitive). When it is unset, this sub-check
|
|
146
|
+
# is skipped with a notice. Matches are redacted to file:line only —
|
|
147
|
+
# the matched text is never echoed.
|
|
148
|
+
if [ -n "${LEXICON_DENYLIST:-}" ]; then
|
|
149
|
+
if grep -nEi "$LEXICON_DENYLIST" "$file" > /dev/null; then
|
|
150
|
+
grep -nEi "$LEXICON_DENYLIST" "$file" | cut -d: -f1 | sort -u \
|
|
151
|
+
| while IFS= read -r ln; do echo "$file:$ln"; done
|
|
152
|
+
echo "FAIL: $file — denied term found"
|
|
153
|
+
fail=1
|
|
154
|
+
fi
|
|
155
|
+
else
|
|
156
|
+
echo "notice: LEXICON_DENYLIST unset — naming-denylist sub-check skipped"
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
# 15. "bank" as the framing subject, not a named example. The default
|
|
160
|
+
# audience term is "regulated enterprise"; a bank is allowed only as
|
|
161
|
+
# one named example (e.g. "tier-1 US or EU bank"). Framing tells —
|
|
162
|
+
# a bank as the sentence's subject, possessive, or an adjective —
|
|
163
|
+
# widen wrongly: "the bank already runs", "a bank's machinery",
|
|
164
|
+
# "targets banks", "bank-required", "bank-grade", "bank InfoSec/CISO".
|
|
165
|
+
# The example-allowlist file carries the lines that legitimately name
|
|
166
|
+
# a bank as an example; everything else fails.
|
|
167
|
+
if grep -nEiw 'bank|banks|banking' "$file" \
|
|
168
|
+
| grep -vEi 'tier-1 (us or eu )?bank|tier-1 banks|US or EU bank|retail-banking|banking convention|banking-vendor convention|named example.*bank|bank[,.) ]+(for example|e\.g\.|as one|as the named)' \
|
|
169
|
+
| grep -nEi "bank's|\bthe bank\b|\ba bank\b|targets? banks|bank-(required|grade|specific|facing|side)|bank (infosec|ciso|reviewer|procurement|architect|auditor)" > /dev/null; then
|
|
170
|
+
grep -nEi "bank's|\bthe bank\b|\ba bank\b|targets? banks|bank-(required|grade|specific|facing|side)|bank (infosec|ciso|reviewer|procurement|architect|auditor)" "$file" \
|
|
171
|
+
| grep -vEi 'tier-1 (us or eu )?bank|tier-1 banks|US or EU bank|retail-banking|banking convention|banking-vendor convention'
|
|
172
|
+
echo "FAIL: $file frames the audience as 'bank' — use 'regulated enterprise'; a bank is allowed only as a named example (tier-1 US/EU bank)"
|
|
173
|
+
fail=1
|
|
174
|
+
fi
|
|
175
|
+
|
|
176
|
+
# 16. SAML as a platform identity surface. OCU's identity surface is
|
|
177
|
+
# OIDC-only; a SAML-only customer IdP federates in through Dex or
|
|
178
|
+
# Keycloak, never an OCU SAML endpoint. Any SAML mention must be in a
|
|
179
|
+
# federation/legacy-fallback clause, not asserted as something OCU
|
|
180
|
+
# speaks. Allowlist the federation phrasing; everything else fails.
|
|
181
|
+
if grep -nEi '\bSAML\b' "$file" \
|
|
182
|
+
| grep -vEi 'SAML-only (customer )?(idp|pam)|federates? in through (dex|keycloak)|never an OCU SAML|through Dex or Keycloak' > /dev/null; then
|
|
183
|
+
grep -nEi '\bSAML\b' "$file" \
|
|
184
|
+
| grep -vEi 'SAML-only (customer )?(idp|pam)|federates? in through (dex|keycloak)|never an OCU SAML|through Dex or Keycloak'
|
|
185
|
+
echo "FAIL: $file asserts SAML as a platform surface — OCU is OIDC-only; a SAML-only IdP federates in via Dex/Keycloak"
|
|
186
|
+
fail=1
|
|
187
|
+
fi
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
for f in "${files[@]}"; do
|
|
191
|
+
[[ -f "$f" ]] || continue
|
|
192
|
+
lines=$(wc -l < "$f" | tr -d ' ')
|
|
193
|
+
check "$f" "$lines"
|
|
194
|
+
done
|
|
195
|
+
|
|
196
|
+
if (( fail )); then
|
|
197
|
+
echo
|
|
198
|
+
echo "Hint: see CLAUDE.md 'Documentation discipline' for the banned patterns."
|
|
199
|
+
exit 1
|
|
200
|
+
fi
|
|
201
|
+
|
|
202
|
+
echo "ai-slop-detector: OK"
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: FSL-1.1-Apache-2.0
|
|
3
|
+
# Copyright (c) 2025 Open Computer Use Contributors
|
|
4
|
+
#
|
|
5
|
+
# architecture-tree-whitelist — fail when an unexpected file appears under
|
|
6
|
+
# `docs/architecture/`. Each directory has a known set of allowed files and
|
|
7
|
+
# filename patterns. Anything outside the whitelist signals that:
|
|
8
|
+
#
|
|
9
|
+
# - someone wrote a verifier snapshot, scratch note, or AI artifact into
|
|
10
|
+
# the architecture set (drift the moment the next pass runs), OR
|
|
11
|
+
# - someone added a new directory without following PROCESS.md, OR
|
|
12
|
+
# - a typo / wrong location for an otherwise legitimate file.
|
|
13
|
+
#
|
|
14
|
+
# Each new component / ADR / mapping that needs a new file shape must:
|
|
15
|
+
# 1. follow PROCESS.md "Adding a <thing>",
|
|
16
|
+
# 2. update this whitelist in the same PR.
|
|
17
|
+
#
|
|
18
|
+
# Run from repo root: scripts/docs-lint/architecture-tree-whitelist.sh
|
|
19
|
+
|
|
20
|
+
set -euo pipefail
|
|
21
|
+
|
|
22
|
+
ROOT="$(git rev-parse --show-toplevel)"
|
|
23
|
+
cd "$ROOT"
|
|
24
|
+
|
|
25
|
+
if [ ! -d docs/architecture ]; then
|
|
26
|
+
echo "architecture-tree-whitelist: docs/architecture/ does not exist, nothing to check"
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
# Per-directory allow-list. `*` is a glob, not regex; it matches anything
|
|
31
|
+
# except `/` (so `compliance/*-mapping.md` does not match `compliance/sub/x.md`).
|
|
32
|
+
ALLOWED=(
|
|
33
|
+
# Top-level architecture-set roots.
|
|
34
|
+
"README.md"
|
|
35
|
+
"MANIFESTO.md"
|
|
36
|
+
"glossary.md"
|
|
37
|
+
"PROCESS.md"
|
|
38
|
+
"primitives-backlog.md"
|
|
39
|
+
|
|
40
|
+
# Top-level numbered cross-cutting artifacts (scope cuts across the whole
|
|
41
|
+
# tree, cited by every component spec — e.g. trust boundaries, C4 context,
|
|
42
|
+
# deployment topologies). Per PROCESS.md, these live at the top level rather
|
|
43
|
+
# than under `manifesto/` or `components/`.
|
|
44
|
+
"[0-9][0-9]-*.md"
|
|
45
|
+
|
|
46
|
+
# ADRs.
|
|
47
|
+
"adr/README.md"
|
|
48
|
+
"adr/0000-template.md"
|
|
49
|
+
"adr/[0-9][0-9][0-9][0-9]-*.md"
|
|
50
|
+
|
|
51
|
+
# Component specs.
|
|
52
|
+
"components/README.md"
|
|
53
|
+
"components/0000-template.md"
|
|
54
|
+
"components/[0-9][0-9]-*.md"
|
|
55
|
+
|
|
56
|
+
# Manifesto sections (one numbered file per section).
|
|
57
|
+
"manifesto/README.md"
|
|
58
|
+
"manifesto/[0-9][0-9]-*.md"
|
|
59
|
+
|
|
60
|
+
# Compliance — only the cross-framework matrix and per-framework mappings.
|
|
61
|
+
"compliance/README.md"
|
|
62
|
+
"compliance/controls-matrix.md"
|
|
63
|
+
"compliance/*-mapping.md"
|
|
64
|
+
"compliance/sub-processors.md"
|
|
65
|
+
|
|
66
|
+
# Diagrams — sources only. PNG / SVG / JPG forbidden (CLAUDE.md §Diagrams).
|
|
67
|
+
"diagrams/README.md"
|
|
68
|
+
"diagrams/*.mmd"
|
|
69
|
+
"diagrams/*.d2"
|
|
70
|
+
"diagrams/*.puml"
|
|
71
|
+
|
|
72
|
+
# Threat models — Threagile / pytm YAML.
|
|
73
|
+
"threat-model/README.md"
|
|
74
|
+
"threat-model/*.yaml"
|
|
75
|
+
"threat-model/*.yml"
|
|
76
|
+
|
|
77
|
+
# Contracts — OpenAPI / AsyncAPI / Protobuf / MCP schema.
|
|
78
|
+
"contracts/README.md"
|
|
79
|
+
"contracts/*.yaml"
|
|
80
|
+
"contracts/*.yml"
|
|
81
|
+
"contracts/*.json"
|
|
82
|
+
"contracts/*.proto"
|
|
83
|
+
|
|
84
|
+
# gitkeep markers for empty scaffold directories. The `?` is a literal
|
|
85
|
+
# filename character set by the glob translator; here we match exactly
|
|
86
|
+
# ".gitkeep" anywhere one directory deep under docs/architecture/.
|
|
87
|
+
"*/.gitkeep"
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
python3 - "${ALLOWED[@]}" <<'PY'
|
|
91
|
+
import fnmatch, pathlib, sys
|
|
92
|
+
|
|
93
|
+
allowed_globs = sys.argv[1:]
|
|
94
|
+
root = pathlib.Path("docs/architecture")
|
|
95
|
+
|
|
96
|
+
def match_pattern(rel: str, pattern: str) -> bool:
|
|
97
|
+
"""Segment-aware glob match. `*` never crosses `/`.
|
|
98
|
+
|
|
99
|
+
Plain `fnmatch.fnmatchcase` treats `/` as a normal character, so
|
|
100
|
+
`compliance/*-mapping.md` would silently accept
|
|
101
|
+
`compliance/sub/evil-mapping.md`. We split on `/` and require equal
|
|
102
|
+
depth + per-segment match instead.
|
|
103
|
+
"""
|
|
104
|
+
rel_parts = rel.split("/")
|
|
105
|
+
pat_parts = pattern.split("/")
|
|
106
|
+
if len(rel_parts) != len(pat_parts):
|
|
107
|
+
return False
|
|
108
|
+
return all(fnmatch.fnmatchcase(r, p) for r, p in zip(rel_parts, pat_parts))
|
|
109
|
+
|
|
110
|
+
fail = False
|
|
111
|
+
for path in root.rglob("*"):
|
|
112
|
+
if not path.is_file():
|
|
113
|
+
continue
|
|
114
|
+
rel = path.relative_to(root).as_posix()
|
|
115
|
+
if not any(match_pattern(rel, g) for g in allowed_globs):
|
|
116
|
+
print(f"FAIL: docs/architecture/{rel} — file not on the whitelist")
|
|
117
|
+
fail = True
|
|
118
|
+
|
|
119
|
+
if fail:
|
|
120
|
+
print("""
|
|
121
|
+
Hint: every file under docs/architecture/ must match a whitelist entry in
|
|
122
|
+
scripts/docs-lint/architecture-tree-whitelist.sh. If the file is legitimate
|
|
123
|
+
(new component, new compliance mapping, new diagram), add the matching
|
|
124
|
+
pattern to ALLOWED in the same PR. If it is a scratch note, verifier
|
|
125
|
+
snapshot, or AI artifact — delete it. Process: docs/architecture/PROCESS.md
|
|
126
|
+
and CLAUDE.md "Architecture content routing".
|
|
127
|
+
""")
|
|
128
|
+
sys.exit(1)
|
|
129
|
+
|
|
130
|
+
print("architecture-tree-whitelist: OK")
|
|
131
|
+
PY
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: FSL-1.1-Apache-2.0
|
|
3
|
+
# Copyright (c) 2025 Open Computer Use Contributors
|
|
4
|
+
#
|
|
5
|
+
# ASCII-diagram detector — blocks box-drawing characters in docs/architecture/.
|
|
6
|
+
#
|
|
7
|
+
# Per CLAUDE.md "Diagrams": Mermaid first; D2/PlantUML when needed; ASCII
|
|
8
|
+
# diagrams are forbidden in docs/architecture/ (they don't render in browsers,
|
|
9
|
+
# can't be linted for broken references, and signal AI-style ad-hoc artwork).
|
|
10
|
+
#
|
|
11
|
+
# Box-drawing Unicode ranges: U+2500–U+257F, plus heavy "═║╔╗╚╝╠╣╦╩╬" style.
|
|
12
|
+
# Common ASCII fallbacks like `+--+` and `| |` in tables are NOT flagged —
|
|
13
|
+
# they're legitimate Markdown tables.
|
|
14
|
+
#
|
|
15
|
+
# Exits 1 if any box-drawing characters are found in docs/architecture/.
|
|
16
|
+
|
|
17
|
+
set -euo pipefail
|
|
18
|
+
|
|
19
|
+
ROOT="$(git rev-parse --show-toplevel)"
|
|
20
|
+
cd "$ROOT"
|
|
21
|
+
|
|
22
|
+
# Unicode box-drawing block: ─ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ═ ║ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ etc.
|
|
23
|
+
pattern=$'[─-╿]'
|
|
24
|
+
|
|
25
|
+
# Gather .md files under docs/architecture/.
|
|
26
|
+
mapfile -t files < <(find docs/architecture -name '*.md' 2>/dev/null)
|
|
27
|
+
|
|
28
|
+
if (( ${#files[@]} == 0 )); then
|
|
29
|
+
echo "ascii-diagram-detector: OK (no files to scan)"
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Use Python for reliable Unicode-range grep (macOS grep -P is limited).
|
|
34
|
+
python3 - "${files[@]}" <<'PY'
|
|
35
|
+
import re, sys
|
|
36
|
+
pat = re.compile(r"[─-╿▀-▟]")
|
|
37
|
+
fail = False
|
|
38
|
+
for path in sys.argv[1:]:
|
|
39
|
+
try:
|
|
40
|
+
with open(path, encoding="utf-8") as f:
|
|
41
|
+
for i, line in enumerate(f, 1):
|
|
42
|
+
if pat.search(line):
|
|
43
|
+
print(f"FAIL: {path}:{i}: Unicode box-drawing diagram detected")
|
|
44
|
+
fail = True
|
|
45
|
+
except (OSError, UnicodeDecodeError):
|
|
46
|
+
continue
|
|
47
|
+
sys.exit(1 if fail else 0)
|
|
48
|
+
PY
|
|
49
|
+
|
|
50
|
+
status=$?
|
|
51
|
+
|
|
52
|
+
if (( status != 0 )); then
|
|
53
|
+
echo
|
|
54
|
+
echo "Hint: convert to Mermaid (committed alongside the doc as .mmd, or inline if ≤ 15 lines)."
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
echo "ascii-diagram-detector: OK"
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: FSL-1.1-Apache-2.0
|
|
3
|
+
# Copyright (c) 2025 Open Computer Use Contributors
|
|
4
|
+
#
|
|
5
|
+
# Front-matter validator — every doc under docs/architecture/ MUST carry the
|
|
6
|
+
# four mandatory YAML fields per CLAUDE.md "Documentation discipline":
|
|
7
|
+
# status, last-reviewed (YYYY-MM-DD), owner, applies-to
|
|
8
|
+
#
|
|
9
|
+
# Also emits a non-blocking WARN if last-reviewed > 180 days old.
|
|
10
|
+
#
|
|
11
|
+
# Exits 1 if any required field is missing from any architecture doc.
|
|
12
|
+
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
ROOT="$(git rev-parse --show-toplevel)"
|
|
16
|
+
cd "$ROOT"
|
|
17
|
+
|
|
18
|
+
fail=0
|
|
19
|
+
today_epoch=$(date +%s)
|
|
20
|
+
stale_threshold=$((180 * 24 * 3600))
|
|
21
|
+
|
|
22
|
+
check_file() {
|
|
23
|
+
local file="$1"
|
|
24
|
+
python3 - "$file" "$today_epoch" "$stale_threshold" <<'PY'
|
|
25
|
+
import re, sys, datetime as dt, pathlib
|
|
26
|
+
|
|
27
|
+
path = pathlib.Path(sys.argv[1])
|
|
28
|
+
today_epoch = int(sys.argv[2])
|
|
29
|
+
stale_threshold = int(sys.argv[3])
|
|
30
|
+
|
|
31
|
+
text = path.read_text(encoding="utf-8")
|
|
32
|
+
|
|
33
|
+
# Strip leading HTML license comments (the SPDX header convention).
|
|
34
|
+
stripped = re.sub(r'^(?:<!--.*?-->\s*\n)+', '', text, flags=re.DOTALL)
|
|
35
|
+
|
|
36
|
+
if not stripped.startswith('---'):
|
|
37
|
+
print(f"FAIL: {path}: no YAML front-matter block")
|
|
38
|
+
sys.exit(1)
|
|
39
|
+
|
|
40
|
+
m = re.match(r'^---\n(.*?)\n---', stripped, flags=re.DOTALL)
|
|
41
|
+
if not m:
|
|
42
|
+
print(f"FAIL: {path}: front-matter block not closed with `---`")
|
|
43
|
+
sys.exit(1)
|
|
44
|
+
|
|
45
|
+
body = m.group(1)
|
|
46
|
+
fields = {}
|
|
47
|
+
for line in body.splitlines():
|
|
48
|
+
line = line.rstrip()
|
|
49
|
+
if not line or line.startswith('#'):
|
|
50
|
+
continue
|
|
51
|
+
if ':' not in line or line.startswith((' ', '\t', '-')):
|
|
52
|
+
continue
|
|
53
|
+
key, _, val = line.partition(':')
|
|
54
|
+
fields[key.strip()] = val.strip().strip('"').strip("'")
|
|
55
|
+
|
|
56
|
+
required = ["status", "last-reviewed", "owner", "applies-to"]
|
|
57
|
+
missing = [k for k in required if k not in fields or not fields[k]]
|
|
58
|
+
if missing:
|
|
59
|
+
print(f"FAIL: {path}: missing front-matter fields: {', '.join(missing)}")
|
|
60
|
+
sys.exit(1)
|
|
61
|
+
|
|
62
|
+
# Accept the literal placeholder YYYY-MM-DD only in template files.
|
|
63
|
+
last_reviewed = fields["last-reviewed"]
|
|
64
|
+
if last_reviewed == "YYYY-MM-DD":
|
|
65
|
+
if "template" not in path.name.lower():
|
|
66
|
+
print(f"FAIL: {path}: last-reviewed is placeholder 'YYYY-MM-DD' in a non-template file")
|
|
67
|
+
sys.exit(1)
|
|
68
|
+
sys.exit(0)
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
parsed = dt.date.fromisoformat(last_reviewed)
|
|
72
|
+
except ValueError:
|
|
73
|
+
print(f"FAIL: {path}: last-reviewed '{last_reviewed}' is not YYYY-MM-DD")
|
|
74
|
+
sys.exit(1)
|
|
75
|
+
|
|
76
|
+
age = today_epoch - int(dt.datetime.combine(parsed, dt.time()).timestamp())
|
|
77
|
+
if age > stale_threshold:
|
|
78
|
+
print(f"WARN: {path}: last-reviewed {last_reviewed} is over 180 days old")
|
|
79
|
+
# Non-blocking — exit 0.
|
|
80
|
+
|
|
81
|
+
sys.exit(0)
|
|
82
|
+
PY
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
while IFS= read -r -d '' f; do
|
|
86
|
+
if ! check_file "$f"; then
|
|
87
|
+
fail=1
|
|
88
|
+
fi
|
|
89
|
+
done < <(find docs/architecture -name '*.md' -print0 2>/dev/null)
|
|
90
|
+
|
|
91
|
+
if (( fail )); then
|
|
92
|
+
echo
|
|
93
|
+
echo "Hint: add YAML front-matter with status, last-reviewed (YYYY-MM-DD), owner, applies-to."
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
echo "front-matter-validator: OK"
|