@opensoha/contracts 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPATIBILITY.md +306 -0
- package/LICENSE +201 -0
- package/README.md +224 -0
- package/agent/agent-checkpoint.schema.json +19 -0
- package/agent/agent-observation.schema.json +20 -0
- package/agent/agent-protocol.schema.json +717 -0
- package/agent/agent-provider-definition.schema.json +44 -0
- package/agent/agent-provider-registry.schema.json +25 -0
- package/agent/agent-provider-runtime-event.schema.json +26 -0
- package/agent/agent-run-step.schema.json +24 -0
- package/agent/conformance-run.schema.json +19 -0
- package/agent/environment-lease.schema.json +31 -0
- package/agent/environment-snapshot.schema.json +26 -0
- package/agent/environment-template.schema.json +19 -0
- package/agent/fleet-target.schema.json +15 -0
- package/agent/multi-agent-plan.schema.json +18 -0
- package/agent/provider-rollout.schema.json +19 -0
- package/apiresponse/response.go +25 -0
- package/apiresponse/response_test.go +27 -0
- package/auth/token-claims.schema.json +78 -0
- package/capabilities/cluster-capability-matrix.schema.json +87 -0
- package/compat/json-schema-ecosystem-0.1.0.json +59 -0
- package/compat/openapi-0.1.0.snapshot.json +5076 -0
- package/compat/openapi-loose-boundaries-0.1.0.json +769 -0
- package/connectors/connector-event-envelope.schema.json +64 -0
- package/evaluation/evaluation-dataset.schema.json +28 -0
- package/evaluation/evaluation-result.schema.json +18 -0
- package/evaluation/evaluation-run.schema.json +19 -0
- package/evaluation/executor-profile.schema.json +18 -0
- package/evaluation/feedback-sample.schema.json +20 -0
- package/evaluation/gate-decision.schema.json +20 -0
- package/evaluation/gate-policy.schema.json +18 -0
- package/evaluation/replay-plan.schema.json +17 -0
- package/evaluation/sample-attempt.schema.json +22 -0
- package/events/event-envelope.schema.json +58 -0
- package/examples/agent-profile/k8s-sre-readonly.json +16 -0
- package/examples/cluster-capability-matrix/runtime-parity.json +40 -0
- package/examples/connector-event-envelope/feishu-message.json +19 -0
- package/examples/gateway-capability-baseline/minimal.json +61 -0
- package/examples/gateway-manifest/minimal.json +72 -0
- package/examples/governance/approval-request.json +35 -0
- package/examples/governance/audit-log.json +14 -0
- package/examples/marketplace-catalog/default.json +75 -0
- package/examples/mcp-preset/k8s-readonly.json +20 -0
- package/examples/openapi/agent-run-tool-call-request.json +11 -0
- package/examples/openapi/agent-tool-call-result-envelope.json +19 -0
- package/examples/openapi/cloud-extension-point-list-envelope.json +15 -0
- package/examples/openapi/directory-runtime-status-envelope.json +31 -0
- package/examples/openapi/gateway-manifest-envelope.json +53 -0
- package/examples/openapi/tool-invocation-request.json +14 -0
- package/examples/openapi/tool-invocation-result-envelope.json +23 -0
- package/examples/plugin-manifest/compute-provider.json +27 -0
- package/examples/plugin-manifest/connector.json +76 -0
- package/examples/plugin-manifest/skill-pack.json +47 -0
- package/examples/runner-operation-lifecycle/late-callback.json +27 -0
- package/examples/skill-manifest/k8s-sre.json +22 -0
- package/examples/token-claims/service-account.json +15 -0
- package/fixtures/json-schema/agent-checkpoint/invalid/raw-state.json +1 -0
- package/fixtures/json-schema/agent-checkpoint/valid/minimal.json +1 -0
- package/fixtures/json-schema/agent-observation/invalid/extra-secret.json +1 -0
- package/fixtures/json-schema/agent-observation/valid/tool.json +1 -0
- package/fixtures/json-schema/agent-profile/invalid/missing-scope.json +15 -0
- package/fixtures/json-schema/agent-profile/valid/k8s-sre-readonly.json +35 -0
- package/fixtures/json-schema/agent-protocol/invalid/missing-agent-id.json +3 -0
- package/fixtures/json-schema/agent-protocol/valid/agent-run-callback-legacy.json +9 -0
- package/fixtures/json-schema/agent-protocol/valid/agent-run-callback-with-events.json +39 -0
- package/fixtures/json-schema/agent-protocol/valid/execution-task-claim.json +5 -0
- package/fixtures/json-schema/agent-provider-definition/invalid/missing-command.json +1 -0
- package/fixtures/json-schema/agent-provider-definition/valid/cli.json +1 -0
- package/fixtures/json-schema/agent-provider-registry/invalid/zero-revision.json +1 -0
- package/fixtures/json-schema/agent-provider-registry/valid/minimal.json +1 -0
- package/fixtures/json-schema/agent-provider-runtime-event/invalid/health-without-provider.json +1 -0
- package/fixtures/json-schema/agent-provider-runtime-event/valid/ack.json +1 -0
- package/fixtures/json-schema/agent-run-step/invalid/unknown-state.json +1 -0
- package/fixtures/json-schema/agent-run-step/valid/running.json +1 -0
- package/fixtures/json-schema/approval-request/invalid/missing-status.json +12 -0
- package/fixtures/json-schema/approval-request/valid/high-risk-tool.json +56 -0
- package/fixtures/json-schema/audit-log/invalid/extra-field.json +10 -0
- package/fixtures/json-schema/audit-log/valid/tool-denied.json +23 -0
- package/fixtures/json-schema/cluster-capability-matrix/invalid/missing-agent-support.json +16 -0
- package/fixtures/json-schema/cluster-capability-matrix/invalid/partial-without-reason.json +18 -0
- package/fixtures/json-schema/cluster-capability-matrix/valid/runtime-parity.json +59 -0
- package/fixtures/json-schema/conformance-run/invalid/missing.json +1 -0
- package/fixtures/json-schema/conformance-run/valid/passed.json +1 -0
- package/fixtures/json-schema/connector-checkpoint/invalid/missing.json +1 -0
- package/fixtures/json-schema/connector-checkpoint/valid/http.json +1 -0
- package/fixtures/json-schema/connector-definition/invalid/missing.json +1 -0
- package/fixtures/json-schema/connector-definition/valid/http.json +1 -0
- package/fixtures/json-schema/connector-event-envelope/invalid/missing-payload.json +11 -0
- package/fixtures/json-schema/connector-event-envelope/invalid/unknown-top-level-field.json +13 -0
- package/fixtures/json-schema/connector-event-envelope/valid/feishu-message.json +19 -0
- package/fixtures/json-schema/context-envelope/invalid/envelope.json +1 -0
- package/fixtures/json-schema/context-envelope/valid/envelope.json +1 -0
- package/fixtures/json-schema/environment-lease/invalid/unbounded.json +1 -0
- package/fixtures/json-schema/environment-lease/valid/observe.json +1 -0
- package/fixtures/json-schema/environment-snapshot/invalid/negative-usage.json +1 -0
- package/fixtures/json-schema/environment-snapshot/valid/active.json +1 -0
- package/fixtures/json-schema/environment-template/invalid/missing.json +1 -0
- package/fixtures/json-schema/environment-template/valid/container.json +1 -0
- package/fixtures/json-schema/evaluation-dataset/invalid/no-samples.json +1 -0
- package/fixtures/json-schema/evaluation-dataset/valid/minimal.json +1 -0
- package/fixtures/json-schema/evaluation-result/invalid/bad-score.json +1 -0
- package/fixtures/json-schema/evaluation-result/valid/passed.json +1 -0
- package/fixtures/json-schema/evaluation-run/invalid/no-candidate.json +1 -0
- package/fixtures/json-schema/evaluation-run/valid/running.json +1 -0
- package/fixtures/json-schema/event-envelope/invalid/bad-severity.json +7 -0
- package/fixtures/json-schema/event-envelope/valid/minimal.json +14 -0
- package/fixtures/json-schema/executor-profile/invalid/missing.json +1 -0
- package/fixtures/json-schema/executor-profile/valid/readonly.json +1 -0
- package/fixtures/json-schema/feedback-sample/invalid/missing.json +1 -0
- package/fixtures/json-schema/feedback-sample/valid/pending.json +1 -0
- package/fixtures/json-schema/fleet-target/invalid/missing.json +1 -0
- package/fixtures/json-schema/fleet-target/valid/linux.json +1 -0
- package/fixtures/json-schema/gate-decision/invalid/missing.json +1 -0
- package/fixtures/json-schema/gate-decision/valid/pass.json +1 -0
- package/fixtures/json-schema/gate-policy/invalid/missing.json +1 -0
- package/fixtures/json-schema/gate-policy/valid/release.json +1 -0
- package/fixtures/json-schema/gateway-capability-baseline/invalid/missing-owner.json +32 -0
- package/fixtures/json-schema/gateway-capability-baseline/valid/minimal.json +61 -0
- package/fixtures/json-schema/gateway-manifest/invalid/bad-risk-level.json +37 -0
- package/fixtures/json-schema/gateway-manifest/valid/minimal.json +48 -0
- package/fixtures/json-schema/graph-revision/invalid/missing.json +1 -0
- package/fixtures/json-schema/graph-revision/valid/active.json +1 -0
- package/fixtures/json-schema/index-publish/invalid/missing.json +1 -0
- package/fixtures/json-schema/index-publish/valid/publish.json +1 -0
- package/fixtures/json-schema/ingestion-job/invalid/missing.json +1 -0
- package/fixtures/json-schema/ingestion-job/valid/queued.json +1 -0
- package/fixtures/json-schema/ingestion-stage/invalid/missing.json +1 -0
- package/fixtures/json-schema/ingestion-stage/valid/succeeded.json +1 -0
- package/fixtures/json-schema/knowledge-base/invalid/base.json +1 -0
- package/fixtures/json-schema/knowledge-base/valid/base.json +1 -0
- package/fixtures/json-schema/knowledge-search/invalid/search.json +1 -0
- package/fixtures/json-schema/knowledge-search/valid/search.json +1 -0
- package/fixtures/json-schema/knowledge-source/invalid/source.json +1 -0
- package/fixtures/json-schema/knowledge-source/valid/source.json +1 -0
- package/fixtures/json-schema/marketplace-catalog/invalid/missing-source.json +5 -0
- package/fixtures/json-schema/marketplace-catalog/valid/minimal.json +44 -0
- package/fixtures/json-schema/mcp-preset/invalid/bad-risk-level.json +20 -0
- package/fixtures/json-schema/mcp-preset/valid/k8s-readonly.json +40 -0
- package/fixtures/json-schema/memory-policy/invalid/missing.json +1 -0
- package/fixtures/json-schema/memory-policy/valid/explicit.json +1 -0
- package/fixtures/json-schema/memory-record/invalid/missing.json +1 -0
- package/fixtures/json-schema/memory-record/valid/explicit.json +1 -0
- package/fixtures/json-schema/multi-agent-plan/invalid/missing.json +1 -0
- package/fixtures/json-schema/multi-agent-plan/valid/running.json +1 -0
- package/fixtures/json-schema/observability-log-query-v1/invalid/missing-query.json +6 -0
- package/fixtures/json-schema/observability-log-query-v1/valid/request.json +15 -0
- package/fixtures/json-schema/observability-log-query-v1/valid/response.json +13 -0
- package/fixtures/json-schema/plugin-manifest/invalid/bad-type.json +7 -0
- package/fixtures/json-schema/plugin-manifest/invalid/logs-query-without-action.json +28 -0
- package/fixtures/json-schema/plugin-manifest/invalid/manifest-only-observability-provider.json +26 -0
- package/fixtures/json-schema/plugin-manifest/invalid/manifest-only-read-provider.json +23 -0
- package/fixtures/json-schema/plugin-manifest/invalid/write-provider-without-actions.json +23 -0
- package/fixtures/json-schema/plugin-manifest/valid/compute-provider.json +25 -0
- package/fixtures/json-schema/plugin-manifest/valid/minimal.json +14 -0
- package/fixtures/json-schema/plugin-manifest/valid/observability-provider.json +29 -0
- package/fixtures/json-schema/project-manifest/invalid/inline-secret.json +14 -0
- package/fixtures/json-schema/project-manifest/valid/demo.json +21 -0
- package/fixtures/json-schema/provider-rollout/invalid/missing.json +1 -0
- package/fixtures/json-schema/provider-rollout/valid/canary.json +1 -0
- package/fixtures/json-schema/replay-plan/invalid/missing.json +1 -0
- package/fixtures/json-schema/replay-plan/valid/readonly.json +1 -0
- package/fixtures/json-schema/retrieval-trace/invalid/missing.json +1 -0
- package/fixtures/json-schema/retrieval-trace/valid/grounded.json +1 -0
- package/fixtures/json-schema/runner-operation-lifecycle/invalid/bad-state.json +7 -0
- package/fixtures/json-schema/runner-operation-lifecycle/invalid/missing-runner-id.json +6 -0
- package/fixtures/json-schema/runner-operation-lifecycle/valid/final-failed.json +27 -0
- package/fixtures/json-schema/runner-operation-lifecycle/valid/heartbeat.json +19 -0
- package/fixtures/json-schema/sample-attempt/invalid/missing.json +1 -0
- package/fixtures/json-schema/sample-attempt/valid/completed.json +1 -0
- package/fixtures/json-schema/skill-manifest/invalid/bad-id.json +5 -0
- package/fixtures/json-schema/skill-manifest/valid/minimal.json +8 -0
- package/fixtures/json-schema/token-claims/invalid/bad-token-kind.json +9 -0
- package/fixtures/json-schema/token-claims/valid/service-account.json +15 -0
- package/fixtures/openapi/AIGatewayManifestEnvelope/invalid/bad-date.json +28 -0
- package/fixtures/openapi/AIGatewayManifestEnvelope/valid/minimal.json +31 -0
- package/fixtures/openapi/AgentProviderRegistryAcknowledgement/invalid/missing-targeted.json +7 -0
- package/fixtures/openapi/AgentProviderRegistryAcknowledgement/valid/rollout.json +17 -0
- package/fixtures/openapi/AgentRunCallbackRequest/invalid/missing-agent-id.json +6 -0
- package/fixtures/openapi/AgentRunCallbackRequest/valid/succeeded.json +10 -0
- package/fixtures/openapi/AgentRunCallbackRequest/valid/with-events.json +39 -0
- package/fixtures/openapi/AuthResultEnvelope/invalid/missing-tokens.json +13 -0
- package/fixtures/openapi/AuthResultEnvelope/valid/session.json +20 -0
- package/fixtures/openapi/CloudExtensionPointListEnvelope/invalid/missing-exclusions.json +11 -0
- package/fixtures/openapi/CloudExtensionPointListEnvelope/valid/managed-fleet.json +19 -0
- package/fixtures/openapi/ComputeAccessSourceListEnvelope/invalid/bad-source-type.json +15 -0
- package/fixtures/openapi/ComputeAccessSourceListEnvelope/valid/mixed.json +19 -0
- package/fixtures/openapi/ComputeOverviewEnvelope/invalid/bad-section-status.json +9 -0
- package/fixtures/openapi/ComputeOverviewEnvelope/valid/partial.json +33 -0
- package/fixtures/openapi/ComputeProviderListEnvelope/invalid/bad-domain.json +23 -0
- package/fixtures/openapi/ComputeProviderListEnvelope/valid/builtin.json +30 -0
- package/fixtures/openapi/ComputeResourceRelationListEnvelope/invalid/bad-relation.json +29 -0
- package/fixtures/openapi/ComputeResourceRelationListEnvelope/valid/vm-runtime.json +33 -0
- package/fixtures/openapi/ComputeTaskListEnvelope/invalid/missing-source-id.json +19 -0
- package/fixtures/openapi/ComputeTaskListEnvelope/valid/running.json +30 -0
- package/fixtures/openapi/DeliveryDraftInput/invalid/missing-application-key.json +9 -0
- package/fixtures/openapi/DeliveryDraftInput/valid/ai-service.json +25 -0
- package/fixtures/openapi/DirectoryEventListEnvelope/invalid/unknown-status.json +13 -0
- package/fixtures/openapi/DirectoryEventListEnvelope/valid/failed.json +16 -0
- package/fixtures/openapi/DirectoryPersonLifecycle/invalid/unknown-employment-status.json +5 -0
- package/fixtures/openapi/DirectoryPersonLifecycle/valid/departed.json +6 -0
- package/fixtures/openapi/DirectoryRuntimeStatusEnvelope/invalid/negative-event-count.json +11 -0
- package/fixtures/openapi/DirectoryRuntimeStatusEnvelope/valid/verified.json +14 -0
- package/fixtures/openapi/DockerContainerStartInput/invalid/missing-image.json +8 -0
- package/fixtures/openapi/DockerContainerStartInput/valid/git-dockerfile.json +22 -0
- package/fixtures/openapi/DockerOperationCallbackRequest/invalid/logs-not-array.json +7 -0
- package/fixtures/openapi/DockerOperationCallbackRequest/valid/succeeded.json +9 -0
- package/fixtures/openapi/ErrorEnvelope/invalid/extra-field.json +7 -0
- package/fixtures/openapi/ErrorEnvelope/valid/error.json +7 -0
- package/fixtures/openapi/EvaluationGateRequest/invalid/missing-candidate.json +4 -0
- package/fixtures/openapi/EvaluationGateRequest/valid/candidate.json +5 -0
- package/fixtures/openapi/ExecutionCallbackRequest/invalid/extra-field.json +6 -0
- package/fixtures/openapi/ExecutionCallbackRequest/valid/succeeded.json +7 -0
- package/fixtures/openapi/GovernanceStatusEnvelope/invalid/window-hours-string.json +81 -0
- package/fixtures/openapi/GovernanceStatusEnvelope/valid/minimal.json +81 -0
- package/fixtures/openapi/IdentityErrorEnvelope/invalid/raw-assertion.json +7 -0
- package/fixtures/openapi/IdentityErrorEnvelope/valid/invalid-signature.json +7 -0
- package/fixtures/openapi/IdentityOutpostClaimRequest/invalid/missing-protocol-version.json +4 -0
- package/fixtures/openapi/IdentityOutpostClaimRequest/valid/current-version.json +5 -0
- package/fixtures/openapi/IdentityRuntimeCapabilityEnvelope/invalid/missing-runtime-state.json +17 -0
- package/fixtures/openapi/IdentityRuntimeCapabilityEnvelope/valid/available.json +17 -0
- package/fixtures/openapi/KnowledgeIngestionJobInput/invalid/missing-source.json +1 -0
- package/fixtures/openapi/KnowledgeIngestionJobInput/valid/source.json +3 -0
- package/fixtures/openapi/KubernetesResourceAgentCreateRequest/invalid/unresolved-target.json +18 -0
- package/fixtures/openapi/KubernetesResourceAgentCreateRequest/valid/resolved-target.json +25 -0
- package/fixtures/openapi/KubernetesResourceCreateRequest/invalid/unknown-source.json +5 -0
- package/fixtures/openapi/KubernetesResourceCreateRequest/valid/global-multi-document.json +5 -0
- package/fixtures/openapi/KubernetesResourceCreateResultEnvelope/invalid/bad-document-index.json +21 -0
- package/fixtures/openapi/KubernetesResourceCreateResultEnvelope/valid/partial.json +62 -0
- package/fixtures/openapi/KubernetesResourceCreateScopeDecisionEnvelope/invalid/missing-capability.json +12 -0
- package/fixtures/openapi/KubernetesResourceCreateScopeDecisionEnvelope/valid/allowed.json +17 -0
- package/fixtures/openapi/KubernetesResourcePreflightEnvelope/invalid/warning-without-message.json +32 -0
- package/fixtures/openapi/KubernetesResourcePreflightEnvelope/valid/mixed-diagnostics.json +83 -0
- package/fixtures/openapi/LogPage/invalid/missing-entry-source.json +12 -0
- package/fixtures/openapi/LogPage/valid/partial-runtime.json +42 -0
- package/fixtures/openapi/LogQuery/invalid/missing-selector.json +3 -0
- package/fixtures/openapi/LogQuery/invalid/unknown-source-mode.json +6 -0
- package/fixtures/openapi/LogQuery/valid/docker-project.json +12 -0
- package/fixtures/openapi/LogQuery/valid/runtime-workload.json +21 -0
- package/fixtures/openapi/LogStreamEvent/invalid/missing-entry.json +3 -0
- package/fixtures/openapi/LogStreamEvent/invalid/unknown-event-type.json +3 -0
- package/fixtures/openapi/LogStreamEvent/valid/live-entry.json +16 -0
- package/fixtures/openapi/MCPCapabilityListEnvelope/invalid/missing-scopes.json +9 -0
- package/fixtures/openapi/MCPCapabilityListEnvelope/valid/minimal.json +10 -0
- package/fixtures/openapi/MFAAdminResetRequest/invalid/missing-reason.json +3 -0
- package/fixtures/openapi/MFAAdminResetRequest/valid/security-incident.json +4 -0
- package/fixtures/openapi/MFAWebAuthnRequestOptionsEnvelope/invalid/missing-challenge-id.json +9 -0
- package/fixtures/openapi/MFAWebAuthnRequestOptionsEnvelope/valid/step-up.json +11 -0
- package/fixtures/openapi/ManifestDeploymentEnvelope/invalid/bad-condition-status.json +33 -0
- package/fixtures/openapi/ManifestDeploymentEnvelope/valid/converged.json +36 -0
- package/fixtures/openapi/ManifestSourceUpdateInput/invalid/unknown-mode.json +6 -0
- package/fixtures/openapi/ManifestSourceUpdateInput/valid/soha-managed.json +6 -0
- package/fixtures/openapi/ObservabilityDataSource/valid/healthy.json +33 -0
- package/fixtures/openapi/ObservabilityDataSourceInput/invalid/secret-in-config.json +9 -0
- package/fixtures/openapi/ObservabilityDataSourceInput/valid/loki.json +33 -0
- package/fixtures/openapi/ObservabilityDataSourceInput/valid/provider.json +21 -0
- package/fixtures/openapi/PasswordLoginRequest/invalid/extra-field.json +5 -0
- package/fixtures/openapi/PasswordLoginRequest/valid/password-login.json +4 -0
- package/fixtures/openapi/PersonalAccessTokenInput/invalid/extra-field.json +6 -0
- package/fixtures/openapi/PersonalAccessTokenInput/valid/create.json +9 -0
- package/fixtures/openapi/PluginManifest/invalid/bad-type.json +7 -0
- package/fixtures/openapi/PluginManifest/valid/skill-pack.json +12 -0
- package/fixtures/openapi/RepositoryInput/invalid/embedded-token.json +8 -0
- package/fixtures/openapi/RepositoryInput/valid/gitlab.json +11 -0
- package/fixtures/openapi/RuntimeConfigChangeRequest/invalid/missing-version.json +8 -0
- package/fixtures/openapi/RuntimeConfigChangeRequest/valid/feature-flags.json +14 -0
- package/fixtures/openapi/RuntimeConfigSnapshotEnvelope/invalid/editable-secret.json +17 -0
- package/fixtures/openapi/RuntimeConfigSnapshotEnvelope/invalid/exposed-default-secret.json +18 -0
- package/fixtures/openapi/RuntimeConfigSnapshotEnvelope/invalid/exposed-effective-secret.json +18 -0
- package/fixtures/openapi/RuntimeConfigSnapshotEnvelope/valid/effective.json +34 -0
- package/fixtures/openapi/SAMLMetadataInput/invalid/unknown-source.json +4 -0
- package/fixtures/openapi/SAMLMetadataInput/valid/xml.json +4 -0
- package/fixtures/openapi/SecretCreateRequest/invalid/missing-value.json +5 -0
- package/fixtures/openapi/SecretCreateRequest/valid/create.json +13 -0
- package/fixtures/openapi/SecretLeaseRedemptionEnvelope/invalid/invalid-alias.json +9 -0
- package/fixtures/openapi/SecretLeaseRedemptionEnvelope/valid/redeem.json +9 -0
- package/fixtures/openapi/SecretMetadataEnvelope/invalid/plaintext-value.json +15 -0
- package/fixtures/openapi/SecretMetadataEnvelope/valid/metadata.json +20 -0
- package/fixtures/openapi/SecretRotateRequest/invalid/empty-value.json +3 -0
- package/fixtures/openapi/SecretRotateRequest/valid/rotate.json +3 -0
- package/fixtures/openapi/ServiceAccountInput/invalid/missing-status.json +4 -0
- package/fixtures/openapi/ServiceAccountInput/valid/create.json +8 -0
- package/fixtures/openapi/WorkbenchStreamEvent/invalid/extra-field.json +11 -0
- package/fixtures/openapi/WorkbenchStreamEvent/invalid/missing-server-fields.json +5 -0
- package/fixtures/openapi/WorkbenchStreamEvent/valid/message-done.json +13 -0
- package/gen/go/sohaapi/client.go +989 -0
- package/gen/go/sohaapi/client_test.go +2127 -0
- package/gen/go/sohaapi/types.go +21450 -0
- package/gen/ts/sohaapi/index.ts +22869 -0
- package/go.mod +18 -0
- package/go.sum +46 -0
- package/governance/approval-request.schema.json +187 -0
- package/governance/audit-log.schema.json +37 -0
- package/helmrelease/release.go +108 -0
- package/helmrelease/release_test.go +9 -0
- package/knowledge/connector-checkpoint.schema.json +16 -0
- package/knowledge/connector-definition.schema.json +18 -0
- package/knowledge/context-envelope.schema.json +32 -0
- package/knowledge/graph-revision.schema.json +21 -0
- package/knowledge/index-publish.schema.json +17 -0
- package/knowledge/ingestion-job.schema.json +22 -0
- package/knowledge/ingestion-stage.schema.json +19 -0
- package/knowledge/knowledge-base.schema.json +48 -0
- package/knowledge/knowledge-search.schema.json +21 -0
- package/knowledge/knowledge-source.schema.json +28 -0
- package/knowledge/retrieval-trace.schema.json +21 -0
- package/mcp/gateway-capability-baseline.schema.json +290 -0
- package/mcp/gateway-manifest.schema.json +210 -0
- package/memory/memory-policy.schema.json +19 -0
- package/memory/memory-record.schema.json +25 -0
- package/openapi/soha-api.json +42282 -0
- package/openapi/soha-api.yaml +21748 -0
- package/openapi/spec_generated.go +23 -0
- package/openapi/spec_test.go +38 -0
- package/package.json +122 -0
- package/plugins/marketplace-catalog.schema.json +120 -0
- package/plugins/observability-log-query-v1.schema.json +88 -0
- package/plugins/plugin-manifest.schema.json +498 -0
- package/presets/mcp-preset.schema.json +142 -0
- package/profiles/agent-profile.schema.json +154 -0
- package/resource/crd_definition.go +10 -0
- package/resource/gateway_details_test.go +55 -0
- package/resource/models.go +1587 -0
- package/resource/models_test.go +72 -0
- package/runner/operation-lifecycle.schema.json +112 -0
- package/skills/skill-manifest.schema.json +64 -0
- package/streamlimit/limited_buffer.go +58 -0
- package/streamlimit/limited_buffer_test.go +38 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
package resource
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"encoding/json"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func TestNetworkTopologyViewJSONOmitsAggregateInputs(t *testing.T) {
|
|
9
|
+
raw, err := json.Marshal(NetworkTopologyView{
|
|
10
|
+
ClusterID: "cluster-a",
|
|
11
|
+
Source: "backend-aggregate",
|
|
12
|
+
GeneratedAt: "2026-07-18T00:00:00Z",
|
|
13
|
+
})
|
|
14
|
+
if err != nil {
|
|
15
|
+
t.Fatalf("marshal topology: %v", err)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var payload map[string]json.RawMessage
|
|
19
|
+
if err := json.Unmarshal(raw, &payload); err != nil {
|
|
20
|
+
t.Fatalf("unmarshal topology: %v", err)
|
|
21
|
+
}
|
|
22
|
+
for _, key := range []string{"services", "ingresses", "httpRoutes", "gateways", "pods"} {
|
|
23
|
+
if _, ok := payload[key]; ok {
|
|
24
|
+
t.Errorf("topology response contains aggregate input %q: %s", key, raw)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
func TestLightweightListViewsOmitDetailOnlyFields(t *testing.T) {
|
|
30
|
+
views := []struct {
|
|
31
|
+
name string
|
|
32
|
+
value any
|
|
33
|
+
omitted []string
|
|
34
|
+
}{
|
|
35
|
+
{"configmap", ConfigMapView{}, []string{"binaryEntries", "immutable"}},
|
|
36
|
+
{"serviceaccount", ServiceAccountView{}, []string{"secrets", "imagePullSecrets", "automountServiceAccountToken"}},
|
|
37
|
+
{"role", RoleView{}, []string{"rules"}},
|
|
38
|
+
{"rolebinding", RoleBindingView{}, []string{"subjects"}},
|
|
39
|
+
{"clusterrole", ClusterRoleView{}, []string{"rules", "aggregationRules"}},
|
|
40
|
+
{"clusterrolebinding", ClusterRoleBindingView{}, []string{"subjects"}},
|
|
41
|
+
{"storageclass", StorageClassView{}, []string{"parameters"}},
|
|
42
|
+
}
|
|
43
|
+
for _, view := range views {
|
|
44
|
+
t.Run(view.name, func(t *testing.T) {
|
|
45
|
+
raw, err := json.Marshal(view.value)
|
|
46
|
+
if err != nil {
|
|
47
|
+
t.Fatalf("marshal %s: %v", view.name, err)
|
|
48
|
+
}
|
|
49
|
+
var payload map[string]json.RawMessage
|
|
50
|
+
if err := json.Unmarshal(raw, &payload); err != nil {
|
|
51
|
+
t.Fatalf("unmarshal %s: %v", view.name, err)
|
|
52
|
+
}
|
|
53
|
+
for _, key := range view.omitted {
|
|
54
|
+
if _, ok := payload[key]; ok {
|
|
55
|
+
t.Errorf("%s list response contains detail-only field %q", view.name, key)
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
func TestAdmissionWebhookDetailDoesNotExposeCABundle(t *testing.T) {
|
|
63
|
+
raw, err := json.Marshal(AdmissionWebhookConfigurationDetailView{
|
|
64
|
+
Webhooks: []AdmissionWebhookView{{Name: "hook.example", CABundleConfigured: true}},
|
|
65
|
+
})
|
|
66
|
+
if err != nil {
|
|
67
|
+
t.Fatalf("marshal webhook detail: %v", err)
|
|
68
|
+
}
|
|
69
|
+
if string(raw) != `{"name":"","ageSeconds":0,"webhooks":[{"name":"hook.example","clientTarget":"","caBundleConfigured":true}]}` {
|
|
70
|
+
t.Fatalf("unexpected webhook detail JSON: %s", raw)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.opensoha.dev/runner/operation-lifecycle.schema.json",
|
|
4
|
+
"title": "OpenSoha Runner Operation Lifecycle",
|
|
5
|
+
"description": "Shared lifecycle event contract for long-running delivery, Docker, VM, AI provider, and agent runner operations.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["operationId", "operationKind", "runnerId", "state", "occurredAt"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"operationId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"operationKind": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["delivery", "docker", "vm", "ai_provider", "agent_run", "connector_action"]
|
|
14
|
+
},
|
|
15
|
+
"runnerId": { "type": "string", "minLength": 1 },
|
|
16
|
+
"agentId": { "type": "string", "minLength": 1 },
|
|
17
|
+
"tenantId": { "type": "string", "minLength": 1 },
|
|
18
|
+
"workspaceId": { "type": "string", "minLength": 1 },
|
|
19
|
+
"state": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": [
|
|
22
|
+
"claimed",
|
|
23
|
+
"heartbeat",
|
|
24
|
+
"cancel_requested",
|
|
25
|
+
"cancelled",
|
|
26
|
+
"timed_out",
|
|
27
|
+
"succeeded",
|
|
28
|
+
"failed",
|
|
29
|
+
"late_callback_ignored"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"sequence": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 0,
|
|
35
|
+
"description": "Monotonic event sequence per operation when available."
|
|
36
|
+
},
|
|
37
|
+
"occurredAt": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "date-time"
|
|
40
|
+
},
|
|
41
|
+
"deadlineAt": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "date-time"
|
|
44
|
+
},
|
|
45
|
+
"heartbeat": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"properties": {
|
|
49
|
+
"intervalSeconds": { "type": "integer", "minimum": 1 },
|
|
50
|
+
"nextDueAt": { "type": "string", "format": "date-time" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"evidence": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": { "$ref": "#/$defs/OperationEvidence" }
|
|
56
|
+
},
|
|
57
|
+
"finalState": {
|
|
58
|
+
"$ref": "#/$defs/FinalOperationState"
|
|
59
|
+
},
|
|
60
|
+
"callback": {
|
|
61
|
+
"$ref": "#/$defs/CallbackContext"
|
|
62
|
+
},
|
|
63
|
+
"metadata": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": true
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"$defs": {
|
|
69
|
+
"OperationEvidence": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["kind", "message"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"kind": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": ["log", "event", "artifact", "callback_payload", "approval", "user_action"]
|
|
77
|
+
},
|
|
78
|
+
"message": { "type": "string", "minLength": 1 },
|
|
79
|
+
"uri": { "type": "string", "format": "uri" },
|
|
80
|
+
"redacted": { "type": "boolean" },
|
|
81
|
+
"metadata": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"FinalOperationState": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["status"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"status": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": ["succeeded", "failed", "cancelled", "timed_out"]
|
|
95
|
+
},
|
|
96
|
+
"reason": { "type": "string" },
|
|
97
|
+
"message": { "type": "string" },
|
|
98
|
+
"completedAt": { "type": "string", "format": "date-time" }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"CallbackContext": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"properties": {
|
|
105
|
+
"callbackId": { "type": "string", "minLength": 1 },
|
|
106
|
+
"accepted": { "type": "boolean" },
|
|
107
|
+
"late": { "type": "boolean" },
|
|
108
|
+
"dedupeKey": { "type": "string", "minLength": 1 }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.opensoha.dev/skills/skill-manifest.schema.json",
|
|
4
|
+
"title": "Soha Skill Manifest",
|
|
5
|
+
"description": "Structured front matter extracted from official Soha skill markdown files.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["id", "name", "category"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
12
|
+
},
|
|
13
|
+
"name": { "type": "string", "minLength": 1 },
|
|
14
|
+
"version": { "type": "string" },
|
|
15
|
+
"category": { "type": "string", "minLength": 1 },
|
|
16
|
+
"description": { "type": "string" },
|
|
17
|
+
"capabilityRefs": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"uniqueItems": true
|
|
24
|
+
},
|
|
25
|
+
"permissionKeys": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1
|
|
30
|
+
},
|
|
31
|
+
"uniqueItems": true
|
|
32
|
+
},
|
|
33
|
+
"requiredScopes": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1
|
|
38
|
+
},
|
|
39
|
+
"uniqueItems": true
|
|
40
|
+
},
|
|
41
|
+
"providerSkillRefs": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["providerKind", "ref"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"providerKind": { "type": "string" },
|
|
48
|
+
"ref": { "type": "string" },
|
|
49
|
+
"arguments": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"metadata": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
package streamlimit
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"bytes"
|
|
5
|
+
"io"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
type LimitedBuffer struct {
|
|
9
|
+
limit int
|
|
10
|
+
buffer bytes.Buffer
|
|
11
|
+
totalBytes int64
|
|
12
|
+
truncated bool
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
func NewLimitedBuffer(limit int) *LimitedBuffer {
|
|
16
|
+
if limit <= 0 {
|
|
17
|
+
limit = 1
|
|
18
|
+
}
|
|
19
|
+
return &LimitedBuffer{limit: limit}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
func (b *LimitedBuffer) Write(p []byte) (int, error) {
|
|
23
|
+
b.totalBytes += int64(len(p))
|
|
24
|
+
remaining := b.limit - b.buffer.Len()
|
|
25
|
+
if remaining > 0 {
|
|
26
|
+
chunk := p
|
|
27
|
+
if len(chunk) > remaining {
|
|
28
|
+
chunk = chunk[:remaining]
|
|
29
|
+
}
|
|
30
|
+
if _, err := b.buffer.Write(chunk); err != nil {
|
|
31
|
+
return 0, err
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if len(p) > remaining {
|
|
35
|
+
b.truncated = true
|
|
36
|
+
}
|
|
37
|
+
return len(p), nil
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
func (b *LimitedBuffer) String() string {
|
|
41
|
+
return b.buffer.String()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
func (b *LimitedBuffer) TotalBytes() int64 {
|
|
45
|
+
return b.totalBytes
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
func (b *LimitedBuffer) Truncated() bool {
|
|
49
|
+
return b.truncated
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
func ReadString(reader io.Reader, limit int) (string, int64, bool, error) {
|
|
53
|
+
buffer := NewLimitedBuffer(limit)
|
|
54
|
+
if _, err := io.Copy(buffer, reader); err != nil {
|
|
55
|
+
return "", 0, false, err
|
|
56
|
+
}
|
|
57
|
+
return buffer.String(), buffer.TotalBytes(), buffer.Truncated(), nil
|
|
58
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
package streamlimit
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"strings"
|
|
5
|
+
"testing"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
func TestLimitedBufferTruncatesAtLimit(t *testing.T) {
|
|
9
|
+
buffer := NewLimitedBuffer(5)
|
|
10
|
+
if _, err := buffer.Write([]byte("hello world")); err != nil {
|
|
11
|
+
t.Fatalf("Write() error = %v", err)
|
|
12
|
+
}
|
|
13
|
+
if got := buffer.String(); got != "hello" {
|
|
14
|
+
t.Fatalf("String() = %q, want hello", got)
|
|
15
|
+
}
|
|
16
|
+
if got := buffer.TotalBytes(); got != 11 {
|
|
17
|
+
t.Fatalf("TotalBytes() = %d, want 11", got)
|
|
18
|
+
}
|
|
19
|
+
if !buffer.Truncated() {
|
|
20
|
+
t.Fatalf("Truncated() = false, want true")
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
func TestReadStringReturnsFullContentWhenWithinLimit(t *testing.T) {
|
|
25
|
+
content, totalBytes, truncated, err := ReadString(strings.NewReader("hello"), 16)
|
|
26
|
+
if err != nil {
|
|
27
|
+
t.Fatalf("ReadString() error = %v", err)
|
|
28
|
+
}
|
|
29
|
+
if content != "hello" {
|
|
30
|
+
t.Fatalf("content = %q, want hello", content)
|
|
31
|
+
}
|
|
32
|
+
if totalBytes != 5 {
|
|
33
|
+
t.Fatalf("totalBytes = %d, want 5", totalBytes)
|
|
34
|
+
}
|
|
35
|
+
if truncated {
|
|
36
|
+
t.Fatalf("truncated = true, want false")
|
|
37
|
+
}
|
|
38
|
+
}
|