personal-agent-protocol 0.3.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.
Files changed (126) hide show
  1. personal_agent_protocol-0.3.0/.github/workflows/build.yaml +23 -0
  2. personal_agent_protocol-0.3.0/.github/workflows/docs.yaml +30 -0
  3. personal_agent_protocol-0.3.0/.github/workflows/py-code-style.yaml +44 -0
  4. personal_agent_protocol-0.3.0/.github/workflows/py-tests.yaml +42 -0
  5. personal_agent_protocol-0.3.0/.github/workflows/py-typing.yaml +43 -0
  6. personal_agent_protocol-0.3.0/.github/workflows/release.yaml +169 -0
  7. personal_agent_protocol-0.3.0/.github/workflows/reusable-python.yaml +100 -0
  8. personal_agent_protocol-0.3.0/.github/workflows/typescript.yaml +33 -0
  9. personal_agent_protocol-0.3.0/.gitignore +135 -0
  10. personal_agent_protocol-0.3.0/.licenserc.yaml +18 -0
  11. personal_agent_protocol-0.3.0/.pre-commit-config.yaml +38 -0
  12. personal_agent_protocol-0.3.0/.vscode/settings.json +9 -0
  13. personal_agent_protocol-0.3.0/CHANGELOG.md +7 -0
  14. personal_agent_protocol-0.3.0/Dockerfile +19 -0
  15. personal_agent_protocol-0.3.0/LICENSE +29 -0
  16. personal_agent_protocol-0.3.0/Makefile +42 -0
  17. personal_agent_protocol-0.3.0/PKG-INFO +191 -0
  18. personal_agent_protocol-0.3.0/README.md +130 -0
  19. personal_agent_protocol-0.3.0/RELEASE.md +43 -0
  20. personal_agent_protocol-0.3.0/docs/.gitignore +24 -0
  21. personal_agent_protocol-0.3.0/docs/LICENSE +21 -0
  22. personal_agent_protocol-0.3.0/docs/Makefile +65 -0
  23. personal_agent_protocol-0.3.0/docs/README.md +34 -0
  24. personal_agent_protocol-0.3.0/docs/docs/concepts/architecture.mdx +57 -0
  25. personal_agent_protocol-0.3.0/docs/docs/concepts/glossary.mdx +24 -0
  26. personal_agent_protocol-0.3.0/docs/docs/concepts/protocol-tour.mdx +62 -0
  27. personal_agent_protocol-0.3.0/docs/docs/contributing/sdk-design.mdx +78 -0
  28. personal_agent_protocol-0.3.0/docs/docs/getting-started/index.mdx +87 -0
  29. personal_agent_protocol-0.3.0/docs/docs/guides/cli.mdx +124 -0
  30. personal_agent_protocol-0.3.0/docs/docs/guides/company.mdx +67 -0
  31. personal_agent_protocol-0.3.0/docs/docs/guides/conformance.mdx +35 -0
  32. personal_agent_protocol-0.3.0/docs/docs/guides/cryptography.mdx +53 -0
  33. personal_agent_protocol-0.3.0/docs/docs/guides/direct-sign-in.mdx +89 -0
  34. personal_agent_protocol-0.3.0/docs/docs/guides/extensions.mdx +64 -0
  35. personal_agent_protocol-0.3.0/docs/docs/guides/personal-agent.mdx +69 -0
  36. personal_agent_protocol-0.3.0/docs/docs/guides/sessions.mdx +102 -0
  37. personal_agent_protocol-0.3.0/docs/docs/index.mdx +100 -0
  38. personal_agent_protocol-0.3.0/docs/docs/protocol/coverage.mdx +71 -0
  39. personal_agent_protocol-0.3.0/docs/docs/protocol/status.mdx +66 -0
  40. personal_agent_protocol-0.3.0/docs/docs/sdk/python.mdx +144 -0
  41. personal_agent_protocol-0.3.0/docs/docs/sdk/typescript.mdx +113 -0
  42. personal_agent_protocol-0.3.0/docs/docs/security/index.mdx +58 -0
  43. personal_agent_protocol-0.3.0/docs/docs/studio/integration.mdx +102 -0
  44. personal_agent_protocol-0.3.0/docs/docusaurus.config.js +195 -0
  45. personal_agent_protocol-0.3.0/docs/package.json +42 -0
  46. personal_agent_protocol-0.3.0/docs/sidebars.js +67 -0
  47. personal_agent_protocol-0.3.0/docs/src/css/custom.css +189 -0
  48. personal_agent_protocol-0.3.0/docs/src/pages/index.module.css +39 -0
  49. personal_agent_protocol-0.3.0/docs/static/img/bricks.svg +32 -0
  50. personal_agent_protocol-0.3.0/docs/static/img/building-construction.svg +22 -0
  51. personal_agent_protocol-0.3.0/docs/static/img/cloud-sun.svg +14 -0
  52. personal_agent_protocol-0.3.0/docs/static/img/cloud.svg +125 -0
  53. personal_agent_protocol-0.3.0/docs/static/img/collaboration.svg +1676 -0
  54. personal_agent_protocol-0.3.0/docs/static/img/copy-left.svg +9 -0
  55. personal_agent_protocol-0.3.0/docs/static/img/datalayer/logo.png +0 -0
  56. personal_agent_protocol-0.3.0/docs/static/img/datalayer/logo.svg +158 -0
  57. personal_agent_protocol-0.3.0/docs/static/img/datalayer/personas/business.svg +527 -0
  58. personal_agent_protocol-0.3.0/docs/static/img/datalayer/personas/data-scientist.svg +486 -0
  59. personal_agent_protocol-0.3.0/docs/static/img/datalayer/personas/devops.svg +463 -0
  60. personal_agent_protocol-0.3.0/docs/static/img/datalayer/project/project-line.svg +564 -0
  61. personal_agent_protocol-0.3.0/docs/static/img/favicon.ico +0 -0
  62. personal_agent_protocol-0.3.0/docs/static/img/jupyter.svg +260 -0
  63. personal_agent_protocol-0.3.0/docs/static/img/open-source.svg +1 -0
  64. personal_agent_protocol-0.3.0/docs/static/img/react-js.svg +4 -0
  65. personal_agent_protocol-0.3.0/docs/static/img/react-js2.svg +46 -0
  66. personal_agent_protocol-0.3.0/docs/static/img/ringed-planet.svg +13 -0
  67. personal_agent_protocol-0.3.0/docs/static/img/robot.svg +28 -0
  68. personal_agent_protocol-0.3.0/docs/static/img/rocket.svg +20 -0
  69. personal_agent_protocol-0.3.0/docs/static/img/shield.svg +14 -0
  70. personal_agent_protocol-0.3.0/docs/static/img/sparkles.svg +18 -0
  71. personal_agent_protocol-0.3.0/docs/static/img/streamlit.gif +0 -0
  72. personal_agent_protocol-0.3.0/docs/static/img/super-hero.svg +32 -0
  73. personal_agent_protocol-0.3.0/docs/static/img/target.svg +134 -0
  74. personal_agent_protocol-0.3.0/docs/static/img/thumbs-up.svg +17 -0
  75. personal_agent_protocol-0.3.0/examples/README.md +1 -0
  76. personal_agent_protocol-0.3.0/package.json +14 -0
  77. personal_agent_protocol-0.3.0/packages/README.md +9 -0
  78. personal_agent_protocol-0.3.0/packages/typescript/README.md +22 -0
  79. personal_agent_protocol-0.3.0/packages/typescript/package.json +36 -0
  80. personal_agent_protocol-0.3.0/packages/typescript/src/auth.ts +227 -0
  81. personal_agent_protocol-0.3.0/packages/typescript/src/crypto.ts +260 -0
  82. personal_agent_protocol-0.3.0/packages/typescript/src/discovery.ts +163 -0
  83. personal_agent_protocol-0.3.0/packages/typescript/src/errors.ts +69 -0
  84. personal_agent_protocol-0.3.0/packages/typescript/src/index.ts +111 -0
  85. personal_agent_protocol-0.3.0/packages/typescript/src/json.ts +152 -0
  86. personal_agent_protocol-0.3.0/packages/typescript/src/models.ts +744 -0
  87. personal_agent_protocol-0.3.0/packages/typescript/src/reactor.ts +220 -0
  88. personal_agent_protocol-0.3.0/packages/typescript/src/sessions.ts +438 -0
  89. personal_agent_protocol-0.3.0/packages/typescript/test/auth.test.mjs +119 -0
  90. personal_agent_protocol-0.3.0/packages/typescript/test/crypto.test.mjs +159 -0
  91. personal_agent_protocol-0.3.0/packages/typescript/test/discovery.test.mjs +219 -0
  92. personal_agent_protocol-0.3.0/packages/typescript/test/reactor.test.mjs +90 -0
  93. personal_agent_protocol-0.3.0/packages/typescript/test/sessions.test.mjs +165 -0
  94. personal_agent_protocol-0.3.0/packages/typescript/tsconfig.json +19 -0
  95. personal_agent_protocol-0.3.0/personal_agent_protocol/__init__.py +151 -0
  96. personal_agent_protocol-0.3.0/personal_agent_protocol/__version__.py +6 -0
  97. personal_agent_protocol-0.3.0/personal_agent_protocol/auth.py +199 -0
  98. personal_agent_protocol-0.3.0/personal_agent_protocol/cli.py +37 -0
  99. personal_agent_protocol-0.3.0/personal_agent_protocol/cli_plugin.py +281 -0
  100. personal_agent_protocol-0.3.0/personal_agent_protocol/config.py +133 -0
  101. personal_agent_protocol-0.3.0/personal_agent_protocol/crypto.py +255 -0
  102. personal_agent_protocol-0.3.0/personal_agent_protocol/discovery.py +158 -0
  103. personal_agent_protocol-0.3.0/personal_agent_protocol/errors.py +50 -0
  104. personal_agent_protocol-0.3.0/personal_agent_protocol/json.py +35 -0
  105. personal_agent_protocol-0.3.0/personal_agent_protocol/models.py +374 -0
  106. personal_agent_protocol-0.3.0/personal_agent_protocol/py.typed +1 -0
  107. personal_agent_protocol-0.3.0/personal_agent_protocol/reactor.py +324 -0
  108. personal_agent_protocol-0.3.0/personal_agent_protocol/sessions.py +386 -0
  109. personal_agent_protocol-0.3.0/protocol/UPSTREAM.md +13 -0
  110. personal_agent_protocol-0.3.0/protocol/fixtures/client-metadata-valid.json +12 -0
  111. personal_agent_protocol-0.3.0/protocol/fixtures/conversation-events-valid.json +49 -0
  112. personal_agent_protocol-0.3.0/protocol/fixtures/discovery-valid.json +44 -0
  113. personal_agent_protocol-0.3.0/protocol/fixtures/oauth-metadata-valid.json +8 -0
  114. personal_agent_protocol-0.3.0/protocol/fixtures/operation-valid.json +15 -0
  115. personal_agent_protocol-0.3.0/protocol/fixtures/session-token-valid.json +8 -0
  116. personal_agent_protocol-0.3.0/protocol/requirements.yaml +121 -0
  117. personal_agent_protocol-0.3.0/pyproject.toml +102 -0
  118. personal_agent_protocol-0.3.0/tests/__init__.py +5 -0
  119. personal_agent_protocol-0.3.0/tests/conftest.py +5 -0
  120. personal_agent_protocol-0.3.0/tests/test_auth.py +116 -0
  121. personal_agent_protocol-0.3.0/tests/test_cli.py +197 -0
  122. personal_agent_protocol-0.3.0/tests/test_crypto.py +164 -0
  123. personal_agent_protocol-0.3.0/tests/test_discovery.py +109 -0
  124. personal_agent_protocol-0.3.0/tests/test_models.py +127 -0
  125. personal_agent_protocol-0.3.0/tests/test_reactor.py +93 -0
  126. personal_agent_protocol-0.3.0/tests/test_sessions.py +230 -0
