palonexus 0.2.0__tar.gz → 0.2.2__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 (57) hide show
  1. {palonexus-0.2.0 → palonexus-0.2.2}/PKG-INFO +6 -1
  2. palonexus-0.2.2/hatch_build.py +92 -0
  3. {palonexus-0.2.0 → palonexus-0.2.2}/pyproject.toml +19 -0
  4. palonexus-0.2.2/src/palonexus/_build.py +2 -0
  5. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/_generated/protocol.py +525 -519
  6. palonexus-0.2.2/src/palonexus/_sdist_provenance.py +3 -0
  7. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/_version.py +2 -2
  8. palonexus-0.2.2/src/palonexus/cli/__init__.py +2 -0
  9. palonexus-0.2.2/src/palonexus/cli/commands.py +979 -0
  10. palonexus-0.2.2/src/palonexus/cli/main.py +89 -0
  11. palonexus-0.2.2/src/palonexus/developer/__init__.py +30 -0
  12. palonexus-0.2.2/src/palonexus/developer/client.py +1614 -0
  13. palonexus-0.2.2/src/palonexus/developer/context.py +137 -0
  14. palonexus-0.2.2/src/palonexus/developer/contracts.py +713 -0
  15. palonexus-0.2.2/src/palonexus/developer/credentials.py +226 -0
  16. palonexus-0.2.2/src/palonexus/developer/guard.py +96 -0
  17. palonexus-0.2.2/src/palonexus/developer/runner.py +174 -0
  18. palonexus-0.2.2/src/palonexus/developer/scaffold.py +116 -0
  19. palonexus-0.2.2/src/palonexus/developer/templates/__init__.py +2 -0
  20. palonexus-0.2.2/src/palonexus/developer/templates/plain_python/__init__.py +2 -0
  21. palonexus-0.2.2/src/palonexus/developer/templates/plain_python/agent.py +19 -0
  22. palonexus-0.2.2/src/palonexus/developer/templates/plain_python/fixtures/release-change.json +5 -0
  23. palonexus-0.2.2/src/palonexus/developer/templates/plain_python/palonexus-agent.yaml +33 -0
  24. palonexus-0.2.2/src/palonexus/developer/templates/plain_python/palonexus-registration.yaml +10 -0
  25. palonexus-0.2.2/src/palonexus/developer/templates/plain_python/pyproject.toml.tmpl +5 -0
  26. palonexus-0.2.2/src/palonexus/developer/version.py +26 -0
  27. {palonexus-0.2.0 → palonexus-0.2.2}/.gitignore +0 -0
  28. {palonexus-0.2.0 → palonexus-0.2.2}/LICENSE +0 -0
  29. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/__init__.py +0 -0
  30. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/_canonicalize.py +0 -0
  31. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/_generated/__init__.py +0 -0
  32. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/approvals.py +0 -0
  33. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/async_client.py +0 -0
  34. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/client.py +0 -0
  35. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/context.py +0 -0
  36. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/credentials.py +0 -0
  37. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/errors.py +0 -0
  38. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/identity/__init__.py +0 -0
  39. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/identity/did.py +0 -0
  40. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/identity/oidc.py +0 -0
  41. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/identity/vc.py +0 -0
  42. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/integrations/__init__.py +0 -0
  43. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/integrations/deepagents.py +0 -0
  44. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/integrations/langchain.py +0 -0
  45. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/integrations/langgraph.py +0 -0
  46. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/keystore.py +0 -0
  47. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/models.py +0 -0
  48. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/protocol.py +0 -0
  49. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/py.typed +0 -0
  50. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/redaction.py +0 -0
  51. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/retry.py +0 -0
  52. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/testing/__init__.py +0 -0
  53. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/testing/fake_transport.py +0 -0
  54. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/testing/mock_server.py +0 -0
  55. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/transports/__init__.py +0 -0
  56. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/transports/base.py +0 -0
  57. {palonexus-0.2.0 → palonexus-0.2.2}/src/palonexus/transports/http.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: palonexus
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Python SDK for the PaloNexus agent control plane
5
5
  Project-URL: Homepage, https://github.com/rogerchucker/palonexus-sdk
