ream-artifacts 0.1.0__py3-none-any.whl

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 (108) hide show
  1. artifacts/__init__.py +91 -0
  2. artifacts/py.typed +0 -0
  3. ream/__init__.py +0 -0
  4. ream/admin.py +698 -0
  5. ream/anchors.py +672 -0
  6. ream/api.py +3779 -0
  7. ream/app.py +332 -0
  8. ream/brand/rooted-lg-dk.svg +12 -0
  9. ream/brand/rooted-lg-lt.svg +12 -0
  10. ream/brand/rooted-lg-mono.svg +12 -0
  11. ream/brand/rooted-sm-dk.svg +11 -0
  12. ream/brand/rooted-sm-lt.svg +11 -0
  13. ream/brand/rooted-sm-mono.svg +11 -0
  14. ream/cli.py +185 -0
  15. ream/client.py +2574 -0
  16. ream/clientlevel.py +46 -0
  17. ream/comments.py +2073 -0
  18. ream/connect.py +347 -0
  19. ream/connect_cli.py +222 -0
  20. ream/content.py +1322 -0
  21. ream/csp.py +234 -0
  22. ream/db.py +1190 -0
  23. ream/decide.py +2727 -0
  24. ream/decisions.py +2901 -0
  25. ream/design.py +196 -0
  26. ream/email_share.py +202 -0
  27. ream/envnames.py +51 -0
  28. ream/events.py +694 -0
  29. ream/folders.py +252 -0
  30. ream/formanswer.py +537 -0
  31. ream/formrecord.py +313 -0
  32. ream/forms.py +830 -0
  33. ream/forms_ui.py +396 -0
  34. ream/frame_pass.py +106 -0
  35. ream/gallery.py +7769 -0
  36. ream/ggscan.py +243 -0
  37. ream/grants.py +90 -0
  38. ream/holds.py +175 -0
  39. ream/hosts.py +103 -0
  40. ream/idempotency.py +110 -0
  41. ream/ids.py +7 -0
  42. ream/image_store.py +343 -0
  43. ream/images.py +439 -0
  44. ream/inbox.py +246 -0
  45. ream/keys.py +373 -0
  46. ream/listening.py +373 -0
  47. ream/logo.py +56 -0
  48. ream/mail.py +119 -0
  49. ream/maintenance.py +158 -0
  50. ream/markdown.py +165 -0
  51. ream/mcp.py +1193 -0
  52. ream/mcp_apps.py +371 -0
  53. ream/mcp_clients.py +508 -0
  54. ream/mcp_headers.py +108 -0
  55. ream/mcp_tools.py +1220 -0
  56. ream/migrate.py +515 -0
  57. ream/news.py +295 -0
  58. ream/nudge.py +251 -0
  59. ream/oauth.py +803 -0
  60. ream/oidc.py +555 -0
  61. ream/onboarding.py +1142 -0
  62. ream/owner.py +132 -0
  63. ream/packing.py +124 -0
  64. ream/pagediff.py +1257 -0
  65. ream/partner.py +680 -0
  66. ream/partner_in.py +977 -0
  67. ream/pickup.py +10 -0
  68. ream/plugin_api.py +547 -0
  69. ream/plugin_cli.py +414 -0
  70. ream/py.typed +0 -0
  71. ream/ratelimit.py +137 -0
  72. ream/reach.py +75 -0
  73. ream/receipts.py +332 -0
  74. ream/rename.py +343 -0
  75. ream/repack.py +224 -0
  76. ream/republish.py +250 -0
  77. ream/review.py +213 -0
  78. ream/scan.py +924 -0
  79. ream/scanners.py +183 -0
  80. ream/schema.sql +1329 -0
  81. ream/schema_sqlite.sql +287 -0
  82. ream/secret_shapes.txt +129 -0
  83. ream/sections.py +679 -0
  84. ream/selfupdate.py +721 -0
  85. ream/serve.py +196 -0
  86. ream/settings.py +719 -0
  87. ream/sinks.py +716 -0
  88. ream/stamp.py +92 -0
  89. ream/store.py +3000 -0
  90. ream/templates/_shared.css +136 -0
  91. ream/templates/comparison.html +299 -0
  92. ream/templates/decision-request.html +309 -0
  93. ream/templates/design.html +329 -0
  94. ream/templates/explainer.html +323 -0
  95. ream/templates/implementation-plan.html +288 -0
  96. ream/templates/incident.html +321 -0
  97. ream/templates/intent.html +354 -0
  98. ream/templates/project-status.html +328 -0
  99. ream/templates.py +127 -0
  100. ream/text.py +335 -0
  101. ream/textvars.py +281 -0
  102. ream/thumbs.py +496 -0
  103. ream/traps.py +229 -0
  104. ream/webhook.py +513 -0
  105. ream_artifacts-0.1.0.dist-info/METADATA +137 -0
  106. ream_artifacts-0.1.0.dist-info/RECORD +108 -0
  107. ream_artifacts-0.1.0.dist-info/WHEEL +4 -0
  108. ream_artifacts-0.1.0.dist-info/entry_points.txt +8 -0
