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,386 @@
|
|
|
1
|
+
"""Generate canonical form-control goldens from FormBuilder mock.ts (SOURCE OF TRUTH).
|
|
2
|
+
|
|
3
|
+
The PROCESIO FormBuilder defines every control + its property list in
|
|
4
|
+
`docs_info/FormBuilder mock.ts`. The runtime/builder clones one golden per control
|
|
5
|
+
from `elements/<type>.json`. This script PARSES the mock and regenerates those
|
|
6
|
+
goldens so they are exact, complete, uniformly ordered, and deterministic --
|
|
7
|
+
replacing harvest-from-exports (capture_goldens.py), which was limited to controls
|
|
8
|
+
that happened to appear in a saved form.
|
|
9
|
+
|
|
10
|
+
Why parse the mock instead of harvesting:
|
|
11
|
+
* complete -- every control the FormBuilder ships (incl. ones never harvested)
|
|
12
|
+
* exact -- keys, render-order, type/category/subCategory/exposed/events all
|
|
13
|
+
come straight from the source; zero drift by construction
|
|
14
|
+
* repeatable -- same mock in -> identical files out (deterministic ids)
|
|
15
|
+
|
|
16
|
+
Enum resolution: the mock references ElementConfigType/Category/SubCategory/Event by
|
|
17
|
+
member name (imported from '../config', not shipped). Values come from `enum_map.json`
|
|
18
|
+
(authoritative). A member missing there is resolved by the fallback rule
|
|
19
|
+
(MEMBER -> lower, '_'->'-') and reported as UNVERIFIED -- confirm with the frontend
|
|
20
|
+
(UNVERIFIED-ENUMS-QUESTION.md) and paste into enum_map.json. ElementType and
|
|
21
|
+
ElementCategory ARE defined in the mock, so they are parsed from it directly.
|
|
22
|
+
|
|
23
|
+
TEMPLATE_ONLY configs are palette-only (not present in instantiated/saved controls),
|
|
24
|
+
so they are intentionally EXCLUDED -- the golden mirrors what the toolbar produces.
|
|
25
|
+
|
|
26
|
+
Usage:
|
|
27
|
+
python sync_from_mock.py # dry-run: report changes + unverified enums
|
|
28
|
+
python sync_from_mock.py --write # (re)write elements/*.json
|
|
29
|
+
python sync_from_mock.py --check # exit 1 if on-disk goldens != mock (CI guard)
|
|
30
|
+
"""
|
|
31
|
+
from __future__ import annotations
|
|
32
|
+
|
|
33
|
+
import json
|
|
34
|
+
import re
|
|
35
|
+
import sys
|
|
36
|
+
import uuid
|
|
37
|
+
from pathlib import Path
|
|
38
|
+
|
|
39
|
+
DIR = Path(__file__).resolve().parent
|
|
40
|
+
MOCK = DIR.parent.parent / "docs_info" / "FormBuilder mock.ts"
|
|
41
|
+
ENUMS_TS = DIR.parent.parent / "docs_info" / "form-config-enums.ts"
|
|
42
|
+
ELEMENTS = DIR / "elements"
|
|
43
|
+
ENUM_MAP = DIR / "enum_map.json"
|
|
44
|
+
_CONFIG_ENUMS = ("ElementConfigCategory", "ElementConfigSubCategory",
|
|
45
|
+
"ElementConfigType", "ElementConfigEvent")
|
|
46
|
+
|
|
47
|
+
# stable namespace so re-runs produce identical ids (the builder reassigns ids at
|
|
48
|
+
# build time anyway; deterministic ids here only keep git diffs clean).
|
|
49
|
+
_NS = uuid.uuid5(uuid.NAMESPACE_DNS, "procesio.form.goldens")
|
|
50
|
+
|
|
51
|
+
# canonical field order within a config object (cosmetic; render order is the
|
|
52
|
+
# ORDER OF CONFIGS, preserved from the mock -- not the field order inside one).
|
|
53
|
+
_CFG_ORDER = ["id", "key", "label", "placeholder", "tooltip", "category",
|
|
54
|
+
"subCategory", "type", "value", "hasTopDivider", "exposed", "events"]
|
|
55
|
+
_TOP_ORDER = ["id", "category", "type", "configs", "parentId", "section"]
|
|
56
|
+
_HEADER = {"heading"}
|
|
57
|
+
_FOOTER = {"button"}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# --------------------------------------------------------------------------- JS literal parser
|
|
61
|
+
class _P:
|
|
62
|
+
"""Minimal recursive-descent parser for the JS object/array literals used in the
|
|
63
|
+
mock. Returns plain Python; bare identifiers (ElementConfigType.X, guid()) become
|
|
64
|
+
('@bare', text) markers so the caller can resolve/strip them."""
|
|
65
|
+
|
|
66
|
+
def __init__(self, s, i=0):
|
|
67
|
+
self.s, self.i = s, i
|
|
68
|
+
|
|
69
|
+
def ws(self):
|
|
70
|
+
s = self.s
|
|
71
|
+
while self.i < len(s):
|
|
72
|
+
c = s[self.i]
|
|
73
|
+
if c in " \t\r\n,":
|
|
74
|
+
self.i += 1
|
|
75
|
+
elif s[self.i:self.i + 2] == "//":
|
|
76
|
+
while self.i < len(s) and s[self.i] != "\n":
|
|
77
|
+
self.i += 1
|
|
78
|
+
else:
|
|
79
|
+
break
|
|
80
|
+
|
|
81
|
+
def value(self):
|
|
82
|
+
self.ws()
|
|
83
|
+
c = self.s[self.i]
|
|
84
|
+
if c == "{":
|
|
85
|
+
return self.obj()
|
|
86
|
+
if c == "[":
|
|
87
|
+
return self.arr()
|
|
88
|
+
if c in "\"'`":
|
|
89
|
+
return self.str()
|
|
90
|
+
if c == "-" or c.isdigit():
|
|
91
|
+
return self.num()
|
|
92
|
+
# keyword or bareword
|
|
93
|
+
m = re.match(r"[A-Za-z_$][\w$.]*", self.s[self.i:])
|
|
94
|
+
word = m.group(0)
|
|
95
|
+
self.i += len(word)
|
|
96
|
+
if word == "true":
|
|
97
|
+
return True
|
|
98
|
+
if word == "false":
|
|
99
|
+
return False
|
|
100
|
+
if word in ("null", "undefined"):
|
|
101
|
+
return None
|
|
102
|
+
if self.s[self.i:self.i + 1] == "(": # function call e.g. guid()
|
|
103
|
+
depth = 0
|
|
104
|
+
while self.i < len(self.s):
|
|
105
|
+
if self.s[self.i] == "(":
|
|
106
|
+
depth += 1
|
|
107
|
+
elif self.s[self.i] == ")":
|
|
108
|
+
depth -= 1
|
|
109
|
+
if depth == 0:
|
|
110
|
+
self.i += 1
|
|
111
|
+
break
|
|
112
|
+
self.i += 1
|
|
113
|
+
return ("@bare", word + "()")
|
|
114
|
+
return ("@bare", word)
|
|
115
|
+
|
|
116
|
+
def obj(self):
|
|
117
|
+
self.i += 1 # {
|
|
118
|
+
out = {}
|
|
119
|
+
while True:
|
|
120
|
+
self.ws()
|
|
121
|
+
if self.s[self.i] == "}":
|
|
122
|
+
self.i += 1
|
|
123
|
+
return out
|
|
124
|
+
# key
|
|
125
|
+
if self.s[self.i] in "\"'`":
|
|
126
|
+
key = self.str()
|
|
127
|
+
else:
|
|
128
|
+
m = re.match(r"[A-Za-z_$][\w$]*", self.s[self.i:])
|
|
129
|
+
key = m.group(0)
|
|
130
|
+
self.i += len(key)
|
|
131
|
+
self.ws()
|
|
132
|
+
assert self.s[self.i] == ":", f"expected ':' at {self.i}"
|
|
133
|
+
self.i += 1
|
|
134
|
+
out[key] = self.value()
|
|
135
|
+
|
|
136
|
+
def arr(self):
|
|
137
|
+
self.i += 1 # [
|
|
138
|
+
out = []
|
|
139
|
+
while True:
|
|
140
|
+
self.ws()
|
|
141
|
+
if self.s[self.i] == "]":
|
|
142
|
+
self.i += 1
|
|
143
|
+
return out
|
|
144
|
+
out.append(self.value())
|
|
145
|
+
|
|
146
|
+
def str(self):
|
|
147
|
+
q = self.s[self.i]
|
|
148
|
+
self.i += 1
|
|
149
|
+
buf = []
|
|
150
|
+
while self.i < len(self.s):
|
|
151
|
+
c = self.s[self.i]
|
|
152
|
+
if c == "\\":
|
|
153
|
+
buf.append(self.s[self.i + 1])
|
|
154
|
+
self.i += 2
|
|
155
|
+
continue
|
|
156
|
+
if c == q:
|
|
157
|
+
self.i += 1
|
|
158
|
+
return "".join(buf)
|
|
159
|
+
buf.append(c)
|
|
160
|
+
self.i += 1
|
|
161
|
+
raise ValueError("unterminated string")
|
|
162
|
+
|
|
163
|
+
def num(self):
|
|
164
|
+
m = re.match(r"-?\d+(\.\d+)?([eE][+-]?\d+)?", self.s[self.i:])
|
|
165
|
+
t = m.group(0)
|
|
166
|
+
self.i += len(t)
|
|
167
|
+
return float(t) if ("." in t or "e" in t or "E" in t) else int(t)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def _strip_line_comments(t):
|
|
171
|
+
return "\n".join(l for l in t.splitlines() if not l.lstrip().startswith("//"))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def _parse_enum_block(text, name):
|
|
175
|
+
"""Parse `enum <name> { A = "a", ... }` defined inside the mock."""
|
|
176
|
+
m = re.search(r"enum\s+" + name + r"\s*\{(.*?)\}", text, re.S)
|
|
177
|
+
out = {}
|
|
178
|
+
for mm in re.finditer(r"(\w+)\s*=\s*\"([^\"]*)\"", m.group(1)):
|
|
179
|
+
out[mm.group(1)] = mm.group(2)
|
|
180
|
+
return out
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
# --------------------------------------------------------------------------- generation
|
|
184
|
+
class Resolver:
|
|
185
|
+
"""Resolves ElementConfig* enum members to their string values. Precedence:
|
|
186
|
+
1. form-config-enums.ts (authoritative, from the frontend) -- if present
|
|
187
|
+
2. enum_map.json (committed fallback / manual override)
|
|
188
|
+
3. rule MEMBER->lower,'_'->'-' (last resort; flagged UNVERIFIED)
|
|
189
|
+
With the enums file present, every member resolves authoritatively (no guessing)."""
|
|
190
|
+
|
|
191
|
+
def __init__(self):
|
|
192
|
+
self.maps = {}
|
|
193
|
+
if ENUM_MAP.exists():
|
|
194
|
+
m = json.loads(ENUM_MAP.read_text(encoding="utf-8"))
|
|
195
|
+
self.maps = {k: dict(v) for k, v in m.items()
|
|
196
|
+
if not k.startswith("_") and isinstance(v, dict)}
|
|
197
|
+
self.from_ts = False
|
|
198
|
+
if ENUMS_TS.exists():
|
|
199
|
+
txt = ENUMS_TS.read_text(encoding="utf-8")
|
|
200
|
+
for name in _CONFIG_ENUMS:
|
|
201
|
+
block = _parse_enum_block(txt, name)
|
|
202
|
+
if block:
|
|
203
|
+
self.maps.setdefault(name, {}).update(block) # the TS file wins
|
|
204
|
+
self.from_ts = True
|
|
205
|
+
self.unverified = {} # "Enum.MEMBER" -> derived value
|
|
206
|
+
|
|
207
|
+
def _rule(self, member):
|
|
208
|
+
return member.lower().replace("_", "-")
|
|
209
|
+
|
|
210
|
+
def resolve(self, enum_name, member):
|
|
211
|
+
table = self.maps.get(enum_name, {})
|
|
212
|
+
if member in table:
|
|
213
|
+
return table[member]
|
|
214
|
+
val = self._rule(member)
|
|
215
|
+
self.unverified.setdefault(f"{enum_name}.{member}", val)
|
|
216
|
+
return val
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def _bare_member(v):
|
|
220
|
+
"""('@bare','ElementConfigType.INPUT') -> ('ElementConfigType','INPUT')."""
|
|
221
|
+
if isinstance(v, tuple) and v and v[0] == "@bare" and "." in v[1]:
|
|
222
|
+
head, _, mem = v[1].partition(".")
|
|
223
|
+
return head, mem
|
|
224
|
+
return None
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def _det_id(*parts):
|
|
228
|
+
return str(uuid.uuid5(_NS, "/".join(parts)))
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def build_goldens():
|
|
232
|
+
raw = MOCK.read_text(encoding="utf-8")
|
|
233
|
+
text = _strip_line_comments(raw)
|
|
234
|
+
el_types = _parse_enum_block(text, "ElementType")
|
|
235
|
+
el_cats = _parse_enum_block(text, "ElementCategory")
|
|
236
|
+
res = Resolver()
|
|
237
|
+
|
|
238
|
+
# locate the elementTemplates array and parse it as one big JS array. Anchor on
|
|
239
|
+
# the assignment '=' so we skip the `ElementTemplate[]` type-annotation brackets.
|
|
240
|
+
eq = text.index("=", text.index("elementTemplates"))
|
|
241
|
+
start = text.index("[", eq)
|
|
242
|
+
arr = _P(text, start).value() # list of template dicts
|
|
243
|
+
|
|
244
|
+
goldens = {}
|
|
245
|
+
stats = {}
|
|
246
|
+
for tpl in arr:
|
|
247
|
+
# top-level type: ElementType.X -> string
|
|
248
|
+
bt = _bare_member(tpl["type"])
|
|
249
|
+
etype = el_types[bt[1]] if bt else tpl["type"]
|
|
250
|
+
# top-level category: string literal OR ElementCategory.X
|
|
251
|
+
cat_raw = tpl["category"]
|
|
252
|
+
bc = _bare_member(cat_raw)
|
|
253
|
+
category = el_cats[bc[1]] if bc else cat_raw
|
|
254
|
+
|
|
255
|
+
configs_out = []
|
|
256
|
+
skipped_template_only = 0
|
|
257
|
+
unverified_here = 0
|
|
258
|
+
idx = {}
|
|
259
|
+
for c in tpl["configs"]:
|
|
260
|
+
tmem = _bare_member(c["type"])
|
|
261
|
+
type_member = tmem[1] if tmem else None
|
|
262
|
+
if type_member == "TEMPLATE_ONLY":
|
|
263
|
+
skipped_template_only += 1
|
|
264
|
+
continue
|
|
265
|
+
key = c["key"]
|
|
266
|
+
n = idx.get(key, 0)
|
|
267
|
+
idx[key] = n + 1
|
|
268
|
+
o = {"id": _det_id(etype, key, str(n)), "key": key}
|
|
269
|
+
for f in ("label", "placeholder", "tooltip"):
|
|
270
|
+
if f in c:
|
|
271
|
+
o[f] = c[f]
|
|
272
|
+
o["category"] = res.resolve("ElementConfigCategory", _bare_member(c["category"])[1])
|
|
273
|
+
o["subCategory"] = res.resolve("ElementConfigSubCategory", _bare_member(c["subCategory"])[1])
|
|
274
|
+
before = len(res.unverified)
|
|
275
|
+
o["type"] = res.resolve("ElementConfigType", type_member)
|
|
276
|
+
o["value"] = c.get("value")
|
|
277
|
+
if "hasTopDivider" in c:
|
|
278
|
+
o["hasTopDivider"] = c["hasTopDivider"]
|
|
279
|
+
if "exposed" in c:
|
|
280
|
+
o["exposed"] = c["exposed"]
|
|
281
|
+
if "events" in c and c["events"] is not None:
|
|
282
|
+
evs = c["events"]
|
|
283
|
+
if isinstance(evs, list):
|
|
284
|
+
o["events"] = [res.resolve("ElementConfigEvent", _bare_member(e)[1]) for e in evs]
|
|
285
|
+
if len(res.unverified) > before:
|
|
286
|
+
unverified_here += 1
|
|
287
|
+
configs_out.append({k: o[k] for k in _CFG_ORDER if k in o})
|
|
288
|
+
|
|
289
|
+
section = "header" if etype in _HEADER else "footer" if etype in _FOOTER else "body"
|
|
290
|
+
gold = {"id": _det_id(etype), "category": category, "type": etype,
|
|
291
|
+
"configs": configs_out, "parentId": None, "section": section}
|
|
292
|
+
goldens[etype] = {k: gold[k] for k in _TOP_ORDER}
|
|
293
|
+
stats[etype] = (len(configs_out), skipped_template_only, unverified_here)
|
|
294
|
+
return goldens, stats, res
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def _dump(obj):
|
|
298
|
+
return json.dumps(obj, ensure_ascii=False, indent=1)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def main(argv):
|
|
302
|
+
write = "--write" in argv
|
|
303
|
+
check = "--check" in argv
|
|
304
|
+
goldens, stats, res = build_goldens()
|
|
305
|
+
|
|
306
|
+
on_disk = {p.stem for p in ELEMENTS.glob("*.json")}
|
|
307
|
+
gen = set(goldens)
|
|
308
|
+
changed, created, identical = [], [], []
|
|
309
|
+
for t in sorted(goldens):
|
|
310
|
+
new_txt = _dump(goldens[t])
|
|
311
|
+
path = ELEMENTS / f"{t}.json"
|
|
312
|
+
if not path.exists():
|
|
313
|
+
created.append(t)
|
|
314
|
+
elif path.read_text(encoding="utf-8").strip() != new_txt.strip():
|
|
315
|
+
changed.append(t)
|
|
316
|
+
else:
|
|
317
|
+
identical.append(t)
|
|
318
|
+
|
|
319
|
+
# ---- soundness gate: never change a value that an existing golden already had
|
|
320
|
+
# right (shared key+occurrence among non-template-only configs).
|
|
321
|
+
failures = []
|
|
322
|
+
for t in sorted(gen & on_disk):
|
|
323
|
+
old = json.loads((ELEMENTS / f"{t}.json").read_text(encoding="utf-8"))
|
|
324
|
+
oldby, occ = {}, {}
|
|
325
|
+
for c in old.get("configs", []):
|
|
326
|
+
k = c.get("key"); n = occ.get(k, 0); occ[k] = n + 1
|
|
327
|
+
oldby[(k, n)] = c
|
|
328
|
+
nocc = {}
|
|
329
|
+
for c in goldens[t]["configs"]:
|
|
330
|
+
k = c["key"]; n = nocc.get(k, 0); nocc[k] = n + 1
|
|
331
|
+
oc = oldby.get((k, n))
|
|
332
|
+
if not oc:
|
|
333
|
+
continue
|
|
334
|
+
# type/category/subCategory/exposed are deterministic from enums and
|
|
335
|
+
# present in both -> any diff means the enum map is wrong (hard fail).
|
|
336
|
+
for attr in ("type", "category", "subCategory", "exposed"):
|
|
337
|
+
if attr in oc and oc.get(attr) != c.get(attr):
|
|
338
|
+
failures.append(f"{t}.{k}#{n}: {attr} disk={oc.get(attr)!r} new={c.get(attr)!r}")
|
|
339
|
+
# events: a stale golden may simply LACK events the mock defines -> adding
|
|
340
|
+
# them is a correction, not a failure. Only a genuine CONTRADICTION (old had
|
|
341
|
+
# a non-empty list that the mock disagrees with) is a soundness problem.
|
|
342
|
+
oe, ne = oc.get("events") or [], c.get("events") or []
|
|
343
|
+
if oe and oe != ne:
|
|
344
|
+
failures.append(f"{t}.{k}#{n}: events disk={oc.get('events')} new={c.get('events')} (CONTRADICTION)")
|
|
345
|
+
|
|
346
|
+
print("# SYNC: FormBuilder mock.ts -> form-control goldens\n")
|
|
347
|
+
print(f"templates parsed : {len(goldens)}")
|
|
348
|
+
print(f"on disk : {len(on_disk)}")
|
|
349
|
+
print(f"to CREATE ({len(created)}): {created}")
|
|
350
|
+
print(f"to CHANGE ({len(changed)}): {changed}")
|
|
351
|
+
print(f"identical ({len(identical)})")
|
|
352
|
+
print(f"\nper-element (configs / template-only-skipped / unverified-typed-configs):")
|
|
353
|
+
for t in sorted(stats):
|
|
354
|
+
a, b, c = stats[t]
|
|
355
|
+
mark = " <-- has UNVERIFIED enum value(s)" if c else ""
|
|
356
|
+
print(f" {t:20s} {a:2d} / {b} / {c}{mark}")
|
|
357
|
+
|
|
358
|
+
print(f"\n## soundness check (must be empty): {len(failures)} mismatch(es) vs existing goldens")
|
|
359
|
+
for f in failures:
|
|
360
|
+
print(f" !! {f}")
|
|
361
|
+
|
|
362
|
+
print(f"\n## UNVERIFIED enum members ({len(res.unverified)}) -- value derived by rule, confirm w/ frontend:")
|
|
363
|
+
for k in sorted(res.unverified):
|
|
364
|
+
print(f" {k:55s} -> {res.unverified[k]!r}")
|
|
365
|
+
|
|
366
|
+
if failures:
|
|
367
|
+
print("\nABORT: soundness check failed -- fix enum_map.json before writing.")
|
|
368
|
+
return 2
|
|
369
|
+
if check:
|
|
370
|
+
drift = created + changed
|
|
371
|
+
if drift:
|
|
372
|
+
print(f"\n--check: {len(drift)} golden(s) differ from mock: {drift}")
|
|
373
|
+
return 1
|
|
374
|
+
print("\n--check: all goldens match the mock.")
|
|
375
|
+
return 0
|
|
376
|
+
if write:
|
|
377
|
+
for t, g in goldens.items():
|
|
378
|
+
(ELEMENTS / f"{t}.json").write_text(_dump(g), encoding="utf-8")
|
|
379
|
+
print(f"\nWROTE {len(goldens)} goldens to {ELEMENTS}")
|
|
380
|
+
else:
|
|
381
|
+
print("\nDRY-RUN (no files written). Re-run with --write to apply.")
|
|
382
|
+
return 0
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
if __name__ == "__main__":
|
|
386
|
+
sys.exit(main(sys.argv[1:]))
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"""Core of the DTO sub-tool pipeline (see DTO-SUBTOOLS-NOTE.md).
|
|
2
|
+
|
|
3
|
+
config --[validate vs config.schema.json]--> --[build: merge onto golden
|
|
4
|
+
template]--> DTO --[optional validate@source oracle]--> --[create | edit]-->
|
|
5
|
+
id --[re-GET]--> result
|
|
6
|
+
|
|
7
|
+
A `Component` bundles the pieces for one resource type. `build` is PURE
|
|
8
|
+
(config + ctx -> DTO, no I/O). Transport is declared as simple endpoint specs for
|
|
9
|
+
the common case; a component overrides `create` / `edit` / `validate` with a
|
|
10
|
+
callable (receiving the live client) only when it needs multi-step logic.
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import json
|
|
15
|
+
from dataclasses import dataclass
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Any, Callable
|
|
18
|
+
|
|
19
|
+
from tools.procesio.errors import UsageError
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass
|
|
23
|
+
class Component:
|
|
24
|
+
name: str
|
|
25
|
+
description: str
|
|
26
|
+
dir: Path
|
|
27
|
+
build: Callable[[dict, dict], Any] # (config, ctx) -> DTO (PURE, no I/O)
|
|
28
|
+
create_endpoint: tuple # (method, path) for the default create
|
|
29
|
+
get_path: str # GET template, "{id}" placeholder
|
|
30
|
+
extract_id: Callable[[Any, Any], Any] # (create_response, dto) -> id
|
|
31
|
+
prepare_ctx: Callable[[Any, dict], dict] | None = None # (client, config) -> ctx (impure)
|
|
32
|
+
create: Callable[[Any, Any, dict], Any] | None = None # override (client, dto, ctx) -> resp
|
|
33
|
+
edit: Callable[[Any, Any, dict, dict], Any] | None = None # (client, id, config, ctx) -> resp
|
|
34
|
+
validate: Callable[[Any, Any, dict], Any] | None = None # oracle (client, dto, ctx) -> resp|None
|
|
35
|
+
save_gate: Callable[[Any, Any, dict], Any] | None = None # pre-save gate (client, dto, ctx) -> report; raises on block
|
|
36
|
+
edit_ctx: Callable[[Any, Any, dict, dict], dict] | None = None # (client, id, config, ctx) -> ctx enriched from the LIVE resource
|
|
37
|
+
# Name of a PATCH-style action for this component, when one exists (it deep-merges
|
|
38
|
+
# instead of rebuilding). `<name>-edit` truthfully says there is no add/insert call,
|
|
39
|
+
# and a caller that reads only that will rebuild the whole definition to move one
|
|
40
|
+
# field - correct, but needlessly destructive when a patch would do. Declared rather
|
|
41
|
+
# than guessed from the action name, so a component without one says nothing.
|
|
42
|
+
patch_action: str = ""
|
|
43
|
+
# Name of an action that SPLICES one item into a live resource, when one exists.
|
|
44
|
+
# Same reason as patch_action: "there is no add/insert call" is the right thing to
|
|
45
|
+
# say for a component that has none, and a lie for one that does.
|
|
46
|
+
add_action: str = ""
|
|
47
|
+
# Non-blocking warnings for a built DTO or a fetched resource, attached to
|
|
48
|
+
# <name>-create / <name>-edit output as `warnings`. Never raises, never blocks.
|
|
49
|
+
lint: Callable[[Any], list] | None = None
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def schema_path(self) -> Path:
|
|
53
|
+
return self.dir / "config.schema.json"
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def template_path(self) -> Path:
|
|
57
|
+
return self.dir / "template.dto.json"
|
|
58
|
+
|
|
59
|
+
def load_schema(self) -> dict:
|
|
60
|
+
return json.loads(self.schema_path.read_text(encoding="utf-8"))
|
|
61
|
+
|
|
62
|
+
def load_template(self) -> Any:
|
|
63
|
+
return json.loads(self.template_path.read_text(encoding="utf-8"))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def validate_config(component: Component, config: Any) -> None:
|
|
67
|
+
"""Validate `config` against the component JSON Schema, listing every
|
|
68
|
+
violation (fail-fast — the design note's reliability anchor)."""
|
|
69
|
+
from jsonschema import Draft202012Validator
|
|
70
|
+
|
|
71
|
+
validator = Draft202012Validator(component.load_schema())
|
|
72
|
+
errors = sorted(validator.iter_errors(config), key=lambda e: list(e.path))
|
|
73
|
+
if errors:
|
|
74
|
+
msgs = []
|
|
75
|
+
for e in errors[:25]:
|
|
76
|
+
loc = "/".join(str(p) for p in e.path) or "(root)"
|
|
77
|
+
msgs.append(f"{loc}: {e.message}")
|
|
78
|
+
raise UsageError(
|
|
79
|
+
f"config does not satisfy the {component.name} schema:\n - "
|
|
80
|
+
+ "\n - ".join(msgs)
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# -- orchestration (used by the handler) ---------------------------------------
|
|
85
|
+
|
|
86
|
+
def prepare(component: Component, client, config: dict) -> dict:
|
|
87
|
+
return component.prepare_ctx(client, config) if component.prepare_ctx else {}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def build_dto(component: Component, config: dict, ctx: dict) -> Any:
|
|
91
|
+
validate_config(component, config)
|
|
92
|
+
return component.build(config, ctx)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def build_edit_dto(component: Component, client, resource_id, config: dict, ctx: dict) -> Any:
|
|
96
|
+
"""The DTO an EDIT would write — the same one `component.edit` builds, not a create's.
|
|
97
|
+
|
|
98
|
+
An edit's preview has to be built through the component's own `edit_ctx`, which is what carries
|
|
99
|
+
over everything the live resource already owns. For a process that is the VARIABLE IDS (reused
|
|
100
|
+
by name) and the canvas positions: a variable is referenced by GUID from outside the process, so
|
|
101
|
+
"do the ids survive?" is the question a dry-run exists to answer, and building the preview from
|
|
102
|
+
the config alone answers it wrongly. A live resource that cannot be read falls back to a plain
|
|
103
|
+
build rather than refusing to preview at all.
|
|
104
|
+
"""
|
|
105
|
+
if component.edit_ctx:
|
|
106
|
+
try:
|
|
107
|
+
ctx = component.edit_ctx(client, resource_id, config, ctx)
|
|
108
|
+
except Exception: # noqa: BLE001 - unreadable live resource -> preview what we can
|
|
109
|
+
pass
|
|
110
|
+
return build_dto(component, config, ctx)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def run_create(component: Component, client, dto: Any, ctx: dict) -> Any:
|
|
114
|
+
if component.create:
|
|
115
|
+
return component.create(client, dto, ctx)
|
|
116
|
+
method, path = component.create_endpoint
|
|
117
|
+
return client.request(method, path, body=dto)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def run_validate(component: Component, client, dto: Any, ctx: dict) -> Any:
|
|
121
|
+
return component.validate(client, dto, ctx) if component.validate else None
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def run_get(component: Component, client, resource_id: Any, ctx: dict) -> Any:
|
|
125
|
+
return client.get(component.get_path.format(id=resource_id))
|