6
6
  Project-URL: Repository, https://github.com/rogerchucker/palonexus-sdk
@@ -10,6 +10,7 @@ Project-URL: Changelog, https://github.com/rogerchucker/palonexus-sdk/blob/main/
10
10
  Author: PaloNexus maintainers
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE
13
+ Keywords: platform-contract-sha:febc6fd899e7007e46373ac3d7efac4c556552d3
13
14
  Classifier: Development Status :: 2 - Pre-Alpha
14
15
  Classifier: License :: OSI Approved :: MIT License
15
16
  Classifier: Programming Language :: Python :: 3
@@ -19,7 +20,11 @@ Requires-Python: >=3.12
19
20
  Requires-Dist: cryptography<47,>=46.0.5
20
21
  Requires-Dist: httpx<0.29,>=0.28.1
21
22
  Requires-Dist: idna==3.18
23
+ Requires-Dist: keyring<26,>=25.7.0
24
+ Requires-Dist: packaging<27,>=26
22
25
  Requires-Dist: pydantic<3,>=2.13.4
26
+ Requires-Dist: pyyaml==6.0.3
27
+ Requires-Dist: rfc8785<0.2,>=0.1.4
23
28
  Requires-Dist: unicodedata2==15.1.0
24
29
  Provides-Extra: deepagents
25
30
  Requires-Dist: deepagents<1,>=0.3; extra == 'deepagents'
@@ -0,0 +1,92 @@
1
+ # SPDX-License-Identifier: MIT
2
+ from __future__ import annotations
3
+
4
+ import re
5
+ import subprocess
6
+ from pathlib import Path
7
+ from typing import Any
8
+
9
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
10
+
11
+
12
+ class SourceRevisionBuildHook(BuildHookInterface[Any]):
13
+ PLUGIN_NAME = "source-revision"
14
+ _BUILD_PATTERN = re.compile(
15
+ r"# generated by the PaloNexus build hook\n"
16
+ r'SOURCE_REVISION = "([0-9a-f]{40})"\n'
17
+ )
18
+ _SDIST_PATTERN = re.compile(
19
+ r"# generated by the PaloNexus build hook\n"
20
+ r'SDIST_MARKER = "palonexus-sdk-sdist-v1"\n'
21
+ r'SOURCE_REVISION = "([0-9a-f]{40})"\n'
22
+ )
23
+
24
+ def _source_revision(self) -> str:
25
+ package = Path(self.root) / "src" / "palonexus"
26
+ marker = package / "_sdist_provenance.py"
27
+ evidence = package / "_build.py"
28
+ if marker.exists():
29
+ try:
30
+ marker_content = marker.read_text(encoding="utf-8")
31
+ evidence_content = evidence.read_text(encoding="utf-8")
32
+ except OSError as error:
33
+ raise RuntimeError(
34
+ "packaged SDK source revision evidence is unavailable"
35
+ ) from error
36
+ marker_match = self._SDIST_PATTERN.fullmatch(marker_content)
37
+ evidence_match = self._BUILD_PATTERN.fullmatch(evidence_content)
38
+ if (
39
+ marker_match is None
40
+ or evidence_match is None
41
+ or marker_match.group(1) != evidence_match.group(1)
42
+ ):
43
+ raise RuntimeError("packaged SDK source revision evidence is invalid")
44
+ revision = marker_match.group(1)
45
+ else:
46
+ try:
47
+ revision = subprocess.run(
48
+ ["git", "rev-parse", "--verify", "HEAD"],
49
+ cwd=self.root,
50
+ check=True,
51
+ capture_output=True,
52
+ text=True,
53
+ ).stdout.strip()
54
+ except (OSError, subprocess.CalledProcessError) as error:
55
+ raise RuntimeError(
56
+ "exact SDK source revision is unavailable"
57
+ ) from error
58
+ if re.fullmatch(r"[0-9a-f]{40}", revision) is None:
59
+ raise RuntimeError("exact SDK source revision is invalid")
60
+ return revision
61
+
62
+ def initialize(self, version: str, build_data: dict[str, Any]) -> None:
63
+ del version
64
+ revision = self._source_revision()
65
+ generated = Path(self.directory) / "palonexus-build" / "_build.py"
66
+ generated.parent.mkdir(parents=True, exist_ok=True)
67
+ generated.write_text(
68
+ "# generated by the PaloNexus build hook\n"
69
+ f'SOURCE_REVISION = "{revision}"\n',
70
+ encoding="utf-8",
71
+ )
72
+ destination = (
73
+ "src/palonexus/_build.py"
74
+ if self.target_name == "sdist"
75
+ else "palonexus/_build.py"
76
+ )
77
+ build_data.setdefault("force_include", {})[str(generated)] = destination
78
+ if self.target_name == "sdist":
79
+ marker = Path(self.directory) / "palonexus-build" / "_sdist_provenance.py"
80
+ marker.write_text(
81
+ "# generated by the PaloNexus build hook\n"
82
+ 'SDIST_MARKER = "palonexus-sdk-sdist-v1"\n'
83
+ f'SOURCE_REVISION = "{revision}"\n',
84
+ encoding="utf-8",
85
+ )
86
+ build_data.setdefault("force_include", {})[str(marker)] = (
87
+ "src/palonexus/_sdist_provenance.py"
88
+ )
89
+
90
+
91
+ def get_build_hook() -> type[SourceRevisionBuildHook]:
92
+ return SourceRevisionBuildHook
@@ -29,6 +29,7 @@ license-files = ["LICENSE"]
29
29
  authors = [
30
30
  { name = "PaloNexus maintainers" },
31
31
  ]
