paglets 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.
- paglets-0.1.0/.github/workflows/ci.yml +77 -0
- paglets-0.1.0/.github/workflows/docs.yml +66 -0
- paglets-0.1.0/.github/workflows/publish.yml +113 -0
- paglets-0.1.0/.gitignore +40 -0
- paglets-0.1.0/.pre-commit-config.yaml +10 -0
- paglets-0.1.0/AGENTS.md +39 -0
- paglets-0.1.0/LICENSE +21 -0
- paglets-0.1.0/PKG-INFO +163 -0
- paglets-0.1.0/README.md +131 -0
- paglets-0.1.0/demos/__init__.py +3 -0
- paglets-0.1.0/demos/clone_workers_demo.py +94 -0
- paglets-0.1.0/demos/disk_survey_demo.py +310 -0
- paglets-0.1.0/demos/finder_demo.py +70 -0
- paglets-0.1.0/demos/itinerary_demo.py +124 -0
- paglets-0.1.0/demos/message_patterns_demo.py +59 -0
- paglets-0.1.0/demos/mobility_events_demo.py +66 -0
- paglets-0.1.0/demos/simple_master_slave_demo.py +93 -0
- paglets-0.1.0/demos/start_hello_demo.py +60 -0
- paglets-0.1.0/demos/support.py +67 -0
- paglets-0.1.0/docs/examples/compute.md +64 -0
- paglets-0.1.0/docs/examples/index.md +119 -0
- paglets-0.1.0/docs/examples/mesh-benchmark.md +60 -0
- paglets-0.1.0/docs/examples/mesh-info.md +44 -0
- paglets-0.1.0/docs/examples/performance.md +156 -0
- paglets-0.1.0/docs/examples/search.md +227 -0
- paglets-0.1.0/docs/examples/source-tree-demos.md +21 -0
- paglets-0.1.0/docs/examples/system-info.md +112 -0
- paglets-0.1.0/docs/git-auto-update.md +235 -0
- paglets-0.1.0/docs/glossary.md +151 -0
- paglets-0.1.0/docs/implementing-paglets.md +440 -0
- paglets-0.1.0/docs/index.md +165 -0
- paglets-0.1.0/docs/operations/configuration.md +15 -0
- paglets-0.1.0/docs/operations/host-cli.md +25 -0
- paglets-0.1.0/docs/operations/index.md +11 -0
- paglets-0.1.0/docs/operations/local-multi-host.md +20 -0
- paglets-0.1.0/docs/operations/package-releases.md +67 -0
- paglets-0.1.0/docs/project/status.md +13 -0
- paglets-0.1.0/docs/technical/configuration.md +38 -0
- paglets-0.1.0/docs/technical/core.md +83 -0
- paglets-0.1.0/docs/technical/overview.md +80 -0
- paglets-0.1.0/docs/technical/persistence.md +45 -0
- paglets-0.1.0/docs/technical/remote.md +75 -0
- paglets-0.1.0/docs/technical/runtime.md +137 -0
- paglets-0.1.0/docs/technical/serialization.md +36 -0
- paglets-0.1.0/docs/technical/services.md +43 -0
- paglets-0.1.0/docs/technical/tooling.md +57 -0
- paglets-0.1.0/docs/usage-ideas.md +285 -0
- paglets-0.1.0/mkdocs.yml +79 -0
- paglets-0.1.0/pyproject.toml +98 -0
- paglets-0.1.0/src/paglets/__init__.py +3 -0
- paglets-0.1.0/src/paglets/config/__init__.py +3 -0
- paglets-0.1.0/src/paglets/config/defaults/__init__.py +3 -0
- paglets-0.1.0/src/paglets/config/defaults/launch.toml +23 -0
- paglets-0.1.0/src/paglets/config/startup.py +431 -0
- paglets-0.1.0/src/paglets/core/__init__.py +3 -0
- paglets-0.1.0/src/paglets/core/agent.py +614 -0
- paglets-0.1.0/src/paglets/core/context_events.py +148 -0
- paglets-0.1.0/src/paglets/core/errors.py +59 -0
- paglets-0.1.0/src/paglets/core/events.py +46 -0
- paglets-0.1.0/src/paglets/core/itinerary.py +223 -0
- paglets-0.1.0/src/paglets/core/messages.py +229 -0
- paglets-0.1.0/src/paglets/core/runtime_values.py +55 -0
- paglets-0.1.0/src/paglets/core/wire.py +9 -0
- paglets-0.1.0/src/paglets/examples/__init__.py +3 -0
- paglets-0.1.0/src/paglets/examples/compute/__init__.py +42 -0
- paglets-0.1.0/src/paglets/examples/compute/agent.py +1279 -0
- paglets-0.1.0/src/paglets/examples/compute/chudnovsky.py +221 -0
- paglets-0.1.0/src/paglets/examples/compute/cli.py +261 -0
- paglets-0.1.0/src/paglets/examples/compute/models.py +111 -0
- paglets-0.1.0/src/paglets/examples/mesh_benchmark/__init__.py +59 -0
- paglets-0.1.0/src/paglets/examples/mesh_benchmark/agent.py +479 -0
- paglets-0.1.0/src/paglets/examples/mesh_benchmark/analysis.py +304 -0
- paglets-0.1.0/src/paglets/examples/mesh_benchmark/cli.py +327 -0
- paglets-0.1.0/src/paglets/examples/mesh_benchmark/models.py +123 -0
- paglets-0.1.0/src/paglets/examples/mesh_info/__init__.py +43 -0
- paglets-0.1.0/src/paglets/examples/mesh_info/agent.py +466 -0
- paglets-0.1.0/src/paglets/examples/mesh_info/cli.py +197 -0
- paglets-0.1.0/src/paglets/examples/performance/__init__.py +36 -0
- paglets-0.1.0/src/paglets/examples/performance/agent.py +196 -0
- paglets-0.1.0/src/paglets/examples/performance/cli.py +290 -0
- paglets-0.1.0/src/paglets/examples/performance/kernels.py +549 -0
- paglets-0.1.0/src/paglets/examples/performance/models.py +98 -0
- paglets-0.1.0/src/paglets/examples/search/__init__.py +25 -0
- paglets-0.1.0/src/paglets/examples/search/agent.py +287 -0
- paglets-0.1.0/src/paglets/examples/search/cli.py +369 -0
- paglets-0.1.0/src/paglets/examples/search/local_search.py +555 -0
- paglets-0.1.0/src/paglets/examples/search/models.py +103 -0
- paglets-0.1.0/src/paglets/examples/system_info/__init__.py +47 -0
- paglets-0.1.0/src/paglets/examples/system_info/agent.py +503 -0
- paglets-0.1.0/src/paglets/examples/system_info/cli.py +215 -0
- paglets-0.1.0/src/paglets/persistence/__init__.py +3 -0
- paglets-0.1.0/src/paglets/persistence/persistency.py +131 -0
- paglets-0.1.0/src/paglets/persistence/storage.py +92 -0
- paglets-0.1.0/src/paglets/remote/__init__.py +3 -0
- paglets-0.1.0/src/paglets/remote/admin.py +457 -0
- paglets-0.1.0/src/paglets/remote/client.py +126 -0
- paglets-0.1.0/src/paglets/remote/mesh.py +625 -0
- paglets-0.1.0/src/paglets/remote/proxy.py +230 -0
- paglets-0.1.0/src/paglets/remote/references.py +36 -0
- paglets-0.1.0/src/paglets/remote/transfer.py +59 -0
- paglets-0.1.0/src/paglets/remote/transport.py +394 -0
- paglets-0.1.0/src/paglets/runtime/__init__.py +3 -0
- paglets-0.1.0/src/paglets/runtime/binding.py +61 -0
- paglets-0.1.0/src/paglets/runtime/child_bootstrap.py +227 -0
- paglets-0.1.0/src/paglets/runtime/child_calls.py +258 -0
- paglets-0.1.0/src/paglets/runtime/child_endpoint.py +121 -0
- paglets-0.1.0/src/paglets/runtime/child_facade.py +424 -0
- paglets-0.1.0/src/paglets/runtime/envelope.py +59 -0
- paglets-0.1.0/src/paglets/runtime/host.py +1142 -0
- paglets-0.1.0/src/paglets/runtime/http_api.py +298 -0
- paglets-0.1.0/src/paglets/runtime/inactive_records.py +180 -0
- paglets-0.1.0/src/paglets/runtime/lifecycle.py +552 -0
- paglets-0.1.0/src/paglets/runtime/mailbox.py +147 -0
- paglets-0.1.0/src/paglets/runtime/process_controller.py +343 -0
- paglets-0.1.0/src/paglets/runtime/process_protocol.py +163 -0
- paglets-0.1.0/src/paglets/runtime/process_runtime.py +12 -0
- paglets-0.1.0/src/paglets/runtime/relay.py +611 -0
- paglets-0.1.0/src/paglets/runtime/resident_services.py +420 -0
- paglets-0.1.0/src/paglets/runtime/resources.py +69 -0
- paglets-0.1.0/src/paglets/serialization/__init__.py +3 -0
- paglets-0.1.0/src/paglets/serialization/codec.py +191 -0
- paglets-0.1.0/src/paglets/services/__init__.py +3 -0
- paglets-0.1.0/src/paglets/services/contracts.py +390 -0
- paglets-0.1.0/src/paglets/services/resident.py +69 -0
- paglets-0.1.0/src/paglets/tooling/__init__.py +3 -0
- paglets-0.1.0/src/paglets/tooling/cli.py +332 -0
- paglets-0.1.0/src/paglets/tooling/discovery.py +168 -0
- paglets-0.1.0/src/paglets/tooling/git_update.py +493 -0
- paglets-0.1.0/tests/__init__.py +3 -0
- paglets-0.1.0/tests/config/test_startup_config.py +360 -0
- paglets-0.1.0/tests/core/test_aglets_concepts.py +201 -0
- paglets-0.1.0/tests/core/test_aglets_extensions.py +530 -0
- paglets-0.1.0/tests/core/test_itinerary_flow.py +79 -0
- paglets-0.1.0/tests/core/test_runtime_values.py +156 -0
- paglets-0.1.0/tests/core/test_service_contracts.py +297 -0
- paglets-0.1.0/tests/examples/test_compute_agent_flow.py +317 -0
- paglets-0.1.0/tests/examples/test_compute_cli.py +183 -0
- paglets-0.1.0/tests/examples/test_compute_math.py +244 -0
- paglets-0.1.0/tests/examples/test_compute_scheduling.py +329 -0
- paglets-0.1.0/tests/examples/test_disk_survey_demo.py +23 -0
- paglets-0.1.0/tests/examples/test_mesh_benchmark.py +496 -0
- paglets-0.1.0/tests/examples/test_mesh_info.py +207 -0
- paglets-0.1.0/tests/examples/test_mesh_info_cli.py +55 -0
- paglets-0.1.0/tests/examples/test_performance.py +322 -0
- paglets-0.1.0/tests/examples/test_search_example.py +221 -0
- paglets-0.1.0/tests/examples/test_system_info.py +109 -0
- paglets-0.1.0/tests/remote/test_admin_client.py +85 -0
- paglets-0.1.0/tests/remote/test_admin_config.py +111 -0
- paglets-0.1.0/tests/remote/test_mesh.py +331 -0
- paglets-0.1.0/tests/runtime/test_binding.py +184 -0
- paglets-0.1.0/tests/runtime/test_durable_deactivation.py +224 -0
- paglets-0.1.0/tests/runtime/test_http_api_basic.py +176 -0
- paglets-0.1.0/tests/runtime/test_http_auth.py +180 -0
- paglets-0.1.0/tests/runtime/test_http_transfer.py +397 -0
- paglets-0.1.0/tests/runtime/test_process_isolation.py +202 -0
- paglets-0.1.0/tests/runtime/test_relay_http.py +375 -0
- paglets-0.1.0/tests/runtime/test_storage.py +149 -0
- paglets-0.1.0/tests/support.py +11 -0
- paglets-0.1.0/tests/test_codec.py +90 -0
- paglets-0.1.0/tests/test_namespace_layout.py +36 -0
- paglets-0.1.0/tests/test_paglets_core.py +161 -0
- paglets-0.1.0/tests/tooling/test_discovery.py +77 -0
- paglets-0.1.0/tests/tooling/test_git_update.py +303 -0
- paglets-0.1.0/tests/tooling/test_host_git_update.py +388 -0
- paglets-0.1.0/uv.lock +1064 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Copyright (c) 2026 by C. Klukas.
|
|
2
|
+
# Licensed under the MIT License. See LICENSE for details.
|
|
3
|
+
|
|
4
|
+
name: CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
pull_request:
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
checks:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- name: Check out repository
|
|
20
|
+
uses: actions/checkout@v7
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Set up uv
|
|
28
|
+
uses: astral-sh/setup-uv@v6
|
|
29
|
+
|
|
30
|
+
- name: Install project
|
|
31
|
+
run: uv sync --dev --extra docs
|
|
32
|
+
|
|
33
|
+
- name: Lint
|
|
34
|
+
run: uv run ruff check .
|
|
35
|
+
|
|
36
|
+
- name: Check formatting
|
|
37
|
+
run: uv run ruff format --check .
|
|
38
|
+
|
|
39
|
+
- name: Type check
|
|
40
|
+
run: uv run pyright
|
|
41
|
+
|
|
42
|
+
- name: Test
|
|
43
|
+
run: uv run pytest --cov=paglets --cov-report=term-missing --cov-report=xml
|
|
44
|
+
|
|
45
|
+
- name: Build documentation
|
|
46
|
+
run: uv run --extra docs mkdocs build --strict
|
|
47
|
+
|
|
48
|
+
- name: Build package
|
|
49
|
+
run: uv build
|
|
50
|
+
|
|
51
|
+
- name: Smoke-test wheel installation
|
|
52
|
+
run: |
|
|
53
|
+
python -m venv /tmp/paglets-wheel-smoke
|
|
54
|
+
/tmp/paglets-wheel-smoke/bin/python -m pip install dist/*.whl
|
|
55
|
+
/tmp/paglets-wheel-smoke/bin/paglets-host --help
|
|
56
|
+
/tmp/paglets-wheel-smoke/bin/paglets-mesh-benchmark --help
|
|
57
|
+
/tmp/paglets-wheel-smoke/bin/paglets-mesh-info --help
|
|
58
|
+
/tmp/paglets-wheel-smoke/bin/paglets-perf-test --help
|
|
59
|
+
/tmp/paglets-wheel-smoke/bin/paglets-pi-compute --help
|
|
60
|
+
/tmp/paglets-wheel-smoke/bin/paglets-search --help
|
|
61
|
+
/tmp/paglets-wheel-smoke/bin/paglets-sysinfo --help
|
|
62
|
+
|
|
63
|
+
- name: Upload coverage artifact
|
|
64
|
+
uses: actions/upload-artifact@v5
|
|
65
|
+
with:
|
|
66
|
+
name: coverage-${{ matrix.python-version }}
|
|
67
|
+
path: coverage.xml
|
|
68
|
+
|
|
69
|
+
- name: Smoke-test command line entry points
|
|
70
|
+
run: |
|
|
71
|
+
uv run paglets-host --help
|
|
72
|
+
uv run paglets-mesh-benchmark --help
|
|
73
|
+
uv run paglets-mesh-info --help
|
|
74
|
+
uv run paglets-perf-test --help
|
|
75
|
+
uv run paglets-pi-compute --help
|
|
76
|
+
uv run paglets-search --help
|
|
77
|
+
uv run paglets-sysinfo --help
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Copyright (c) 2026 by C. Klukas.
|
|
2
|
+
# Licensed under the MIT License. See LICENSE for details.
|
|
3
|
+
|
|
4
|
+
name: Docs
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
paths:
|
|
11
|
+
- ".github/workflows/docs.yml"
|
|
12
|
+
- "docs/**"
|
|
13
|
+
- "mkdocs.yml"
|
|
14
|
+
- "pyproject.toml"
|
|
15
|
+
- "uv.lock"
|
|
16
|
+
- "src/**"
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
pages: write
|
|
22
|
+
id-token: write
|
|
23
|
+
|
|
24
|
+
concurrency:
|
|
25
|
+
group: pages
|
|
26
|
+
cancel-in-progress: false
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
build:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- name: Check out repository
|
|
33
|
+
uses: actions/checkout@v7
|
|
34
|
+
|
|
35
|
+
- name: Set up Python
|
|
36
|
+
uses: actions/setup-python@v6
|
|
37
|
+
with:
|
|
38
|
+
python-version: "3.11"
|
|
39
|
+
|
|
40
|
+
- name: Set up uv
|
|
41
|
+
uses: astral-sh/setup-uv@v6
|
|
42
|
+
|
|
43
|
+
- name: Install documentation dependencies
|
|
44
|
+
run: uv sync --extra docs
|
|
45
|
+
|
|
46
|
+
- name: Build documentation
|
|
47
|
+
run: uv run --extra docs mkdocs build --strict
|
|
48
|
+
|
|
49
|
+
- name: Configure GitHub Pages
|
|
50
|
+
uses: actions/configure-pages@v6
|
|
51
|
+
|
|
52
|
+
- name: Upload documentation artifact
|
|
53
|
+
uses: actions/upload-pages-artifact@v5
|
|
54
|
+
with:
|
|
55
|
+
path: site
|
|
56
|
+
|
|
57
|
+
deploy:
|
|
58
|
+
environment:
|
|
59
|
+
name: github-pages
|
|
60
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
needs: build
|
|
63
|
+
steps:
|
|
64
|
+
- name: Deploy to GitHub Pages
|
|
65
|
+
id: deployment
|
|
66
|
+
uses: actions/deploy-pages@v5
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Copyright (c) 2026 by C. Klukas.
|
|
2
|
+
# Licensed under the MIT License. See LICENSE for details.
|
|
3
|
+
|
|
4
|
+
name: Publish Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- "v*.*.*"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
name: Build and verify package
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- name: Check out repository
|
|
21
|
+
uses: actions/checkout@v7
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v6
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.11"
|
|
27
|
+
|
|
28
|
+
- name: Set up uv
|
|
29
|
+
uses: astral-sh/setup-uv@v6
|
|
30
|
+
|
|
31
|
+
- name: Install project
|
|
32
|
+
run: uv sync --dev --extra docs
|
|
33
|
+
|
|
34
|
+
- name: Verify release tag matches package version
|
|
35
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
36
|
+
run: |
|
|
37
|
+
python - <<'PY'
|
|
38
|
+
import os
|
|
39
|
+
import tomllib
|
|
40
|
+
from pathlib import Path
|
|
41
|
+
|
|
42
|
+
version = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))["project"]["version"]
|
|
43
|
+
tag = os.environ["GITHUB_REF_NAME"]
|
|
44
|
+
tag_version = tag[1:] if tag.startswith("v") else tag
|
|
45
|
+
if tag_version != version:
|
|
46
|
+
raise SystemExit(f"tag {tag!r} does not match pyproject version {version!r}")
|
|
47
|
+
PY
|
|
48
|
+
|
|
49
|
+
- name: Lint
|
|
50
|
+
run: uv run ruff check .
|
|
51
|
+
|
|
52
|
+
- name: Check formatting
|
|
53
|
+
run: uv run ruff format --check .
|
|
54
|
+
|
|
55
|
+
- name: Type check
|
|
56
|
+
run: uv run pyright
|
|
57
|
+
|
|
58
|
+
- name: Test
|
|
59
|
+
run: uv run pytest
|
|
60
|
+
|
|
61
|
+
- name: Build documentation
|
|
62
|
+
run: uv run --extra docs mkdocs build --strict
|
|
63
|
+
|
|
64
|
+
- name: Build package
|
|
65
|
+
run: uv build
|
|
66
|
+
|
|
67
|
+
- name: Check package metadata
|
|
68
|
+
run: uvx twine check --strict dist/*
|
|
69
|
+
|
|
70
|
+
- name: Smoke-test wheel installation
|
|
71
|
+
run: |
|
|
72
|
+
python -m venv /tmp/paglets-wheel-smoke
|
|
73
|
+
/tmp/paglets-wheel-smoke/bin/python -m pip install dist/*.whl
|
|
74
|
+
/tmp/paglets-wheel-smoke/bin/python - <<'PY'
|
|
75
|
+
import importlib.metadata
|
|
76
|
+
import paglets
|
|
77
|
+
|
|
78
|
+
assert importlib.metadata.version("paglets")
|
|
79
|
+
assert paglets.__doc__
|
|
80
|
+
PY
|
|
81
|
+
/tmp/paglets-wheel-smoke/bin/paglets-host --help
|
|
82
|
+
/tmp/paglets-wheel-smoke/bin/paglets-mesh-benchmark --help
|
|
83
|
+
/tmp/paglets-wheel-smoke/bin/paglets-mesh-info --help
|
|
84
|
+
/tmp/paglets-wheel-smoke/bin/paglets-perf-test --help
|
|
85
|
+
/tmp/paglets-wheel-smoke/bin/paglets-pi-compute --help
|
|
86
|
+
/tmp/paglets-wheel-smoke/bin/paglets-search --help
|
|
87
|
+
/tmp/paglets-wheel-smoke/bin/paglets-sysinfo --help
|
|
88
|
+
|
|
89
|
+
- name: Upload distribution artifact
|
|
90
|
+
uses: actions/upload-artifact@v5
|
|
91
|
+
with:
|
|
92
|
+
name: paglets-dist
|
|
93
|
+
path: dist/*
|
|
94
|
+
|
|
95
|
+
publish:
|
|
96
|
+
name: Publish to PyPI
|
|
97
|
+
needs: build
|
|
98
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
environment:
|
|
101
|
+
name: pypi
|
|
102
|
+
url: https://pypi.org/project/paglets/
|
|
103
|
+
permissions:
|
|
104
|
+
id-token: write
|
|
105
|
+
steps:
|
|
106
|
+
- name: Download distribution artifact
|
|
107
|
+
uses: actions/download-artifact@v6
|
|
108
|
+
with:
|
|
109
|
+
name: paglets-dist
|
|
110
|
+
path: dist
|
|
111
|
+
|
|
112
|
+
- name: Publish distribution
|
|
113
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
paglets-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
aglets-git/
|
|
2
|
+
|
|
3
|
+
# Python bytecode and caches
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
.pytest_cache/
|
|
8
|
+
.mypy_cache/
|
|
9
|
+
.ruff_cache/
|
|
10
|
+
.pyre/
|
|
11
|
+
.coverage
|
|
12
|
+
.coverage.*
|
|
13
|
+
coverage.xml
|
|
14
|
+
htmlcov/
|
|
15
|
+
|
|
16
|
+
# Virtual environments
|
|
17
|
+
.venv/
|
|
18
|
+
venv/
|
|
19
|
+
env/
|
|
20
|
+
.env
|
|
21
|
+
.env.*
|
|
22
|
+
|
|
23
|
+
# Build artifacts
|
|
24
|
+
build/
|
|
25
|
+
dist/
|
|
26
|
+
site/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
*.egg
|
|
29
|
+
|
|
30
|
+
# Local/editor/system files
|
|
31
|
+
.DS_Store
|
|
32
|
+
.idea/
|
|
33
|
+
.vscode/
|
|
34
|
+
*.swp
|
|
35
|
+
*.swo
|
|
36
|
+
|
|
37
|
+
# Local paglets runtime/config artifacts
|
|
38
|
+
.paglets/
|
|
39
|
+
ROADMAP.md
|
|
40
|
+
aglets_manual_ocr_clean.md
|
paglets-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
## License Headers
|
|
4
|
+
|
|
5
|
+
New code files must include the project copyright and license notice.
|
|
6
|
+
|
|
7
|
+
For Python files, use this exact header at the top of the file:
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
# Copyright (c) 2026 by C. Klukas.
|
|
11
|
+
# Licensed under the MIT License. See LICENSE for details.
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
For other source-code file types, use the equivalent comment syntax for that
|
|
15
|
+
language while preserving the same text.
|
|
16
|
+
|
|
17
|
+
Do not add project license headers to generated files, vendored dependencies,
|
|
18
|
+
virtual environments, caches, build outputs, or other ignored artifacts.
|
|
19
|
+
|
|
20
|
+
## Documentation
|
|
21
|
+
|
|
22
|
+
When adding or changing user-visible features, update the MkDocs documentation
|
|
23
|
+
under `docs/`.
|
|
24
|
+
|
|
25
|
+
Also update root-level `README.md` when the change affects installation,
|
|
26
|
+
quick-start usage, command-line entry points, major examples, public APIs, or
|
|
27
|
+
project-level behavior.
|
|
28
|
+
|
|
29
|
+
Keep documentation examples current with the code and prefer commands that can
|
|
30
|
+
be run from the repository root.
|
|
31
|
+
|
|
32
|
+
## Units
|
|
33
|
+
|
|
34
|
+
Use classic binary-scaled byte units for storage, payload sizes, and byte
|
|
35
|
+
throughput: label them as `KB`, `MB`, `GB`, etc., and scale by 1024. Do not use
|
|
36
|
+
IEC labels such as `KiB`, `MiB`, or `GiB`.
|
|
37
|
+
|
|
38
|
+
For network-style bit throughput, use decimal-scaled units such as `kbit/s`,
|
|
39
|
+
`Mbit/s`, and `Gbit/s`, scaled by 1000.
|
paglets-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 by C. Klukas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
paglets-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: paglets
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A small Python Aglets-inspired mobile object runtime.
|
|
5
|
+
Project-URL: Homepage, https://github.com/cklukas/paglets
|
|
6
|
+
Project-URL: Documentation, https://cklukas.github.io/paglets/
|
|
7
|
+
Project-URL: Repository, https://github.com/cklukas/paglets
|
|
8
|
+
Project-URL: Issues, https://github.com/cklukas/paglets/issues
|
|
9
|
+
Author: C. Klukas
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agents,distributed-systems,mesh,mobile-agents,runtime
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Requires-Dist: pathspec>=0.12
|
|
25
|
+
Requires-Dist: psutil>=5.9
|
|
26
|
+
Requires-Dist: setproctitle>=1.3
|
|
27
|
+
Provides-Extra: docs
|
|
28
|
+
Requires-Dist: mkdocs-material<10,>=9.5; extra == 'docs'
|
|
29
|
+
Requires-Dist: mkdocs<2,>=1.6; extra == 'docs'
|
|
30
|
+
Requires-Dist: mkdocstrings[python]<1,>=0.28; extra == 'docs'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# paglets
|
|
34
|
+
|
|
35
|
+
[](https://github.com/cklukas/paglets/actions/workflows/ci.yml)
|
|
36
|
+
[](https://github.com/cklukas/paglets/actions/workflows/publish.yml)
|
|
37
|
+
[](https://cklukas.github.io/paglets/)
|
|
38
|
+
[](https://www.python.org/)
|
|
39
|
+
[](LICENSE)
|
|
40
|
+
|
|
41
|
+
`paglets` is a compact Python re-imagining of the Java Aglets mobile-agent idea: stateful objects with identity, lifecycle hooks, message passing, proxies, movement between hosts, durable deactivation, resident services, and explicit dataclass state serialization.
|
|
42
|
+
|
|
43
|
+
Hosts are expected to already have the same paglet code importable. Movement transfers the paglet class name, state class name, and serialized dataclass state; it does not upload code or move Python stacks, threads, sockets, or arbitrary live resources.
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
Install and run tests from a checkout:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
uv run pytest
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Build the Python package locally:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
uv build
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
After a tagged release is published, install the package with:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
python -m pip install paglets
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Start two local hosts:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
uv run paglets-host --name alpha --port 8765 --mesh-version dev
|
|
69
|
+
uv run paglets-host --name beta --port 8766 --peer http://127.0.0.1:8765 --mesh-version dev
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Run a packaged example CLI:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
uv run paglets-sysinfo summary
|
|
76
|
+
uv run paglets-search grep TODO .
|
|
77
|
+
uv run paglets-pi-compute --digits 32
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Run a source-tree demo:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv run python demos/disk_survey_demo.py --hosts alpha beta gamma
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Minimal Paglet
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from dataclasses import dataclass, field
|
|
90
|
+
|
|
91
|
+
from paglets.core.agent import Paglet, PagletState
|
|
92
|
+
from paglets.core.messages import Message
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@dataclass
|
|
96
|
+
class CounterState(PagletState):
|
|
97
|
+
count: int = 0
|
|
98
|
+
events: list[str] = field(default_factory=list)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class CounterPaglet(Paglet[CounterState]):
|
|
102
|
+
State = CounterState
|
|
103
|
+
|
|
104
|
+
def handle_message(self, message: Message):
|
|
105
|
+
if message.kind == "increment":
|
|
106
|
+
self.state.count += int(message.args.get("by", 1))
|
|
107
|
+
return {"count": self.state.count}
|
|
108
|
+
return self.not_handled()
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Public imports are intentionally explicit:
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from paglets.runtime.host import Host
|
|
115
|
+
from paglets.core.agent import Paglet, PagletState
|
|
116
|
+
from paglets.core.messages import Message
|
|
117
|
+
from paglets.remote.proxy import PagletProxy
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Flat imports such as `from paglets import Host` are unsupported.
|
|
121
|
+
|
|
122
|
+
## Documentation
|
|
123
|
+
|
|
124
|
+
The full documentation is published at <https://cklukas.github.io/paglets/>.
|
|
125
|
+
|
|
126
|
+
Useful entry points:
|
|
127
|
+
|
|
128
|
+
- [Implementing Paglets](https://cklukas.github.io/paglets/implementing-paglets/)
|
|
129
|
+
- [Examples](https://cklukas.github.io/paglets/examples/)
|
|
130
|
+
- [Operations](https://cklukas.github.io/paglets/operations/)
|
|
131
|
+
- [Technical Reference](https://cklukas.github.io/paglets/technical/overview/)
|
|
132
|
+
- [Status And Limitations](https://cklukas.github.io/paglets/project/status/)
|
|
133
|
+
|
|
134
|
+
Build docs locally:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
uv run --extra docs mkdocs build --strict
|
|
138
|
+
uv run --extra docs mkdocs serve
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Project Layout
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
src/paglets/core/ paglet model, messages, lifecycle events
|
|
145
|
+
src/paglets/runtime/ host facade, child processes, HTTP, relay, storage runtime
|
|
146
|
+
src/paglets/remote/ clients, proxies, transfer tickets, mesh, admin API
|
|
147
|
+
src/paglets/persistence/ inactive records and managed storage
|
|
148
|
+
src/paglets/services/ service contracts and resident services
|
|
149
|
+
src/paglets/serialization/ dataclass wire conversion and import resolution
|
|
150
|
+
src/paglets/config/ launch config and bundled defaults
|
|
151
|
+
src/paglets/tooling/ CLI, discovery, git auto-update
|
|
152
|
+
src/paglets/examples/ packaged example agents and CLIs
|
|
153
|
+
demos/ runnable source-tree demo scripts
|
|
154
|
+
tests/ behavior-oriented test suites by topic
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Status
|
|
158
|
+
|
|
159
|
+
`paglets` is early-stage software for experiments and trusted local/LAN meshes. Use API-key authentication for shared networks and relay deployments.
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
MIT. See [LICENSE](LICENSE).
|
paglets-0.1.0/README.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# paglets
|
|
2
|
+
|
|
3
|
+
[](https://github.com/cklukas/paglets/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/cklukas/paglets/actions/workflows/publish.yml)
|
|
5
|
+
[](https://cklukas.github.io/paglets/)
|
|
6
|
+
[](https://www.python.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
`paglets` is a compact Python re-imagining of the Java Aglets mobile-agent idea: stateful objects with identity, lifecycle hooks, message passing, proxies, movement between hosts, durable deactivation, resident services, and explicit dataclass state serialization.
|
|
10
|
+
|
|
11
|
+
Hosts are expected to already have the same paglet code importable. Movement transfers the paglet class name, state class name, and serialized dataclass state; it does not upload code or move Python stacks, threads, sockets, or arbitrary live resources.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
Install and run tests from a checkout:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
uv run pytest
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Build the Python package locally:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
uv build
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
After a tagged release is published, install the package with:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
python -m pip install paglets
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Start two local hosts:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uv run paglets-host --name alpha --port 8765 --mesh-version dev
|
|
37
|
+
uv run paglets-host --name beta --port 8766 --peer http://127.0.0.1:8765 --mesh-version dev
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Run a packaged example CLI:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
uv run paglets-sysinfo summary
|
|
44
|
+
uv run paglets-search grep TODO .
|
|
45
|
+
uv run paglets-pi-compute --digits 32
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Run a source-tree demo:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
uv run python demos/disk_survey_demo.py --hosts alpha beta gamma
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Minimal Paglet
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from dataclasses import dataclass, field
|
|
58
|
+
|
|
59
|
+
from paglets.core.agent import Paglet, PagletState
|
|
60
|
+
from paglets.core.messages import Message
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass
|
|
64
|
+
class CounterState(PagletState):
|
|
65
|
+
count: int = 0
|
|
66
|
+
events: list[str] = field(default_factory=list)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class CounterPaglet(Paglet[CounterState]):
|
|
70
|
+
State = CounterState
|
|
71
|
+
|
|
72
|
+
def handle_message(self, message: Message):
|
|
73
|
+
if message.kind == "increment":
|
|
74
|
+
self.state.count += int(message.args.get("by", 1))
|
|
75
|
+
return {"count": self.state.count}
|
|
76
|
+
return self.not_handled()
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Public imports are intentionally explicit:
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from paglets.runtime.host import Host
|
|
83
|
+
from paglets.core.agent import Paglet, PagletState
|
|
84
|
+
from paglets.core.messages import Message
|
|
85
|
+
from paglets.remote.proxy import PagletProxy
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Flat imports such as `from paglets import Host` are unsupported.
|
|
89
|
+
|
|
90
|
+
## Documentation
|
|
91
|
+
|
|
92
|
+
The full documentation is published at <https://cklukas.github.io/paglets/>.
|
|
93
|
+
|
|
94
|
+
Useful entry points:
|
|
95
|
+
|
|
96
|
+
- [Implementing Paglets](https://cklukas.github.io/paglets/implementing-paglets/)
|
|
97
|
+
- [Examples](https://cklukas.github.io/paglets/examples/)
|
|
98
|
+
- [Operations](https://cklukas.github.io/paglets/operations/)
|
|
99
|
+
- [Technical Reference](https://cklukas.github.io/paglets/technical/overview/)
|
|
100
|
+
- [Status And Limitations](https://cklukas.github.io/paglets/project/status/)
|
|
101
|
+
|
|
102
|
+
Build docs locally:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
uv run --extra docs mkdocs build --strict
|
|
106
|
+
uv run --extra docs mkdocs serve
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Project Layout
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
src/paglets/core/ paglet model, messages, lifecycle events
|
|
113
|
+
src/paglets/runtime/ host facade, child processes, HTTP, relay, storage runtime
|
|
114
|
+
src/paglets/remote/ clients, proxies, transfer tickets, mesh, admin API
|
|
115
|
+
src/paglets/persistence/ inactive records and managed storage
|
|
116
|
+
src/paglets/services/ service contracts and resident services
|
|
117
|
+
src/paglets/serialization/ dataclass wire conversion and import resolution
|
|
118
|
+
src/paglets/config/ launch config and bundled defaults
|
|
119
|
+
src/paglets/tooling/ CLI, discovery, git auto-update
|
|
120
|
+
src/paglets/examples/ packaged example agents and CLIs
|
|
121
|
+
demos/ runnable source-tree demo scripts
|
|
122
|
+
tests/ behavior-oriented test suites by topic
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Status
|
|
126
|
+
|
|
127
|
+
`paglets` is early-stage software for experiments and trusted local/LAN meshes. Use API-key authentication for shared networks and relay deployments.
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
MIT. See [LICENSE](LICENSE).
|