procesio-cli 0.1.1__py3-none-any.whl
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.
- procesio_cli/__init__.py +18 -0
- procesio_cli/_cli.py +71 -0
- procesio_cli/agents/__init__.py +0 -0
- procesio_cli/agents/_lib/__init__.py +0 -0
- procesio_cli/agents/_lib/actiondef.py +24 -0
- procesio_cli/agents/_lib/errors.py +40 -0
- procesio_cli/agents/_lib/reversibility.py +236 -0
- procesio_cli/agents/_lib/toolrunner.py +141 -0
- procesio_cli/agents/connector-builder/CONNECTOR-BUILDER-PLAYBOOK.md +62 -0
- procesio_cli/agents/connector-builder/CONNECTOR-BUILDER-PROCESIO-INTEROP.md +76 -0
- procesio_cli/agents/connector-builder/CONNECTOR-BUILDER-TROUBLESHOOTING.md +60 -0
- procesio_cli/agents/connector-builder/README.md +51 -0
- procesio_cli/agents/connector-builder/agent.yaml +61 -0
- procesio_cli/agents/connector-builder/context.py +19 -0
- procesio_cli/agents/connector-builder/handlers/__init__.py +1 -0
- procesio_cli/agents/connector-builder/handlers/checklist.py +71 -0
- procesio_cli/agents/connector-builder/handlers/guidance.py +37 -0
- procesio_cli/agents/connector-builder/handlers/nextstep.py +221 -0
- procesio_cli/agents/connector-builder/handlers/status.py +35 -0
- procesio_cli/agents/connector-builder/knowledge.py +47 -0
- procesio_cli/agents/connector-builder/main.py +93 -0
- procesio_cli/agents/connector-builder/tests/conftest.py +95 -0
- procesio_cli/agents/connector-builder/tests/test_cba_agent.py +148 -0
- procesio_cli/agents/orchestrator/__init__.py +0 -0
- procesio_cli/agents/orchestrator/bootstraplib.py +166 -0
- procesio_cli/agents/procesio/IMPLEMENTATION-PATTERNS/00-INDEX.md +60 -0
- procesio_cli/agents/procesio/IMPLEMENTATION-PATTERNS/01-PROCESSES.md +230 -0
- procesio_cli/agents/procesio/IMPLEMENTATION-PATTERNS/02-FORMS.md +287 -0
- procesio_cli/agents/procesio/IMPLEMENTATION-PATTERNS/03-INTEGRATIONS.md +384 -0
- procesio_cli/agents/procesio/IMPLEMENTATION-PATTERNS/04-DATABASE.md +293 -0
- procesio_cli/agents/procesio/PROCESIO-API-RELIABILITY-DOCTRINE.md +113 -0
- procesio_cli/agents/procesio/PROCESIO-BEST-PRACTICES.md +316 -0
- procesio_cli/agents/procesio/PROCESIO-BUILD-AND-TEST-PLAYBOOK.md +217 -0
- procesio_cli/agents/procesio/PROCESIO-DATASTORE.md +72 -0
- procesio_cli/agents/procesio/PROCESIO-ENVIRONMENTS.md +62 -0
- procesio_cli/agents/procesio/PROCESIO-SCHEDULING.md +47 -0
- procesio_cli/agents/procesio/PROCESIO-VISUAL-ORGANIZATION.md +175 -0
- procesio_cli/agents/procesio/README.md +97 -0
- procesio_cli/agents/procesio/__init__.py +0 -0
- procesio_cli/agents/procesio/agent.yaml +73 -0
- procesio_cli/agents/procesio/audit.py +226 -0
- procesio_cli/agents/procesio/checklist.py +135 -0
- procesio_cli/agents/procesio/context.py +19 -0
- procesio_cli/agents/procesio/handlers/__init__.py +0 -0
- procesio_cli/agents/procesio/handlers/audit.py +39 -0
- procesio_cli/agents/procesio/handlers/checklist.py +34 -0
- procesio_cli/agents/procesio/handlers/guidance.py +36 -0
- procesio_cli/agents/procesio/handlers/status.py +33 -0
- procesio_cli/agents/procesio/handlers/verify.py +39 -0
- procesio_cli/agents/procesio/knowledge.py +115 -0
- procesio_cli/agents/procesio/main.py +89 -0
- procesio_cli/agents/procesio/tests/__init__.py +0 -0
- procesio_cli/agents/procesio/tests/conftest.py +62 -0
- procesio_cli/agents/procesio/tests/test_audit.py +91 -0
- procesio_cli/agents/procesio/tests/test_checklist.py +28 -0
- procesio_cli/agents/procesio/tests/test_guidance.py +78 -0
- procesio_cli/agents/procesio/tests/test_manifest_sync.py +48 -0
- procesio_cli/agents/procesio/tests/test_verify.py +134 -0
- procesio_cli/agents/procesio/tests/test_workspace_scope.py +97 -0
- procesio_cli/agents/procesio/verifylib.py +222 -0
- procesio_cli/dashboard/README.md +117 -0
- procesio_cli/dashboard/__init__.py +18 -0
- procesio_cli/dashboard/serve.py +98 -0
- procesio_cli/dashboard/server/__init__.py +1 -0
- procesio_cli/dashboard/server/config_schemas.py +92 -0
- procesio_cli/dashboard/server/google.py +103 -0
- procesio_cli/dashboard/server/handler.py +160 -0
- procesio_cli/dashboard/server/inventory.py +213 -0
- procesio_cli/dashboard/server/jobs.py +118 -0
- procesio_cli/dashboard/server/llmtest.py +181 -0
- procesio_cli/dashboard/server/procesio_env.py +94 -0
- procesio_cli/dashboard/server/routes.py +74 -0
- procesio_cli/dashboard/server/runner.py +150 -0
- procesio_cli/dashboard/server/security.py +29 -0
- procesio_cli/dashboard/server/setup.py +211 -0
- procesio_cli/dashboard/server/validate.py +152 -0
- procesio_cli/dashboard/tests/conftest.py +16 -0
- procesio_cli/dashboard/tests/test_dashboard.py +225 -0
- procesio_cli/dashboard/tests/test_procesio_env.py +159 -0
- procesio_cli/dashboard/web/actions.js +274 -0
- procesio_cli/dashboard/web/api.js +79 -0
- procesio_cli/dashboard/web/app.js +385 -0
- procesio_cli/dashboard/web/copilot.js +72 -0
- procesio_cli/dashboard/web/google.js +121 -0
- procesio_cli/dashboard/web/index.html +67 -0
- procesio_cli/dashboard/web/procesio_env.js +187 -0
- procesio_cli/dashboard/web/styles.css +207 -0
- procesio_cli/registry.py +370 -0
- procesio_cli/scripts/build-router.py +249 -0
- procesio_cli/scripts/build-tool-skill.py +202 -0
- procesio_cli/scripts/check-requirements.py +131 -0
- procesio_cli/scripts/check-skill-governance.py +174 -0
- procesio_cli/scripts/evaluate-skill-routing.py +217 -0
- procesio_cli/scripts/evaluate-skills.py +316 -0
- procesio_cli/scripts/get-skill.py +122 -0
- procesio_cli/scripts/list-skills.py +68 -0
- procesio_cli/scripts/list-tools.py +73 -0
- procesio_cli/scripts/run-agent.py +59 -0
- procesio_cli/scripts/run-tool.py +123 -0
- procesio_cli/scripts/secret_scan.py +584 -0
- procesio_cli/scripts/set-credential.py +126 -0
- procesio_cli/scripts/validate-skills.py +530 -0
- procesio_cli/skills/PORTFOLIO.md +134 -0
- procesio_cli/skills/__init__.py +6 -0
- procesio_cli/skills/agent-skill-engineer/SKILL.md +226 -0
- procesio_cli/skills/agent-skill-engineer/evals/evals.json +422 -0
- procesio_cli/skills/agent-skill-engineer/references/authoring-standard.md +178 -0
- procesio_cli/skills/agent-skill-engineer/references/decision-framework.md +107 -0
- procesio_cli/skills/agent-skill-engineer/references/domain-evidence-protocol.md +248 -0
- procesio_cli/skills/agent-skill-engineer/references/evaluation-standard.md +191 -0
- procesio_cli/skills/agent-skill-engineer/references/expert-lenses.md +167 -0
- procesio_cli/skills/agent-skill-engineer/references/field-gate-standard.md +231 -0
- procesio_cli/skills/agent-skill-engineer/references/optimization-protocol.md +233 -0
- procesio_cli/skills/agent-skill-engineer/references/optimizer-contract.md +268 -0
- procesio_cli/skills/agent-skill-engineer/references/portability-standard.md +99 -0
- procesio_cli/skills/agent-skill-engineer/references/research-basis.md +128 -0
- procesio_cli/skills/agent-skill-engineer/references/review-standard.md +143 -0
- procesio_cli/skills/agent-skill-engineer/scripts/audit_skill.py +959 -0
- procesio_cli/skills/agent-skill-engineer/scripts/optimize_skill.py +891 -0
- procesio_cli/skills/agent-skill-engineer/scripts/scaffold_skill.py +397 -0
- procesio_cli/skills/evals/baseline-catalog.json +14 -0
- procesio_cli/skills/evals/baseline-routing-v2.json +38 -0
- procesio_cli/skills/evals/baseline.json +37 -0
- procesio_cli/skills/evals/behavioral.json +367 -0
- procesio_cli/skills/evals/field-boundary-development-v1.json +126 -0
- procesio_cli/skills/evals/field-closeout-correction-development-v1.json +23 -0
- procesio_cli/skills/evals/field-closeout-development-v1.json +89 -0
- procesio_cli/skills/evals/portfolio-pressure-training-v1.json +83 -0
- procesio_cli/skills/evals/routing.json +363 -0
- procesio_cli/skills/evals/validation-baseline.json +4 -0
- procesio_cli/skills/procesio-cli/SKILL.md +134 -0
- procesio_cli/skills/procesio-cli/evals/evals.json +111 -0
- procesio_cli/skills/procesio-cli/evals/workflows.json +16 -0
- procesio_cli/skills/procesio-cli/references/connector-lifecycle.md +47 -0
- procesio_cli/skills/procesio-cli/references/credentials-admin.md +113 -0
- procesio_cli/skills/procesio-cli/references/data-verification.md +71 -0
- procesio_cli/skills/procesio-cli/references/documents-files.md +44 -0
- procesio_cli/skills/procesio-cli/references/form-e2e.md +57 -0
- procesio_cli/skills/procesio-cli/references/operation-contract.md +138 -0
- procesio_cli/skills/procesio-cli/references/process-debugging.md +65 -0
- procesio_cli/skills/procesio-cli/references/process-lifecycle.md +88 -0
- procesio_cli/skills/procesio-cli/references/schedules-webhooks.md +58 -0
- procesio_cli/skills/procesio-cli/references/transport-environments.md +53 -0
- procesio_cli/skills/procesio-cli-maintainer/SKILL.md +84 -0
- procesio_cli/skills/procesio-cli-maintainer/evals/evals.json +116 -0
- procesio_cli/skills/procesio-cli-maintainer/references/change-contract.md +34 -0
- procesio_cli/skills/procesio-cli-maintainer/references/mcp-compatibility.md +13 -0
- procesio_cli/skills/procesio-cli-maintainer/references/skill-authoring.md +51 -0
- procesio_cli/skills/procesio-platform-advisor/SKILL.md +82 -0
- procesio_cli/skills/procesio-platform-advisor/evals/evals.json +116 -0
- procesio_cli/skills/procesio-platform-advisor/references/capability-map.md +22 -0
- procesio_cli/skills/procesio-platform-advisor/references/fit-framework.md +35 -0
- procesio_cli/skills/procesio-platform-advisor/references/freshness-policy.md +25 -0
- procesio_cli/skills/procesio-platform-advisor/references/sizing-method.md +70 -0
- procesio_cli/skills/procesio-platform-advisor/scripts/estimate_capacity.py +99 -0
- procesio_cli/skills/procesio-setup/SKILL.md +180 -0
- procesio_cli/skills/sql-server-optimizer/SKILL.md +86 -0
- procesio_cli/skills/sql-server-optimizer/evals/evals.json +116 -0
- procesio_cli/skills/sql-server-optimizer/references/db-context.md +44 -0
- procesio_cli/skills/sql-server-optimizer/references/generic-mode.md +32 -0
- procesio_cli/skills/sql-server-optimizer/references/procesio-mode.md +40 -0
- procesio_cli/skills/sql-server-optimizer/references/sql-rules.md +43 -0
- procesio_cli/skills/sql-server-optimizer/scripts/export-indexes.sql +178 -0
- procesio_cli/skills/sql-server-optimizer/scripts/export-procs-and-functions.sql +118 -0
- procesio_cli/skills/sql-server-optimizer/scripts/export-tables.sql +367 -0
- procesio_cli/skills/tests/__init__.py +0 -0
- procesio_cli/skills/tests/test_agent_skill_engineer.py +240 -0
- procesio_cli/skills/tests/test_auth_failure_stop.py +25 -0
- procesio_cli/skills/tests/test_capacity_estimator.py +85 -0
- procesio_cli/skills/tests/test_field_boundary_learning.py +100 -0
- procesio_cli/skills/tests/test_field_closeout_learning.py +123 -0
- procesio_cli/skills/tests/test_field_gate_standard.py +76 -0
- procesio_cli/skills/tests/test_operational_playbooks.py +51 -0
- procesio_cli/skills/tests/test_portfolio_pressure_training.py +35 -0
- procesio_cli/skills/tests/test_process_lifecycle_single_run.py +25 -0
- procesio_cli/skills/tests/test_skill_evaluator.py +67 -0
- procesio_cli/skills/tests/test_skill_optimizer.py +473 -0
- procesio_cli/skills/tests/test_skill_portfolio_review.py +70 -0
- procesio_cli/skills/tests/test_skill_release_binding.py +204 -0
- procesio_cli/skills/tests/test_skill_routing.py +74 -0
- procesio_cli/skills/tests/test_skill_scaffold_v2.py +116 -0
- procesio_cli/skills/tests/test_validate_skills.py +115 -0
- procesio_cli/tools/__init__.py +0 -0
- procesio_cli/tools/_lib/README.md +119 -0
- procesio_cli/tools/_lib/__init__.py +0 -0
- procesio_cli/tools/_lib/accounting.py +120 -0
- procesio_cli/tools/_lib/contacts.py +544 -0
- procesio_cli/tools/_lib/creds.py +83 -0
- procesio_cli/tools/_lib/creds_backends.py +578 -0
- procesio_cli/tools/_lib/dbprofiles.py +147 -0
- procesio_cli/tools/_lib/dbquery.py +286 -0
- procesio_cli/tools/_lib/dbschema.py +225 -0
- procesio_cli/tools/_lib/io.py +54 -0
- procesio_cli/tools/_lib/manifest.py +297 -0
- procesio_cli/tools/_lib/skill_release.py +127 -0
- procesio_cli/tools/_lib/skill_resources.py +118 -0
- procesio_cli/tools/_lib/userdata.py +228 -0
- procesio_cli/tools/_lib/webserialize/__init__.py +16 -0
- procesio_cli/tools/_lib/webserialize/admin.py +61 -0
- procesio_cli/tools/_lib/webserialize/client.py +264 -0
- procesio_cli/tools/_lib/webserialize/config.py +96 -0
- procesio_cli/tools/_lib/webserialize/errors.py +27 -0
- procesio_cli/tools/_lib/webserialize/framing.py +45 -0
- procesio_cli/tools/_lib/webserialize/registry.py +47 -0
- procesio_cli/tools/_lib/webserialize/runtime.py +61 -0
- procesio_cli/tools/_lib/webserialize/server.py +510 -0
- procesio_cli/tools/_lib/websession.py +194 -0
- procesio_cli/tools/connector-builder/CONNECTOR-BUILDER-API-NOTES.md +91 -0
- procesio_cli/tools/connector-builder/README.md +101 -0
- procesio_cli/tools/connector-builder/SKILL.md +248 -0
- procesio_cli/tools/connector-builder/__init__.py +7 -0
- procesio_cli/tools/connector-builder/actiondef.py +24 -0
- procesio_cli/tools/connector-builder/client.py +251 -0
- procesio_cli/tools/connector-builder/errors.py +44 -0
- procesio_cli/tools/connector-builder/gen_manifest.py +142 -0
- procesio_cli/tools/connector-builder/handlers/__init__.py +1 -0
- procesio_cli/tools/connector-builder/handlers/admin.py +182 -0
- procesio_cli/tools/connector-builder/handlers/auth.py +74 -0
- procesio_cli/tools/connector-builder/handlers/builds.py +396 -0
- procesio_cli/tools/connector-builder/handlers/common.py +104 -0
- procesio_cli/tools/connector-builder/handlers/files.py +111 -0
- procesio_cli/tools/connector-builder/handlers/raw.py +38 -0
- procesio_cli/tools/connector-builder/handlers/telemetry.py +39 -0
- procesio_cli/tools/connector-builder/main.py +94 -0
- procesio_cli/tools/connector-builder/tests/conftest.py +146 -0
- procesio_cli/tools/connector-builder/tests/test_cb_client.py +86 -0
- procesio_cli/tools/connector-builder/tests/test_cb_dispatch.py +105 -0
- procesio_cli/tools/connector-builder/tests/test_cb_manifest_sync.py +76 -0
- procesio_cli/tools/connector-builder/tests/test_cb_wait.py +123 -0
- procesio_cli/tools/connector-builder/tool.yaml +671 -0
- procesio_cli/tools/framework-map/.gitattributes +2 -0
- procesio_cli/tools/framework-map/README.md +98 -0
- procesio_cli/tools/framework-map/SKILL.md +30 -0
- procesio_cli/tools/framework-map/app.js +188 -0
- procesio_cli/tools/framework-map/fm_builder.py +476 -0
- procesio_cli/tools/framework-map/fm_catalog.py +19 -0
- procesio_cli/tools/framework-map/fm_ro_catalog.py +94 -0
- procesio_cli/tools/framework-map/fm_strings.py +101 -0
- procesio_cli/tools/framework-map/main.py +95 -0
- procesio_cli/tools/framework-map/styles.css +214 -0
- procesio_cli/tools/framework-map/tests/conftest.py +33 -0
- procesio_cli/tools/framework-map/tests/test_fm_build.py +126 -0
- procesio_cli/tools/framework-map/tests/test_fm_manifest_sync.py +63 -0
- procesio_cli/tools/framework-map/tests/test_fm_store_tree.py +75 -0
- procesio_cli/tools/framework-map/tool.yaml +61 -0
- procesio_cli/tools/mysql/MOVED-TO-CENTRAL.md +29 -0
- procesio_cli/tools/mysql/README.md +196 -0
- procesio_cli/tools/mysql/SKILL.md +37 -0
- procesio_cli/tools/mysql/__init__.py +0 -0
- procesio_cli/tools/mysql/connection.py +191 -0
- procesio_cli/tools/mysql/main.py +487 -0
- procesio_cli/tools/mysql/profiles.template.json +1 -0
- procesio_cli/tools/mysql/schema.py +434 -0
- procesio_cli/tools/mysql/tests/__init__.py +0 -0
- procesio_cli/tools/mysql/tests/conftest.py +21 -0
- procesio_cli/tools/mysql/tests/test_manifest_sync.py +68 -0
- procesio_cli/tools/mysql/tests/test_mysql.py +201 -0
- procesio_cli/tools/mysql/tests/test_mysql_schema.py +337 -0
- procesio_cli/tools/mysql/tool.yaml +112 -0
- procesio_cli/tools/procesio/DTO-SUBTOOLS-NOTE.md +360 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/00-INDEX.md +67 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/01-ANATOMY.md +209 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/02-CODE-INJECTION.md +309 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/03-DOM-CONTRACT.md +370 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/04-INTERACTION-RECIPES.md +600 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/05-STEPPER-AND-MOTION.md +426 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/06-PROCESS-INTEGRATION.md +347 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/07-DEPLOY-WORKFLOW.md +294 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/08-PITFALLS.md +569 -0
- procesio_cli/tools/procesio/FORM-DEV-GUIDE/09-NAVIGATION-AND-HOSTING.md +308 -0
- procesio_cli/tools/procesio/PHASE4-E2E-NOTES.md +594 -0
- procesio_cli/tools/procesio/PROCESIO-API-CORRECTIONS.md +295 -0
- procesio_cli/tools/procesio/PROCESIO-API-NOTES.md +6976 -0
- procesio_cli/tools/procesio/PROCESIO-AUTH-NOTES.md +226 -0
- procesio_cli/tools/procesio/PROCESIO-CARD-BUILD-NOTES.md +183 -0
- procesio_cli/tools/procesio/PROCESIO-CONNECTORS-NOTES.md +141 -0
- procesio_cli/tools/procesio/PROCESIO-CUSTOM-ACTION-NOTES.md +179 -0
- procesio_cli/tools/procesio/PROCESIO-DOCS-FIX-REPORT.md +123 -0
- procesio_cli/tools/procesio/PROCESIO-ENVIRONMENTS-NOTES.md +94 -0
- procesio_cli/tools/procesio/PROCESIO-FE-VALIDATION-NOTES.md +107 -0
- procesio_cli/tools/procesio/PROCESIO-FOREACH-NOTES.md +199 -0
- procesio_cli/tools/procesio/PROCESIO-FORM-API-HANG-NOTE.md +101 -0
- procesio_cli/tools/procesio/PROCESIO-FORM-SUBMISSION-NOTES.md +172 -0
- procesio_cli/tools/procesio/PROCESIO-HTML-TO-DOCX-NOTES.md +110 -0
- procesio_cli/tools/procesio/PROCESIO-INSTANCE-HISTORY-NOTES.md +242 -0
- procesio_cli/tools/procesio/PROCESIO-METERING-NOTES.md +201 -0
- procesio_cli/tools/procesio/PROCESIO-NODE-CODE-NOTES.md +279 -0
- procesio_cli/tools/procesio/PROCESIO-NODE-MODULE-WHITELIST.md +113 -0
- procesio_cli/tools/procesio/PROCESIO-PYTHON-ACTION-NOTES.md +165 -0
- procesio_cli/tools/procesio/PROCESIO-QUERY-STORE-NOTES.md +826 -0
- procesio_cli/tools/procesio/PROCESIO-RECONCILIATION-PATTERNS.md +104 -0
- procesio_cli/tools/procesio/PROCESIO-RESOURCE-MODEL-NOTES.md +1100 -0
- procesio_cli/tools/procesio/PROCESIO-SEND-EMAIL-CRED-OPTIONALITY.md +45 -0
- procesio_cli/tools/procesio/PROCESIO-SEND-EMAIL-NOTES.md +252 -0
- procesio_cli/tools/procesio/PROCESIO-SQL-ACTIONS-NOTES.md +284 -0
- procesio_cli/tools/procesio/PROCESIO-USAGE-GUIDE.md +219 -0
- procesio_cli/tools/procesio/README.md +341 -0
- procesio_cli/tools/procesio/SCHEDULE-INPUT-SECURITY-NOTES.md +63 -0
- procesio_cli/tools/procesio/SKILL.md +694 -0
- procesio_cli/tools/procesio/__init__.py +1 -0
- procesio_cli/tools/procesio/actiondef.py +27 -0
- procesio_cli/tools/procesio/assets/html2docx/html2docx.js +2155 -0
- procesio_cli/tools/procesio/auth.py +354 -0
- procesio_cli/tools/procesio/autogen.py +121 -0
- procesio_cli/tools/procesio/client.py +355 -0
- procesio_cli/tools/procesio/config.py +96 -0
- procesio_cli/tools/procesio/data/endpoints.json +2901 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/01-authentication.md +180 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/02-conventions.md +116 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/ANONYMOUS-SURFACE.md +51 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/README.md +104 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/SYMBOL-INDEX.md +444 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/03-auth-users-workspaces.md +731 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/04-processes.md +913 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/05-actions.md +605 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/06-files.md +237 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/07-forms-documents.md +985 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/08-credentials.md +532 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/09-datastore-datatypes.md +830 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/10-custom-urls.md +319 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/11-subscriptions-resources-analytics.md +455 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/12-webhooks-notifications-misc.md +519 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/13-realtime-signalr.md +153 -0
- procesio_cli/tools/procesio/docs_info/API-DOCUMENTATION/endpoints/99-internal-and-other-services.md +52 -0
- procesio_cli/tools/procesio/docs_info/FormBuilder mock.ts +5725 -0
- procesio_cli/tools/procesio/docs_info/Procesio Platform Actions.json +30219 -0
- procesio_cli/tools/procesio/docs_info/form-config-enums.ts +92 -0
- procesio_cli/tools/procesio/docs_info/form-theme.ts +1603 -0
- procesio_cli/tools/procesio/docs_info/process-validation-reference-1.md +2739 -0
- procesio_cli/tools/procesio/dto/__init__.py +13 -0
- procesio_cli/tools/procesio/dto/credential/builder.py +179 -0
- procesio_cli/tools/procesio/dto/credential/config.schema.json +19 -0
- procesio_cli/tools/procesio/dto/credential/description.md +193 -0
- procesio_cli/tools/procesio/dto/credential/fixtures/rest.config.json +11 -0
- procesio_cli/tools/procesio/dto/credential/fixtures/rest.dto.json +28 -0
- procesio_cli/tools/procesio/dto/credential/fixtures/rest.template.json +44 -0
- procesio_cli/tools/procesio/dto/credential/template.dto.json +16 -0
- procesio_cli/tools/procesio/dto/data/_refresh.py +147 -0
- procesio_cli/tools/procesio/dto/data/action_catalog.json +30825 -0
- procesio_cli/tools/procesio/dto/data/action_families.json +55 -0
- procesio_cli/tools/procesio/dto/data/platform_types.json +182 -0
- procesio_cli/tools/procesio/dto/datatype/builder.py +223 -0
- procesio_cli/tools/procesio/dto/datatype/config.schema.json +47 -0
- procesio_cli/tools/procesio/dto/datatype/description.md +85 -0
- procesio_cli/tools/procesio/dto/datatype/fixtures/customer.config.json +41 -0
- procesio_cli/tools/procesio/dto/datatype/fixtures/customer.dto.json +164 -0
- procesio_cli/tools/procesio/dto/datatype/template.dto.json +37 -0
- procesio_cli/tools/procesio/dto/document/builder.py +193 -0
- procesio_cli/tools/procesio/dto/document/config.schema.json +33 -0
- procesio_cli/tools/procesio/dto/document/description.md +124 -0
- procesio_cli/tools/procesio/dto/document/fixtures/invoice.config.json +16 -0
- procesio_cli/tools/procesio/dto/document/fixtures/invoice.dto.json +32 -0
- procesio_cli/tools/procesio/dto/document/template.dto.json +14 -0
- procesio_cli/tools/procesio/dto/form/FORM-STYLING-NOTES.md +142 -0
- procesio_cli/tools/procesio/dto/form/GOLDEN-DRIFT-NOTES.md +72 -0
- procesio_cli/tools/procesio/dto/form/RUN-PROCESS-RESULT-NOTES.md +80 -0
- procesio_cli/tools/procesio/dto/form/addelement.py +277 -0
- procesio_cli/tools/procesio/dto/form/builder.py +1009 -0
- procesio_cli/tools/procesio/dto/form/capture_goldens.py +106 -0
- procesio_cli/tools/procesio/dto/form/code_cipher.py +67 -0
- procesio_cli/tools/procesio/dto/form/config.schema.json +76 -0
- procesio_cli/tools/procesio/dto/form/data_shell.json +1 -0
- procesio_cli/tools/procesio/dto/form/description.md +346 -0
- procesio_cli/tools/procesio/dto/form/elements/approval.json +259 -0
- procesio_cli/tools/procesio/dto/form/elements/assignee.json +137 -0
- procesio_cli/tools/procesio/dto/form/elements/button.json +125 -0
- procesio_cli/tools/procesio/dto/form/elements/chart.json +341 -0
- procesio_cli/tools/procesio/dto/form/elements/chat.json +199 -0
- procesio_cli/tools/procesio/dto/form/elements/checkbox.json +153 -0
- procesio_cli/tools/procesio/dto/form/elements/column.json +77 -0
- procesio_cli/tools/procesio/dto/form/elements/columns.json +78 -0
- procesio_cli/tools/procesio/dto/form/elements/datetime-input.json +304 -0
- procesio_cli/tools/procesio/dto/form/elements/divider.json +54 -0
- procesio_cli/tools/procesio/dto/form/elements/dropdown.json +130 -0
- procesio_cli/tools/procesio/dto/form/elements/dynamic-table-row.json +253 -0
- procesio_cli/tools/procesio/dto/form/elements/file-upload.json +196 -0
- procesio_cli/tools/procesio/dto/form/elements/file-viewer.json +169 -0
- procesio_cli/tools/procesio/dto/form/elements/heading.json +79 -0
- procesio_cli/tools/procesio/dto/form/elements/icon.json +107 -0
- procesio_cli/tools/procesio/dto/form/elements/image.json +174 -0
- procesio_cli/tools/procesio/dto/form/elements/input.json +206 -0
- procesio_cli/tools/procesio/dto/form/elements/list.json +202 -0
- procesio_cli/tools/procesio/dto/form/elements/number-input.json +202 -0
- procesio_cli/tools/procesio/dto/form/elements/paragraph.json +79 -0
- procesio_cli/tools/procesio/dto/form/elements/radiobox.json +174 -0
- procesio_cli/tools/procesio/dto/form/elements/section.json +114 -0
- procesio_cli/tools/procesio/dto/form/elements/select.json +217 -0
- procesio_cli/tools/procesio/dto/form/elements/side-panel.json +146 -0
- procesio_cli/tools/procesio/dto/form/elements/signature-pad.json +141 -0
- procesio_cli/tools/procesio/dto/form/elements/static-table-row.json +84 -0
- procesio_cli/tools/procesio/dto/form/elements/step.json +105 -0
- procesio_cli/tools/procesio/dto/form/elements/stepper.json +126 -0
- procesio_cli/tools/procesio/dto/form/elements/tab.json +77 -0
- procesio_cli/tools/procesio/dto/form/elements/table.json +279 -0
- procesio_cli/tools/procesio/dto/form/elements/tabs.json +114 -0
- procesio_cli/tools/procesio/dto/form/elements/textarea.json +213 -0
- procesio_cli/tools/procesio/dto/form/enum_map.json +68 -0
- procesio_cli/tools/procesio/dto/form/fieldpath.py +284 -0
- procesio_cli/tools/procesio/dto/form/fixtures/reg.config.json +32 -0
- procesio_cli/tools/procesio/dto/form/fixtures/reg.elements.json +638 -0
- procesio_cli/tools/procesio/dto/form/sync_from_mock.py +386 -0
- procesio_cli/tools/procesio/dto/framework.py +125 -0
- procesio_cli/tools/procesio/dto/process/builder.py +1991 -0
- procesio_cli/tools/procesio/dto/process/config.schema.json +159 -0
- procesio_cli/tools/procesio/dto/process/description.md +218 -0
- procesio_cli/tools/procesio/dto/process/fixtures/greet.config.json +32 -0
- procesio_cli/tools/procesio/dto/process/fixtures/greet.dto.json +317 -0
- procesio_cli/tools/procesio/dto/process/naming.py +305 -0
- procesio_cli/tools/procesio/dto/process/normalize.py +74 -0
- procesio_cli/tools/procesio/dto/process/template.dto.json +32 -0
- procesio_cli/tools/procesio/dto/refdata.py +87 -0
- procesio_cli/tools/procesio/dto/registry.py +27 -0
- procesio_cli/tools/procesio/dto/webhook/builder.py +142 -0
- procesio_cli/tools/procesio/dto/webhook/config.schema.json +25 -0
- procesio_cli/tools/procesio/dto/webhook/description.md +92 -0
- procesio_cli/tools/procesio/dto/webhook/fixtures/order.config.json +10 -0
- procesio_cli/tools/procesio/dto/webhook/fixtures/order.dto.json +25 -0
- procesio_cli/tools/procesio/dto/webhook/template.dto.json +14 -0
- procesio_cli/tools/procesio/environments.py +264 -0
- procesio_cli/tools/procesio/errors.py +166 -0
- procesio_cli/tools/procesio/flowmodel/README.md +37 -0
- procesio_cli/tools/procesio/flowmodel/__init__.py +14 -0
- procesio_cli/tools/procesio/flowmodel/digest.py +223 -0
- procesio_cli/tools/procesio/flowmodel/families.py +34 -0
- procesio_cli/tools/procesio/flowmodel/fevalidation.py +1098 -0
- procesio_cli/tools/procesio/flowmodel/formdigest.py +232 -0
- procesio_cli/tools/procesio/flowmodel/inspect.py +78 -0
- procesio_cli/tools/procesio/flowmodel/model.py +82 -0
- procesio_cli/tools/procesio/flowmodel/nodeparam.py +871 -0
- procesio_cli/tools/procesio/flowmodel/reader.py +191 -0
- procesio_cli/tools/procesio/flowmodel/sqlparam.py +410 -0
- procesio_cli/tools/procesio/form_code_keys.py +50 -0
- procesio_cli/tools/procesio/formlint.py +292 -0
- procesio_cli/tools/procesio/gen_manifest.py +118 -0
- procesio_cli/tools/procesio/handlers/__init__.py +1 -0
- procesio_cli/tools/procesio/handlers/auth_actions.py +103 -0
- procesio_cli/tools/procesio/handlers/catalog.py +147 -0
- procesio_cli/tools/procesio/handlers/common.py +90 -0
- procesio_cli/tools/procesio/handlers/customaction_ops.py +146 -0
- procesio_cli/tools/procesio/handlers/datastore_ops.py +482 -0
- procesio_cli/tools/procesio/handlers/datatype_ops.py +275 -0
- procesio_cli/tools/procesio/handlers/dto_actions.py +258 -0
- procesio_cli/tools/procesio/handlers/environment_admin.py +146 -0
- procesio_cli/tools/procesio/handlers/fevalidate.py +236 -0
- procesio_cli/tools/procesio/handlers/files.py +141 -0
- procesio_cli/tools/procesio/handlers/flowgraph.py +229 -0
- procesio_cli/tools/procesio/handlers/flowlint.py +269 -0
- procesio_cli/tools/procesio/handlers/form_chains.py +336 -0
- procesio_cli/tools/procesio/handlers/form_code.py +277 -0
- procesio_cli/tools/procesio/handlers/form_element.py +199 -0
- procesio_cli/tools/procesio/handlers/form_events.py +441 -0
- procesio_cli/tools/procesio/handlers/form_update.py +270 -0
- procesio_cli/tools/procesio/handlers/formprocess.py +211 -0
- procesio_cli/tools/procesio/handlers/generic.py +135 -0
- procesio_cli/tools/procesio/handlers/layout.py +137 -0
- procesio_cli/tools/procesio/handlers/nodeparams.py +1018 -0
- procesio_cli/tools/procesio/handlers/process_layout.py +189 -0
- procesio_cli/tools/procesio/handlers/process_naming.py +213 -0
- procesio_cli/tools/procesio/handlers/processes.py +416 -0
- procesio_cli/tools/procesio/handlers/profile_admin.py +184 -0
- procesio_cli/tools/procesio/handlers/resource_ops.py +447 -0
- procesio_cli/tools/procesio/handlers/schedules.py +320 -0
- procesio_cli/tools/procesio/handlers/sqlactions.py +232 -0
- procesio_cli/tools/procesio/handlers/transport.py +463 -0
- procesio_cli/tools/procesio/handlers/usageguide.py +222 -0
- procesio_cli/tools/procesio/layout/README.md +196 -0
- procesio_cli/tools/procesio/layout/__init__.py +11 -0
- procesio_cli/tools/procesio/layout/adapter.py +736 -0
- procesio_cli/tools/procesio/layout/cycles.py +186 -0
- procesio_cli/tools/procesio/layout/dispatch.py +39 -0
- procesio_cli/tools/procesio/layout/elk/elk_runner.mjs +50 -0
- procesio_cli/tools/procesio/layout/elk/package-lock.json +21 -0
- procesio_cli/tools/procesio/layout/elk/package.json +11 -0
- procesio_cli/tools/procesio/layout/elk_engine.py +568 -0
- procesio_cli/tools/procesio/layout/engine.py +1311 -0
- procesio_cli/tools/procesio/layout/report.py +187 -0
- procesio_cli/tools/procesio/main.py +179 -0
- procesio_cli/tools/procesio/profiles.py +193 -0
- procesio_cli/tools/procesio/reliability.py +193 -0
- procesio_cli/tools/procesio/sqlformat.py +167 -0
- procesio_cli/tools/procesio/swagger.py +51 -0
- procesio_cli/tools/procesio/tests/__init__.py +0 -0
- procesio_cli/tools/procesio/tests/conftest.py +129 -0
- procesio_cli/tools/procesio/tests/test_auth.py +200 -0
- procesio_cli/tools/procesio/tests/test_autogen.py +78 -0
- procesio_cli/tools/procesio/tests/test_builder_attrpath_sqlbind.py +180 -0
- procesio_cli/tools/procesio/tests/test_builder_custom_action_catalog.py +72 -0
- procesio_cli/tools/procesio/tests/test_client.py +114 -0
- procesio_cli/tools/procesio/tests/test_client_reliability.py +139 -0
- procesio_cli/tools/procesio/tests/test_customaction.py +103 -0
- procesio_cli/tools/procesio/tests/test_customaction_test.py +80 -0
- procesio_cli/tools/procesio/tests/test_cycles.py +69 -0
- procesio_cli/tools/procesio/tests/test_datastore.py +378 -0
- procesio_cli/tools/procesio/tests/test_datastore_node.py +94 -0
- procesio_cli/tools/procesio/tests/test_dispatch.py +170 -0
- procesio_cli/tools/procesio/tests/test_document_page_size.py +19 -0
- procesio_cli/tools/procesio/tests/test_dto.py +734 -0
- procesio_cli/tools/procesio/tests/test_edit_dryrun_preview.py +96 -0
- procesio_cli/tools/procesio/tests/test_elk_layout.py +221 -0
- procesio_cli/tools/procesio/tests/test_environments.py +214 -0
- procesio_cli/tools/procesio/tests/test_fevalidate_gate.py +104 -0
- procesio_cli/tools/procesio/tests/test_fevalidation.py +317 -0
- procesio_cli/tools/procesio/tests/test_fieldpath_variables.py +87 -0
- procesio_cli/tools/procesio/tests/test_files.py +72 -0
- procesio_cli/tools/procesio/tests/test_flow_digest.py +202 -0
- procesio_cli/tools/procesio/tests/test_flowlint.py +114 -0
- procesio_cli/tools/procesio/tests/test_flowmodel.py +158 -0
- procesio_cli/tools/procesio/tests/test_form_add_element.py +256 -0
- procesio_cli/tools/procesio/tests/test_form_approval_gaps.py +319 -0
- procesio_cli/tools/procesio/tests/test_form_auto_names.py +60 -0
- procesio_cli/tools/procesio/tests/test_form_chains.py +217 -0
- procesio_cli/tools/procesio/tests/test_form_code_actions.py +188 -0
- procesio_cli/tools/procesio/tests/test_form_code_keys.py +92 -0
- procesio_cli/tools/procesio/tests/test_form_code_style.py +178 -0
- procesio_cli/tools/procesio/tests/test_form_delete_element.py +99 -0
- procesio_cli/tools/procesio/tests/test_form_element_config.py +141 -0
- procesio_cli/tools/procesio/tests/test_form_event_maps.py +135 -0
- procesio_cli/tools/procesio/tests/test_form_event_ops.py +376 -0
- procesio_cli/tools/procesio/tests/test_form_event_replace.py +86 -0
- procesio_cli/tools/procesio/tests/test_form_events.py +92 -0
- procesio_cli/tools/procesio/tests/test_form_parity.py +171 -0
- procesio_cli/tools/procesio/tests/test_form_select_source.py +74 -0
- procesio_cli/tools/procesio/tests/test_form_sync.py +35 -0
- procesio_cli/tools/procesio/tests/test_form_update.py +133 -0
- procesio_cli/tools/procesio/tests/test_formlint.py +155 -0
- procesio_cli/tools/procesio/tests/test_formlint_css_scope.py +38 -0
- procesio_cli/tools/procesio/tests/test_formlint_field_names.py +83 -0
- procesio_cli/tools/procesio/tests/test_guards.py +110 -0
- procesio_cli/tools/procesio/tests/test_hidden_setting_types.py +39 -0
- procesio_cli/tools/procesio/tests/test_html2docx_asset.py +132 -0
- procesio_cli/tools/procesio/tests/test_key_handle_terminology.py +45 -0
- procesio_cli/tools/procesio/tests/test_layout.py +574 -0
- procesio_cli/tools/procesio/tests/test_layout_report.py +88 -0
- procesio_cli/tools/procesio/tests/test_manifest_sync.py +68 -0
- procesio_cli/tools/procesio/tests/test_nodedelete.py +151 -0
- procesio_cli/tools/procesio/tests/test_nodeparam.py +826 -0
- procesio_cli/tools/procesio/tests/test_normalize.py +70 -0
- procesio_cli/tools/procesio/tests/test_payload_docs.py +86 -0
- procesio_cli/tools/procesio/tests/test_process_action_naming.py +170 -0
- procesio_cli/tools/procesio/tests/test_process_call_api_seed.py +46 -0
- procesio_cli/tools/procesio/tests/test_process_ext.py +373 -0
- procesio_cli/tools/procesio/tests/test_process_invariants.py +183 -0
- procesio_cli/tools/procesio/tests/test_process_layout.py +117 -0
- procesio_cli/tools/procesio/tests/test_process_naming.py +188 -0
- procesio_cli/tools/procesio/tests/test_process_query_store.py +172 -0
- procesio_cli/tools/procesio/tests/test_processinfo_variable.py +56 -0
- procesio_cli/tools/procesio/tests/test_profiles.py +127 -0
- procesio_cli/tools/procesio/tests/test_put_projects.py +41 -0
- procesio_cli/tools/procesio/tests/test_reliability.py +107 -0
- procesio_cli/tools/procesio/tests/test_removal_gate.py +95 -0
- procesio_cli/tools/procesio/tests/test_resource_ops.py +173 -0
- procesio_cli/tools/procesio/tests/test_save_validity.py +207 -0
- procesio_cli/tools/procesio/tests/test_schedule_cron_shape.py +111 -0
- procesio_cli/tools/procesio/tests/test_schedules.py +309 -0
- procesio_cli/tools/procesio/tests/test_sqlconvert.py +234 -0
- procesio_cli/tools/procesio/tests/test_sqlformat.py +83 -0
- procesio_cli/tools/procesio/tests/test_sqlparam.py +187 -0
- procesio_cli/tools/procesio/tests/test_superseded_actions.py +54 -0
- procesio_cli/tools/procesio/tests/test_surgical_concurrency.py +156 -0
- procesio_cli/tools/procesio/tests/test_tier4.py +123 -0
- procesio_cli/tools/procesio/tests/test_transport.py +147 -0
- procesio_cli/tools/procesio/tests/test_transport_data_stores.py +168 -0
- procesio_cli/tools/procesio/tests/test_transport_mapper_repair.py +150 -0
- procesio_cli/tools/procesio/tests/test_transport_webhook_strip.py +253 -0
- procesio_cli/tools/procesio/tests/test_usage_guide.py +96 -0
- procesio_cli/tools/procesio/tool.yaml +12486 -0
- procesio_cli/tools/sqlserver/MOVED-TO-CENTRAL.md +29 -0
- procesio_cli/tools/sqlserver/README.md +192 -0
- procesio_cli/tools/sqlserver/SKILL.md +37 -0
- procesio_cli/tools/sqlserver/SQLSERVER-SCHEMA-NOTES.md +284 -0
- procesio_cli/tools/sqlserver/__init__.py +0 -0
- procesio_cli/tools/sqlserver/connection.py +242 -0
- procesio_cli/tools/sqlserver/main.py +521 -0
- procesio_cli/tools/sqlserver/profiles.template.json +1 -0
- procesio_cli/tools/sqlserver/schema.py +600 -0
- procesio_cli/tools/sqlserver/tests/__init__.py +0 -0
- procesio_cli/tools/sqlserver/tests/conftest.py +21 -0
- procesio_cli/tools/sqlserver/tests/test_connection.py +75 -0
- procesio_cli/tools/sqlserver/tests/test_dbprofiles.py +92 -0
- procesio_cli/tools/sqlserver/tests/test_dbquery.py +220 -0
- procesio_cli/tools/sqlserver/tests/test_manifest_sync.py +68 -0
- procesio_cli/tools/sqlserver/tests/test_sqlserver.py +326 -0
- procesio_cli/tools/sqlserver/tests/test_sqlserver_schema.py +488 -0
- procesio_cli/tools/sqlserver/tool.yaml +123 -0
- procesio_cli/tools/web/README.md +381 -0
- procesio_cli/tools/web/SKILL.md +37 -0
- procesio_cli/tools/web/WEB-AUTOMATION-NOTES.md +277 -0
- procesio_cli/tools/web/__init__.py +21 -0
- procesio_cli/tools/web/actiondef.py +24 -0
- procesio_cli/tools/web/api.py +444 -0
- procesio_cli/tools/web/brokered.py +107 -0
- procesio_cli/tools/web/driver.py +839 -0
- procesio_cli/tools/web/drivercontract.py +44 -0
- procesio_cli/tools/web/errors.py +54 -0
- procesio_cli/tools/web/handlers/__init__.py +1 -0
- procesio_cli/tools/web/handlers/archive.py +367 -0
- procesio_cli/tools/web/handlers/browse.py +182 -0
- procesio_cli/tools/web/handlers/contacts.py +74 -0
- procesio_cli/tools/web/handlers/sessmgmt.py +120 -0
- procesio_cli/tools/web/main.py +128 -0
- procesio_cli/tools/web/sessions.py +253 -0
- procesio_cli/tools/web/steps.py +162 -0
- procesio_cli/tools/web/tests/__init__.py +0 -0
- procesio_cli/tools/web/tests/conftest.py +197 -0
- procesio_cli/tools/web/tests/test_api.py +330 -0
- procesio_cli/tools/web/tests/test_archive.py +190 -0
- procesio_cli/tools/web/tests/test_brokered.py +138 -0
- procesio_cli/tools/web/tests/test_dispatch.py +132 -0
- procesio_cli/tools/web/tests/test_errors.py +60 -0
- procesio_cli/tools/web/tests/test_manifest_sync.py +76 -0
- procesio_cli/tools/web/tests/test_page_contacts.py +68 -0
- procesio_cli/tools/web/tests/test_sessions.py +145 -0
- procesio_cli/tools/web/tests/test_steps.py +210 -0
- procesio_cli/tools/web/tool.yaml +184 -0
- procesio_cli/tools/xlsx/README.md +34 -0
- procesio_cli/tools/xlsx/SKILL.md +28 -0
- procesio_cli/tools/xlsx/__init__.py +0 -0
- procesio_cli/tools/xlsx/main.py +129 -0
- procesio_cli/tools/xlsx/reader.py +91 -0
- procesio_cli/tools/xlsx/tests/__init__.py +0 -0
- procesio_cli/tools/xlsx/tests/conftest.py +39 -0
- procesio_cli/tools/xlsx/tests/test_xlsx.py +103 -0
- procesio_cli/tools/xlsx/tool.yaml +30 -0
- procesio_cli/webplatform/aat_mcp/AAT-MCP-NOTES.md +244 -0
- procesio_cli/webplatform/aat_mcp/README.md +78 -0
- procesio_cli/webplatform/aat_mcp/bridge.py +705 -0
- procesio_cli/webplatform/aat_mcp/chat_server.py +194 -0
- procesio_cli/webplatform/aat_mcp/chat_surface.snapshot.json +668 -0
- procesio_cli/webplatform/aat_mcp/chat_surface.yaml +372 -0
- procesio_cli/webplatform/aat_mcp/gate.py +68 -0
- procesio_cli/webplatform/aat_mcp/http_server.py +139 -0
- procesio_cli/webplatform/aat_mcp/protocol.py +175 -0
- procesio_cli/webplatform/aat_mcp/server.py +306 -0
- procesio_cli/webplatform/aat_mcp/tests/conftest.py +8 -0
- procesio_cli/webplatform/aat_mcp/tests/test_aat_mcp.py +255 -0
- procesio_cli/webplatform/aat_mcp/tests/test_chat_surface.py +247 -0
- procesio_cli/webplatform/aat_mcp/tests/test_discovery.py +489 -0
- procesio_cli/webplatform/aat_mcp/tests/test_multiuser.py +86 -0
- procesio_cli/webplatform/aat_mcp/tests/test_progressive_discovery.py +89 -0
- procesio_cli/webplatform/aat_mcp/tests/test_protocol.py +180 -0
- procesio_cli/webplatform/aat_mcp/tests/test_skill_discovery.py +23 -0
- procesio_cli-0.1.1.dist-info/METADATA +467 -0
- procesio_cli-0.1.1.dist-info/RECORD +647 -0
- procesio_cli-0.1.1.dist-info/WHEEL +4 -0
- procesio_cli-0.1.1.dist-info/entry_points.txt +7 -0
- procesio_cli-0.1.1.dist-info/licenses/LICENSE +201 -0
- procesio_cli-0.1.1.dist-info/licenses/NOTICE +5 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"""LLM-agnostic verification + setup copilot.
|
|
2
|
+
|
|
3
|
+
The dashboard cannot call Claude, so every model-backed feature here goes through
|
|
4
|
+
the `llm` tool, which is provider-neutral (OpenAI / Azure / local / Anthropic /
|
|
5
|
+
Codex CLI - whatever the user configured). Nothing here hardcodes a provider.
|
|
6
|
+
|
|
7
|
+
Features:
|
|
8
|
+
* provider_test - ping a provider's credential (llm test-provider)
|
|
9
|
+
* test_tool - run a tool's live probe, then have the model judge the result
|
|
10
|
+
* test_agent - run an agent's status/readiness, then a model summary
|
|
11
|
+
* context_inspect- summarize what the context/state store actually contains
|
|
12
|
+
* copilot - a setup assistant that reads the current state and replies
|
|
13
|
+
with guidance plus one-click suggested actions
|
|
14
|
+
"""
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import sqlite3
|
|
19
|
+
from typing import Any
|
|
20
|
+
|
|
21
|
+
import registry
|
|
22
|
+
from tools._lib import userdata
|
|
23
|
+
|
|
24
|
+
from . import inventory, runner, validate
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _provider_ready() -> bool:
|
|
28
|
+
return any(p.get("key_present") for p in inventory.providers().get("providers", []))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _llm(system: str, user: str, *, max_tokens: int = 400) -> tuple[str | None, str | None]:
|
|
32
|
+
"""One provider-agnostic completion via the llm tool (default provider)."""
|
|
33
|
+
messages = json.dumps([{"role": "user", "content": user}])
|
|
34
|
+
argv = ["complete", "--system", system, "--messages", messages,
|
|
35
|
+
"--temperature", "0", "--max-tokens", str(max_tokens)]
|
|
36
|
+
r = runner.run_tool("llm", argv, timeout=90)
|
|
37
|
+
if r["ok"]:
|
|
38
|
+
return (r["data"] or {}).get("content"), None
|
|
39
|
+
err = r["error"] or {}
|
|
40
|
+
return None, (err.get("message") or err.get("code") or "llm call failed")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def provider_test(req) -> Any:
|
|
44
|
+
provider = (req.body.get("provider") or "").strip()
|
|
45
|
+
argv = ["test-provider"] + (["--provider", provider] if provider else [])
|
|
46
|
+
r = runner.run_tool("llm", argv, timeout=60)
|
|
47
|
+
if r["ok"]:
|
|
48
|
+
d = r["data"] or {}
|
|
49
|
+
return {"ok": True, "provider": provider or d.get("provider"),
|
|
50
|
+
"model": d.get("model"), "usage": d.get("usage")}
|
|
51
|
+
err = r["error"] or {}
|
|
52
|
+
return {"ok": False, "provider": provider,
|
|
53
|
+
"detail": err.get("message") or err.get("code") or "failed"}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _tool_entry(name: str) -> dict | None:
|
|
57
|
+
for t in registry.list_tools():
|
|
58
|
+
if t["name"] == name:
|
|
59
|
+
return t
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_tool(req) -> Any:
|
|
64
|
+
name = (req.body.get("name") or "").strip()
|
|
65
|
+
entry = _tool_entry(name)
|
|
66
|
+
if entry is None:
|
|
67
|
+
return (404, {"error": "unknown tool"})
|
|
68
|
+
probe = validate.probe("tool:" + name, entry, force=True)
|
|
69
|
+
out = {"name": name, "ok": probe["status"] == "connected",
|
|
70
|
+
"summary": probe["status"], "probe": probe}
|
|
71
|
+
if _provider_ready():
|
|
72
|
+
content, err = _llm(
|
|
73
|
+
"You verify software integrations. Given a tool's live-check result, "
|
|
74
|
+
"say in ONE sentence whether the credential works and what to do if not.",
|
|
75
|
+
f"Tool '{name}'. Live check: {json.dumps(probe)}.", max_tokens=120)
|
|
76
|
+
out["llm"] = content or f"(llm unavailable: {err})"
|
|
77
|
+
else:
|
|
78
|
+
out["llm"] = "configure an LLM provider to get a judged explanation"
|
|
79
|
+
return out
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def test_agent(req) -> Any:
|
|
83
|
+
name = (req.body.get("name") or "").strip()
|
|
84
|
+
entry = None
|
|
85
|
+
for a in registry.list_agents():
|
|
86
|
+
if a["name"] == name:
|
|
87
|
+
entry = a
|
|
88
|
+
break
|
|
89
|
+
if entry is None:
|
|
90
|
+
return (404, {"error": "unknown agent"})
|
|
91
|
+
action_names = {a["name"] for a in entry.get("actions", [])}
|
|
92
|
+
detail: Any
|
|
93
|
+
if "status" in action_names:
|
|
94
|
+
r = runner.run_agent(name, ["status"], timeout=90)
|
|
95
|
+
detail = r["data"] if r["ok"] else r["error"]
|
|
96
|
+
ok = r["ok"] and bool(entry.get("ready"))
|
|
97
|
+
else:
|
|
98
|
+
detail = entry.get("tool_status", {})
|
|
99
|
+
ok = bool(entry.get("ready"))
|
|
100
|
+
out = {"name": name, "ok": ok, "ready": entry.get("ready"),
|
|
101
|
+
"summary": "ready" if entry.get("ready") else "not ready",
|
|
102
|
+
"tool_status": entry.get("tool_status", {}), "status": detail}
|
|
103
|
+
if _provider_ready():
|
|
104
|
+
content, err = _llm(
|
|
105
|
+
"You verify multi-tool agents. In ONE sentence, say whether this agent "
|
|
106
|
+
"is ready to run and what is missing if not.",
|
|
107
|
+
f"Agent '{name}'. Ready={entry.get('ready')}. "
|
|
108
|
+
f"Driven tools: {json.dumps(entry.get('tool_status', {}))}.", max_tokens=120)
|
|
109
|
+
out["llm"] = content or f"(llm unavailable: {err})"
|
|
110
|
+
return out
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _sample_titles(limit: int = 15) -> list[str]:
|
|
114
|
+
p = userdata.store_db_path()
|
|
115
|
+
if not p.exists():
|
|
116
|
+
return []
|
|
117
|
+
try:
|
|
118
|
+
con = sqlite3.connect(f"file:{p}?mode=ro", uri=True, timeout=5)
|
|
119
|
+
rows = con.execute(
|
|
120
|
+
"SELECT title FROM records WHERE status='active' "
|
|
121
|
+
"ORDER BY updated DESC LIMIT ?", (limit,)).fetchall()
|
|
122
|
+
con.close()
|
|
123
|
+
return [r[0] for r in rows]
|
|
124
|
+
except sqlite3.Error:
|
|
125
|
+
return []
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def context_inspect(req) -> Any:
|
|
129
|
+
stats = inventory.store_stats()
|
|
130
|
+
titles = _sample_titles()
|
|
131
|
+
out = {"stats": stats, "sample_titles": titles}
|
|
132
|
+
if _provider_ready() and (stats or titles):
|
|
133
|
+
content, err = _llm(
|
|
134
|
+
"You summarize a knowledge store. In 2-3 short lines say what the user's "
|
|
135
|
+
"context covers and what looks thin. No preamble.",
|
|
136
|
+
f"Store stats: {json.dumps(stats)}. Recent record titles: {json.dumps(titles)}.",
|
|
137
|
+
max_tokens=200)
|
|
138
|
+
out["summary"] = content or f"(llm unavailable: {err})"
|
|
139
|
+
else:
|
|
140
|
+
out["summary"] = ("Configure an LLM provider for a written summary. "
|
|
141
|
+
f"Raw: {stats}")
|
|
142
|
+
return out
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
_COPILOT_SYSTEM = (
|
|
146
|
+
"You are the setup assistant embedded in the Agents-and-Tools dashboard. Help "
|
|
147
|
+
"the user get tools and agents working. Be concise and concrete. You cannot see "
|
|
148
|
+
"or enter secret values yourself - for a credential, direct the user to the "
|
|
149
|
+
"Store button. Reply as STRICT JSON: {\"reply\": \"...\", \"suggestions\": "
|
|
150
|
+
"[{\"action\": one of set_credential|edit_config|test_tool|test_agent|"
|
|
151
|
+
"oauth_login|web_login|bootstrap, \"label\": \"...\", \"data\": {...}}]}. "
|
|
152
|
+
"Keep suggestions to at most 4, each directly relevant. data carries the args "
|
|
153
|
+
"(tool/secret for set_credential; component/name for edit_config; name for "
|
|
154
|
+
"test_tool/test_agent; tool for oauth_login)."
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def copilot(req) -> Any:
|
|
159
|
+
message = (req.body.get("message") or "").strip()
|
|
160
|
+
if not message:
|
|
161
|
+
return (400, {"error": "message is required"})
|
|
162
|
+
if not _provider_ready():
|
|
163
|
+
return {"reply": "No LLM provider is configured yet. Open the LLM Providers "
|
|
164
|
+
"tab, store a key, and test it - then I can help.", "suggestions": []}
|
|
165
|
+
inv = inventory.build()
|
|
166
|
+
state = {
|
|
167
|
+
"fresh_start": inv["fresh_start"],
|
|
168
|
+
"llm_ready": inv["summary"]["llm_ready"],
|
|
169
|
+
"tools_needing_setup": [t["name"] for t in inv["tools"] if t.get("needs_setup")][:25],
|
|
170
|
+
"agents_needing_setup": [a["name"] for a in inv["agents"] if a.get("needs_setup")][:25],
|
|
171
|
+
}
|
|
172
|
+
content, err = _llm(_COPILOT_SYSTEM,
|
|
173
|
+
f"Current state: {json.dumps(state)}\n\nUser: {message}",
|
|
174
|
+
max_tokens=600)
|
|
175
|
+
if content is None:
|
|
176
|
+
return {"reply": f"LLM call failed: {err}", "suggestions": []}
|
|
177
|
+
parsed = runner._parse_json(content)
|
|
178
|
+
if isinstance(parsed, dict) and "reply" in parsed:
|
|
179
|
+
parsed.setdefault("suggestions", [])
|
|
180
|
+
return parsed
|
|
181
|
+
return {"reply": content, "suggestions": []}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""PROCESIO environments panel — dashboard routes.
|
|
2
|
+
|
|
3
|
+
Every operation is a thin wrapper over an EXISTING procesio tool action run through
|
|
4
|
+
`runner.run_tool` (the same subprocess bridge every other setup action uses). The
|
|
5
|
+
dashboard never reimplements the environment logic, credential handling, or URL
|
|
6
|
+
validation — the tool remains the single source of truth, so this stays trivial to
|
|
7
|
+
maintain: add an action to the tool and it shows up here for free.
|
|
8
|
+
|
|
9
|
+
Read: list-environments, list-credentials
|
|
10
|
+
Write: set-environment, add-environment, remove-environment (environments)
|
|
11
|
+
set-default, remove-credential (credentials)
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
from typing import Any
|
|
16
|
+
|
|
17
|
+
from . import inventory, runner
|
|
18
|
+
|
|
19
|
+
TOOL = "procesio"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _run(argv: list[str], *, mutating: bool) -> dict[str, Any]:
|
|
23
|
+
"""Run a procesio action and shape a uniform {ok, data, error}. On a successful
|
|
24
|
+
mutation, drop the inventory cache so the card (and its env-aware health probe)
|
|
25
|
+
re-reads on the next poll."""
|
|
26
|
+
res = runner.run_tool(TOOL, argv, timeout=90)
|
|
27
|
+
if mutating and res["ok"]:
|
|
28
|
+
inventory.invalidate()
|
|
29
|
+
return {"ok": res["ok"], "data": res.get("data"), "error": res.get("error")}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _name(req) -> str:
|
|
33
|
+
return (req.body.get("name") or "").strip()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# -- read -------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
def state(req) -> Any:
|
|
39
|
+
"""Everything the panel needs in one round-trip: the environment registry
|
|
40
|
+
(built-ins + user, the default, bound credentials) and the credential profiles
|
|
41
|
+
(names/types/workspaces/environment binding — never a secret value)."""
|
|
42
|
+
envs = _run(["list-environments"], mutating=False)
|
|
43
|
+
creds = _run(["list-credentials"], mutating=False)
|
|
44
|
+
return {
|
|
45
|
+
"environments": envs["data"],
|
|
46
|
+
"environments_error": envs["error"],
|
|
47
|
+
"credentials": creds["data"],
|
|
48
|
+
"credentials_error": creds["error"],
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# -- environments -----------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
def set_environment(req) -> Any:
|
|
55
|
+
if not _name(req):
|
|
56
|
+
return (400, {"error": "name is required"})
|
|
57
|
+
return _run(["set-environment", "--name", _name(req)], mutating=True)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def add_environment(req) -> Any:
|
|
61
|
+
b = req.body or {}
|
|
62
|
+
name = (b.get("name") or "").strip()
|
|
63
|
+
web = (b.get("web_base") or "").strip()
|
|
64
|
+
app = (b.get("app_base") or "").strip()
|
|
65
|
+
forms = (b.get("forms_base") or "").strip()
|
|
66
|
+
if not (name and web and app and forms):
|
|
67
|
+
return (400, {"error": "name, web_base, app_base and forms_base are all required"})
|
|
68
|
+
argv = ["add-environment", "--name", name,
|
|
69
|
+
"--web-base", web, "--app-base", app, "--forms-base", forms]
|
|
70
|
+
if (b.get("auth_base") or "").strip():
|
|
71
|
+
argv += ["--auth-base", b["auth_base"].strip()]
|
|
72
|
+
if b.get("make_default"):
|
|
73
|
+
argv += ["--make-default"]
|
|
74
|
+
return _run(argv, mutating=True)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def remove_environment(req) -> Any:
|
|
78
|
+
if not _name(req):
|
|
79
|
+
return (400, {"error": "name is required"})
|
|
80
|
+
return _run(["remove-environment", "--name", _name(req)], mutating=True)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# -- credentials (existing profile actions; no secrets pass through here) ----
|
|
84
|
+
|
|
85
|
+
def set_default_credential(req) -> Any:
|
|
86
|
+
if not _name(req):
|
|
87
|
+
return (400, {"error": "name is required"})
|
|
88
|
+
return _run(["set-default", "--name", _name(req)], mutating=True)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def remove_credential(req) -> Any:
|
|
92
|
+
if not _name(req):
|
|
93
|
+
return (400, {"error": "name is required"})
|
|
94
|
+
return _run(["remove-credential", "--name", _name(req)], mutating=True)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Central route wiring. One place maps URL -> handler function.
|
|
2
|
+
|
|
3
|
+
Handlers take a `Req` and return either a JSON-able object (200) or a
|
|
4
|
+
(status, object) tuple. SSE routes (validate/all) are handled directly in
|
|
5
|
+
handler.py. Later-milestone route modules are wired only when their file exists,
|
|
6
|
+
so a not-yet-built module never blocks the ones already present - but a real
|
|
7
|
+
import error inside an existing module still surfaces.
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import importlib.util
|
|
12
|
+
from typing import Callable
|
|
13
|
+
|
|
14
|
+
_GET: dict[str, Callable] = {}
|
|
15
|
+
_POST: dict[str, Callable] = {}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def resolve(method: str, path: str):
|
|
19
|
+
return (_GET if method == "GET" else _POST).get(path)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _exists(mod: str) -> bool:
|
|
23
|
+
return importlib.util.find_spec(f"dashboard.server.{mod}") is not None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _wire():
|
|
27
|
+
from . import inventory, validate
|
|
28
|
+
|
|
29
|
+
_GET["/api/health"] = lambda req: {"ok": True}
|
|
30
|
+
_GET["/api/inventory"] = lambda req: inventory.build(
|
|
31
|
+
force=req.q("force") in ("1", "true", "yes"))
|
|
32
|
+
_POST["/api/validate/one"] = validate.validate_one_route
|
|
33
|
+
|
|
34
|
+
if _exists("setup"):
|
|
35
|
+
from . import setup
|
|
36
|
+
_POST["/api/credential/set"] = setup.credential_set
|
|
37
|
+
_POST["/api/credential/delete"] = setup.credential_delete
|
|
38
|
+
_GET["/api/credential/check"] = setup.credential_check
|
|
39
|
+
_POST["/api/bootstrap"] = setup.bootstrap
|
|
40
|
+
_GET["/api/config/list"] = setup.config_list
|
|
41
|
+
_GET["/api/config/get"] = setup.config_get
|
|
42
|
+
_POST["/api/config/validate"] = setup.config_validate
|
|
43
|
+
_POST["/api/config/set"] = setup.config_set
|
|
44
|
+
_POST["/api/session/start"] = setup.session_start
|
|
45
|
+
_POST["/api/session/commit"] = setup.session_commit
|
|
46
|
+
_POST["/api/oauth/start"] = setup.oauth_start
|
|
47
|
+
_GET["/api/job/get"] = setup.job_get
|
|
48
|
+
|
|
49
|
+
if _exists("google"):
|
|
50
|
+
from . import google
|
|
51
|
+
_GET["/api/google/accounts"] = google.accounts
|
|
52
|
+
_GET["/api/google/email"] = google.email
|
|
53
|
+
_POST["/api/google/login"] = google.login
|
|
54
|
+
_POST["/api/google/remove"] = google.remove
|
|
55
|
+
|
|
56
|
+
if _exists("procesio_env"):
|
|
57
|
+
from . import procesio_env
|
|
58
|
+
_GET["/api/procesio/state"] = procesio_env.state
|
|
59
|
+
_POST["/api/procesio/set-environment"] = procesio_env.set_environment
|
|
60
|
+
_POST["/api/procesio/add-environment"] = procesio_env.add_environment
|
|
61
|
+
_POST["/api/procesio/remove-environment"] = procesio_env.remove_environment
|
|
62
|
+
_POST["/api/procesio/set-default-credential"] = procesio_env.set_default_credential
|
|
63
|
+
_POST["/api/procesio/remove-credential"] = procesio_env.remove_credential
|
|
64
|
+
|
|
65
|
+
if _exists("llmtest"):
|
|
66
|
+
from . import llmtest
|
|
67
|
+
_POST["/api/llm/provider/test"] = llmtest.provider_test
|
|
68
|
+
_POST["/api/test/tool"] = llmtest.test_tool
|
|
69
|
+
_POST["/api/test/agent"] = llmtest.test_agent
|
|
70
|
+
_GET["/api/context/inspect"] = llmtest.context_inspect
|
|
71
|
+
_POST["/api/copilot"] = llmtest.copilot
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
_wire()
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"""Subprocess bridge to the framework's own scripts.
|
|
2
|
+
|
|
3
|
+
The dashboard reads registry data by importing `registry` directly (fast, in
|
|
4
|
+
process). But anything that RUNS a tool/agent or writes a credential goes through
|
|
5
|
+
the existing scripts as a subprocess, so each runs in its own venv-correct process
|
|
6
|
+
exactly as it does from the terminal - the dashboard never reimplements a tool's
|
|
7
|
+
logic or its credential handling.
|
|
8
|
+
|
|
9
|
+
Every well-behaved tool emits exactly one JSON object on stdout (io.emit / io.fail)
|
|
10
|
+
and logs to stderr, so we parse stdout as JSON and keep stderr for diagnostics.
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
import os
|
|
16
|
+
import subprocess
|
|
17
|
+
import sys
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
from typing import Any
|
|
20
|
+
|
|
21
|
+
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
|
22
|
+
VENV_PY = PROJECT_ROOT / ".venv" / "Scripts" / "python.exe"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def python_exe() -> str:
|
|
26
|
+
"""The interpreter to launch scripts with. Prefer the project venv; the
|
|
27
|
+
scripts also self-reexec into it, so this is belt-and-suspenders."""
|
|
28
|
+
return str(VENV_PY) if VENV_PY.exists() else sys.executable
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def flags_from(args: dict[str, Any] | None) -> list[str]:
|
|
32
|
+
"""Turn {name: value} into ['--name', 'value', ...].
|
|
33
|
+
|
|
34
|
+
Booleans become a bare flag when True and are dropped when False (the common
|
|
35
|
+
argparse store_true convention). Everything else is stringified. Values that
|
|
36
|
+
are dict/list are JSON-encoded (some tools take JSON string args)."""
|
|
37
|
+
out: list[str] = []
|
|
38
|
+
for k, v in (args or {}).items():
|
|
39
|
+
flag = f"--{k}"
|
|
40
|
+
if isinstance(v, bool):
|
|
41
|
+
if v:
|
|
42
|
+
out.append(flag)
|
|
43
|
+
continue
|
|
44
|
+
if isinstance(v, (dict, list)):
|
|
45
|
+
v = json.dumps(v, ensure_ascii=False)
|
|
46
|
+
out.extend([flag, str(v)])
|
|
47
|
+
return out
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def run_script(script_rel: str, argv: list[str], *, stdin_text: str | None = None,
|
|
51
|
+
timeout: float = 60.0, env: dict[str, str] | None = None) -> dict[str, Any]:
|
|
52
|
+
"""Run scripts/<script_rel> with argv. Returns raw process result.
|
|
53
|
+
|
|
54
|
+
`env` overlays extra environment on the inherited env (e.g. AAT_USER_ID for the
|
|
55
|
+
multi-user web platform, so userdata + creds resolve per-user in the subprocess).
|
|
56
|
+
Never raises on a non-zero exit - the caller inspects returncode/stdout."""
|
|
57
|
+
script = PROJECT_ROOT / "scripts" / script_rel
|
|
58
|
+
cmd = [python_exe(), str(script), *argv]
|
|
59
|
+
proc_env = {**os.environ, **env} if env else None
|
|
60
|
+
try:
|
|
61
|
+
proc = subprocess.run(
|
|
62
|
+
cmd, input=stdin_text, capture_output=True, text=True,
|
|
63
|
+
encoding="utf-8", errors="replace", timeout=timeout,
|
|
64
|
+
cwd=str(PROJECT_ROOT), env=proc_env,
|
|
65
|
+
)
|
|
66
|
+
except subprocess.TimeoutExpired as e:
|
|
67
|
+
return {"returncode": -1, "stdout": "", "stderr": f"timeout after {timeout}s",
|
|
68
|
+
"timed_out": True, "cmd": cmd}
|
|
69
|
+
return {"returncode": proc.returncode, "stdout": proc.stdout or "",
|
|
70
|
+
"stderr": proc.stderr or "", "timed_out": False, "cmd": cmd}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _parse_json(text: str) -> Any:
|
|
74
|
+
"""Parse a tool's stdout as one JSON object. Tolerate leading/trailing noise
|
|
75
|
+
by falling back to the last line that parses."""
|
|
76
|
+
text = (text or "").strip()
|
|
77
|
+
if not text:
|
|
78
|
+
return None
|
|
79
|
+
try:
|
|
80
|
+
return json.loads(text)
|
|
81
|
+
except ValueError:
|
|
82
|
+
for line in reversed(text.splitlines()):
|
|
83
|
+
line = line.strip()
|
|
84
|
+
if line and line[0] in "{[":
|
|
85
|
+
try:
|
|
86
|
+
return json.loads(line)
|
|
87
|
+
except ValueError:
|
|
88
|
+
continue
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def run_tool(tool: str, argv: list[str], *, timeout: float = 60.0,
|
|
93
|
+
env: dict[str, str] | None = None) -> dict[str, Any]:
|
|
94
|
+
"""Run a tool via scripts/run-tool.py and normalize the outcome.
|
|
95
|
+
|
|
96
|
+
Returns {ok, data, error, returncode, stderr}. `ok` is True only when the
|
|
97
|
+
process exited 0 AND stdout parsed to a non-error JSON object. `env` overlays
|
|
98
|
+
extra environment (e.g. AAT_USER_ID for per-user isolation)."""
|
|
99
|
+
res = run_script("run-tool.py", [tool, *argv], timeout=timeout, env=env)
|
|
100
|
+
return _normalize(res)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def run_agent(agent: str, argv: list[str], *, timeout: float = 120.0,
|
|
104
|
+
env: dict[str, str] | None = None) -> dict[str, Any]:
|
|
105
|
+
res = run_script("run-agent.py", [agent, *argv], timeout=timeout, env=env)
|
|
106
|
+
return _normalize(res)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _normalize(res: dict[str, Any]) -> dict[str, Any]:
|
|
110
|
+
data = _parse_json(res["stdout"])
|
|
111
|
+
is_err_envelope = isinstance(data, dict) and "error" in data
|
|
112
|
+
ok = res["returncode"] == 0 and data is not None and not is_err_envelope
|
|
113
|
+
err = None
|
|
114
|
+
if not ok:
|
|
115
|
+
if is_err_envelope:
|
|
116
|
+
err = data["error"]
|
|
117
|
+
elif res.get("timed_out"):
|
|
118
|
+
err = {"code": "timeout", "message": res["stderr"]}
|
|
119
|
+
elif data is None:
|
|
120
|
+
err = {"code": "no_json",
|
|
121
|
+
"message": (res["stderr"] or res["stdout"] or "").strip()[:800]
|
|
122
|
+
or "tool produced no JSON output"}
|
|
123
|
+
else:
|
|
124
|
+
err = {"code": "nonzero_exit",
|
|
125
|
+
"message": (res["stderr"] or "").strip()[:800]}
|
|
126
|
+
return {"ok": ok, "data": data, "error": err,
|
|
127
|
+
"returncode": res["returncode"], "stderr": res["stderr"][:2000]}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def check_credential(tool: str, secret: str) -> bool:
|
|
131
|
+
"""True if the secret is present in Credential Manager (via set-credential
|
|
132
|
+
--check, which honors namespace:name shared secrets the same way)."""
|
|
133
|
+
res = run_script("set-credential.py", [tool, secret, "--check"], timeout=20)
|
|
134
|
+
return res["returncode"] == 0
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def set_credential(tool: str, secret: str, value: str) -> dict[str, Any]:
|
|
138
|
+
"""Store a secret by piping it to set-credential.py --stdin. The value is
|
|
139
|
+
never placed on the command line, never logged, never written to disk here."""
|
|
140
|
+
res = run_script("set-credential.py", [tool, secret, "--stdin"],
|
|
141
|
+
stdin_text=value, timeout=25)
|
|
142
|
+
ok = res["returncode"] == 0
|
|
143
|
+
msg = (res["stdout"] or res["stderr"] or "").strip()
|
|
144
|
+
return {"ok": ok, "message": msg}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def delete_credential(tool: str, secret: str) -> dict[str, Any]:
|
|
148
|
+
res = run_script("set-credential.py", [tool, secret, "--delete"], timeout=20)
|
|
149
|
+
return {"ok": res["returncode"] == 0,
|
|
150
|
+
"message": (res["stdout"] or res["stderr"]).strip()}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Local-only access gate for the dashboard.
|
|
2
|
+
|
|
3
|
+
Threat model: single user, own laptop, server bound to 127.0.0.1. The token stops
|
|
4
|
+
another local process (or a random browser tab hitting localhost) from driving the
|
|
5
|
+
API. It is NOT multi-user auth - that is out of scope until the shared/remote mode
|
|
6
|
+
is built.
|
|
7
|
+
|
|
8
|
+
Secrets never pass through here on the way out: no GET ever returns a stored
|
|
9
|
+
credential value, and set-credential receives values only over loopback POST which
|
|
10
|
+
are piped straight to the credential store (see runner.set_credential).
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import hmac
|
|
15
|
+
import secrets as _secrets # stdlib
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
_TOKEN = _secrets.token_urlsafe(24)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def token() -> str:
|
|
22
|
+
return _TOKEN
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def token_ok(candidate: str | None) -> bool:
|
|
26
|
+
"""Constant-time compare so a wrong token leaks no timing signal."""
|
|
27
|
+
if not candidate:
|
|
28
|
+
return False
|
|
29
|
+
return hmac.compare_digest(candidate, _TOKEN)
|