32
+ keywords = ["platform-contract-sha:febc6fd899e7007e46373ac3d7efac4c556552d3"]
32
33
  classifiers = [
33
34
  "Development Status :: 2 - Pre-Alpha",
34
35
  "License :: OSI Approved :: MIT License",
@@ -40,10 +41,17 @@ dependencies = [
40
41
  "cryptography>=46.0.5,<47",
41
42
  "httpx>=0.28.1,<0.29",
42
43
  "idna==3.18",
44
+ "keyring>=25.7.0,<26",
45
+ "packaging>=26,<27",
43
46
  "pydantic>=2.13.4,<3",
47
+ "pyyaml==6.0.3",
48
+ "rfc8785>=0.1.4,<0.2",
44
49
  "unicodedata2==15.1.0",
45
50
  ]
46
51
 
52
+ [project.scripts]
53
+ pnxs = "palonexus.cli.main:entrypoint"
54
+
47
55
  [project.urls]
48
56
  Homepage = "https://github.com/rogerchucker/palonexus-sdk"
49
57
  Repository = "https://github.com/rogerchucker/palonexus-sdk"
@@ -78,12 +86,23 @@ search_parent_directories = true
78
86
  [tool.hatch.build.hooks.vcs]
79
87
  version-file = "src/palonexus/_version.py"
80
88
 
89
+ [tool.hatch.build.hooks.custom]
90
+ path = "hatch_build.py"
91
+
81
92
  [tool.hatch.build.targets.wheel]
82
93
  packages = ["src/palonexus"]
83
94
 
84
95
  [tool.hatch.build.targets.sdist]
85
96
  include = [
86
97
  "LICENSE",
98
+ "hatch_build.py",
87
99
  "pyproject.toml",
88
100
  "src/palonexus",
89
101
  ]
102
+
103
+ [tool.palonexus.platform-contract]
104
+ repository = "rogerchucker/palonexus-platform"
105
+ # Task 1 adds canonical developer schemas to both repositories and lists their
106
+ # repository-relative paths here. The release gate rejects missing, extra, or
107
+ # byte-different files as soon as this list is populated.
108
+ schema-paths = ["contracts/developer/cli-compatibility-v1.schema.json", "contracts/developer/exact-action-v3.schema.json", "contracts/developer/registration-profile-v1.schema.json", "contracts/developer/v1.schema.json"]
@@ -0,0 +1,2 @@
1
+ # generated by the PaloNexus build hook
2
+ SOURCE_REVISION = "90b32d14d89ad419ce5ee7a4b3cee5ef3f6db5ce"