noebase 0.1.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 (226) hide show
  1. noebase-0.1.2/PKG-INFO +6 -0
  2. noebase-0.1.2/noebase/__init__.py +132 -0
  3. noebase-0.1.2/noebase/__init__.pyi +68 -0
  4. noebase-0.1.2/noebase/_acts/__init__.py +1 -0
  5. noebase-0.1.2/noebase/_acts/actor.py +31 -0
  6. noebase-0.1.2/noebase/_acts/actor.pyi +15 -0
  7. noebase-0.1.2/noebase/_acts/agent.py +367 -0
  8. noebase-0.1.2/noebase/_acts/agent.pyi +52 -0
  9. noebase-0.1.2/noebase/_acts/api_key.py +46 -0
  10. noebase-0.1.2/noebase/_acts/api_key.pyi +17 -0
  11. noebase-0.1.2/noebase/_acts/app.py +86 -0
  12. noebase-0.1.2/noebase/_acts/app.pyi +20 -0
  13. noebase-0.1.2/noebase/_acts/approval.py +126 -0
  14. noebase-0.1.2/noebase/_acts/approval.pyi +26 -0
  15. noebase-0.1.2/noebase/_acts/audit.py +38 -0
  16. noebase-0.1.2/noebase/_acts/audit.pyi +16 -0
  17. noebase-0.1.2/noebase/_acts/auth.py +91 -0
  18. noebase-0.1.2/noebase/_acts/auth.pyi +23 -0
  19. noebase-0.1.2/noebase/_acts/cci.py +54 -0
  20. noebase-0.1.2/noebase/_acts/cci.pyi +17 -0
  21. noebase-0.1.2/noebase/_acts/check.py +121 -0
  22. noebase-0.1.2/noebase/_acts/check.pyi +25 -0
  23. noebase-0.1.2/noebase/_acts/checkpoint.py +24 -0
  24. noebase-0.1.2/noebase/_acts/checkpoint.pyi +14 -0
  25. noebase-0.1.2/noebase/_acts/cli.py +116 -0
  26. noebase-0.1.2/noebase/_acts/cli.pyi +23 -0
  27. noebase-0.1.2/noebase/_acts/clock.py +98 -0
  28. noebase-0.1.2/noebase/_acts/clock.pyi +21 -0
  29. noebase-0.1.2/noebase/_acts/codesite.py +556 -0
  30. noebase-0.1.2/noebase/_acts/codesite.pyi +73 -0
  31. noebase-0.1.2/noebase/_acts/compliance.py +31 -0
  32. noebase-0.1.2/noebase/_acts/compliance.pyi +15 -0
  33. noebase-0.1.2/noebase/_acts/delivery.py +36 -0
  34. noebase-0.1.2/noebase/_acts/delivery.pyi +16 -0
  35. noebase-0.1.2/noebase/_acts/dm.py +161 -0
  36. noebase-0.1.2/noebase/_acts/dm.pyi +30 -0
  37. noebase-0.1.2/noebase/_acts/editor.py +82 -0
  38. noebase-0.1.2/noebase/_acts/editor.pyi +20 -0
  39. noebase-0.1.2/noebase/_acts/event.py +67 -0
  40. noebase-0.1.2/noebase/_acts/event.pyi +18 -0
  41. noebase-0.1.2/noebase/_acts/fleet.py +56 -0
  42. noebase-0.1.2/noebase/_acts/fleet.pyi +17 -0
  43. noebase-0.1.2/noebase/_acts/form.py +89 -0
  44. noebase-0.1.2/noebase/_acts/form.pyi +22 -0
  45. noebase-0.1.2/noebase/_acts/graph.py +226 -0
  46. noebase-0.1.2/noebase/_acts/graph.pyi +36 -0
  47. noebase-0.1.2/noebase/_acts/history.py +157 -0
  48. noebase-0.1.2/noebase/_acts/history.pyi +30 -0
  49. noebase-0.1.2/noebase/_acts/inference.py +25 -0
  50. noebase-0.1.2/noebase/_acts/inference.pyi +14 -0
  51. noebase-0.1.2/noebase/_acts/kind.py +130 -0
  52. noebase-0.1.2/noebase/_acts/kind.pyi +26 -0
  53. noebase-0.1.2/noebase/_acts/legal.py +29 -0
  54. noebase-0.1.2/noebase/_acts/legal.pyi +15 -0
  55. noebase-0.1.2/noebase/_acts/log.py +25 -0
  56. noebase-0.1.2/noebase/_acts/log.pyi +14 -0
  57. noebase-0.1.2/noebase/_acts/mcp.py +57 -0
  58. noebase-0.1.2/noebase/_acts/mcp.pyi +18 -0
  59. noebase-0.1.2/noebase/_acts/me.py +168 -0
  60. noebase-0.1.2/noebase/_acts/me.pyi +29 -0
  61. noebase-0.1.2/noebase/_acts/measure.py +64 -0
  62. noebase-0.1.2/noebase/_acts/measure.pyi +18 -0
  63. noebase-0.1.2/noebase/_acts/memory.py +62 -0
  64. noebase-0.1.2/noebase/_acts/memory.pyi +18 -0
  65. noebase-0.1.2/noebase/_acts/node.py +635 -0
  66. noebase-0.1.2/noebase/_acts/node.pyi +86 -0
  67. noebase-0.1.2/noebase/_acts/notification.py +61 -0
  68. noebase-0.1.2/noebase/_acts/notification.pyi +18 -0
  69. noebase-0.1.2/noebase/_acts/org.py +471 -0
  70. noebase-0.1.2/noebase/_acts/org.pyi +67 -0
  71. noebase-0.1.2/noebase/_acts/payment.py +81 -0
  72. noebase-0.1.2/noebase/_acts/payment.pyi +21 -0
  73. noebase-0.1.2/noebase/_acts/permission.py +93 -0
  74. noebase-0.1.2/noebase/_acts/permission.pyi +22 -0
  75. noebase-0.1.2/noebase/_acts/place.py +291 -0
  76. noebase-0.1.2/noebase/_acts/place.pyi +45 -0
  77. noebase-0.1.2/noebase/_acts/plugin.py +248 -0
  78. noebase-0.1.2/noebase/_acts/plugin.pyi +34 -0
  79. noebase-0.1.2/noebase/_acts/projection.py +220 -0
  80. noebase-0.1.2/noebase/_acts/projection.pyi +38 -0
  81. noebase-0.1.2/noebase/_acts/publication.py +225 -0
  82. noebase-0.1.2/noebase/_acts/publication.pyi +39 -0
  83. noebase-0.1.2/noebase/_acts/pulse.py +46 -0
  84. noebase-0.1.2/noebase/_acts/pulse.pyi +17 -0
  85. noebase-0.1.2/noebase/_acts/sandbox.py +153 -0
  86. noebase-0.1.2/noebase/_acts/sandbox.pyi +28 -0
  87. noebase-0.1.2/noebase/_acts/schema.py +312 -0
  88. noebase-0.1.2/noebase/_acts/schema.pyi +44 -0
  89. noebase-0.1.2/noebase/_acts/search.py +113 -0
  90. noebase-0.1.2/noebase/_acts/search.pyi +23 -0
  91. noebase-0.1.2/noebase/_acts/space.py +628 -0
  92. noebase-0.1.2/noebase/_acts/space.pyi +88 -0
  93. noebase-0.1.2/noebase/_acts/stash.py +56 -0
  94. noebase-0.1.2/noebase/_acts/stash.pyi +18 -0
  95. noebase-0.1.2/noebase/_acts/task.py +41 -0
  96. noebase-0.1.2/noebase/_acts/task.pyi +16 -0
  97. noebase-0.1.2/noebase/_acts/thread.py +592 -0
  98. noebase-0.1.2/noebase/_acts/thread.pyi +80 -0
  99. noebase-0.1.2/noebase/_acts/turn.py +104 -0
  100. noebase-0.1.2/noebase/_acts/turn.pyi +24 -0
  101. noebase-0.1.2/noebase/_acts/user.py +177 -0
  102. noebase-0.1.2/noebase/_acts/user.pyi +33 -0
  103. noebase-0.1.2/noebase/_acts/webpage.py +24 -0
  104. noebase-0.1.2/noebase/_acts/webpage.pyi +14 -0
  105. noebase-0.1.2/noebase/_acts/workbench.py +131 -0
  106. noebase-0.1.2/noebase/_acts/workbench.pyi +25 -0
  107. noebase-0.1.2/noebase/_acts/workflow.py +147 -0
  108. noebase-0.1.2/noebase/_acts/workflow.pyi +29 -0
  109. noebase-0.1.2/noebase/_client.py +426 -0
  110. noebase-0.1.2/noebase/_contracts/_index.json +527 -0
  111. noebase-0.1.2/noebase/_contracts/actor.json +64 -0
  112. noebase-0.1.2/noebase/_contracts/agent.json +1697 -0
  113. noebase-0.1.2/noebase/_contracts/api_key.json +126 -0
  114. noebase-0.1.2/noebase/_contracts/app.json +327 -0
  115. noebase-0.1.2/noebase/_contracts/approval.json +593 -0
  116. noebase-0.1.2/noebase/_contracts/audit.json +62 -0
  117. noebase-0.1.2/noebase/_contracts/auth.json +286 -0
  118. noebase-0.1.2/noebase/_contracts/cci.json +185 -0
  119. noebase-0.1.2/noebase/_contracts/check.json +674 -0
  120. noebase-0.1.2/noebase/_contracts/checkpoint.json +36 -0
  121. noebase-0.1.2/noebase/_contracts/cli.json +500 -0
  122. noebase-0.1.2/noebase/_contracts/clock.json +474 -0
  123. noebase-0.1.2/noebase/_contracts/codesite.json +2591 -0
  124. noebase-0.1.2/noebase/_contracts/compliance.json +68 -0
  125. noebase-0.1.2/noebase/_contracts/delivery.json +71 -0
  126. noebase-0.1.2/noebase/_contracts/dm.json +476 -0
  127. noebase-0.1.2/noebase/_contracts/editor.json +291 -0
  128. noebase-0.1.2/noebase/_contracts/event.json +288 -0
  129. noebase-0.1.2/noebase/_contracts/fleet.json +154 -0
  130. noebase-0.1.2/noebase/_contracts/form.json +304 -0
  131. noebase-0.1.2/noebase/_contracts/graph.json +1008 -0
  132. noebase-0.1.2/noebase/_contracts/history.json +576 -0
  133. noebase-0.1.2/noebase/_contracts/inference.json +33 -0
  134. noebase-0.1.2/noebase/_contracts/kind.json +664 -0
  135. noebase-0.1.2/noebase/_contracts/legal.json +51 -0
  136. noebase-0.1.2/noebase/_contracts/log.json +74 -0
  137. noebase-0.1.2/noebase/_contracts/mcp.json +200 -0
  138. noebase-0.1.2/noebase/_contracts/me.json +510 -0
  139. noebase-0.1.2/noebase/_contracts/measure.json +450 -0
  140. noebase-0.1.2/noebase/_contracts/memory.json +205 -0
  141. noebase-0.1.2/noebase/_contracts/node.json +3102 -0
  142. noebase-0.1.2/noebase/_contracts/notification.json +128 -0
  143. noebase-0.1.2/noebase/_contracts/org.json +2772 -0
  144. noebase-0.1.2/noebase/_contracts/payment.json +246 -0
  145. noebase-0.1.2/noebase/_contracts/permission.json +407 -0
  146. noebase-0.1.2/noebase/_contracts/place.json +1286 -0
  147. noebase-0.1.2/noebase/_contracts/plugin.json +930 -0
  148. noebase-0.1.2/noebase/_contracts/projection.json +1173 -0
  149. noebase-0.1.2/noebase/_contracts/publication.json +1018 -0
  150. noebase-0.1.2/noebase/_contracts/pulse.json +119 -0
  151. noebase-0.1.2/noebase/_contracts/sandbox.json +711 -0
  152. noebase-0.1.2/noebase/_contracts/schema.json +2576 -0
  153. noebase-0.1.2/noebase/_contracts/search.json +397 -0
  154. noebase-0.1.2/noebase/_contracts/space.json +3423 -0
  155. noebase-0.1.2/noebase/_contracts/stash.json +216 -0
  156. noebase-0.1.2/noebase/_contracts/task.json +110 -0
  157. noebase-0.1.2/noebase/_contracts/thread.json +3302 -0
  158. noebase-0.1.2/noebase/_contracts/turn.json +389 -0
  159. noebase-0.1.2/noebase/_contracts/user.json +795 -0
  160. noebase-0.1.2/noebase/_contracts/webpage.json +33 -0
  161. noebase-0.1.2/noebase/_contracts/workbench.json +456 -0
  162. noebase-0.1.2/noebase/_contracts/workflow.json +495 -0
  163. noebase-0.1.2/noebase/_contracts.py +70 -0
  164. noebase-0.1.2/noebase/_file.py +131 -0
  165. noebase-0.1.2/noebase/_generated.py +44 -0
  166. noebase-0.1.2/noebase/_generated.pyi +119 -0
  167. noebase-0.1.2/noebase/_shape.py +138 -0
  168. noebase-0.1.2/noebase/_things/__init__.py +1 -0
  169. noebase-0.1.2/noebase/_things/apps.py +47 -0
  170. noebase-0.1.2/noebase/_things/apps.pyi +16 -0
  171. noebase-0.1.2/noebase/_things/automations.py +413 -0
  172. noebase-0.1.2/noebase/_things/automations.pyi +69 -0
  173. noebase-0.1.2/noebase/_things/brain.py +220 -0
  174. noebase-0.1.2/noebase/_things/brain.pyi +40 -0
  175. noebase-0.1.2/noebase/_things/calendar.py +83 -0
  176. noebase-0.1.2/noebase/_things/calendar.pyi +19 -0
  177. noebase-0.1.2/noebase/_things/changes.py +245 -0
  178. noebase-0.1.2/noebase/_things/changes.pyi +47 -0
  179. noebase-0.1.2/noebase/_things/checks.py +188 -0
  180. noebase-0.1.2/noebase/_things/checks.pyi +38 -0
  181. noebase-0.1.2/noebase/_things/code.py +336 -0
  182. noebase-0.1.2/noebase/_things/code.pyi +55 -0
  183. noebase-0.1.2/noebase/_things/conversations.py +370 -0
  184. noebase-0.1.2/noebase/_things/conversations.pyi +58 -0
  185. noebase-0.1.2/noebase/_things/decks.py +66 -0
  186. noebase-0.1.2/noebase/_things/decks.pyi +18 -0
  187. noebase-0.1.2/noebase/_things/exports.py +40 -0
  188. noebase-0.1.2/noebase/_things/exports.pyi +14 -0
  189. noebase-0.1.2/noebase/_things/files.py +265 -0
  190. noebase-0.1.2/noebase/_things/files.pyi +35 -0
  191. noebase-0.1.2/noebase/_things/goals.py +168 -0
  192. noebase-0.1.2/noebase/_things/goals.pyi +33 -0
  193. noebase-0.1.2/noebase/_things/kinds.py +402 -0
  194. noebase-0.1.2/noebase/_things/kinds.pyi +63 -0
  195. noebase-0.1.2/noebase/_things/me.py +388 -0
  196. noebase-0.1.2/noebase/_things/me.pyi +76 -0
  197. noebase-0.1.2/noebase/_things/members.py +312 -0
  198. noebase-0.1.2/noebase/_things/members.pyi +49 -0
  199. noebase-0.1.2/noebase/_things/membrane.py +401 -0
  200. noebase-0.1.2/noebase/_things/membrane.pyi +63 -0
  201. noebase-0.1.2/noebase/_things/org.py +170 -0
  202. noebase-0.1.2/noebase/_things/org.pyi +37 -0
  203. noebase-0.1.2/noebase/_things/pages.py +107 -0
  204. noebase-0.1.2/noebase/_things/pages.pyi +26 -0
  205. noebase-0.1.2/noebase/_things/papers.py +298 -0
  206. noebase-0.1.2/noebase/_things/papers.pyi +52 -0
  207. noebase-0.1.2/noebase/_things/pdfs.py +55 -0
  208. noebase-0.1.2/noebase/_things/pdfs.pyi +18 -0
  209. noebase-0.1.2/noebase/_things/radar.py +61 -0
  210. noebase-0.1.2/noebase/_things/radar.pyi +17 -0
  211. noebase-0.1.2/noebase/_things/reach.py +117 -0
  212. noebase-0.1.2/noebase/_things/reach.pyi +26 -0
  213. noebase-0.1.2/noebase/_things/sessions.py +350 -0
  214. noebase-0.1.2/noebase/_things/sessions.pyi +62 -0
  215. noebase-0.1.2/noebase/_things/space.py +237 -0
  216. noebase-0.1.2/noebase/_things/space.pyi +33 -0
  217. noebase-0.1.2/noebase/_things/tables.py +133 -0
  218. noebase-0.1.2/noebase/_things/tables.pyi +27 -0
  219. noebase-0.1.2/noebase/_wait.py +93 -0
  220. noebase-0.1.2/noebase/py.typed +0 -0
  221. noebase-0.1.2/noebase.egg-info/PKG-INFO +6 -0
  222. noebase-0.1.2/noebase.egg-info/SOURCES.txt +224 -0
  223. noebase-0.1.2/noebase.egg-info/dependency_links.txt +1 -0
  224. noebase-0.1.2/noebase.egg-info/top_level.txt +1 -0
  225. noebase-0.1.2/pyproject.toml +15 -0
  226. noebase-0.1.2/setup.cfg +4 -0
