diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1000955 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig: https://editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.{py,go,rs,java,kt}] +indent_size = 4 + +[Makefile] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1f72383 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +# Normalize line endings to LF in the repository. +* text=auto eol=lf + +# Treat known binary types explicitly so diffs and merges behave correctly. +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.pdf binary +*.zip binary +*.tar binary +*.tar.gz binary +*.tgz binary +*.gz binary +*.7z binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary +*.mp3 binary +*.mp4 binary +*.webm binary diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..882b650 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,30 @@ +name: Bug report +description: Report a defect or unexpected behaviour +title: "bug: " +labels: ["bug", "triage"] +body: + - type: textarea + id: summary + attributes: { label: Summary } + validations: { required: true } + - type: textarea + id: steps + attributes: { label: Steps to reproduce } + validations: { required: true } + - type: textarea + id: expected + attributes: { label: Expected behaviour } + validations: { required: true } + - type: textarea + id: actual + attributes: { label: Actual behaviour } + validations: { required: true } + - type: input + id: version + attributes: { label: Version / commit } + - type: textarea + id: environment + attributes: { label: Environment } + - type: textarea + id: logs + attributes: { label: Logs / output, render: shell } diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..aa1434e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Documentation + url: https://github.com/agent-matrix + about: Browse Agent-Matrix repositories and documentation. + - name: Security advisory + url: https://docs.github.com/en/code-security/security-advisories + about: Please report security issues privately. See SECURITY.md. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..9e3f745 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,19 @@ +name: Feature request +description: Propose a change or new capability +title: "feat: " +labels: ["enhancement", "triage"] +body: + - type: textarea + id: problem + attributes: { label: Problem } + validations: { required: true } + - type: textarea + id: proposal + attributes: { label: Proposal } + validations: { required: true } + - type: textarea + id: alternatives + attributes: { label: Alternatives considered } + - type: textarea + id: impact + attributes: { label: Impact on the alive system } diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..484a954 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +## Summary + +## Type of change + +- [ ] feat +- [ ] fix +- [ ] chore +- [ ] docs +- [ ] refactor +- [ ] test + +## Alive-system surface + +- [ ] Adds/updates a health endpoint or check +- [ ] Adds/updates emitted or consumed events +- [ ] Adds/updates governance metadata +- [ ] Adds/updates economics metadata +- [ ] None of the above + +## Test plan + +- [ ] Unit tests pass locally +- [ ] Lint passes locally + +## Checklist + +- [ ] PR title follows Conventional Commits +- [ ] `CHANGELOG.md` updated under Unreleased (if user-visible) +- [ ] No secrets, credentials, or private endpoints committed diff --git a/.matrix/README.md b/.matrix/README.md new file mode 100644 index 0000000..a61ed7e --- /dev/null +++ b/.matrix/README.md @@ -0,0 +1,5 @@ +# Agent-Matrix Alive-System Manifest + +- `repo.yml` — repo identity, role, governance, economics, maintenance +- `health.yml` — health checks this repo exposes +- `events.yml` — events this repo emits and consumes diff --git a/.matrix/events.yml b/.matrix/events.yml new file mode 100644 index 0000000..bdc7926 --- /dev/null +++ b/.matrix/events.yml @@ -0,0 +1,3 @@ +schema_version: "0.1" +emitted: [] +consumed: [] diff --git a/.matrix/health.yml b/.matrix/health.yml new file mode 100644 index 0000000..32c52aa --- /dev/null +++ b/.matrix/health.yml @@ -0,0 +1,2 @@ +schema_version: "0.1" +checks: [] diff --git a/.matrix/repo.yml b/.matrix/repo.yml new file mode 100644 index 0000000..24ed16d --- /dev/null +++ b/.matrix/repo.yml @@ -0,0 +1,18 @@ +schema_version: "0.1" +repo: + owner: "agent-matrix" + name: "matrix-python-sdk" + full_name: "agent-matrix/matrix-python-sdk" + role: "sdk" +alive: { participates: true, contracts_version: "0.2" } +maintenance: + maintainer: "matrix-maintainer" + repair_enabled: true + repair_constraints: [pr_only, run_tests] +governance: + risk_level: low + requires_approval: false + approver: "matrix-guardian" +economics: { budget_aware: false, reporter: "matrix-treasury" } +events: { emitted: [], consumed: [] } +health: { type: "command", endpoint: "", command: "python -c 'import matrix_sdk'" } diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1aec2a3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Standardized repository governance files (SECURITY.md, CODE_OF_CONDUCT.md, + CODEOWNERS, .editorconfig, .gitattributes) as part of the Agent-Matrix + alive-system synchronization. diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..50c91ec --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,6 @@ +# Default owners for everything in the repo. +# These users / teams are the default reviewers for all pull requests. +# +# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-security/customizing-your-repository/about-code-owners + +* @agent-matrix/maintainers diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..3bdb6d1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,59 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by mistakes +- Focusing on what is best for the overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and unwelcome sexual attention +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Project maintainers are responsible for clarifying and enforcing standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior they deem inappropriate, threatening, offensive, or +harmful. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies +when an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the maintainers listed in `CODEOWNERS`. All complaints will be +reviewed and investigated promptly and fairly. + +All project maintainers are obligated to respect the privacy and security of +the reporter of any incident. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), +version 2.1, available at +. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e8d10d4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,35 @@ +# Security Policy + +## Reporting a Vulnerability + +If you discover a security vulnerability in this repository, please report it +responsibly. Do **not** open a public issue. + +- Use GitHub's [private vulnerability reporting](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) on this repository. +- Or email the maintainers listed in `CODEOWNERS`. + +We aim to acknowledge reports within 3 business days and provide a remediation +timeline within 10 business days for accepted reports. + +## Supported Versions + +The latest minor release is supported with security fixes. Older versions are +supported on a best-effort basis. + +## Scope + +In scope: + +- Source code in this repository +- Build, test, and release workflows under `.github/workflows/` +- Documented APIs, CLIs, manifests, and runtime artifacts produced by this repo + +Out of scope: + +- Third-party dependencies (please report upstream first) +- Self-hosted misconfiguration of an operator's environment + +## Coordinated Disclosure + +This project follows coordinated disclosure. Please give maintainers a +reasonable window to remediate before any public disclosure.