artifacts/__init__.py ADDED
@@ -0,0 +1,91 @@
1
+ """The old import name, kept for good: `import artifacts` is `import ream`.
2
+
3
+ The package was renamed to `ream` (docs/decisions.md, "Ream inside the code too"). Callers
4
+ outside this repository still write `import artifacts`, `from artifacts.settings import ...`,
5
+ `artifacts.plugin_api`, or name `artifacts.client:run` as an entry point, and all of it keeps
6
+ working. Nothing here is a copy:
7
+
8
+ * `artifacts` itself becomes the `ream` module object (so `resources.files("artifacts")` finds
9
+ the schema and the templates in `ream`);
10
+ * `artifacts.X` is the SAME module object as `ream.X`, found by the finder below, so
11
+ `settings.override(...)` or a monkeypatch through either name acts on one module, never on
12
+ two copies that each hold their own state.
13
+
14
+ This file reads no environment and holds no logic of the service.
15
+ """
16
+
17
+ import importlib
18
+ import importlib.abc
19
+ import importlib.util
20
+ import sys
21
+ from importlib.machinery import ModuleSpec
22
+
23
+ import ream
24
+
25
+ _OLD = "artifacts"
26
+ _NEW = "ream"
27
+
28
+
29
+ class _AliasFinder(importlib.abc.MetaPathFinder, importlib.abc.Loader):
30
+ """Answers `artifacts.<x>` with the already-imported `ream.<x>`."""
31
+
32
+ def __init__(self) -> None:
33
+ self._real_specs: dict[str, ModuleSpec] = {}
34
+
35
+ def find_spec(self, fullname, path=None, target=None) -> ModuleSpec | None:
36
+ if not fullname.startswith(_OLD + "."):
37
+ return None
38
+ real = _NEW + fullname[len(_OLD) :]
39
+ try:
40
+ found = importlib.util.find_spec(real)
41
+ except ModuleNotFoundError:
42
+ return None
43
+ if found is None:
44
+ return None
45
+ self._real_spec(fullname)
46
+ return importlib.util.spec_from_loader(fullname, self)
47
+
48
+ def create_module(self, spec: ModuleSpec):
49
+ return importlib.import_module(_NEW + spec.name[len(_OLD) :])
50
+
51
+ def _real_spec(self, fullname: str) -> ModuleSpec | None:
52
+ """The spec `ream.<x>` was really imported with. Once `artifacts.<x>` has been
53
+ imported the import system overwrites `module.__spec__` with the alias spec, so
54
+ the first real one seen is kept."""
55
+ real = _NEW + fullname[len(_OLD) :]
56
+ if real not in self._real_specs:
57
+ found = importlib.util.find_spec(real)
58
+ if found is None or found.name != real:
59
+ return found
60
+ self._real_specs[real] = found
61
+ return self._real_specs[real]
62
+
63
+ def exec_module(self, module) -> None:
64
+ """Nothing to run: the module was executed under its real name. The import
65
+ system has just set `module.__spec__` to the alias spec; put the real one back."""
66
+ real = self._real_spec(_OLD + module.__name__[len(_NEW) :])
67
+ if real is not None:
68
+ module.__spec__ = real
69
+
70
+ def _real_loader(self, fullname: str):
71
+ real = self._real_spec(fullname)
72
+ if real is None or real.loader is None:
73
+ raise ImportError(f"no loader for {fullname}", name=fullname)
74
+ return real.loader
75
+
76
+ # `python -m artifacts.<x>` (runpy) asks the alias spec's loader for the code.
77
+ def get_code(self, fullname: str):
78
+ return self._real_loader(fullname).get_code(_NEW + fullname[len(_OLD) :])
79
+
80
+ def get_source(self, fullname: str):
81
+ return self._real_loader(fullname).get_source(_NEW + fullname[len(_OLD) :])
82
+
83
+ def is_package(self, fullname: str) -> bool:
84
+ return self._real_loader(fullname).is_package(_NEW + fullname[len(_OLD) :])
85
+
86
+
87
+ if not any(isinstance(f, _AliasFinder) for f in sys.meta_path):
88
+ sys.meta_path.insert(0, _AliasFinder())
89
+
90
+ # `import artifacts` hands back the ream package itself.
91
+ sys.modules[__name__] = ream
artifacts/py.typed ADDED
File without changes
ream/__init__.py ADDED
File without changes