noebase-0.1.2/PKG-INFO ADDED
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: noebase
3
+ Version: 0.1.2
4
+ Summary: The NoeBase space as a Python module: every act a function, generated from the catalog.
5
+ Author-email: NoeBase <dev@noebase.com>
6
+ Requires-Python: >=3.10
@@ -0,0 +1,132 @@
1
+ """noebase: the space as a Python module. Start with `print(noebase.help())`.
2
+
3
+ `noebase.next()` says what to take next; things × actions below it (`noebase.goals.list()`).
4
+ An answer prints as a short summary; `noebase.full(x)` is all of it. Never open the module's files:
5
+ `noebase.help("goals")` and `noebase.describe("goals.list")` say what they hold.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import importlib
11
+ import re
12
+ from typing import Any
13
+
14
+ from ._client import VERSION as __version__
15
+ from ._client import NoeBaseError, ReviewPending, RunStopped, UnknownParameter, call, default_space
16
+ from ._contracts import act_of_path, contract, contracts
17
+ from ._generated import POWERS, THINGS, acts
18
+ from ._generated import * # noqa: F403 - the powers on top (`next`, …)
19
+ from . import _file
20
+ from ._shape import Rows, full
21
+ from ._wait import MIN_EVERY, WaitTimedOut, wait_for_check, watch
22
+
23
+
24
+ def __getattr__(name: str) -> Any:
25
+ """A thing loads the first time it is used (`noebase.goals`), so importing the module stays cheap."""
26
+ if name in THINGS:
27
+ ns = importlib.import_module(f"._things.{name}", __name__).ns
28
+ if name == "checks":
29
+ # Waiting is an event, not a loop (PY10e): the checks floor waits on a verdict, once and bounded.
30
+ ns.wait = wait_for_check
31
+ globals()[name] = ns
32
+ return ns
33
+ raise AttributeError(f"module 'noebase' has no attribute {name!r}; noebase.help() names what it has")
34
+
35
+
36
+ def __dir__() -> list[str]:
37
+ return sorted([*globals(), *THINGS])
38
+
39
+
40
+ def _snake(key: str) -> str:
41
+ return re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", key).lower()
42
+
43
+
44
+ def describe(name: str) -> str:
45
+ """The contract of one act, by its catalog name (`thread.next`) or its SDK path (`goals.list`)."""
46
+ entry = contract(name)
47
+ if entry is None:
48
+ act = act_of_path(name.removeprefix("noebase."))
49
+ entry = contract(act) if act else None
50
+ if entry is None:
51
+ raise KeyError(f"no act or path named {name!r}; try noebase.search({name!r})")
52
+ name = act
53
+ inp = entry["input"]
54
+ required = set(inp.get("required") or [])
55
+ lines = [f"{name} ({'writes' if entry['writes'] else 'reads'})", f" sdk: noebase.{entry['path'] or 'acts.' + name}", f" {entry['description']}"]
56
+ for key, prop in sorted((inp.get("properties") or {}).items()):
57
+ mark = "required" if key in required else "optional"
58
+ lines.append(f" - {_snake(key)} ({mark}): {prop.get('description', prop.get('type', ''))}")
59
+ for ex in entry.get("examples", [])[:3]:
60
+ lines.append(f" e.g. {ex}")
61
+ return "\n".join(lines)
62
+
63
+
64
+ def _first_line(text: str | None) -> str:
65
+ line = (text or "").strip().split("\n")[0]
66
+ return line if len(line) <= 110 else line[:109] + "…"
67
+
68
+
69
+ def _topic(topic: str) -> str:
70
+ """One thing's actions, one line each, or an act's contract."""
71
+ path = topic.removeprefix("noebase.")
72
+ head, *rest = path.split(".")
73
+ node: Any = __getattr__(head) if head in THINGS else None
74
+ for seg in rest:
75
+ node = getattr(node, seg, None) if node is not None else None
76
+ if node is not None and not callable(getattr(node, "__func__", None)):
77
+ lines = [f"noebase.{path}"]
78
+ for attr, member in sorted(vars(type(node)).items()):
79
+ if attr.startswith("_") and attr != "__call__":
80
+ continue
81
+ if callable(member) and not isinstance(member, type):
82
+ lines.append(f" .{attr}(): {_first_line(member.__doc__)}" if attr != "__call__" else f" (): {_first_line(member.__doc__)}")
83
+ elif not callable(member):
84
+ lines.append(f" .{attr}: more — noebase.help('{path}.{attr}')")
85
+ lines.append(f" one in full: noebase.describe('{path}.<action>')")
86
+ return "\n".join(lines)
87
+ try:
88
+ return describe(path)
89
+ except KeyError:
90
+ return search(topic, limit=5)
91
+
92
+
93
+ def help(topic: str | None = None) -> str: # noqa: A001 - the module's own help
94
+ """How to use the module; with a topic, that thing's actions (`help("goals")`) or one act."""
95
+ if topic is not None:
96
+ return _topic(topic)
97
+ return "\n".join([
98
+ "noebase — the space as a module. Calls are noebase.<thing>.<action>(…), keyword arguments in snake_case;",
99
+ "space_id defaults to your space. A list returns nextCursor: pass it back as cursor= for the next page.",
100
+ "on top: " + ", ".join(f"noebase.{p}()" for p in POWERS),
101
+ "things: " + ", ".join(THINGS),
102
+ "a thing's actions: noebase.help('goals') · one act in full: noebase.describe('goals.list')",
103
+ "find an act by words: noebase.search('what you want') · any act by name: noebase.call('thread.next', …)",
104
+ "an answer prints as a summary under 1 KB; noebase.full(x) is all of it; read fields by name.",
105
+ "x.source says 'file' or 'act' and x.age its seconds: a fresh space file answers goals.list();",
106
+ "noebase.sql('SELECT … FROM goal_graph') queries the file (views: noebase.sql('SELECT name FROM sqlite_master')).",
107
+ "a misspelt parameter raises UnknownParameter naming the closest; a write that needs a person",
108
+ "raises ReviewPending with its approval_id: retry the same call after a person approves it.",
109
+ ])
110
+
111
+
112
+ def sql(query: str, *params: Any, space_id: str | None = None) -> Rows:
113
+ """A read-only SQL query over the space file (`space.sqlite`): its views are meta, nodes, links,
114
+ goals, goal_graph, checks, check_runs, sessions, pulls, trails. The rows say the file's age (PY10d)."""
115
+ rows, age = _file.sql(query, *params, space_id=space_id)
116
+ return Rows(rows, "sql", "file", age)
117
+
118
+
119
+ def search(query: str, limit: int = 10) -> str:
120
+ """The acts whose names, SDK paths and words match `query` best, one line each."""
121
+ words = [w for w in re.split(r"\W+", query.lower()) if w]
122
+ scored = []
123
+ for name, entry in contracts().items():
124
+ hay = " ".join([name, entry.get("path") or "", entry["description"], *entry.get("examples", [])]).lower()
125
+ score = sum(hay.count(w) for w in words) + 3 * sum(w in name.lower() or w in (entry.get("path") or "") for w in words)
126
+ if score:
127
+ scored.append((score, name, entry))
128
+ scored.sort(key=lambda t: (-t[0], t[1]))
129
+ return "\n".join(f"noebase.{e['path'] or 'acts.' + n} ({n}): {_first_line(e['description'])}" for _, n, e in scored[:limit]) or f"nothing matches {query!r}"
130
+
131
+
132
+ __all__ = ["MIN_EVERY", "NoeBaseError", "ReviewPending", "RunStopped", "UnknownParameter", "WaitTimedOut", "watch", "acts", "call", "default_space", "describe", "full", "help", "search", "sql", *POWERS, *THINGS]
@@ -0,0 +1,68 @@
1
+ # generated - use noebase.describe() to learn an act; never open this file.
2
+ # The stub of noebase/__init__.py; scripts/generate-python-sdk.ts writes it.
3
+ from __future__ import annotations
4
+
5
+ from typing import Any
6
+
7
+ from ._client import NoeBaseError as NoeBaseError, ReviewPending as ReviewPending, RunStopped as RunStopped, UnknownParameter as UnknownParameter
8
+ from ._client import call as call, default_space as default_space
9
+ from ._shape import Rows as Rows, full as full
10
+ from ._wait import MIN_EVERY as MIN_EVERY, WaitTimedOut as WaitTimedOut, watch as watch
11
+
12
+ def describe(name: str) -> str: ...
13
+ def help(topic: str | None = None) -> str: ...
14
+ def search(query: str, limit: int = 10) -> str: ...
15
+ def sql(query: str, *params: Any, space_id: str | None = None) -> Rows: ...
16
+
17
+ from ._generated import acts as acts, next as next
18
+ from ._things.apps import _T_apps
19
+ from ._things.automations import _T_automations
20
+ from ._things.brain import _T_brain
21
+ from ._things.calendar import _T_calendar
22
+ from ._things.changes import _T_changes
23
+ from ._things.checks import _T_checks
24
+ from ._things.code import _T_code
25
+ from ._things.conversations import _T_conversations
26
+ from ._things.decks import _T_decks
27
+ from ._things.exports import _T_exports
28
+ from ._things.files import _T_files
29
+ from ._things.goals import _T_goals
30
+ from ._things.kinds import _T_kinds
31
+ from ._things.me import _T_me
32
+ from ._things.members import _T_members
33
+ from ._things.membrane import _T_membrane
34
+ from ._things.org import _T_org
35
+ from ._things.pages import _T_pages
36
+ from ._things.papers import _T_papers
37
+ from ._things.pdfs import _T_pdfs
38
+ from ._things.radar import _T_radar
39
+ from ._things.reach import _T_reach
40
+ from ._things.sessions import _T_sessions
41
+ from ._things.space import _T_space
42
+ from ._things.tables import _T_tables
43
+
44
+ apps: _T_apps
45
+ automations: _T_automations
46
+ brain: _T_brain
47
+ calendar: _T_calendar
48
+ changes: _T_changes
49
+ checks: _T_checks
50
+ code: _T_code
51
+ conversations: _T_conversations
52
+ decks: _T_decks
53
+ exports: _T_exports
54
+ files: _T_files
55
+ goals: _T_goals
56
+ kinds: _T_kinds
57
+ me: _T_me
58
+ members: _T_members
59
+ membrane: _T_membrane
60
+ org: _T_org
61
+ pages: _T_pages
62
+ papers: _T_papers
63
+ pdfs: _T_pdfs
64
+ radar: _T_radar
65
+ reach: _T_reach
66
+ sessions: _T_sessions
67
+ space: _T_space
68
+ tables: _T_tables
@@ -0,0 +1 @@
1
+ # generated - use noebase.describe() to learn an act; never open this file.
@@ -0,0 +1,31 @@
1
+ # generated - use noebase.describe() to learn an act; never open this file.
2
+ # From the action catalog and peers/python/sdk-map.tsv by scripts/generate-python-sdk.ts; guards/python-sdk-sync refuses it stale.
3
+ # fmt: off
4
+ from __future__ import annotations
5
+
6
+ from typing import Any, Literal
7
+
8
+ from .._client import _route
9
+
10
+
11
+ class _A_actor:
12
+ """noebase.acts.actor: the actor.* acts by their own names."""
13
+
14
+ def revoke(self, *, actor_id: str, actor_type: Literal["user", "agent"], reason: str | None = None, revocation_key: str | None = None, **extra: Any) -> Any:
15
+ """Instantly revokes a delegated actor — subsequent pipeline runs fail with FORBIDDEN
16
+
17
+ Act: actor.revoke (writes).
18
+
19
+ actor_id: a string at least 1 character(s) long
20
+ """
21
+ return _route((("actor.revoke", (), {"actor_id": "actorId", "actor_type": "actorType", "reason": "reason", "revocation_key": "revocationKey"}),), {"actor_id": actor_id, "actor_type": actor_type, "reason": reason, "revocation_key": revocation_key}, extra)
22
+
23
+ def whoami(self, *, place_id: str | None = None, **extra: Any) -> Any:
24
+ """Returns the ResolvedActor for the current caller (identity, role, capabilities, delegation, revocation)
25
+
26
+ Act: actor.whoami (reads).
27
+ """
28
+ return _route((("actor.whoami", (), {"place_id": "placeId"}),), {"place_id": place_id}, extra)
29
+
30
+
31
+ ns = _A_actor()
@@ -0,0 +1,15 @@
1
+ # generated - use noebase.describe() to learn an act; never open this file.
2
+ # From the action catalog and peers/python/sdk-map.tsv by scripts/generate-python-sdk.ts; guards/python-sdk-sync refuses it stale.
3
+ # fmt: off
4
+ from __future__ import annotations
5
+
6
+ from typing import Any, Literal
7
+
8
+ from .._shape import Result
9
+
10
+
11
+ class _A_actor:
12
+ def revoke(self, *, actor_id: str, actor_type: Literal["user", "agent"], reason: str | None = None, revocation_key: str | None = None) -> Result: ...
13
+ def whoami(self, *, place_id: str | None = None) -> Result: ...
14
+
15
+ ns: _A_actor
@@ -0,0 +1,367 @@
1
+ # generated - use noebase.describe() to learn an act; never open this file.
2
+ # From the action catalog and peers/python/sdk-map.tsv by scripts/generate-python-sdk.ts; guards/python-sdk-sync refuses it stale.
3
+ # fmt: off
4
+ from __future__ import annotations
5
+
6
+ from typing import Any, Literal
7
+
8
+ from .._client import _route
9
+
10
+
11
+ class _A_agent:
12
+ """noebase.acts.agent: the agent.* acts by their own names."""
13
+
14
+ def add_lane(self, *, codesite: str | None = None, harness: Literal["claude-code", "codex", "cloud"] | None = None, look: str | None = None, model: str | None = None, name: str | None = None, role: Literal["researcher", "writer", "feedback"] | None = None, rules: str | None = None, space_id: str | None = None, stance: str | None = None, voice: str | None = None, **extra: Any) -> Any:
15
+ """Add an agent colleague to this space's Members. A role (researcher, writer, feedback) presets its name, stance and rules.
16
+
17
+ Act: agent.addLane (writes).
18
+
19
+ codesite: a string at most 100 character(s) long
20
+ look: a string at most 16 character(s) long
21
+ model: a string at most 120 character(s) long
22
+ name: a string at most 100 character(s) long
23
+ rules: a string at most 8000 character(s) long
24
+ stance: a string at most 80 character(s) long
25
+ voice: a string at most 280 character(s) long
26
+ """
27
+ return _route((("agent.addLane", (), {"codesite": "codesite", "harness": "harness", "look": "look", "model": "model", "name": "name", "role": "role", "rules": "rules", "space_id": "spaceId", "stance": "stance", "voice": "voice"}),), {"codesite": codesite, "harness": harness, "look": look, "model": model, "name": name, "role": role, "rules": rules, "space_id": space_id, "stance": stance, "voice": voice}, extra)
28
+
29
+ def begin(self, *, harness: Literal["claude-code", "codex", "cloud"], codesite: str | None = None, harness_session: str | None = None, model: str | None = None, space_id: str | None = None, take: bool | None = None, unplaced: bool | None = None, wake: bool | None = None, **extra: Any) -> Any:
30
+ """Begin working in this space as a lane: resume your lane for this harness and codesite (or open one), show at work, and take the work your lane's context offers — or, with take, the schedule's next — the first call of a session on your computer
31
+
32
+ Act: agent.begin (writes).
33
+
34
+ codesite: a string at most 100 character(s) long
35
+ harness_session: a string at most 200 character(s) long
36
+ model: a string at most 120 character(s) long
37
+ """
38
+ return _route((("agent.begin", (), {"codesite": "codesite", "harness": "harness", "harness_session": "harnessSession", "model": "model", "space_id": "spaceId", "take": "take", "unplaced": "unplaced", "wake": "wake"}),), {"harness": harness, "codesite": codesite, "harness_session": harness_session, "model": model, "space_id": space_id, "take": take, "unplaced": unplaced, "wake": wake}, extra)
39
+
40
+ def close_session(self, *, lane_id: str, space_id: str | None = None, **extra: Any) -> Any:
41
+ """End your session on a lane so the next session can take it. Safe to call when it already ended.
42
+
43
+ Act: agent.closeSession (writes).
44
+ """
45
+ return _route((("agent.closeSession", (), {"lane_id": "laneId", "space_id": "spaceId"}),), {"lane_id": lane_id, "space_id": space_id}, extra)
46
+
47
+ def create(self, **extra: Any) -> Any:
48
+ """Creates a new agent with custom configuration
49
+
50
+ Act: agent.create (writes).
51
+ """
52
+ return _route((("agent.create", (), {}),), {}, extra)
53
+
54
+ def delete(self, *, _id: str, user_id: str, **extra: Any) -> Any:
55
+ """Deletes an agent
56
+
57
+ Act: agent.delete (writes).
58
+ """
59
+ return _route((("agent.delete", (), {"_id": "_id", "user_id": "userId"}),), {"_id": _id, "user_id": user_id}, extra)
60
+
61
+ def evaluate(self, *, item: str, skill_name: str, context: str | None = None, cursor: str | None = None, limit: int | None = None, model: Literal["accounts/fireworks/models/minimax-m3", "openai/gpt-oss-120b", "accounts/fireworks/models/glm-5p2"] | None = None, **extra: Any) -> Any:
62
+ """Judge an item against a named evaluator skill (e.g. evaluate-clarity). Returns a binary pass/fail verdict + decomposed sub-checks (plus a [0..1] pass-fraction score for aggregate trends). Used by experiment runners.
63
+
64
+ Act: agent.evaluate (writes).
65
+
66
+ item: a string at most 50000 character(s) long
67
+ skill_name: a string at most 120 character(s) long
68
+ context: a string at most 50000 character(s) long
69
+ cursor: A previous page's nextCursor
70
+ limit: Page size, default 500, clamped to 500
71
+ """
72
+ return _route((("agent.evaluate", (), {"context": "context", "cursor": "cursor", "item": "item", "limit": "limit", "model": "model", "skill_name": "skillName"}),), {"item": item, "skill_name": skill_name, "context": context, "cursor": cursor, "limit": limit, "model": model}, extra)
73
+
74
+ def extend_session(self, *, lane_id: str, lease_ms: float | None = None, space_id: str | None = None, **extra: Any) -> Any:
75
+ """Renew your session on a lane while you work. If you stop renewing, the session lapses and the lane is free for the next one.
76
+
77
+ Act: agent.extendSession (writes).
78
+ """
79
+ return _route((("agent.extendSession", (), {"lane_id": "laneId", "lease_ms": "leaseMs", "space_id": "spaceId"}),), {"lane_id": lane_id, "lease_ms": lease_ms, "space_id": space_id}, extra)
80
+
81
+ def fold_teammates(self, *, org_id: str, **extra: Any) -> Any:
82
+ """Turn every teammate one org's spaces still hold into a colleague, memberships kept
83
+
84
+ Act: agent.foldTeammates (writes).
85
+ """
86
+ return _route((("agent.foldTeammates", (), {"org_id": "orgId"}),), {"org_id": org_id}, extra)
87
+
88
+ def get(self, *, _id: str, user_id: str, **extra: Any) -> Any:
89
+ """Gets a single agent by ID
90
+
91
+ Act: agent.get (reads).
92
+ """
93
+ return _route((("agent.get", (), {"_id": "_id", "user_id": "userId"}),), {"_id": _id, "user_id": user_id}, extra)
94
+
95
+ def get_cloud_lanes(self, *, space_id: str | None = None, **extra: Any) -> Any:
96
+ """Read the capacity dial: how many lanes this space may run in the cloud at once, and how many run now.
97
+
98
+ Act: agent.getCloudLanes (reads).
99
+ """
100
+ return _route((("agent.getCloudLanes", (), {"space_id": "spaceId"}),), {"space_id": space_id}, extra)
101
+
102
+ def get_lane(self, *, lane_id: str, cursor: str | None = None, limit: int | None = None, space_id: str | None = None, **extra: Any) -> Any:
103
+ """Read one lane's profile — what it knows (the areas it finished leaves in, the verdicts it judged), its manifest, its recent leaves and sessions.
104
+
105
+ Act: agent.getLane (reads).
106
+
107
+ cursor: A previous page's nextCursor
108
+ limit: Page size, default 20, clamped to 20
109
+ """
110
+ return _route((("agent.getLane", (), {"cursor": "cursor", "lane_id": "laneId", "limit": "limit", "space_id": "spaceId"}),), {"lane_id": lane_id, "cursor": cursor, "limit": limit, "space_id": space_id}, extra)
111
+
112
+ def get_status(self, *, agent_id: str, user_id: str, **extra: Any) -> Any:
113
+ """Gets the current status of an agent
114
+
115
+ Act: agent.getStatus (reads).
116
+ """
117
+ return _route((("agent.getStatus", (), {"agent_id": "agentId", "user_id": "userId"}),), {"agent_id": agent_id, "user_id": user_id}, extra)
118
+
119
+ def get_worker(self, *, org_id: str, worker_id: str, **extra: Any) -> Any:
120
+ """Read one of this org's colleagues by id — its name, the persona it wears, its home thread and the places it serves.
121
+
122
+ Act: agent.getWorker (reads).
123
+
124
+ worker_id: a string at least 1 character(s) long
125
+ """
126
+ return _route((("agent.getWorker", (), {"org_id": "orgId", "worker_id": "workerId"}),), {"org_id": org_id, "worker_id": worker_id}, extra)
127
+
128
+ def heard(self, *, harness_session: str, channel: Literal["space", "web", "outside-mcp", "upload", "mail"] | None = None, cwd: str | None = None, event: Literal["UserPromptSubmit", "PostToolUse", "Idle", "PreToolUse"] | None = None, harness: Literal["claude-code", "codex", "cloud"] | None = None, tool: str | None = None, **extra: Any) -> Any:
129
+ """Hear what your session was told since it last heard — the messages of your lane, said once, in the prompt or tool hook's own answer
130
+
131
+ Act: agent.heard (writes).
132
+
133
+ harness_session: a string at most 200 character(s) long
134
+ cwd: a string at most 4096 character(s) long
135
+ tool: a string at most 200 character(s) long
136
+ """
137
+ return _route((("agent.heard", (), {"channel": "channel", "cwd": "cwd", "event": "event", "harness": "harness", "harness_session": "harnessSession", "tool": "tool"}),), {"harness_session": harness_session, "channel": channel, "cwd": cwd, "event": event, "harness": harness, "tool": tool}, extra)
138
+
139
+ def heard_receipt(self, *, harness_session: str, lane_id: str, message_ids: list, cursor: str | None = None, limit: int | None = None, space_id: str | None = None, **extra: Any) -> Any:
140
+ """Read which of these messages of a lane were said to one harness session, and when — never hearing them; a withheld message reads as waiting
141
+
142
+ Act: agent.heardReceipt (reads).
143
+
144
+ harness_session: a string at most 200 character(s) long
145
+ message_ids: an array of at most 50 item(s)
146
+ cursor: A previous page's nextCursor
147
+ limit: Page size, default 50, clamped to 50
148
+ """
149
+ return _route((("agent.heardReceipt", (), {"cursor": "cursor", "harness_session": "harnessSession", "lane_id": "laneId", "limit": "limit", "message_ids": "messageIds", "space_id": "spaceId"}),), {"harness_session": harness_session, "lane_id": lane_id, "message_ids": message_ids, "cursor": cursor, "limit": limit, "space_id": space_id}, extra)
150
+
151
+ def invoke(self, *, agent_id: str, intent: str, assembly: Literal["space", "none"] | None = None, conversation_history: list | None = None, persona: Any | None = None, space_id: Any | None = None, stream: Any | None = None, trigger_ref: Any | None = None, trigger_source: Literal["cci", "routine", "manual", "workflow", "loop", "lane"] | None = None, **extra: Any) -> Any:
152
+ """Run an agent for a single Turn (intent → LLM+tool loop → result). A turn that outlasts the call's wait answers status running with its turnId — never call again: what it writes lands in its place, and a step that needs approval waits in the Approval Center. Use agent.run for multi-step workflows.
153
+
154
+ Act: agent.invoke (writes).
155
+ """
156
+ return _route((("agent.invoke", (), {"agent_id": "agentId", "assembly": "assembly", "conversation_history": "conversationHistory", "intent": "intent", "persona": "persona", "space_id": "spaceId", "stream": "stream", "trigger_ref": "triggerRef", "trigger_source": "triggerSource"}),), {"agent_id": agent_id, "intent": intent, "assembly": assembly, "conversation_history": conversation_history, "persona": persona, "space_id": space_id, "stream": stream, "trigger_ref": trigger_ref, "trigger_source": trigger_source}, extra)
157
+
158
+ def list(self, *, user_id: str, agent_type: Literal["assistant", "writer", "researcher", "feedback", "custom"] | None = None, limit: int | None = None, offset: int | None = None, status: Literal["idle", "running", "paused"] | None = None, **extra: Any) -> Any:
159
+ """Lists all agents owned by the current user
160
+
161
+ Act: agent.list (reads).
162
+
163
+ limit: a number less than or equal to 100
164
+ offset: a non-negative number
165
+ """
166
+ return _route((("agent.list", (), {"agent_type": "agentType", "limit": "limit", "offset": "offset", "status": "status", "user_id": "userId"}),), {"user_id": user_id, "agent_type": agent_type, "limit": limit, "offset": offset, "status": status}, extra)
167
+
168
+ def list_lanes(self, *, cursor: str | None = None, limit: int | None = None, space_id: str | None = None, **extra: Any) -> Any:
169
+ """List this space's lanes — its colleagues, each with the agent and model that work it, its context window, codesite and character. Use to see who can take work here.
170
+
171
+ Act: agent.listLanes (reads).
172
+
173
+ cursor: A previous page's nextCursor
174
+ limit: Page size, default 200, clamped to 200
175
+ """
176
+ return _route((("agent.listLanes", (), {"cursor": "cursor", "limit": "limit", "space_id": "spaceId"}),), {"cursor": cursor, "limit": limit, "space_id": space_id}, extra)
177
+
178
+ def list_workers(self, *, org_id: str, cursor: str | None = None, include_retired: bool | None = None, limit: int | None = None, offset: int | None = None, **extra: Any) -> Any:
179
+ """List this org's named colleagues — the agents the org minted, with their persona, home thread and the places they serve. Use to see who is available to assign work to, or to find a colleague's home.
180
+
181
+ Act: agent.listWorkers (reads).
182
+
183
+ cursor: A previous page's nextCursor
184
+ limit: Page size, default 200, clamped to 200
185
+ offset: a non-negative number
186
+ """
187
+ return _route((("agent.listWorkers", (), {"cursor": "cursor", "include_retired": "includeRetired", "limit": "limit", "offset": "offset", "org_id": "orgId"}),), {"org_id": org_id, "cursor": cursor, "include_retired": include_retired, "limit": limit, "offset": offset}, extra)
188
+
189
+ def mark_unplaced(self, *, harness_session: str, **extra: Any) -> Any:
190
+ """Say that a run started in no space, so its first prompt joins it nowhere — the start hook's answer through NoeBase Local; it answers nothing
191
+
192
+ Act: agent.markUnplaced (writes).
193
+
194
+ harness_session: a string at most 200 character(s) long
195
+ """
196
+ return _route((("agent.markUnplaced", (), {"harness_session": "harnessSession"}),), {"harness_session": harness_session}, extra)
197
+
198
+ def may_stop(self, *, harness_session: str, **extra: Any) -> Any:
199
+ """Ask whether your session may stop: the door runs your leaf's checks — green closes the leaf and lets you go, a leaf waiting on a person lets you go, anything else names what is still red
200
+
201
+ Act: agent.mayStop (writes).
202
+
203
+ harness_session: a string at most 200 character(s) long
204
+ """
205
+ return _route((("agent.mayStop", (), {"harness_session": "harnessSession"}),), {"harness_session": harness_session}, extra)
206
+
207
+ def message(self, *, text: str, to_lane_id: str, lane_id: str | None = None, space_id: str | None = None, **extra: Any) -> Any:
208
+ """Write to another lane of this space, thread to thread — a question that cannot wait for the field. It lands in that lane's own thread, and the lane hears it before its next turn.
209
+
210
+ Act: agent.message (writes).
211
+
212
+ text: a string at most 4000 character(s) long
213
+ """
214
+ return _route((("agent.message", (), {"lane_id": "laneId", "space_id": "spaceId", "text": "text", "to_lane_id": "toLaneId"}),), {"text": text, "to_lane_id": to_lane_id, "lane_id": lane_id, "space_id": space_id}, extra)
215
+
216
+ def messages(self, *, lane_id: str, cursor: str | None = None, limit: int | None = None, since: float | None = None, space_id: str | None = None, **extra: Any) -> Any:
217
+ """Read what a lane of this space was told — the messages other lanes and people wrote into its thread, after the time of your last read
218
+
219
+ Act: agent.messages (reads).
220
+
221
+ cursor: A previous page's nextCursor; continue even if that page had no messages
222
+ limit: Page size, default 50, clamped to 50
223
+ """
224
+ return _route((("agent.messages", (), {"cursor": "cursor", "lane_id": "laneId", "limit": "limit", "since": "since", "space_id": "spaceId"}),), {"lane_id": lane_id, "cursor": cursor, "limit": limit, "since": since, "space_id": space_id}, extra)
225
+
226
+ def mint_worker(self, *, home_place_id: str, name: str, org_id: str, persona_name: str, job: str | None = None, **extra: Any) -> Any:
227
+ """Mint a named colleague for this org from a persona the org authored: it becomes a member of the home space with a pinned home thread you message it in. Use when a team wants a standing agent of its own ("Outbound", "Analyst") rather than one of the shipped role-agents.
228
+
229
+ Act: agent.mintWorker (writes).
230
+
231
+ name: a string at most 100 character(s) long
232
+ persona_name: a string at most 100 character(s) long
233
+ job: a string at most 280 character(s) long
234
+ """
235
+ return _route((("agent.mintWorker", (), {"home_place_id": "homePlaceId", "job": "job", "name": "name", "org_id": "orgId", "persona_name": "personaName"}),), {"home_place_id": home_place_id, "name": name, "org_id": org_id, "persona_name": persona_name, "job": job}, extra)
236
+
237
+ def name_lane(self, *, lane_id: str, name: str, space_id: str | None = None, **extra: Any) -> Any:
238
+ """Name a lane, or rename it — the name every roster shows and how it is addressed. Unique among the org's colleagues. Only the person who started the lane, or the space's owner, or an agent acting for one of them.
239
+
240
+ Act: agent.nameLane (writes).
241
+
242
+ name: a string at most 100 character(s) long
243
+ """
244
+ return _route((("agent.nameLane", (), {"lane_id": "laneId", "name": "name", "space_id": "spaceId"}),), {"lane_id": lane_id, "name": name, "space_id": space_id}, extra)
245
+
246
+ def open_session(self, *, lane_id: str, harness_session: str | None = None, lease_ms: float | None = None, space_id: str | None = None, **extra: Any) -> Any:
247
+ """Begin working a lane: claim it for this session, load its manifest and resume in its thread. A lane takes one session at a time — renew it with agent.extendSession, end it with agent.closeSession.
248
+
249
+ Act: agent.openSession (writes).
250
+
251
+ harness_session: a string at most 200 character(s) long
252
+ """
253
+ return _route((("agent.openSession", (), {"harness_session": "harnessSession", "lane_id": "laneId", "lease_ms": "leaseMs", "space_id": "spaceId"}),), {"lane_id": lane_id, "harness_session": harness_session, "lease_ms": lease_ms, "space_id": space_id}, extra)
254
+
255
+ def pass_message(self, *, lane_id: str, message_id: str, space_id: str | None = None, **extra: Any) -> Any:
256
+ """Pass a message that waits because the session that wrote it had read a web page or an outside server — it then reaches the lane it was written to. Only a person, in the app.
257
+
258
+ Act: agent.passMessage (writes).
259
+ """
260
+ return _route((("agent.passMessage", (), {"lane_id": "laneId", "message_id": "messageId", "space_id": "spaceId"}),), {"lane_id": lane_id, "message_id": message_id, "space_id": space_id}, extra)
261
+
262
+ def pending_work(self, *, assignee: dict | None = None, cursor: str | None = None, limit: int | None = None, space_id: str | None = None, **extra: Any) -> Any:
263
+ """Lists the open work in the current space — pending approvals awaiting a decision, live/blocked threads, and the standing routines of this space.
264
+
265
+ Act: agent.pendingWork (reads).
266
+
267
+ cursor: A previous page's nextCursor
268
+ limit: Page size, default 500, clamped to 500
269
+ """
270
+ return _route((("agent.pendingWork", (), {"assignee": "assignee", "cursor": "cursor", "limit": "limit", "space_id": "spaceId"}),), {"assignee": assignee, "cursor": cursor, "limit": limit, "space_id": space_id}, extra)
271
+
272
+ def present(self, *, harness_session: str, activity: list | None = None, **extra: Any) -> Any:
273
+ """Say your session is still at work, and what it did since its last beat — a heartbeat from the harness's hooks; it answers only the lane it beat for
274
+
275
+ Act: agent.present (writes).
276
+
277
+ harness_session: a string at most 200 character(s) long
278
+ activity: an array of at most 20 item(s)
279
+ """
280
+ return _route((("agent.present", (), {"activity": "activity", "harness_session": "harnessSession"}),), {"harness_session": harness_session, "activity": activity}, extra)
281
+
282
+ def recall_worker(self, *, org_id: str, worker_id: str, space_id: str | None = None, **extra: Any) -> Any:
283
+ """Withdraw one of the org's colleagues from this space — it stops being a member here and can no longer be assigned work in it. Its home space is refused: retire the colleague instead.
284
+
285
+ Act: agent.recallWorker (writes).
286
+
287
+ worker_id: a string at least 1 character(s) long
288
+ """
289
+ return _route((("agent.recallWorker", (), {"org_id": "orgId", "space_id": "spaceId", "worker_id": "workerId"}),), {"org_id": org_id, "worker_id": worker_id, "space_id": space_id}, extra)
290
+
291
+ def retire_worker(self, *, org_id: str, worker_id: str, **extra: Any) -> Any:
292
+ """Retire one of the org's colleagues: it leaves every place it served, its home is archived, and it can no longer act. Everything it already wrote stays where it is, still attributed to it.
293
+
294
+ Act: agent.retireWorker (writes).
295
+
296
+ worker_id: a string at least 1 character(s) long
297
+ """
298
+ return _route((("agent.retireWorker", (), {"org_id": "orgId", "worker_id": "workerId"}),), {"org_id": org_id, "worker_id": worker_id}, extra)
299
+
300
+ def session(self, *, lane_id: str, cursor: str | None = None, limit: int | None = None, space_id: str | None = None, **extra: Any) -> Any:
301
+ """Ask what a session is doing now — whether it is at work, the leaf it works, who works it, what it last did and the last things said in its thread
302
+
303
+ Act: agent.session (reads).
304
+
305
+ cursor: A previous page's nextCursor
306
+ limit: Page size, default 10, clamped to 10
307
+ """
308
+ return _route((("agent.session", (), {"cursor": "cursor", "lane_id": "laneId", "limit": "limit", "space_id": "spaceId"}),), {"lane_id": lane_id, "cursor": cursor, "limit": limit, "space_id": space_id}, extra)
309
+
310
+ def set_cloud_lanes(self, *, cloud_lanes: Any, space_id: str | None = None, **extra: Any) -> Any:
311
+ """Set how many lanes this space may run in the cloud at once — the capacity dial, which is also what a day costs. Lowering it stops the newest cloud lanes; a session on your own computer is never counted.
312
+
313
+ Act: agent.setCloudLanes (writes).
314
+ """
315
+ return _route((("agent.setCloudLanes", (), {"cloud_lanes": "cloudLanes", "space_id": "spaceId"}),), {"cloud_lanes": cloud_lanes, "space_id": space_id}, extra)
316
+
317
+ def set_manifest(self, *, lane_id: str, manifest: dict, space_id: str | None = None, **extra: Any) -> Any:
318
+ """Change a lane's manifest — the agent and model that work it, its context window and codesite, the look, voice and stance a person gives it, and the rules every session works under. Only the person who started the lane, or the space's owner.
319
+
320
+ Act: agent.setManifest (writes).
321
+ """
322
+ return _route((("agent.setManifest", (), {"lane_id": "laneId", "manifest": "manifest", "space_id": "spaceId"}),), {"lane_id": lane_id, "manifest": manifest, "space_id": space_id}, extra)
323
+
324
+ def start_lanes(self, *, count: int, goal_id: str | None = None, space_id: str | None = None, **extra: Any) -> Any:
325
+ """Start N agents in this space: raise the cloud dial by N, wake the idle cloud colleagues whose knowledge fits the waiting leaves, open new lanes for the rest, and let each take its next leaf. They stop when their leaves run out or the dial goes down.
326
+
327
+ Act: agent.startLanes (writes).
328
+
329
+ count: a number less than or equal to 50
330
+ """
331
+ return _route((("agent.startLanes", (), {"count": "count", "goal_id": "goalId", "space_id": "spaceId"}),), {"count": count, "goal_id": goal_id, "space_id": space_id}, extra)
332
+
333
+ def station_worker(self, *, org_id: str, worker_id: str, space_id: str | None = None, **extra: Any) -> Any:
334
+ """Post one of the org's colleagues to this space as a member, so it can be @-addressed and assigned work here. Use when a space needs a standing agent the org already minted.
335
+
336
+ Act: agent.stationWorker (writes).
337
+
338
+ worker_id: a string at least 1 character(s) long
339
+ """
340
+ return _route((("agent.stationWorker", (), {"org_id": "orgId", "space_id": "spaceId", "worker_id": "workerId"}),), {"org_id": org_id, "worker_id": worker_id, "space_id": space_id}, extra)
341
+
342
+ def stop_session(self, *, lane_id: str, space_id: str | None = None, **extra: Any) -> Any:
343
+ """Stop a lane's running session — its lease ends, and its harness's writes are refused until you open the lane again. Only the session's person, the person who started the lane, or the space's owner. A cooperative brake: to cut a credential off, revoke it.
344
+
345
+ Act: agent.stopSession (writes).
346
+ """
347
+ return _route((("agent.stopSession", (), {"lane_id": "laneId", "space_id": "spaceId"}),), {"lane_id": lane_id, "space_id": space_id}, extra)
348
+
349
+ def update(self, **extra: Any) -> Any:
350
+ """Updates an existing agent
351
+
352
+ Act: agent.update (writes).
353
+ """
354
+ return _route((("agent.update", (), {}),), {}, extra)
355
+
356
+ def what_changed(self, *, cursor: str | None = None, limit: int | None = None, since: str | None = None, space_id: str | None = None, **extra: Any) -> Any:
357
+ """Lists what changed in the current space since a timestamp — the recently created or updated items (metadata only), newest first. Defaults to the last 24 hours.
358
+
359
+ Act: agent.whatChanged (reads).
360
+
361
+ cursor: A previous page's nextCursor
362
+ limit: Page size, default 500, clamped to 500
363
+ """
364
+ return _route((("agent.whatChanged", (), {"cursor": "cursor", "limit": "limit", "since": "since", "space_id": "spaceId"}),), {"cursor": cursor, "limit": limit, "since": since, "space_id": space_id}, extra)
365
+
366
+
367
+ ns = _A_agent()