@@ -0,0 +1,23 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ python-build:
12
+ name: Python Build & Test (${{ matrix.python-version }})
13
+ strategy:
14
+ matrix:
15
+ python-version: ['3.11', '3.12']
16
+ uses: ./.github/workflows/reusable-python.yaml
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ install-extras: test,typing
20
+ run-tests: true
21
+ test-command: pytest tests/ --cov=personal_agent_protocol --cov-report term-missing
22
+ run-mypy: true
23
+ mypy-target: personal_agent_protocol
@@ -0,0 +1,30 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ paths:
7
+ - 'docs/**'
8
+ - '.github/workflows/docs.yaml'
9
+ pull_request:
10
+ branches: [main, develop]
11
+ paths:
12
+ - 'docs/**'
13
+ - '.github/workflows/docs.yaml'
14
+ workflow_dispatch:
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+ defaults:
20
+ run:
21
+ working-directory: docs
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ - uses: actions/setup-node@v6
25
+ with:
26
+ node-version: 22
27
+ cache: npm
28
+ cache-dependency-path: docs/package-lock.json
29
+ - run: npm ci
30
+ - run: npm run build
@@ -0,0 +1,44 @@
1
+ name: Py Code Style
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - develop
8
+ paths:
9
+ - 'personal_agent_protocol/**/*.py'
10
+ - 'tests/**/*.py'
11
+ - 'pyproject.toml'
12
+ - 'setup.py'
13
+ - '.pre-commit-config.yaml'
14
+ - 'ruff.toml'
15
+ - '.ruff.toml'
16
+ - '.github/workflows/py-code-style.yaml'
17
+ - '.github/workflows/reusable-python.yaml'
18
+ pull_request:
19
+ branches:
20
+ - main
21
+ - develop
22
+ paths:
23
+ - 'personal_agent_protocol/**/*.py'
24
+ - 'tests/**/*.py'
25
+ - 'pyproject.toml'
26
+ - 'setup.py'
27
+ - '.pre-commit-config.yaml'
28
+ - 'ruff.toml'
29
+ - '.ruff.toml'
30
+ - '.github/workflows/py-code-style.yaml'
31
+ - '.github/workflows/reusable-python.yaml'
32
+ workflow_dispatch:
33
+
34
+ concurrency:
35
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
36
+ cancel-in-progress: true
37
+
38
+ jobs:
39
+ check-code-style:
40
+ uses: ./.github/workflows/reusable-python.yaml
41
+ with:
42
+ python-version: '3.11'
43
+ extra-packages: pre-commit
44
+ run-pre-commit: true
@@ -0,0 +1,42 @@
1
+ name: Py Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'personal_agent_protocol/**'
9
+ - 'tests/**'
10
+ - 'pyproject.toml'
11
+ - 'setup.py'
12
+ - 'requirements*.txt'
13
+ - '**/*.py'
14
+ - '.github/workflows/py-tests.yaml'
15
+ - '.github/workflows/reusable-python.yaml'
16
+ pull_request:
17
+ branches:
18
+ - main
19
+ paths:
20
+ - 'personal_agent_protocol/**'
21
+ - 'tests/**'
22
+ - 'pyproject.toml'
23
+ - 'setup.py'
24
+ - 'requirements*.txt'
25
+ - '**/*.py'
26
+ - '.github/workflows/py-tests.yaml'
27
+ - '.github/workflows/reusable-python.yaml'
28
+
29
+ workflow_dispatch:
30
+
31
+ jobs:
32
+ tests:
33
+ strategy:
34
+ max-parallel: 1
35
+ matrix:
36
+ python-version: ['3.10', '3.11', '3.12', '3.13']
37
+ uses: ./.github/workflows/reusable-python.yaml
38
+ with:
39
+ python-version: ${{ matrix.python-version }}
40
+ install-extras: test
41
+ run-tests: true
42
+ test-command: pytest tests/ --cov=personal_agent_protocol --cov-report term-missing
@@ -0,0 +1,43 @@
1
+ name: Py Type Checking
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - develop
8
+ paths:
9
+ - 'personal_agent_protocol/**/*.py'
10
+ - 'tests/**/*.py'
11
+ - 'pyproject.toml'
12
+ - 'setup.py'
13
+ - 'mypy.ini'
14
+ - '.mypy.ini'
15
+ - '.github/workflows/py-typing.yaml'
16
+ - '.github/workflows/reusable-python.yaml'
17
+ pull_request:
18
+ branches:
19
+ - main
20
+ - develop
21
+ paths:
22
+ - 'personal_agent_protocol/**/*.py'
23
+ - 'tests/**/*.py'
24
+ - 'pyproject.toml'
25
+ - 'setup.py'
26
+ - 'mypy.ini'
27
+ - '.mypy.ini'
28
+ - '.github/workflows/py-typing.yaml'
29
+ - '.github/workflows/reusable-python.yaml'
30
+ workflow_dispatch:
31
+
32
+ concurrency:
33
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
34
+ cancel-in-progress: true
35
+
36
+ jobs:
37
+ type-check:
38
+ uses: ./.github/workflows/reusable-python.yaml
39
+ with:
40
+ python-version: '3.12'
41
+ install-extras: typing
42
+ run-mypy: true
43
+ mypy-target: personal_agent_protocol
@@ -0,0 +1,169 @@
1
+ # Copyright (c) 2023-2026 Datalayer, Inc.
2
+ # Distributed under the terms of the Modified BSD License.
3
+
4
+ # Publishes the release a tag names to PyPI and npm without stored tokens.
5
+ # Each registry trusts this workflow through its own GitHub environment. The
6
+ # tag must name both package versions; versions already published are skipped.
7
+ # See RELEASE.md.
8
+
9
+ name: Release
10
+
11
+ on:
12
+ push:
13
+ tags:
14
+ - 'v*'
15
+
16
+ concurrency:
17
+ group: release-${{ github.ref }}
18
+ cancel-in-progress: false
19
+
20
+ permissions:
21
+ contents: read
22
+
23
+ jobs:
24
+ build:
25
+ runs-on: ubuntu-latest
26
+ outputs:
27
+ python: ${{ steps.plan.outputs.python }}
28
+ typescript: ${{ steps.plan.outputs.typescript }}
29
+ steps:
30
+ - uses: actions/checkout@v6
31
+
32
+ - uses: actions/setup-python@v6
33
+ with:
34
+ python-version: '3.12'
35
+
36
+ - uses: actions/setup-node@v6
37
+ with:
38
+ node-version: '24'
39
+ registry-url: 'https://registry.npmjs.org'
40
+ package-manager-cache: false
41
+
42
+ - name: Use an npm CLI with trusted-publishing support
43
+ run: npm install --global npm@latest
44
+
45
+ - name: Check the tag names both package versions
46
+ run: |
47
+ set -euo pipefail
48
+ tag="${GITHUB_REF_NAME#v}"
49
+ python_version="$(python -c "import re;print(re.search(r'__version__\s*=\s*[\"\']([^\"\']+)', open('personal_agent_protocol/__version__.py').read())[1])")"
50
+ typescript_version="$(node -p "require('./packages/typescript/package.json').version")"
51
+ echo "tag=$tag python=$python_version typescript=$typescript_version"
52
+ test "$tag" = "$python_version"
53
+ test "$tag" = "$typescript_version"
54
+
55
+ - name: Find which packages need publishing
56
+ id: plan
57
+ run: |
58
+ set -euo pipefail
59
+ version="${GITHUB_REF_NAME#v}"
60
+ status="$(curl -sL -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/personal-agent-protocol/$version/json")"
61
+ if [ "$status" = "200" ]; then
62
+ echo "PyPI: personal-agent-protocol $version is already published, skipping"
63
+ echo "python=" >> "$GITHUB_OUTPUT"
64
+ else
65
+ echo "PyPI: personal-agent-protocol $version will be published"
66
+ echo "python=yes" >> "$GITHUB_OUTPUT"
67
+ fi
68
+ if npm view "@datalayer/personal-agent-protocol@$version" version --json >/dev/null 2>&1; then
69
+ echo "npm: @datalayer/personal-agent-protocol $version is already published, skipping"
70
+ echo "typescript=" >> "$GITHUB_OUTPUT"
71
+ else
72
+ echo "npm: @datalayer/personal-agent-protocol $version will be published"
73
+ echo "typescript=yes" >> "$GITHUB_OUTPUT"
74
+ fi
75
+
76
+ - name: Build Python distributions
77
+ if: steps.plan.outputs.python != ''
78
+ run: |
79
+ set -euo pipefail
80
+ python -m pip install --upgrade pip build
81
+ python -m build --sdist --wheel --outdir dist .
82
+ ls -la dist
83
+
84
+ - uses: actions/upload-artifact@v4
85
+ if: steps.plan.outputs.python != ''
86
+ with:
87
+ name: python
88
+ path: dist/*
89
+
90
+ - name: Build and test the TypeScript package
91
+ if: steps.plan.outputs.typescript != ''
92
+ run: |
93
+ set -euo pipefail
94
+ npm install --no-package-lock
95
+ npm test
96
+ mkdir -p npm-dist
97
+ npm pack ./packages/typescript --pack-destination npm-dist
98
+ ls -la npm-dist
99
+
100
+ - uses: actions/upload-artifact@v4
101
+ if: steps.plan.outputs.typescript != ''
102
+ with:
103
+ name: npm
104
+ path: npm-dist/*
105
+
106
+ pypi:
107
+ needs: build
108
+ if: needs.build.outputs.python != ''
109
+ runs-on: ubuntu-latest
110
+ environment: pypi
111
+ permissions:
112
+ id-token: write
113
+ steps:
114
+ - uses: actions/download-artifact@v4
115
+ with:
116
+ name: python
117
+ path: dist
118
+ - uses: pypa/gh-action-pypi-publish@release/v1
119
+ with:
120
+ skip-existing: true
121
+
122
+ npm:
123
+ needs: build
124
+ if: needs.build.outputs.typescript != ''
125
+ runs-on: ubuntu-latest
126
+ environment: npm
127
+ permissions:
128
+ contents: read
129
+ id-token: write
130
+ steps:
131
+ - uses: actions/checkout@v6
132
+ - uses: actions/setup-node@v6
133
+ with:
134
+ node-version: '24'
135
+ registry-url: 'https://registry.npmjs.org'
136
+ package-manager-cache: false
137
+ - name: Use an npm CLI with trusted-publishing support
138
+ run: npm install --global npm@latest
139
+ - uses: actions/download-artifact@v4
140
+ with:
141
+ name: npm
142
+ path: npm-dist
143
+ - name: Publish with npm trusted publishing
144
+ run: npm publish npm-dist/*.tgz --access public
145
+
146
+ release:
147
+ name: GitHub release
148
+ needs: [build, pypi, npm]
149
+ if: >-
150
+ always() &&
151
+ needs.build.result == 'success' &&
152
+ needs.pypi.result != 'failure' &&
153
+ needs.npm.result != 'failure'
154
+ runs-on: ubuntu-latest
155
+ permissions:
156
+ contents: write
157
+ steps:
158
+ - uses: actions/checkout@v6
159
+ with:
160
+ fetch-depth: 0
161
+ - name: Create the release with generated notes
162
+ run: |
163
+ version="${GITHUB_REF_NAME#v}"
164
+ gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 && exit 0
165
+ gh release create "$GITHUB_REF_NAME" --title "Release $version" --generate-notes \
166
+ --notes "- [PyPI personal-agent-protocol](https://pypi.org/project/personal-agent-protocol/$version/)
167
+ - [npm @datalayer/personal-agent-protocol](https://www.npmjs.com/package/@datalayer/personal-agent-protocol/v/$version)"
168
+ env:
169
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,100 @@
1
+ name: Reusable Python Workflow
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ python-version:
7
+ description: Python version to use
8
+ required: false
9
+ type: string
10
+ default: '3.11'
11
+ install-system-deps:
12
+ description: Install Linux system dependencies and unlock keyring
13
+ required: false
14
+ type: boolean
15
+ default: true
16
+ install-extras:
17
+ description: Optional extras to install from pyproject (for example test,typing)
18
+ required: false
19
+ type: string
20
+ default: ''
21
+ extra-packages:
22
+ description: Optional extra packages to install with uv pip
23
+ required: false
24
+ type: string
25
+ default: ''
26
+ run-tests:
27
+ description: Run tests
28
+ required: false
29
+ type: boolean
30
+ default: false
31
+ test-command:
32
+ description: Test command to run when run-tests=true
33
+ required: false
34
+ type: string
35
+ default: 'pytest -q'
36
+ run-mypy:
37
+ description: Run mypy
38
+ required: false
39
+ type: boolean
40
+ default: false
41
+ mypy-target:
42
+ description: Package/module path to type-check
43
+ required: false
44
+ type: string
45
+ default: ''
46
+ run-pre-commit:
47
+ description: Run pre-commit
48
+ required: false
49
+ type: boolean
50
+ default: false
51
+
52
+ jobs:
53
+ python-checks:
54
+ runs-on: ubuntu-latest
55
+
56
+ steps:
57
+ - name: Install system dependencies
58
+ if: inputs.install-system-deps
59
+ run: |
60
+ sudo apt-get update
61
+ sudo apt-get install -y libdbus-1-3 libdbus-1-dev libglib2.0-dev
62
+
63
+ - name: Checkout
64
+ uses: actions/checkout@v6
65
+
66
+ - name: Setup UV
67
+ uses: astral-sh/setup-uv@v7
68
+ with:
69
+ version: latest
70
+ python-version: ${{ inputs.python-version }}
71
+ activate-environment: true
72
+
73
+ - name: Install dependencies
74
+ run: |
75
+ uv pip install .
76
+ if [[ -n "${{ inputs.install-extras }}" ]]; then
77
+ uv pip install ".[${{ inputs.install-extras }}]"
78
+ fi
79
+ if [[ -n "${{ inputs.extra-packages }}" ]]; then
80
+ uv pip install ${{ inputs.extra-packages }}
81
+ fi
82
+
83
+ - name: Unlock keyring
84
+ if: inputs.install-system-deps
85
+ uses: t1m0thyj/unlock-keyring@v1
86
+
87
+ - name: Configure git to use https
88
+ run: git config --global hub.protocol https
89
+
90
+ - name: Run tests
91
+ if: inputs.run-tests
92
+ run: ${{ inputs.test-command }}
93
+
94
+ - name: Run mypy
95
+ if: inputs.run-mypy
96
+ run: mypy ${{ inputs.mypy-target }}
97
+
98
+ - name: Run pre-commit
99
+ if: inputs.run-pre-commit
100
+ run: pre-commit run --all-files
@@ -0,0 +1,33 @@
1
+ name: TypeScript
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ paths:
7
+ - 'packages/typescript/**'
8
+ - 'protocol/fixtures/**'
9
+ - 'package.json'
10
+ - 'package-lock.json'
11
+ - '.github/workflows/typescript.yaml'
12
+ pull_request:
13
+ branches: [main, develop]
14
+ paths:
15
+ - 'packages/typescript/**'
16
+ - 'protocol/fixtures/**'
17
+ - 'package.json'
18
+ - 'package-lock.json'
19
+ - '.github/workflows/typescript.yaml'
20
+ workflow_dispatch:
21
+
22
+ jobs:
23
+ build-and-test:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v6
27
+ - uses: actions/setup-node@v6
28
+ with:
29
+ node-version: 22
30
+ cache: npm
31
+ - run: npm ci
32
+ - run: npm run typecheck
33
+ - run: npm test
@@ -0,0 +1,135 @@
1
+ *.egg-info/
2
+ .ipynb_checkpoints
3
+
4
+ # Created by https://www.gitignore.io/api/python
5
+ # Edit at https://www.gitignore.io/?templates=python
6
+
7
+ ### Python ###
8
+ # Byte-compiled / optimized / DLL files
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ dist/
20
+ downloads/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ pip-wheel-metadata/
28
+ share/python-wheels/
29
+ .installed.cfg
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Environment variables:
59
+ .env
60
+
61
+ # Scrapy stuff:
62
+ .scrapy
63
+
64
+ # Sphinx documentation
65
+ docs/_build/
66
+
67
+ # PyBuilder
68
+ target/
69
+
70
+ # pyenv
71
+ .python-version
72
+
73
+ # celery beat schedule file
74
+ celerybeat-schedule
75
+
76
+ # SageMath parsed files
77
+ *.sage.py
78
+
79
+ # Spyder project settings
80
+ .spyderproject
81
+ .spyproject
82
+
83
+ # Rope project settings
84
+ .ropeproject
85
+
86
+ # Mr Developer
87
+ .mr.developer.cfg
88
+ .project
89
+ .pydevproject
90
+
91
+ # mkdocs documentation
92
+ /site
93
+
94
+ # mypy
95
+ .mypy_cache/
96
+ .dmypy.json
97
+ dmypy.json
98
+
99
+ # ruff
100
+ .ruff_cache
101
+
102
+ # Pyre type checker
103
+ .pyre/
104
+
105
+ # End of https://www.gitignore.io/api/python
106
+
107
+ # OSX files
108
+ .DS_Store
109
+
110
+ # Include
111
+ !**/.*ignore
112
+ !**/.*rc
113
+ !**/.*rc.js
114
+ !**/.*rc.json
115
+ !**/.*rc.yml
116
+ !**/.*config
117
+ !*.*rc.json
118
+ !.github
119
+ !.devcontainer
120
+
121
+ untracked_notebooks/*
122
+ .jupyter_ystore
123
+ .jupyter_ystore.db
124
+ docs/.yarn/*
125
+
126
+ uv.lock
127
+
128
+ generated
129
+
130
+ # TypeScript
131
+ node_modules/
132
+ packages/typescript/lib/
133
+
134
+ **/package-lock.json
135
+
@@ -0,0 +1,18 @@
1
+ header:
2
+ license:
3
+ content: |
4
+ Copyright (c) 2023-2024 Datalayer, Inc.
5
+
6
+ BSD 3-Clause License
7
+
8
+
9
+ paths-ignore:
10
+ - '**/*.ipynb'
11
+ - '**/*.json'
12
+ - '**/*.yaml'
13
+ - '**/*.yml'
14
+ - '**/.*'
15
+ - 'docs/**/*'
16
+ - 'LICENSE'
17
+
18
+ comment: on-failure
@@ -0,0 +1,38 @@
1
+ ci:
2
+ autoupdate_schedule: monthly
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v5.0.0
7
+ hooks:
8
+ - id: end-of-file-fixer
9
+ - id: check-case-conflict
10
+ - id: check-executables-have-shebangs
11
+ - id: requirements-txt-fixer
12
+ - id: check-added-large-files
13
+ - id: check-case-conflict
14
+ - id: check-toml
15
+ - id: check-yaml
16
+ - id: debug-statements
17
+ - id: forbid-new-submodules
18
+ - id: check-builtin-literals
19
+ - id: trailing-whitespace
20
+
21
+ - repo: https://github.com/python-jsonschema/check-jsonschema
22
+ rev: 0.29.4
23
+ hooks:
24
+ - id: check-github-workflows
25
+
26
+ - repo: https://github.com/executablebooks/mdformat
27
+ rev: 0.7.19
28
+ hooks:
29
+ - id: mdformat
30
+ additional_dependencies:
31
+ [mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
32
+
33
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
34
+ rev: v0.8.0
35
+ hooks:
36
+ - id: ruff
37
+ args: ["--fix"]
38
+ - id: ruff-format
@@ -0,0 +1,9 @@
1
+ {
2
+ "python-envs.pythonProjects": [
3
+ {
4
+ "path": "",
5
+ "envManager": "ms-python.python:conda",
6
+ "packageManager": "ms-python.python:conda"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,7 @@
1
+ <!--
2
+ ~ Copyright (c) 2023-2024 Datalayer, Inc.
3
+ ~
4
+ ~ BSD 3-Clause License
5
+ -->
6
+
7
+ # Changelog