maivn-contracts 0.1.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.
- maivn_contracts-0.1.0/.gitattributes +23 -0
- maivn_contracts-0.1.0/.github/workflows/ci.yml +56 -0
- maivn_contracts-0.1.0/.github/workflows/publish-pypi.yml +50 -0
- maivn_contracts-0.1.0/.gitignore +92 -0
- maivn_contracts-0.1.0/CHANGELOG.md +15 -0
- maivn_contracts-0.1.0/LICENSE +191 -0
- maivn_contracts-0.1.0/NOTICE +6 -0
- maivn_contracts-0.1.0/PKG-INFO +43 -0
- maivn_contracts-0.1.0/README.md +29 -0
- maivn_contracts-0.1.0/agents/agent.schema.json +53 -0
- maivn_contracts-0.1.0/agents/agent_version.schema.json +937 -0
- maivn_contracts-0.1.0/agents/message_binding.schema.json +93 -0
- maivn_contracts-0.1.0/api/.gitkeep +1 -0
- maivn_contracts-0.1.0/artifacts/artifact_error.schema.json +25 -0
- maivn_contracts-0.1.0/artifacts/artifact_lifecycle_event.schema.json +33 -0
- maivn_contracts-0.1.0/artifacts/artifact_patch.schema.json +275 -0
- maivn_contracts-0.1.0/artifacts/artifact_plan.schema.json +395 -0
- maivn_contracts-0.1.0/artifacts/artifact_plan_v3.schema.json +4711 -0
- maivn_contracts-0.1.0/artifacts/artifact_ref.schema.json +522 -0
- maivn_contracts-0.1.0/artifacts/artifact_reservation.schema.json +37 -0
- maivn_contracts-0.1.0/artifacts/ordinary_export_deletion_receipt.schema.json +23 -0
- maivn_contracts-0.1.0/artifacts/ordinary_export_deletion_request.schema.json +17 -0
- maivn_contracts-0.1.0/artifacts/ordinary_export_deletion_status_request.schema.json +17 -0
- maivn_contracts-0.1.0/artifacts/private_artifact_lifecycle_receipt.schema.json +16 -0
- maivn_contracts-0.1.0/artifacts/private_artifact_resolve_request.schema.json +166 -0
- maivn_contracts-0.1.0/artifacts/private_work_intent_status.schema.json +113 -0
- maivn_contracts-0.1.0/artifacts/redacted_artifact_payload.schema.json +18 -0
- maivn_contracts-0.1.0/artifacts/vault_effect_accepted.schema.json +15 -0
- maivn_contracts-0.1.0/artifacts/vault_intent_status_request.schema.json +15 -0
- maivn_contracts-0.1.0/artifacts/vault_ordinary_export_service_assertion.schema.json +58 -0
- maivn_contracts-0.1.0/artifacts/vault_ordinary_export_trust_document.schema.json +74 -0
- maivn_contracts-0.1.0/artifacts/vault_value_map_handle.schema.json +20 -0
- maivn_contracts-0.1.0/artifacts/vault_work_request.schema.json +436 -0
- maivn_contracts-0.1.0/artifacts/verified_export_manifest.schema.json +117 -0
- maivn_contracts-0.1.0/artifacts/verified_export_publication_outcome.schema.json +34 -0
- maivn_contracts-0.1.0/artifacts/verified_export_publication_request.schema.json +17 -0
- maivn_contracts-0.1.0/evals/agent_registry_eval.py +215 -0
- maivn_contracts-0.1.0/evals/message_roundtrip_eval.py +164 -0
- maivn_contracts-0.1.0/evals/modes_ab_contract_eval.py +83 -0
- maivn_contracts-0.1.0/evals/resource_policy_eval.py +219 -0
- maivn_contracts-0.1.0/evals/roundtrip_eval.py +185 -0
- maivn_contracts-0.1.0/evals/run_protocol_eval.py +299 -0
- maivn_contracts-0.1.0/evals/tools_contract_eval.py +279 -0
- maivn_contracts-0.1.0/evals/trigger_lifecycle_eval.py +226 -0
- maivn_contracts-0.1.0/events/.gitkeep +1 -0
- maivn_contracts-0.1.0/events/event.schema.json +204 -0
- maivn_contracts-0.1.0/events/projections/audit.json +460 -0
- maivn_contracts-0.1.0/events/projections/billing.json +131 -0
- maivn_contracts-0.1.0/events/projections/canvas.json +277 -0
- maivn_contracts-0.1.0/events/projections/replay.json +445 -0
- maivn_contracts-0.1.0/events/projections/trace.json +337 -0
- maivn_contracts-0.1.0/events/projections/webhook.json +292 -0
- maivn_contracts-0.1.0/events/taxonomy.json +160 -0
- maivn_contracts-0.1.0/flows/flow_graph.schema.json +191 -0
- maivn_contracts-0.1.0/messages/.gitkeep +1 -0
- maivn_contracts-0.1.0/messages/attachment.schema.json +97 -0
- maivn_contracts-0.1.0/messages/message.schema.json +525 -0
- maivn_contracts-0.1.0/pyproject.toml +80 -0
- maivn_contracts-0.1.0/pyrightconfig.json +23 -0
- maivn_contracts-0.1.0/resources/derived_artifact.schema.json +154 -0
- maivn_contracts-0.1.0/resources/processing_state.schema.json +109 -0
- maivn_contracts-0.1.0/resources/resource_policy.schema.json +38 -0
- maivn_contracts-0.1.0/runtime/command.schema.json +121 -0
- maivn_contracts-0.1.0/runtime/run_config.schema.json +237 -0
- maivn_contracts-0.1.0/runtime/run_state.schema.json +110 -0
- maivn_contracts-0.1.0/runtime/stream_part.schema.json +49 -0
- maivn_contracts-0.1.0/scenarios/.gitkeep +1 -0
- maivn_contracts-0.1.0/scenarios/scenario.schema.json +564 -0
- maivn_contracts-0.1.0/scenarios/trigger.schema.json +890 -0
- maivn_contracts-0.1.0/scenarios/trigger_fire.schema.json +129 -0
- maivn_contracts-0.1.0/scenarios/trigger_invocation.schema.json +109 -0
- maivn_contracts-0.1.0/scenarios/trigger_launch.schema.json +21 -0
- maivn_contracts-0.1.0/scripts/release_guard.py +118 -0
- maivn_contracts-0.1.0/scripts/release_guard_test.py +38 -0
- maivn_contracts-0.1.0/src/maivn_contracts/__init__.py +33 -0
- maivn_contracts-0.1.0/src/maivn_contracts/agents/__init__.py +102 -0
- maivn_contracts-0.1.0/src/maivn_contracts/agents/fingerprint.py +81 -0
- maivn_contracts-0.1.0/src/maivn_contracts/agents/loaders.py +95 -0
- maivn_contracts-0.1.0/src/maivn_contracts/agents/model.py +914 -0
- maivn_contracts-0.1.0/src/maivn_contracts/agents/serving.py +161 -0
- maivn_contracts-0.1.0/src/maivn_contracts/api_errors/__init__.py +33 -0
- maivn_contracts-0.1.0/src/maivn_contracts/api_errors/envelope.py +310 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/__init__.py +450 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/attachment_resolution.py +61 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/attachment_schemas.py +53 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/common_v3.py +240 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/document_v2.py +376 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/document_v3.py +276 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/errors.py +85 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/image_v2.py +240 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/image_v3.py +224 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/lifecycle.py +290 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/lifecycle_status.py +415 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/loaders.py +619 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/model.py +417 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/patches.py +303 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/plan_contracts.py +277 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/plan_inputs.py +162 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/plans.py +24 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/presentation_v3.py +248 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/primitives.py +252 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/private_file_intake.py +100 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/refs.py +238 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/tool_files.py +173 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/vault_ordinary_export_protocol.py +538 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/vault_protocol.py +887 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/vault_types.py +104 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/vault_work.py +459 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/workbook_v2.py +500 -0
- maivn_contracts-0.1.0/src/maivn_contracts/artifacts/workbook_v3.py +328 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/__init__.py +80 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/audit.py +142 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/billing.py +176 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/loaders.py +146 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/model.py +317 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/replay.py +366 -0
- maivn_contracts-0.1.0/src/maivn_contracts/events/trace.py +1664 -0
- maivn_contracts-0.1.0/src/maivn_contracts/flows/__init__.py +40 -0
- maivn_contracts-0.1.0/src/maivn_contracts/flows/loaders.py +51 -0
- maivn_contracts-0.1.0/src/maivn_contracts/flows/model.py +310 -0
- maivn_contracts-0.1.0/src/maivn_contracts/messages/__init__.py +52 -0
- maivn_contracts-0.1.0/src/maivn_contracts/messages/loaders.py +106 -0
- maivn_contracts-0.1.0/src/maivn_contracts/messages/model.py +473 -0
- maivn_contracts-0.1.0/src/maivn_contracts/py.typed +1 -0
- maivn_contracts-0.1.0/src/maivn_contracts/resources/__init__.py +54 -0
- maivn_contracts-0.1.0/src/maivn_contracts/resources/loaders.py +104 -0
- maivn_contracts-0.1.0/src/maivn_contracts/resources/locking.py +14 -0
- maivn_contracts-0.1.0/src/maivn_contracts/resources/model.py +224 -0
- maivn_contracts-0.1.0/src/maivn_contracts/runtime/__init__.py +92 -0
- maivn_contracts-0.1.0/src/maivn_contracts/runtime/choice_options.py +55 -0
- maivn_contracts-0.1.0/src/maivn_contracts/runtime/loaders.py +121 -0
- maivn_contracts-0.1.0/src/maivn_contracts/runtime/model.py +437 -0
- maivn_contracts-0.1.0/src/maivn_contracts/runtime/private_placeholders.py +100 -0
- maivn_contracts-0.1.0/src/maivn_contracts/runtime/protocol.py +47 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/__init__.py +138 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/connection_events.py +75 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/connection_selectors.py +135 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/loaders.py +179 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/local_file_events.py +66 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/model.py +1056 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/producers.py +79 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/selectors.py +16 -0
- maivn_contracts-0.1.0/src/maivn_contracts/scenarios/templates.py +34 -0
- maivn_contracts-0.1.0/src/maivn_contracts/swarms/__init__.py +12 -0
- maivn_contracts-0.1.0/src/maivn_contracts/swarms/loaders.py +15 -0
- maivn_contracts-0.1.0/src/maivn_contracts/swarms/model.py +76 -0
- maivn_contracts-0.1.0/src/maivn_contracts/tools/__init__.py +85 -0
- maivn_contracts-0.1.0/src/maivn_contracts/tools/loaders.py +165 -0
- maivn_contracts-0.1.0/src/maivn_contracts/tools/model.py +443 -0
- maivn_contracts-0.1.0/src/maivn_contracts/toolsets/__init__.py +20 -0
- maivn_contracts-0.1.0/src/maivn_contracts/toolsets/loaders.py +26 -0
- maivn_contracts-0.1.0/src/maivn_contracts/toolsets/model.py +60 -0
- maivn_contracts-0.1.0/src/maivn_contracts/workers/__init__.py +20 -0
- maivn_contracts-0.1.0/src/maivn_contracts/workers/loaders.py +101 -0
- maivn_contracts-0.1.0/src/maivn_contracts/workers/model.py +57 -0
- maivn_contracts-0.1.0/tests/contract/agents/test_golden_fixtures.py +71 -0
- maivn_contracts-0.1.0/tests/contract/agents/test_public_interface.py +155 -0
- maivn_contracts-0.1.0/tests/contract/artifacts/test_public_interface.py +312 -0
- maivn_contracts-0.1.0/tests/contract/evals/test_eval_convention.py +133 -0
- maivn_contracts-0.1.0/tests/contract/events/test_public_interface.py +62 -0
- maivn_contracts-0.1.0/tests/contract/events/test_taxonomy_and_projections.py +179 -0
- maivn_contracts-0.1.0/tests/contract/flows/test_public_interface.py +40 -0
- maivn_contracts-0.1.0/tests/contract/messages/test_golden_fixtures.py +65 -0
- maivn_contracts-0.1.0/tests/contract/messages/test_public_interface.py +103 -0
- maivn_contracts-0.1.0/tests/contract/resources/test_golden_fixtures.py +109 -0
- maivn_contracts-0.1.0/tests/contract/resources/test_public_interface.py +120 -0
- maivn_contracts-0.1.0/tests/contract/runtime/test_golden_fixtures.py +92 -0
- maivn_contracts-0.1.0/tests/contract/runtime/test_public_interface.py +228 -0
- maivn_contracts-0.1.0/tests/contract/scenarios/test_connection_selectors.py +157 -0
- maivn_contracts-0.1.0/tests/contract/scenarios/test_form_events.py +59 -0
- maivn_contracts-0.1.0/tests/contract/scenarios/test_golden_fixtures.py +94 -0
- maivn_contracts-0.1.0/tests/contract/scenarios/test_local_file_events.py +68 -0
- maivn_contracts-0.1.0/tests/contract/scenarios/test_producers.py +40 -0
- maivn_contracts-0.1.0/tests/contract/scenarios/test_public_interface.py +263 -0
- maivn_contracts-0.1.0/tests/contract/tools/test_conversation_dependencies.py +50 -0
- maivn_contracts-0.1.0/tests/contract/tools/test_golden_fixtures.py +79 -0
- maivn_contracts-0.1.0/tests/contract/tools/test_message_composition.py +52 -0
- maivn_contracts-0.1.0/tests/contract/tools/test_public_interface.py +142 -0
- maivn_contracts-0.1.0/tests/fixtures/api_error_vectors.json +123 -0
- maivn_contracts-0.1.0/tests/fixtures/connection_selectors.json +617 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_agent_versions.json +238 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_agents.json +11 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_artifact_lifecycle_events.json +33 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_artifact_refs.json +157 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_attachments.json +22 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_commands.json +14 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_derived_artifacts.json +57 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_events.json +72 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_flow_graphs.json +86 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_message_bindings.json +16 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_messages.json +111 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_processing_states.json +16 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_resource_policies.json +13 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_run_configs.json +12 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_run_states.json +22 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_scenarios.json +274 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_stream_parts.json +19 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_tool_callbacks.json +3 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_tool_calls.json +43 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_tool_dispatches.json +11 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_tool_outcomes.json +59 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_tool_specs.json +65 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_trigger_fires.json +35 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_trigger_invocations.json +27 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_trigger_launches.json +4 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_triggers.json +283 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_worker_connections.json +4 -0
- maivn_contracts-0.1.0/tests/fixtures/invalid_worker_frames.json +4 -0
- maivn_contracts-0.1.0/tests/fixtures/modes_ab_hmac_vectors.json +9 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_agent_versions.json +216 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_agents.json +11 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_artifact_lifecycle_events.json +24 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_artifact_refs.json +68 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_attachments.json +23 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_commands.json +33 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_derived_artifacts.json +60 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_events.json +147 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_flow_graphs.json +68 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_message_bindings.json +15 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_messages.json +143 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_processing_states.json +45 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_resource_policies.json +34 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_run_configs.json +20 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_run_states.json +50 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_scenarios.json +180 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_stream_parts.json +39 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_tool_callbacks.json +3 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_tool_calls.json +39 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_tool_dispatches.json +23 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_tool_outcomes.json +66 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_tool_specs.json +135 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_trigger_fires.json +45 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_trigger_invocations.json +15 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_trigger_launches.json +27 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_triggers.json +282 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_worker_connections.json +17 -0
- maivn_contracts-0.1.0/tests/fixtures/valid_worker_frames.json +5 -0
- maivn_contracts-0.1.0/tests/fixtures/vault_ordinary_export_protocol_golden_vectors.json +24 -0
- maivn_contracts-0.1.0/tests/fixtures/vault_protocol_golden_vectors.json +122 -0
- maivn_contracts-0.1.0/tests/unit/agents/test_graph_memory_policy.py +57 -0
- maivn_contracts-0.1.0/tests/unit/agents/test_loaders.py +207 -0
- maivn_contracts-0.1.0/tests/unit/agents/test_nested_tool_dependencies.py +46 -0
- maivn_contracts-0.1.0/tests/unit/agents/test_planning_choices.py +68 -0
- maivn_contracts-0.1.0/tests/unit/agents/test_runtime_topology.py +125 -0
- maivn_contracts-0.1.0/tests/unit/agents/test_serving.py +155 -0
- maivn_contracts-0.1.0/tests/unit/api_errors/test_envelope.py +132 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_artifact_ref_loaders.py +403 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_artifact_v2_contracts.py +1075 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_artifact_v3_contracts.py +626 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_attachment_schema.py +63 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_lifecycle_event_contracts.py +439 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_precommit_artifact_contracts.py +1286 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_private_artifact_contracts.py +1475 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_private_file_intake.py +126 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_tool_file_contracts.py +192 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_vault_grant_delivery_contract.py +117 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_vault_lifecycle_task1_contracts.py +1104 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_vault_lifecycle_task5_contracts.py +590 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_vault_ordinary_export_protocol.py +404 -0
- maivn_contracts-0.1.0/tests/unit/artifacts/test_vault_retrieval_delivery_contract.py +177 -0
- maivn_contracts-0.1.0/tests/unit/events/test_audit.py +164 -0
- maivn_contracts-0.1.0/tests/unit/events/test_billing.py +101 -0
- maivn_contracts-0.1.0/tests/unit/events/test_loaders.py +280 -0
- maivn_contracts-0.1.0/tests/unit/events/test_replay.py +123 -0
- maivn_contracts-0.1.0/tests/unit/events/test_trace.py +2300 -0
- maivn_contracts-0.1.0/tests/unit/flows/test_loaders.py +55 -0
- maivn_contracts-0.1.0/tests/unit/flows/test_models.py +304 -0
- maivn_contracts-0.1.0/tests/unit/messages/test_loaders.py +119 -0
- maivn_contracts-0.1.0/tests/unit/messages/test_pii_whitelist.py +45 -0
- maivn_contracts-0.1.0/tests/unit/resources/test_loaders.py +214 -0
- maivn_contracts-0.1.0/tests/unit/runtime/test_choice_options.py +47 -0
- maivn_contracts-0.1.0/tests/unit/runtime/test_loaders.py +357 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_database_table_source.py +66 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_file_output_binding.py +403 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_launch_binding.py +19 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_loaders.py +713 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_schedule_cron.py +92 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_templates.py +37 -0
- maivn_contracts-0.1.0/tests/unit/scenarios/test_trigger_launch_loaders.py +88 -0
- maivn_contracts-0.1.0/tests/unit/swarms/test_models.py +79 -0
- maivn_contracts-0.1.0/tests/unit/test_artifact_ref_composition.py +201 -0
- maivn_contracts-0.1.0/tests/unit/test_modes_ab_hmac.py +33 -0
- maivn_contracts-0.1.0/tests/unit/tools/test_dispatch_loaders.py +80 -0
- maivn_contracts-0.1.0/tests/unit/tools/test_loaders.py +249 -0
- maivn_contracts-0.1.0/tests/unit/toolsets/test_models.py +90 -0
- maivn_contracts-0.1.0/tests/unit/workers/test_loaders.py +77 -0
- maivn_contracts-0.1.0/tools/tool_call.schema.json +106 -0
- maivn_contracts-0.1.0/tools/tool_callback.schema.json +10 -0
- maivn_contracts-0.1.0/tools/tool_dispatch.schema.json +12 -0
- maivn_contracts-0.1.0/tools/tool_outcome.schema.json +136 -0
- maivn_contracts-0.1.0/tools/tool_spec.schema.json +579 -0
- maivn_contracts-0.1.0/uv.lock +695 -0
- maivn_contracts-0.1.0/workers/worker_connection.schema.json +25 -0
- maivn_contracts-0.1.0/workers/worker_frame.schema.json +38 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Line endings. Every source extension below is stored in git and checked out
|
|
2
|
+
# with LF on every platform. Endings drifting to CRLF is what has repeatedly
|
|
3
|
+
# turned a one-line edit into a whole-file diff nobody could review.
|
|
4
|
+
#
|
|
5
|
+
# Binary assets - png, mp3, ico, jpg, pdf - match nothing here on purpose. They
|
|
6
|
+
# carry CR LF byte pairs that are data, not line endings.
|
|
7
|
+
*.css text eol=lf
|
|
8
|
+
*.json text eol=lf
|
|
9
|
+
*.md text eol=lf
|
|
10
|
+
*.py text eol=lf
|
|
11
|
+
*.svelte text eol=lf
|
|
12
|
+
*.toml text eol=lf
|
|
13
|
+
*.ts text eol=lf
|
|
14
|
+
*.yaml text eol=lf
|
|
15
|
+
*.yml text eol=lf
|
|
16
|
+
|
|
17
|
+
# Launcher and shell scripts. Windows PowerShell 5.1 parses and runs LF-only
|
|
18
|
+
# scripts, and cmd.exe runs LF-only batch files including label, goto and
|
|
19
|
+
# delayed-expansion blocks - both were executed on Windows 11 to check before
|
|
20
|
+
# this was written, rather than assumed.
|
|
21
|
+
*.cmd text eol=lf
|
|
22
|
+
*.ps1 text eol=lf
|
|
23
|
+
*.sh text eol=lf
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
# Standalone check for this public package repository. The development
|
|
4
|
+
# environment ([tool.uv.sources]) points at sibling packages that only exist in
|
|
5
|
+
# the platform monorepo, so this workflow never syncs it. It proves what a user
|
|
6
|
+
# gets: the distributions build without path sources, pass twine, and the wheel
|
|
7
|
+
# installs from PyPI-published dependencies into a clean environment.
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
pull_request:
|
|
11
|
+
push:
|
|
12
|
+
branches:
|
|
13
|
+
- master
|
|
14
|
+
- main
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: maivn-contracts-ci-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
build:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
strategy:
|
|
28
|
+
matrix:
|
|
29
|
+
python-version: ["3.10", "3.12"]
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
32
|
+
with:
|
|
33
|
+
persist-credentials: false
|
|
34
|
+
|
|
35
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
|
|
39
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
40
|
+
|
|
41
|
+
- name: Release guard self-test (offline)
|
|
42
|
+
run: uv run --with packaging --no-project --python 3.12 python scripts/release_guard_test.py
|
|
43
|
+
|
|
44
|
+
- name: Build distributions
|
|
45
|
+
run: uv build --no-sources
|
|
46
|
+
|
|
47
|
+
- name: Validate distributions
|
|
48
|
+
run: uvx twine check dist/*
|
|
49
|
+
|
|
50
|
+
- name: Install the wheel into a clean environment
|
|
51
|
+
run: |
|
|
52
|
+
uv venv .ci --python ${{ matrix.python-version }}
|
|
53
|
+
uv pip install --python .ci/bin/python dist/*.whl
|
|
54
|
+
|
|
55
|
+
- name: Import smoke test
|
|
56
|
+
run: .ci/bin/python -c "import maivn_contracts; print(maivn_contracts.__name__)"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Publish PyPI
|
|
2
|
+
|
|
3
|
+
# Trusted publishing (OIDC): PyPI's publisher for this project is bound to this
|
|
4
|
+
# repository, this workflow file name and the "pypi" environment. Keep all three.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: maivn-contracts-pypi-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
publish:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
environment: pypi
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
|
|
29
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
|
|
33
|
+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
|
34
|
+
|
|
35
|
+
- name: Release guard self-test (offline)
|
|
36
|
+
run: uv run --with packaging --no-project --python 3.12 python scripts/release_guard_test.py
|
|
37
|
+
- name: Validate release version
|
|
38
|
+
# release_guard imports tomllib (3.11+ stdlib); pin the interpreter explicitly.
|
|
39
|
+
run: uv run --with packaging --no-project --python 3.12 python scripts/release_guard.py
|
|
40
|
+
|
|
41
|
+
- name: Build distributions
|
|
42
|
+
# --no-sources: the [tool.uv.sources] path entries are development-only and
|
|
43
|
+
# must never reach a published distribution.
|
|
44
|
+
run: uv build --no-sources
|
|
45
|
+
|
|
46
|
+
- name: Validate distributions
|
|
47
|
+
run: uvx twine check dist/*
|
|
48
|
+
|
|
49
|
+
- name: Publish to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# --- inherited from the maivn-platform superproject at extraction ---
|
|
2
|
+
# Secrets and local environment
|
|
3
|
+
.env
|
|
4
|
+
.env.*
|
|
5
|
+
!.env.example
|
|
6
|
+
*.pem
|
|
7
|
+
*.key
|
|
8
|
+
*.crt
|
|
9
|
+
|
|
10
|
+
# Python
|
|
11
|
+
__pycache__/
|
|
12
|
+
*.py[cod]
|
|
13
|
+
*.pyo
|
|
14
|
+
.Python
|
|
15
|
+
.venv/
|
|
16
|
+
venv/
|
|
17
|
+
env/
|
|
18
|
+
.ruff_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.pytest_cache/
|
|
21
|
+
.pyright/
|
|
22
|
+
.coverage
|
|
23
|
+
coverage.xml
|
|
24
|
+
htmlcov/
|
|
25
|
+
dist/
|
|
26
|
+
build/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
|
|
29
|
+
# Node / TypeScript
|
|
30
|
+
node_modules/
|
|
31
|
+
.npm/
|
|
32
|
+
.pnpm-store/
|
|
33
|
+
.yarn/
|
|
34
|
+
*.tsbuildinfo
|
|
35
|
+
coverage/
|
|
36
|
+
.next/
|
|
37
|
+
.nuxt/
|
|
38
|
+
.svelte-kit/
|
|
39
|
+
out/
|
|
40
|
+
|
|
41
|
+
# Go
|
|
42
|
+
bin/
|
|
43
|
+
pkg/
|
|
44
|
+
*.test
|
|
45
|
+
*.out
|
|
46
|
+
coverage.out
|
|
47
|
+
.gocache/
|
|
48
|
+
.tmp-gen-check-*/
|
|
49
|
+
|
|
50
|
+
# Rust
|
|
51
|
+
target/
|
|
52
|
+
Cargo.lock
|
|
53
|
+
|
|
54
|
+
# Build artifacts and caches
|
|
55
|
+
.cache/
|
|
56
|
+
.parcel-cache/
|
|
57
|
+
.turbo/
|
|
58
|
+
.vite/
|
|
59
|
+
tmp/
|
|
60
|
+
temp/
|
|
61
|
+
logs/
|
|
62
|
+
*.log
|
|
63
|
+
|
|
64
|
+
# OS and editors
|
|
65
|
+
.DS_Store
|
|
66
|
+
Thumbs.db
|
|
67
|
+
*.swp
|
|
68
|
+
*.swo
|
|
69
|
+
.idea/
|
|
70
|
+
.vscode/*
|
|
71
|
+
!.vscode/extensions.json
|
|
72
|
+
|
|
73
|
+
# Generated local outputs
|
|
74
|
+
output/
|
|
75
|
+
outputs/
|
|
76
|
+
|
|
77
|
+
# Local task runner files
|
|
78
|
+
.codex-task-*.md
|
|
79
|
+
|
|
80
|
+
# Canonical prose belongs in the Obsidian vault. Do not ignore docs/; accidental repository prose must remain visible.
|
|
81
|
+
.superpowers/
|
|
82
|
+
|
|
83
|
+
# Local service runtime state
|
|
84
|
+
.maivn-service-pids.json
|
|
85
|
+
.maivn-run-state.json
|
|
86
|
+
.maivn-logs/
|
|
87
|
+
.maivn-runtime/
|
|
88
|
+
.playwright-mcp/
|
|
89
|
+
|
|
90
|
+
# Agent scratch output, never product source
|
|
91
|
+
.scratch-codex/
|
|
92
|
+
.impeccable/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-09-28
|
|
11
|
+
|
|
12
|
+
First public release, published for the maivn 2.0.0 SDK.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- The canonical schema contracts of mAIvn Platform v2 as pydantic models and JSON schemas, for Python 3.10 and later.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2024-2026 mAIvn, LLC. All Rights Reserved.
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: maivn-contracts
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Canonical schema contracts for mAIvn Platform v2.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: jsonschema
|
|
10
|
+
Requires-Dist: pydantic>=2.13.5
|
|
11
|
+
Requires-Dist: rfc8785==0.1.4
|
|
12
|
+
Requires-Dist: typing-extensions>=4.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# maivn-contracts
|
|
16
|
+
|
|
17
|
+
`maivn-contracts` contains the typed wire models, JSON Schemas, loaders, and
|
|
18
|
+
validators shared by mAIvn services and the Python SDK.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install maivn-contracts
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Import from a focused public namespace rather than from its implementation
|
|
27
|
+
modules:
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from maivn_contracts.events import Event, validate_event
|
|
31
|
+
from maivn_contracts.messages import Message, validate_message
|
|
32
|
+
from maivn_contracts.tools import ToolCall, validate_tool_call
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The package exposes contract families for agents, artifacts, events, messages,
|
|
36
|
+
resources, runtime state, scenarios, swarms, tools, toolsets, and workers. Each
|
|
37
|
+
family's `load_*_schema` functions return the checked-in schema, `validate_*`
|
|
38
|
+
functions validate untrusted wire data, and Pydantic models provide typed
|
|
39
|
+
construction and parsing.
|
|
40
|
+
|
|
41
|
+
Treat schemas and their canonical encodings as protocol boundaries. Do not
|
|
42
|
+
copy private fields into logs or relax a validator only in one consumer. Update
|
|
43
|
+
the shared contract and all affected producers and consumers together.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# maivn-contracts
|
|
2
|
+
|
|
3
|
+
`maivn-contracts` contains the typed wire models, JSON Schemas, loaders, and
|
|
4
|
+
validators shared by mAIvn services and the Python SDK.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install maivn-contracts
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Import from a focused public namespace rather than from its implementation
|
|
13
|
+
modules:
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from maivn_contracts.events import Event, validate_event
|
|
17
|
+
from maivn_contracts.messages import Message, validate_message
|
|
18
|
+
from maivn_contracts.tools import ToolCall, validate_tool_call
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The package exposes contract families for agents, artifacts, events, messages,
|
|
22
|
+
resources, runtime state, scenarios, swarms, tools, toolsets, and workers. Each
|
|
23
|
+
family's `load_*_schema` functions return the checked-in schema, `validate_*`
|
|
24
|
+
functions validate untrusted wire data, and Pydantic models provide typed
|
|
25
|
+
construction and parsing.
|
|
26
|
+
|
|
27
|
+
Treat schemas and their canonical encodings as protocol boundaries. Do not
|
|
28
|
+
copy private fields into logs or relax a validator only in one consumer. Update
|
|
29
|
+
the shared contract and all affected producers and consumers together.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.maivn.dev/agents/agent.schema.json",
|
|
4
|
+
"title": "Deployed Agent",
|
|
5
|
+
"description": "Identity-only deployed-agent record for the mAIvn Platform v2 agent registry.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"agent_id",
|
|
10
|
+
"project_id",
|
|
11
|
+
"name",
|
|
12
|
+
"latest_version",
|
|
13
|
+
"created_at",
|
|
14
|
+
"updated_at"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"agent_id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"description": "Stable deployed-agent identifier."
|
|
21
|
+
},
|
|
22
|
+
"project_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"description": "Project that owns this deployed agent."
|
|
26
|
+
},
|
|
27
|
+
"name": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"description": "Human-readable deployed-agent name."
|
|
31
|
+
},
|
|
32
|
+
"description": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"description": "Optional human-readable deployed-agent description."
|
|
36
|
+
},
|
|
37
|
+
"latest_version": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 1,
|
|
40
|
+
"description": "Latest immutable version number deployed for this agent."
|
|
41
|
+
},
|
|
42
|
+
"created_at": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "date-time",
|
|
45
|
+
"description": "RFC3339 timestamp for when the agent identity was created."
|
|
46
|
+
},
|
|
47
|
+
"updated_at": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"format": "date-time",
|
|
50
|
+
"description": "RFC3339 timestamp for when the agent identity was last updated."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|