sage-run 1.0.0__tar.gz
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.
- sage_run-1.0.0/.dockerignore +18 -0
- sage_run-1.0.0/.github/copilot-instructions.md +19 -0
- sage_run-1.0.0/.github/workflows/ci.yml +97 -0
- sage_run-1.0.0/.github/workflows/release.yml +272 -0
- sage_run-1.0.0/.gitignore +25 -0
- sage_run-1.0.0/CLAUDE.md +31 -0
- sage_run-1.0.0/CONTRIBUTING.md +67 -0
- sage_run-1.0.0/LICENSE +82 -0
- sage_run-1.0.0/Makefile +130 -0
- sage_run-1.0.0/PKG-INFO +163 -0
- sage_run-1.0.0/README.md +115 -0
- sage_run-1.0.0/SECURITY.md +14 -0
- sage_run-1.0.0/connectors/gcp-pubsub-connector/Dockerfile +16 -0
- sage_run-1.0.0/connectors/gcp-pubsub-connector/main.py +419 -0
- sage_run-1.0.0/connectors/servicenow-connector/Dockerfile +20 -0
- sage_run-1.0.0/connectors/servicenow-connector/main.py +285 -0
- sage_run-1.0.0/control-plane-ui/.dockerignore +6 -0
- sage_run-1.0.0/control-plane-ui/Dockerfile +13 -0
- sage_run-1.0.0/control-plane-ui/biome.json +35 -0
- sage_run-1.0.0/control-plane-ui/next-env.d.ts +6 -0
- sage_run-1.0.0/control-plane-ui/next.config.js +6 -0
- sage_run-1.0.0/control-plane-ui/package-lock.json +4929 -0
- sage_run-1.0.0/control-plane-ui/package.json +42 -0
- sage_run-1.0.0/control-plane-ui/postcss.config.js +6 -0
- sage_run-1.0.0/control-plane-ui/src/app/analytics/page.tsx +314 -0
- sage_run-1.0.0/control-plane-ui/src/app/api/[...path]/route.ts +20 -0
- sage_run-1.0.0/control-plane-ui/src/app/approvals/page.tsx +238 -0
- sage_run-1.0.0/control-plane-ui/src/app/background-jobs/page.tsx +468 -0
- sage_run-1.0.0/control-plane-ui/src/app/connectors/page.tsx +179 -0
- sage_run-1.0.0/control-plane-ui/src/app/globals.css +146 -0
- sage_run-1.0.0/control-plane-ui/src/app/healthz/route.ts +27 -0
- sage_run-1.0.0/control-plane-ui/src/app/icon.svg +8 -0
- sage_run-1.0.0/control-plane-ui/src/app/knowledge-sources/[sourceId]/page.tsx +320 -0
- sage_run-1.0.0/control-plane-ui/src/app/knowledge-sources/page.tsx +220 -0
- sage_run-1.0.0/control-plane-ui/src/app/layout.tsx +30 -0
- sage_run-1.0.0/control-plane-ui/src/app/mcp/page.tsx +233 -0
- sage_run-1.0.0/control-plane-ui/src/app/memory/page.tsx +1043 -0
- sage_run-1.0.0/control-plane-ui/src/app/page.tsx +143 -0
- sage_run-1.0.0/control-plane-ui/src/app/platform/page.tsx +5 -0
- sage_run-1.0.0/control-plane-ui/src/app/schedules/page.tsx +172 -0
- sage_run-1.0.0/control-plane-ui/src/app/tasks/[taskId]/page.tsx +1329 -0
- sage_run-1.0.0/control-plane-ui/src/app/tasks/page.tsx +1026 -0
- sage_run-1.0.0/control-plane-ui/src/app/webhooks/[...path]/route.ts +20 -0
- sage_run-1.0.0/control-plane-ui/src/app/workflows/[name]/page.tsx +173 -0
- sage_run-1.0.0/control-plane-ui/src/app/workflows/page.tsx +317 -0
- sage_run-1.0.0/control-plane-ui/src/components/content-preview.tsx +130 -0
- sage_run-1.0.0/control-plane-ui/src/components/expandable-meta.tsx +30 -0
- sage_run-1.0.0/control-plane-ui/src/components/knowledge-source-form.tsx +411 -0
- sage_run-1.0.0/control-plane-ui/src/components/plugin-preview.tsx +536 -0
- sage_run-1.0.0/control-plane-ui/src/components/task-initiator.tsx +11 -0
- sage_run-1.0.0/control-plane-ui/src/components/theme-provider.tsx +49 -0
- sage_run-1.0.0/control-plane-ui/src/components/top-nav.tsx +329 -0
- sage_run-1.0.0/control-plane-ui/src/components/workflows-list-section.tsx +133 -0
- sage_run-1.0.0/control-plane-ui/src/lib/agent-model.ts +50 -0
- sage_run-1.0.0/control-plane-ui/src/lib/api.ts +540 -0
- sage_run-1.0.0/control-plane-ui/src/lib/gateway-proxy.ts +58 -0
- sage_run-1.0.0/control-plane-ui/src/lib/workflow-format.ts +10 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/analytics.ts +95 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/approvals.ts +94 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/background-jobs.ts +136 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/connectors.ts +93 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/index.ts +492 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/knowledge-sources.ts +589 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/mcp-catalog.ts +332 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/memories.ts +464 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/schedules.ts +52 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/sessions.ts +1364 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/tasks.ts +297 -0
- sage_run-1.0.0/control-plane-ui/src/mock-data/workflows.ts +710 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/app.tsx +18 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/entry.tsx +16 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/index.html +13 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/mock-adapter.ts +34 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/navigation.tsx +96 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/next-link-shim.tsx +1 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/next-navigation-shim.ts +6 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/router.tsx +86 -0
- sage_run-1.0.0/control-plane-ui/src/standalone/vite.config.mts +28 -0
- sage_run-1.0.0/control-plane-ui/tailwind.config.js +39 -0
- sage_run-1.0.0/control-plane-ui/tests/knowledge-source-contracts.test.cjs +251 -0
- sage_run-1.0.0/control-plane-ui/tsconfig.json +40 -0
- sage_run-1.0.0/deploy/docker-compose.yml +496 -0
- sage_run-1.0.0/digests/agent-runtime +1 -0
- sage_run-1.0.0/digests/control-plane-ui +1 -0
- sage_run-1.0.0/digests/gateway +1 -0
- sage_run-1.0.0/digests/gcp-pubsub-connector +1 -0
- sage_run-1.0.0/digests/knowledge-indexer +1 -0
- sage_run-1.0.0/digests/mcp +1 -0
- sage_run-1.0.0/digests/servicenow-connector +1 -0
- sage_run-1.0.0/digests/session-manager +1 -0
- sage_run-1.0.0/docs/architecture.md +121 -0
- sage_run-1.0.0/docs/configuration.md +780 -0
- sage_run-1.0.0/docs/connectors.md +210 -0
- sage_run-1.0.0/docs/deployment.md +516 -0
- sage_run-1.0.0/docs/mcps.md +397 -0
- sage_run-1.0.0/docs/memory.md +116 -0
- sage_run-1.0.0/docs/security.md +310 -0
- sage_run-1.0.0/docs/workflow-authoring.md +305 -0
- sage_run-1.0.0/examples/workflow-repo/Makefile +33 -0
- sage_run-1.0.0/examples/workflow-repo/README.md +129 -0
- sage_run-1.0.0/examples/workflow-repo/connectors/README.md +49 -0
- sage_run-1.0.0/examples/workflow-repo/connectors/custom-connector-example/main.py +110 -0
- sage_run-1.0.0/examples/workflow-repo/deploy/README.md +57 -0
- sage_run-1.0.0/examples/workflow-repo/deploy/compose.env.example +21 -0
- sage_run-1.0.0/examples/workflow-repo/deploy/docker-compose.override.yml +51 -0
- sage_run-1.0.0/examples/workflow-repo/litellm.config.example.yaml +15 -0
- sage_run-1.0.0/examples/workflow-repo/mcps/README.md +72 -0
- sage_run-1.0.0/examples/workflow-repo/mcps/custom-mcp-example/mcp_custom_example.py +66 -0
- sage_run-1.0.0/examples/workflow-repo/platform-config.yaml +243 -0
- sage_run-1.0.0/examples/workflow-repo/skills/README.md +28 -0
- sage_run-1.0.0/examples/workflow-repo/skills/custom-skill-example/SKILL.md +26 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/.mcp.json +50 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/README.md +107 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/agent.yaml +88 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/agents/coordinator.md +35 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/hooks/hooks.json +3 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/settings.json +50 -0
- sage_run-1.0.0/examples/workflow-repo/workflows/example-workflow/skills/example-skill/SKILL.md +8 -0
- sage_run-1.0.0/gateway/Dockerfile +31 -0
- sage_run-1.0.0/gateway/__init__.py +0 -0
- sage_run-1.0.0/gateway/api.py +2490 -0
- sage_run-1.0.0/gateway/approval_broker.py +300 -0
- sage_run-1.0.0/gateway/event_collector.py +253 -0
- sage_run-1.0.0/gateway/main.py +87 -0
- sage_run-1.0.0/gateway/message.py +203 -0
- sage_run-1.0.0/gateway/message_ingress.py +559 -0
- sage_run-1.0.0/gateway/plugin_dir.py +264 -0
- sage_run-1.0.0/gateway/provisioner.py +173 -0
- sage_run-1.0.0/gateway/scheduler.py +216 -0
- sage_run-1.0.0/hooks/__init__.py +0 -0
- sage_run-1.0.0/hooks/auto_recall_hook.py +223 -0
- sage_run-1.0.0/hooks/retain_incident_hook.py +369 -0
- sage_run-1.0.0/knowledge-indexer/Dockerfile +21 -0
- sage_run-1.0.0/knowledge-indexer/__init__.py +1 -0
- sage_run-1.0.0/knowledge-indexer/main.py +182 -0
- sage_run-1.0.0/mcps/Dockerfile +13 -0
- sage_run-1.0.0/mcps/__init__.py +0 -0
- sage_run-1.0.0/mcps/common.py +60 -0
- sage_run-1.0.0/mcps/core/__init__.py +1 -0
- sage_run-1.0.0/mcps/core/mcp_knowledge.py +317 -0
- sage_run-1.0.0/mcps/core/mcp_memory.py +201 -0
- sage_run-1.0.0/mcps/core/mcp_message.py +288 -0
- sage_run-1.0.0/mcps/core/mcp_platform.py +204 -0
- sage_run-1.0.0/mcps/evidence.py +109 -0
- sage_run-1.0.0/mcps/integrations/__init__.py +1 -0
- sage_run-1.0.0/mcps/integrations/mcp_cloudwatch.py +769 -0
- sage_run-1.0.0/mcps/integrations/mcp_gcp_logging.py +412 -0
- sage_run-1.0.0/mcps/integrations/mcp_github.py +578 -0
- sage_run-1.0.0/mcps/integrations/mcp_jira.py +166 -0
- sage_run-1.0.0/mcps/integrations/mcp_salesforce.py +1103 -0
- sage_run-1.0.0/mcps/integrations/mcp_splunk.py +464 -0
- sage_run-1.0.0/mcps/requirements.txt +12 -0
- sage_run-1.0.0/pyproject.toml +104 -0
- sage_run-1.0.0/release.json +14 -0
- sage_run-1.0.0/runtime/Dockerfile +92 -0
- sage_run-1.0.0/runtime/requirements.txt +3 -0
- sage_run-1.0.0/runtime/session_entrypoint.py +2241 -0
- sage_run-1.0.0/sage_run/__init__.py +1 -0
- sage_run-1.0.0/sage_run/__main__.py +5 -0
- sage_run-1.0.0/sage_run/bootstrap.py +293 -0
- sage_run-1.0.0/sage_run/chart/Chart.yaml +6 -0
- sage_run-1.0.0/sage_run/chart/files/init_db.sql +339 -0
- sage_run-1.0.0/sage_run/chart/templates/_helpers.tpl +106 -0
- sage_run-1.0.0/sage_run/chart/templates/connectors.yaml +38 -0
- sage_run-1.0.0/sage_run/chart/templates/control-plane-ui.yaml +67 -0
- sage_run-1.0.0/sage_run/chart/templates/gateway.yaml +62 -0
- sage_run-1.0.0/sage_run/chart/templates/infrastructure.yaml +257 -0
- sage_run-1.0.0/sage_run/chart/templates/knowledge-cache-pvc.yaml +14 -0
- sage_run-1.0.0/sage_run/chart/templates/knowledge-indexer.yaml +38 -0
- sage_run-1.0.0/sage_run/chart/templates/mcps.yaml +68 -0
- sage_run-1.0.0/sage_run/chart/templates/rbac.yaml +29 -0
- sage_run-1.0.0/sage_run/chart/templates/session-manager.yaml +52 -0
- sage_run-1.0.0/sage_run/chart/templates/workflow-mcps.yaml +59 -0
- sage_run-1.0.0/sage_run/chart/values.yaml +128 -0
- sage_run-1.0.0/sage_run/cli.py +151 -0
- sage_run-1.0.0/sage_run/keys.py +79 -0
- sage_run-1.0.0/sage_run/local.py +475 -0
- sage_run-1.0.0/sage_run/profiles.py +48 -0
- sage_run-1.0.0/sage_run/remote.py +261 -0
- sage_run-1.0.0/sage_run/resources/release.json +14 -0
- sage_run-1.0.0/sage_run/validation.py +149 -0
- sage_run-1.0.0/schemas/__init__.py +1 -0
- sage_run-1.0.0/schemas/agent-yaml-schema.json +365 -0
- sage_run-1.0.0/scripts/__init__.py +0 -0
- sage_run-1.0.0/scripts/backfill_hindsight.py +158 -0
- sage_run-1.0.0/scripts/build_workflow_bundle.py +48 -0
- sage_run-1.0.0/scripts/create_github_app.py +251 -0
- sage_run-1.0.0/scripts/set_secret.py +229 -0
- sage_run-1.0.0/session-manager/Dockerfile +29 -0
- sage_run-1.0.0/session-manager/__init__.py +0 -0
- sage_run-1.0.0/session-manager/container_lifecycle.py +693 -0
- sage_run-1.0.0/session-manager/heartbeat.py +316 -0
- sage_run-1.0.0/session-manager/housekeeping.py +88 -0
- sage_run-1.0.0/session-manager/main.py +173 -0
- sage_run-1.0.0/session-manager/memory_sync.py +384 -0
- sage_run-1.0.0/session-manager/runtime_launchers.py +486 -0
- sage_run-1.0.0/session-manager/workflow_config.py +22 -0
- sage_run-1.0.0/shared/__init__.py +0 -0
- sage_run-1.0.0/shared/lib/__init__.py +0 -0
- sage_run-1.0.0/shared/lib/alert_envelope.py +100 -0
- sage_run-1.0.0/shared/lib/approvals.py +191 -0
- sage_run-1.0.0/shared/lib/background_jobs.py +220 -0
- sage_run-1.0.0/shared/lib/config.py +179 -0
- sage_run-1.0.0/shared/lib/connections.py +143 -0
- sage_run-1.0.0/shared/lib/connector_state.py +25 -0
- sage_run-1.0.0/shared/lib/crypto.py +261 -0
- sage_run-1.0.0/shared/lib/db.py +302 -0
- sage_run-1.0.0/shared/lib/github_app.py +172 -0
- sage_run-1.0.0/shared/lib/health_server.py +39 -0
- sage_run-1.0.0/shared/lib/housekeeping.py +496 -0
- sage_run-1.0.0/shared/lib/init_db.sql +339 -0
- sage_run-1.0.0/shared/lib/knowledge_source_authorization.py +84 -0
- sage_run-1.0.0/shared/lib/knowledge_source_cache.py +295 -0
- sage_run-1.0.0/shared/lib/knowledge_source_confluence.py +659 -0
- sage_run-1.0.0/shared/lib/knowledge_source_embeddings.py +133 -0
- sage_run-1.0.0/shared/lib/knowledge_source_graphify.py +470 -0
- sage_run-1.0.0/shared/lib/knowledge_source_hybrid_index.py +490 -0
- sage_run-1.0.0/shared/lib/knowledge_source_hybrid_retrieval.py +351 -0
- sage_run-1.0.0/shared/lib/knowledge_source_indexer.py +720 -0
- sage_run-1.0.0/shared/lib/knowledge_source_publication.py +223 -0
- sage_run-1.0.0/shared/lib/knowledge_source_scrubbing.py +89 -0
- sage_run-1.0.0/shared/lib/knowledge_source_serving.py +690 -0
- sage_run-1.0.0/shared/lib/mattermost_api.py +317 -0
- sage_run-1.0.0/shared/lib/memory_catalog.py +43 -0
- sage_run-1.0.0/shared/lib/message_bus.py +212 -0
- sage_run-1.0.0/shared/lib/message_ingress.py +308 -0
- sage_run-1.0.0/shared/lib/models.py +500 -0
- sage_run-1.0.0/shared/lib/object_store.py +253 -0
- sage_run-1.0.0/shared/lib/platform_config.py +90 -0
- sage_run-1.0.0/shared/lib/platform_secrets.py +687 -0
- sage_run-1.0.0/shared/lib/plugin_validation.py +61 -0
- sage_run-1.0.0/shared/lib/slack_api.py +217 -0
- sage_run-1.0.0/shared/lib/task_call_budget.py +38 -0
- sage_run-1.0.0/shared/lib/task_queue.py +629 -0
- sage_run-1.0.0/shared/lib/trace_tree.py +782 -0
- sage_run-1.0.0/shared/lib/workflow_bundles.py +398 -0
- sage_run-1.0.0/shared/lib/workflow_paths.py +248 -0
- sage_run-1.0.0/shared/lib/workflow_repo_sync.py +305 -0
- sage_run-1.0.0/skills/large-result-handling/SKILL.md +58 -0
- sage_run-1.0.0/skills/message-communication/SKILL.md +134 -0
- sage_run-1.0.0/skills/reflect/SKILL.md +94 -0
- sage_run-1.0.0/skills/splunk-queries/SKILL.md +130 -0
- sage_run-1.0.0/tests/COVERAGE.md +396 -0
- sage_run-1.0.0/tests/README.md +169 -0
- sage_run-1.0.0/tests/__init__.py +0 -0
- sage_run-1.0.0/tests/conftest.py +193 -0
- sage_run-1.0.0/tests/fakes/__init__.py +1 -0
- sage_run-1.0.0/tests/fakes/hindsight.py +127 -0
- sage_run-1.0.0/tests/fakes/mcp_testserver.py +178 -0
- sage_run-1.0.0/tests/fakes/message.py +262 -0
- sage_run-1.0.0/tests/fakes/mock_llm.py +380 -0
- sage_run-1.0.0/tests/fixtures/knowledge-mcp-container/platform-config.yaml +1 -0
- sage_run-1.0.0/tests/fixtures/knowledge-mcp-container/workflows/platform-test/.mcp.json +8 -0
- sage_run-1.0.0/tests/fixtures/knowledge-mcp-container/workflows/platform-test/agent.yaml +2 -0
- sage_run-1.0.0/tests/fixtures/repo-root/shared/CLAUDE.md +13 -0
- sage_run-1.0.0/tests/fixtures/repo-root/shared/platform-config.yaml +56 -0
- sage_run-1.0.0/tests/fixtures/repo-root/shared/skills/test-shared-skill/SKILL.md +8 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/.mcp.json +49 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/CLAUDE.md +10 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/README.md +17 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/agent.yaml +49 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/agents/helper.md +11 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/agents/test-coordinator.md +20 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/hooks/hooks.json +48 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/hooks/test_pretool_hook.py +55 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/hooks/test_prompt_hook.py +60 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/hooks/test_subagent_stop_hook.py +50 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/settings.json +41 -0
- sage_run-1.0.0/tests/fixtures/repo-root/workflows/platform-test/skills/test-skill/SKILL.md +11 -0
- sage_run-1.0.0/tests/runtime/README.md +76 -0
- sage_run-1.0.0/tests/runtime/__init__.py +6 -0
- sage_run-1.0.0/tests/runtime/conftest.py +927 -0
- sage_run-1.0.0/tests/runtime/scenarios/__init__.py +56 -0
- sage_run-1.0.0/tests/runtime/test_approval_scenario.py +297 -0
- sage_run-1.0.0/tests/runtime/test_bundle_transport_scenario.py +77 -0
- sage_run-1.0.0/tests/runtime/test_credentials_and_telemetry_scenario.py +332 -0
- sage_run-1.0.0/tests/runtime/test_happy_path_scenario.py +122 -0
- sage_run-1.0.0/tests/runtime/test_hooks_scenario.py +217 -0
- sage_run-1.0.0/tests/runtime/test_instruction_surface_scenario.py +418 -0
- sage_run-1.0.0/tests/runtime/test_knowledge_mcp_container.py +320 -0
- sage_run-1.0.0/tests/runtime/test_lifecycle_scenario.py +368 -0
- sage_run-1.0.0/tests/runtime/test_mcp_header_scenario.py +76 -0
- sage_run-1.0.0/tests/runtime/test_mcp_variants_scenario.py +227 -0
- sage_run-1.0.0/tests/runtime/test_memory_scenario.py +262 -0
- sage_run-1.0.0/tests/runtime/test_subagent_and_questions_scenario.py +582 -0
- sage_run-1.0.0/tests/runtime/test_timeout_scenario.py +76 -0
- sage_run-1.0.0/tests/service/__init__.py +4 -0
- sage_run-1.0.0/tests/service/conftest.py +167 -0
- sage_run-1.0.0/tests/service/test_background_jobs.py +92 -0
- sage_run-1.0.0/tests/service/test_concurrent_approvals.py +193 -0
- sage_run-1.0.0/tests/service/test_confluence_source_api.py +284 -0
- sage_run-1.0.0/tests/service/test_control_plane_api.py +97 -0
- sage_run-1.0.0/tests/service/test_event_collector.py +249 -0
- sage_run-1.0.0/tests/service/test_gateway_api.py +257 -0
- sage_run-1.0.0/tests/service/test_gateway_approval_actions.py +136 -0
- sage_run-1.0.0/tests/service/test_housekeeping.py +130 -0
- sage_run-1.0.0/tests/service/test_knowledge_hybrid_mcp.py +443 -0
- sage_run-1.0.0/tests/service/test_knowledge_source_api.py +93 -0
- sage_run-1.0.0/tests/service/test_knowledge_source_hybrid_sync.py +793 -0
- sage_run-1.0.0/tests/service/test_knowledge_sources.py +188 -0
- sage_run-1.0.0/tests/service/test_knowledge_vector_retention.py +277 -0
- sage_run-1.0.0/tests/service/test_platform_catalogs.py +191 -0
- sage_run-1.0.0/tests/service/test_provisioner.py +52 -0
- sage_run-1.0.0/tests/service/test_runtime_timeout_wait_accounting.py +86 -0
- sage_run-1.0.0/tests/service/test_scheduler_and_pause.py +192 -0
- sage_run-1.0.0/tests/service/test_task_queue.py +349 -0
- sage_run-1.0.0/tests/service/test_workflow_repo_endpoints.py +144 -0
- sage_run-1.0.0/tests/service/test_workflow_repo_sync_state.py +87 -0
- sage_run-1.0.0/tests/unit/__init__.py +1 -0
- sage_run-1.0.0/tests/unit/test_alert_envelope.py +76 -0
- sage_run-1.0.0/tests/unit/test_approval_broker.py +118 -0
- sage_run-1.0.0/tests/unit/test_approvals_helpers.py +24 -0
- sage_run-1.0.0/tests/unit/test_auto_recall_hook.py +161 -0
- sage_run-1.0.0/tests/unit/test_bootstrap_script.py +481 -0
- sage_run-1.0.0/tests/unit/test_budget_reminder.py +364 -0
- sage_run-1.0.0/tests/unit/test_cloudwatch_mcp.py +581 -0
- sage_run-1.0.0/tests/unit/test_compose_profiles.py +41 -0
- sage_run-1.0.0/tests/unit/test_config.py +28 -0
- sage_run-1.0.0/tests/unit/test_confluence_configuration.py +489 -0
- sage_run-1.0.0/tests/unit/test_connections_and_overlays.py +184 -0
- sage_run-1.0.0/tests/unit/test_connector_instance_loaders.py +116 -0
- sage_run-1.0.0/tests/unit/test_connectors_and_memory_helpers.py +313 -0
- sage_run-1.0.0/tests/unit/test_container_lifecycle_helpers.py +292 -0
- sage_run-1.0.0/tests/unit/test_create_github_app_script.py +206 -0
- sage_run-1.0.0/tests/unit/test_crypto_roundtrip.py +56 -0
- sage_run-1.0.0/tests/unit/test_event_collector_helpers.py +83 -0
- sage_run-1.0.0/tests/unit/test_fakes.py +166 -0
- sage_run-1.0.0/tests/unit/test_gcp_logging_mcp.py +235 -0
- sage_run-1.0.0/tests/unit/test_gcp_pubsub_connector.py +306 -0
- sage_run-1.0.0/tests/unit/test_github_app.py +113 -0
- sage_run-1.0.0/tests/unit/test_github_mcp.py +242 -0
- sage_run-1.0.0/tests/unit/test_housekeeping.py +203 -0
- sage_run-1.0.0/tests/unit/test_identity_groups.py +60 -0
- sage_run-1.0.0/tests/unit/test_jira_mcp.py +52 -0
- sage_run-1.0.0/tests/unit/test_knowledge_indexer_worker.py +65 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_authorization.py +94 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_cache.py +128 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_confluence.py +370 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_embeddings.py +117 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_graphify.py +223 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_hybrid_index.py +423 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_hybrid_retrieval.py +240 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_indexer.py +80 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_migrations.py +495 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_models.py +118 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_publication.py +100 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_scrubbing.py +57 -0
- sage_run-1.0.0/tests/unit/test_knowledge_source_serving.py +310 -0
- sage_run-1.0.0/tests/unit/test_large_outputs.py +130 -0
- sage_run-1.0.0/tests/unit/test_local_instance.py +179 -0
- sage_run-1.0.0/tests/unit/test_mcp_evidence.py +27 -0
- sage_run-1.0.0/tests/unit/test_mcp_knowledge_budget.py +49 -0
- sage_run-1.0.0/tests/unit/test_mcp_platform.py +77 -0
- sage_run-1.0.0/tests/unit/test_memory_catalog.py +53 -0
- sage_run-1.0.0/tests/unit/test_memory_sync.py +186 -0
- sage_run-1.0.0/tests/unit/test_message_bus.py +254 -0
- sage_run-1.0.0/tests/unit/test_message_ingress.py +912 -0
- sage_run-1.0.0/tests/unit/test_message_mcp.py +35 -0
- sage_run-1.0.0/tests/unit/test_model_costs_seed.py +48 -0
- sage_run-1.0.0/tests/unit/test_model_profiles.py +105 -0
- sage_run-1.0.0/tests/unit/test_object_store.py +160 -0
- sage_run-1.0.0/tests/unit/test_platform_secrets.py +49 -0
- sage_run-1.0.0/tests/unit/test_plugin_dir.py +300 -0
- sage_run-1.0.0/tests/unit/test_release_workflow.py +121 -0
- sage_run-1.0.0/tests/unit/test_remote_deploy.py +81 -0
- sage_run-1.0.0/tests/unit/test_retain_incident_hook.py +101 -0
- sage_run-1.0.0/tests/unit/test_runtime_launchers.py +364 -0
- sage_run-1.0.0/tests/unit/test_salesforce_mcp.py +92 -0
- sage_run-1.0.0/tests/unit/test_sandbox_credential_denies.py +225 -0
- sage_run-1.0.0/tests/unit/test_sandbox_patterns.py +85 -0
- sage_run-1.0.0/tests/unit/test_scheduler_cron.py +26 -0
- sage_run-1.0.0/tests/unit/test_scheduler_dst.py +68 -0
- sage_run-1.0.0/tests/unit/test_servicenow_connector.py +207 -0
- sage_run-1.0.0/tests/unit/test_session_manager_priority.py +27 -0
- sage_run-1.0.0/tests/unit/test_set_secret.py +54 -0
- sage_run-1.0.0/tests/unit/test_splunk_mcp.py +377 -0
- sage_run-1.0.0/tests/unit/test_task_wait_accounting.py +39 -0
- sage_run-1.0.0/tests/unit/test_test_plugin_fixture.py +63 -0
- sage_run-1.0.0/tests/unit/test_trace_tree.py +179 -0
- sage_run-1.0.0/tests/unit/test_validate_workflow_repo_script.py +92 -0
- sage_run-1.0.0/tests/unit/test_workflow_bundles.py +190 -0
- sage_run-1.0.0/tests/unit/test_workflow_repo_sync.py +216 -0
- sage_run-1.0.0/uv.lock +4294 -0
- sage_run-1.0.0/workflows/.gitkeep +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Repository Guidelines
|
|
2
|
+
|
|
3
|
+
## Repository Boundary
|
|
4
|
+
|
|
5
|
+
- This is the public platform repository. It owns reusable platform logic, APIs, schemas, deployment machinery, generic documentation, and generic examples.
|
|
6
|
+
- Private workflow repositories own workflow packages and instance configuration, including deployment-specific integrations and encrypted secrets.
|
|
7
|
+
- Never add company-specific names, domains, identifiers, account data, secrets, or deployment configuration to this repository. Use neutral names and reserved example domains in fixtures and examples.
|
|
8
|
+
- Add or change generic example configuration only when needed to document a public platform contract.
|
|
9
|
+
|
|
10
|
+
## Implementation
|
|
11
|
+
|
|
12
|
+
- Choose one canonical implementation. Do not add fallbacks, parallel paths, or compatibility shims.
|
|
13
|
+
- When replacing behavior, scan for and remove stale code, tests, documentation, and configuration from the previous implementation.
|
|
14
|
+
- Keep documentation, schemas, and generic example configuration synchronized with every public contract change.
|
|
15
|
+
|
|
16
|
+
## Validation
|
|
17
|
+
|
|
18
|
+
- Run `make lint` after every implementation change.
|
|
19
|
+
- Run `make tests` after every implementation change. This must include unit, service, and runtime tests.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_call:
|
|
8
|
+
inputs:
|
|
9
|
+
runtime_diagnostics:
|
|
10
|
+
required: false
|
|
11
|
+
default: false
|
|
12
|
+
type: boolean
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
inputs:
|
|
15
|
+
runtime_diagnostics:
|
|
16
|
+
description: Print runtime container logs and slow-test durations
|
|
17
|
+
required: false
|
|
18
|
+
default: false
|
|
19
|
+
type: boolean
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
|
|
24
|
+
concurrency:
|
|
25
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
26
|
+
cancel-in-progress: true
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
lint-and-test:
|
|
30
|
+
name: Lint and full test suite
|
|
31
|
+
runs-on: ubuntu-24.04
|
|
32
|
+
timeout-minutes: 20
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- name: Check out repository
|
|
36
|
+
uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- name: Set up Python
|
|
39
|
+
uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.11"
|
|
42
|
+
|
|
43
|
+
- name: Set up uv
|
|
44
|
+
uses: astral-sh/setup-uv@v6
|
|
45
|
+
with:
|
|
46
|
+
enable-cache: true
|
|
47
|
+
|
|
48
|
+
- name: Set up Node.js
|
|
49
|
+
uses: actions/setup-node@v4
|
|
50
|
+
with:
|
|
51
|
+
node-version: 22
|
|
52
|
+
cache: npm
|
|
53
|
+
cache-dependency-path: control-plane-ui/package-lock.json
|
|
54
|
+
|
|
55
|
+
- name: Set up Docker Buildx
|
|
56
|
+
uses: docker/setup-buildx-action@v3
|
|
57
|
+
|
|
58
|
+
- name: Install dependencies
|
|
59
|
+
run: |
|
|
60
|
+
uv sync --frozen --extra dev --extra server --extra kubernetes
|
|
61
|
+
npm --prefix control-plane-ui ci
|
|
62
|
+
|
|
63
|
+
- name: Verify installed operator wheel
|
|
64
|
+
run: |
|
|
65
|
+
uv build --wheel --out-dir "$RUNNER_TEMP/sage-run-dist"
|
|
66
|
+
uv venv "$RUNNER_TEMP/sage-run-operator" --python 3.11
|
|
67
|
+
uv pip install --python "$RUNNER_TEMP/sage-run-operator/bin/python" "$RUNNER_TEMP"/sage-run-dist/*.whl
|
|
68
|
+
"$RUNNER_TEMP/sage-run-operator/bin/python" -I -m sage_run --version
|
|
69
|
+
mkdir -p "$RUNNER_TEMP/sage-run-workflows/workflows"
|
|
70
|
+
cp -R "$GITHUB_WORKSPACE/tests/fixtures/repo-root/workflows/platform-test" "$RUNNER_TEMP/sage-run-workflows/workflows/platform-test"
|
|
71
|
+
"$RUNNER_TEMP/sage-run-operator/bin/python" -I -m sage_run validate "$RUNNER_TEMP/sage-run-workflows"
|
|
72
|
+
printf 'mcps: {enabled: [github]}\n' > "$RUNNER_TEMP/sage-run-workflows/platform-config.yaml"
|
|
73
|
+
test "$("$RUNNER_TEMP/sage-run-operator/bin/python" -I -m sage_run profiles "$RUNNER_TEMP/sage-run-workflows")" = github
|
|
74
|
+
"$RUNNER_TEMP/sage-run-operator/bin/python" -I -c "from importlib.util import find_spec; assert find_spec('claude_agent_sdk') is None; assert find_spec('gateway') is None"
|
|
75
|
+
|
|
76
|
+
- name: Lint
|
|
77
|
+
run: make lint
|
|
78
|
+
|
|
79
|
+
- name: Build a service image
|
|
80
|
+
run: docker buildx build --load -t sage-run-gateway:ci -f gateway/Dockerfile .
|
|
81
|
+
|
|
82
|
+
- name: Lint and render Helm chart
|
|
83
|
+
run: |
|
|
84
|
+
helm lint sage_run/chart --set workflowRepo.hostPath=/workflows
|
|
85
|
+
helm template sage-run sage_run/chart --set workflowRepo.hostPath=/workflows >/dev/null
|
|
86
|
+
|
|
87
|
+
- name: Run full test suite
|
|
88
|
+
run: >-
|
|
89
|
+
make tests
|
|
90
|
+
SANDBOX_MODE=gha
|
|
91
|
+
PYTEST_FLAGS="-vv -ra${{ inputs.runtime_diagnostics && ' --durations=25' || '' }}"
|
|
92
|
+
env:
|
|
93
|
+
PYTHONUNBUFFERED: "1"
|
|
94
|
+
RUNTIME_TEST_DEBUG: ${{ inputs.runtime_diagnostics && '1' || '0' }}
|
|
95
|
+
RUNTIME_BUILD: >-
|
|
96
|
+
docker buildx build --load --cache-from=type=gha
|
|
97
|
+
--cache-to=type=gha,mode=max
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
name: Publish release
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: release-${{ github.event.release.tag_name }}
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
version:
|
|
16
|
+
name: Resolve and check release version
|
|
17
|
+
runs-on: ubuntu-24.04
|
|
18
|
+
timeout-minutes: 5
|
|
19
|
+
outputs:
|
|
20
|
+
version: ${{ steps.version.outputs.version }}
|
|
21
|
+
sha: ${{ steps.version.outputs.sha }}
|
|
22
|
+
steps:
|
|
23
|
+
- name: Check out release tag
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
ref: ${{ github.event.release.tag_name }}
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
|
|
29
|
+
- name: Set up uv
|
|
30
|
+
uses: astral-sh/setup-uv@v6
|
|
31
|
+
|
|
32
|
+
- name: Validate release version
|
|
33
|
+
id: version
|
|
34
|
+
env:
|
|
35
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
version="$(uv version --short)"
|
|
39
|
+
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
40
|
+
printf 'Unsupported release version: %s\n' "$version" >&2
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
if [[ "$RELEASE_TAG" != "v$version" ]]; then
|
|
44
|
+
printf 'Release tag %s must match package version v%s\n' "$RELEASE_TAG" "$version" >&2
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
chart_matches="$(grep -Ec "^(version|appVersion): \"?$version\"?$" sage_run/chart/Chart.yaml || true)"
|
|
48
|
+
if [[ "$chart_matches" != 2 ]]; then
|
|
49
|
+
printf 'Chart.yaml version and appVersion must both be %s\n' "$version" >&2
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
if ! grep -Eq "^ \"version\": \"$version\",$" control-plane-ui/package.json; then
|
|
53
|
+
printf 'control-plane-ui/package.json version must be %s\n' "$version" >&2
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
printf 'version=%s\n' "$version" >> "$GITHUB_OUTPUT"
|
|
57
|
+
printf 'sha=%s\n' "$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
|
58
|
+
|
|
59
|
+
verify:
|
|
60
|
+
name: Verify release
|
|
61
|
+
needs: version
|
|
62
|
+
uses: ./.github/workflows/ci.yml
|
|
63
|
+
|
|
64
|
+
images:
|
|
65
|
+
name: Publish ${{ matrix.component }} image
|
|
66
|
+
needs: [version, verify]
|
|
67
|
+
runs-on: ubuntu-24.04
|
|
68
|
+
timeout-minutes: 150
|
|
69
|
+
permissions:
|
|
70
|
+
contents: read
|
|
71
|
+
packages: write
|
|
72
|
+
strategy:
|
|
73
|
+
fail-fast: false
|
|
74
|
+
matrix:
|
|
75
|
+
include:
|
|
76
|
+
- component: gateway
|
|
77
|
+
dockerfile: gateway/Dockerfile
|
|
78
|
+
- component: session-manager
|
|
79
|
+
dockerfile: session-manager/Dockerfile
|
|
80
|
+
- component: knowledge-indexer
|
|
81
|
+
dockerfile: knowledge-indexer/Dockerfile
|
|
82
|
+
- component: gcp-pubsub-connector
|
|
83
|
+
dockerfile: connectors/gcp-pubsub-connector/Dockerfile
|
|
84
|
+
- component: servicenow-connector
|
|
85
|
+
dockerfile: connectors/servicenow-connector/Dockerfile
|
|
86
|
+
- component: control-plane-ui
|
|
87
|
+
dockerfile: control-plane-ui/Dockerfile
|
|
88
|
+
context: control-plane-ui
|
|
89
|
+
- component: mcp
|
|
90
|
+
dockerfile: mcps/Dockerfile
|
|
91
|
+
- component: agent-runtime
|
|
92
|
+
dockerfile: runtime/Dockerfile
|
|
93
|
+
steps:
|
|
94
|
+
- name: Check out release commit
|
|
95
|
+
uses: actions/checkout@v4
|
|
96
|
+
with:
|
|
97
|
+
ref: ${{ needs.version.outputs.sha }}
|
|
98
|
+
persist-credentials: false
|
|
99
|
+
|
|
100
|
+
- name: Set up QEMU
|
|
101
|
+
uses: docker/setup-qemu-action@v3
|
|
102
|
+
with:
|
|
103
|
+
platforms: arm64
|
|
104
|
+
|
|
105
|
+
- name: Set up Docker Buildx
|
|
106
|
+
uses: docker/setup-buildx-action@v3
|
|
107
|
+
|
|
108
|
+
- name: Log in to GHCR
|
|
109
|
+
uses: docker/login-action@v3
|
|
110
|
+
with:
|
|
111
|
+
registry: ghcr.io
|
|
112
|
+
username: ${{ github.actor }}
|
|
113
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
114
|
+
|
|
115
|
+
- name: Build and push multi-platform image
|
|
116
|
+
id: build
|
|
117
|
+
uses: docker/build-push-action@v6
|
|
118
|
+
with:
|
|
119
|
+
context: ${{ matrix.context || '.' }}
|
|
120
|
+
file: ${{ matrix.dockerfile }}
|
|
121
|
+
platforms: linux/amd64,linux/arm64
|
|
122
|
+
push: true
|
|
123
|
+
tags: ghcr.io/${{ github.repository }}-${{ matrix.component }}:${{ needs.version.outputs.version }}
|
|
124
|
+
labels: |
|
|
125
|
+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
|
126
|
+
org.opencontainers.image.revision=${{ needs.version.outputs.sha }}
|
|
127
|
+
org.opencontainers.image.version=${{ needs.version.outputs.version }}
|
|
128
|
+
org.opencontainers.image.licenses=Apache-2.0
|
|
129
|
+
provenance: mode=max
|
|
130
|
+
sbom: true
|
|
131
|
+
cache-from: type=gha,scope=release-${{ matrix.component }}
|
|
132
|
+
cache-to: type=gha,mode=max,scope=release-${{ matrix.component }}
|
|
133
|
+
|
|
134
|
+
- name: Record image digest
|
|
135
|
+
env:
|
|
136
|
+
COMPONENT: ${{ matrix.component }}
|
|
137
|
+
REFERENCE: ghcr.io/${{ github.repository }}-${{ matrix.component }}:${{ needs.version.outputs.version }}@${{ steps.build.outputs.digest }}
|
|
138
|
+
run: |
|
|
139
|
+
mkdir -p digests
|
|
140
|
+
printf '%s' "$REFERENCE" > "digests/$COMPONENT"
|
|
141
|
+
|
|
142
|
+
- name: Store image digest
|
|
143
|
+
uses: actions/upload-artifact@v4
|
|
144
|
+
with:
|
|
145
|
+
name: digest-${{ matrix.component }}
|
|
146
|
+
path: digests/*
|
|
147
|
+
if-no-files-found: error
|
|
148
|
+
|
|
149
|
+
package:
|
|
150
|
+
name: Build Python distributions
|
|
151
|
+
needs: [version, images]
|
|
152
|
+
runs-on: ubuntu-24.04
|
|
153
|
+
timeout-minutes: 15
|
|
154
|
+
steps:
|
|
155
|
+
- name: Check out release commit
|
|
156
|
+
uses: actions/checkout@v4
|
|
157
|
+
with:
|
|
158
|
+
ref: ${{ needs.version.outputs.sha }}
|
|
159
|
+
persist-credentials: false
|
|
160
|
+
|
|
161
|
+
- name: Set up Python
|
|
162
|
+
uses: actions/setup-python@v5
|
|
163
|
+
with:
|
|
164
|
+
python-version: "3.11"
|
|
165
|
+
|
|
166
|
+
- name: Set up uv
|
|
167
|
+
uses: astral-sh/setup-uv@v6
|
|
168
|
+
|
|
169
|
+
- name: Download image digests
|
|
170
|
+
uses: actions/download-artifact@v4
|
|
171
|
+
with:
|
|
172
|
+
pattern: digest-*
|
|
173
|
+
merge-multiple: true
|
|
174
|
+
path: digests
|
|
175
|
+
|
|
176
|
+
- name: Write release manifest
|
|
177
|
+
env:
|
|
178
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
179
|
+
SHA: ${{ needs.version.outputs.sha }}
|
|
180
|
+
run: |
|
|
181
|
+
python - <<'EOF'
|
|
182
|
+
import json, os
|
|
183
|
+
from pathlib import Path
|
|
184
|
+
images = {path.name: path.read_text().strip() for path in sorted(Path("digests").iterdir())}
|
|
185
|
+
assert len(images) == 8, sorted(images)
|
|
186
|
+
manifest = {"version": os.environ["VERSION"], "git_commit": os.environ["SHA"], "images": images}
|
|
187
|
+
target = Path("sage_run/resources/release.json")
|
|
188
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
189
|
+
target.write_text(json.dumps(manifest, indent=2) + "\n")
|
|
190
|
+
Path("release.json").write_text(target.read_text())
|
|
191
|
+
print(target.read_text())
|
|
192
|
+
EOF
|
|
193
|
+
|
|
194
|
+
- name: Build wheel and source distribution
|
|
195
|
+
run: uv build --no-sources
|
|
196
|
+
|
|
197
|
+
- name: Check distribution metadata
|
|
198
|
+
run: uvx --from twine twine check --strict dist/*
|
|
199
|
+
|
|
200
|
+
- name: Verify installed operator wheel
|
|
201
|
+
env:
|
|
202
|
+
VERSION: ${{ needs.version.outputs.version }}
|
|
203
|
+
run: |
|
|
204
|
+
uv venv "$RUNNER_TEMP/sage-run-operator" --python 3.11
|
|
205
|
+
uv pip install --python "$RUNNER_TEMP/sage-run-operator/bin/python" dist/*.whl
|
|
206
|
+
cd "$RUNNER_TEMP"
|
|
207
|
+
"$RUNNER_TEMP/sage-run-operator/bin/python" -I -m sage_run --version
|
|
208
|
+
"$RUNNER_TEMP/sage-run-operator/bin/python" -I -c "
|
|
209
|
+
import os
|
|
210
|
+
from importlib.util import find_spec
|
|
211
|
+
from pathlib import Path
|
|
212
|
+
import sage_run
|
|
213
|
+
from sage_run.local import _chart_path, release_images
|
|
214
|
+
assert find_spec('claude_agent_sdk') is None and find_spec('gateway') is None
|
|
215
|
+
assert (Path(sage_run.__file__).parent / 'chart/Chart.yaml').is_file()
|
|
216
|
+
assert _chart_path(None) == Path(sage_run.__file__).parent / 'chart'
|
|
217
|
+
images = release_images(os.environ['VERSION'])
|
|
218
|
+
assert len(images['overrides']) == 8 and all('@sha256:' in ref for ref in images['overrides'].values())
|
|
219
|
+
"
|
|
220
|
+
|
|
221
|
+
- name: Store Python distributions
|
|
222
|
+
uses: actions/upload-artifact@v4
|
|
223
|
+
with:
|
|
224
|
+
name: python-distributions
|
|
225
|
+
path: |
|
|
226
|
+
dist/*
|
|
227
|
+
release.json
|
|
228
|
+
if-no-files-found: error
|
|
229
|
+
|
|
230
|
+
pypi:
|
|
231
|
+
name: Publish to PyPI
|
|
232
|
+
needs: [package]
|
|
233
|
+
runs-on: ubuntu-24.04
|
|
234
|
+
timeout-minutes: 10
|
|
235
|
+
environment:
|
|
236
|
+
name: pypi
|
|
237
|
+
url: https://pypi.org/p/sage-run
|
|
238
|
+
permissions:
|
|
239
|
+
id-token: write
|
|
240
|
+
steps:
|
|
241
|
+
- name: Download Python distributions
|
|
242
|
+
uses: actions/download-artifact@v4
|
|
243
|
+
with:
|
|
244
|
+
name: python-distributions
|
|
245
|
+
path: artifacts
|
|
246
|
+
|
|
247
|
+
- name: Select distributions
|
|
248
|
+
run: mkdir dist && mv artifacts/dist/* dist/
|
|
249
|
+
|
|
250
|
+
- name: Publish with Trusted Publishing
|
|
251
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
252
|
+
|
|
253
|
+
release-assets:
|
|
254
|
+
name: Attach release assets
|
|
255
|
+
needs: [version, pypi]
|
|
256
|
+
runs-on: ubuntu-24.04
|
|
257
|
+
timeout-minutes: 10
|
|
258
|
+
permissions:
|
|
259
|
+
contents: write
|
|
260
|
+
steps:
|
|
261
|
+
- name: Download Python distributions
|
|
262
|
+
uses: actions/download-artifact@v4
|
|
263
|
+
with:
|
|
264
|
+
name: python-distributions
|
|
265
|
+
path: artifacts
|
|
266
|
+
|
|
267
|
+
- name: Attach wheel, source distribution and release manifest
|
|
268
|
+
env:
|
|
269
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
270
|
+
GH_REPO: ${{ github.repository }}
|
|
271
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
272
|
+
run: gh release upload "$RELEASE_TAG" artifacts/dist/* artifacts/release.json
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.env
|
|
2
|
+
compose.env
|
|
3
|
+
dist/bootstrap/
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.pyc
|
|
6
|
+
.pyo
|
|
7
|
+
.pyd
|
|
8
|
+
.venv/
|
|
9
|
+
.python-version
|
|
10
|
+
node_modules/
|
|
11
|
+
.next/
|
|
12
|
+
*.tsbuildinfo
|
|
13
|
+
dist/
|
|
14
|
+
build/
|
|
15
|
+
.DS_Store
|
|
16
|
+
.coverage
|
|
17
|
+
coverage/
|
|
18
|
+
htmlcov/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.mypy_cache/
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.ruff_cache/
|
|
23
|
+
key.txt
|
|
24
|
+
tests/fixtures/.runtime-mount/
|
|
25
|
+
backups/
|
sage_run-1.0.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SAGE Run — Shared Instructions
|
|
2
|
+
|
|
3
|
+
## Investigation
|
|
4
|
+
|
|
5
|
+
- Start from the strongest concrete input already available in the task
|
|
6
|
+
- Prefer live tool queries over guessing or extrapolating from memory
|
|
7
|
+
- Work one branch at a time; choose the next highest-signal check
|
|
8
|
+
- If a branch fails or misses twice, pivot rather than retrying the same shape
|
|
9
|
+
- Stop once the answer is sufficiently supported; do not gather adjacent context beyond that
|
|
10
|
+
- Separate historical evidence from current state when they may have drifted
|
|
11
|
+
- Do not end a turn with unfinished work; continue until you can report a supported finding or final conclusion
|
|
12
|
+
- Launch `Agent` subagents asynchronously with `run_in_background: true`; wait for their completion notification or use `SendMessage` to continue them instead of running them in the foreground
|
|
13
|
+
- Treat a background subagent result as incomplete when it ends with an intended next step (for example, "let me", "I need to", or "next I will") or does not satisfy its requested return contract. Do not synthesize from it: use `SendMessage` to resume that child with a concrete next check, and require either the next tool call or a completed branch finding before accepting its result.
|
|
14
|
+
|
|
15
|
+
## Memory and Skills
|
|
16
|
+
|
|
17
|
+
- Consult memory for prior patterns before starting; write durable notes when you learn something reusable
|
|
18
|
+
- Treat memory as supporting context, not proof of current system state
|
|
19
|
+
- Treat project memory as normal files under `.claude/agent-memory/`; use standard file tools such as `Read`, `Write`, `Grep`, or `Glob` rather than assuming a separate memory-specific tool
|
|
20
|
+
- Use `MEMORY.md` and neighboring memory files only for durable workflow notes, not as a scratchpad for intermediate reasoning
|
|
21
|
+
- Invoke an existing skill through the `Skill` tool when the task matches it; do not recreate the procedure from memory
|
|
22
|
+
- For large tool results or downloaded content, use the `large-result-handling` skill instead of repeated broad reads
|
|
23
|
+
|
|
24
|
+
## Output and Safety
|
|
25
|
+
|
|
26
|
+
- Format output to suit the workflow; do not include implementation metadata such as duration or token counts
|
|
27
|
+
- Ask for approval before destructive, irreversible, or high-risk actions
|
|
28
|
+
- If the task is blocked on a missing human fact or decision and the workflow exposes `AskUserQuestion`, summarize what you know so far and ask one specific next-step question instead of looping
|
|
29
|
+
- If a tool call fails, report the limitation and continue with available evidence
|
|
30
|
+
- Never output credentials, tokens, or sensitive keys
|
|
31
|
+
- Decline off-scope requests without investigating them
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for contributing to SAGE Run.
|
|
4
|
+
|
|
5
|
+
## Public Core Boundary
|
|
6
|
+
|
|
7
|
+
This repository is the public platform core. Contributions should not include:
|
|
8
|
+
|
|
9
|
+
- Company-specific workflows
|
|
10
|
+
- Customer names, hostnames, channels, or incident examples
|
|
11
|
+
- Plaintext secrets, tokens, private keys, or encrypted secrets from a private deployment
|
|
12
|
+
- Private connector implementations
|
|
13
|
+
|
|
14
|
+
Put workflow-specific assets in a workflow repository and test them through bundle assembly.
|
|
15
|
+
|
|
16
|
+
## Development Checks
|
|
17
|
+
|
|
18
|
+
Run focused tests for the area you changed, then the unit suite:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
python -m pytest -q tests/unit
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Run lint and formatting checks:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
python -m ruff check .
|
|
28
|
+
python -m ruff format --check .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For UI changes:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
cd control-plane-ui
|
|
35
|
+
npm ci
|
|
36
|
+
npm run build
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For deployment changes, render templates where possible:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
docker compose config >/tmp/sage-run-compose.yaml
|
|
43
|
+
helm template sage-run sage_run/chart \
|
|
44
|
+
--set workflowRepo.hostPath=/tmp/workflows \
|
|
45
|
+
>/tmp/sage-run-helm.yaml
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Workflow Bundle Checks
|
|
49
|
+
|
|
50
|
+
Use the bundle CLI to validate workflow repo changes:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
python scripts/build_workflow_bundle.py my-workflow \
|
|
54
|
+
--workflow-root /path/to/workflow-repo \
|
|
55
|
+
--output /tmp/sage-run-bundles
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Bundle validation rejects plaintext-looking secrets. Store sensitive values through encrypted config or deployment secret managers.
|
|
59
|
+
|
|
60
|
+
## Pull Requests
|
|
61
|
+
|
|
62
|
+
Please include:
|
|
63
|
+
|
|
64
|
+
- What behavior changed
|
|
65
|
+
- What public/private boundary was affected
|
|
66
|
+
- What validation commands passed
|
|
67
|
+
- Any deployment or migration notes
|
sage_run-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
SAGE Run
|
|
2
|
+
Copyright 2026 Vishal Goel and SAGE Run contributors
|
|
3
|
+
|
|
4
|
+
SAGE Run's original code and documentation are licensed under the Apache
|
|
5
|
+
License, Version 2.0, reproduced in full below, unless otherwise indicated.
|
|
6
|
+
|
|
7
|
+
Third-party components are not licensed by this project's license grant.
|
|
8
|
+
Dependencies, bundled software, container base images, and third-party service
|
|
9
|
+
images retain their respective copyrights, licenses, notices, and applicable
|
|
10
|
+
terms. This includes the Claude Agent SDK and Claude Code CLI; their applicable
|
|
11
|
+
component licenses and Anthropic terms govern their use and redistribution.
|
|
12
|
+
Bundling, installing, or using a component with SAGE Run does not relicense it
|
|
13
|
+
under Apache-2.0 or waive any third-party obligations. This scope statement
|
|
14
|
+
does not modify the Apache License below or any third-party license.
|
|
15
|
+
|
|
16
|
+
Apache License
|
|
17
|
+
Version 2.0, January 2004
|
|
18
|
+
http://www.apache.org/licenses/
|
|
19
|
+
|
|
20
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
21
|
+
|
|
22
|
+
1. Definitions.
|
|
23
|
+
|
|
24
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
25
|
+
|
|
26
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
27
|
+
|
|
28
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
29
|
+
|
|
30
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
31
|
+
|
|
32
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
33
|
+
|
|
34
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
37
|
+
|
|
38
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
39
|
+
|
|
40
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
41
|
+
|
|
42
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
43
|
+
|
|
44
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
45
|
+
|
|
46
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
47
|
+
|
|
48
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
49
|
+
|
|
50
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
51
|
+
|
|
52
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
53
|
+
|
|
54
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
55
|
+
|
|
56
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
57
|
+
|
|
58
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
59
|
+
|
|
60
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
61
|
+
|
|
62
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
63
|
+
|
|
64
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
65
|
+
|
|
66
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
67
|
+
|
|
68
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
69
|
+
|
|
70
|
+
END OF TERMS AND CONDITIONS
|
|
71
|
+
|
|
72
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
73
|
+
|
|
74
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
75
|
+
|
|
76
|
+
Copyright [yyyy] [name of copyright owner]
|
|
77
|
+
|
|
78
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
|
79
|
+
|
|
80
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
81
|
+
|
|
82
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|