@agentorg/cli 0.0.3 → 0.0.4

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 (153) hide show
  1. package/README.md +14 -10
  2. package/dist/bundled/index.json +4 -4
  3. package/dist/bundled/{sha256-87e121cbe58279f3a633e61c9773b61fc17fd53eac3d7c6f037925cbfd5d5384.agentorg → sha256-01d69bc3888c2a53963f4413d47de909d129ad27c78e9af6d830bb50c3478419.agentorg} +0 -0
  4. package/dist/bundled/{sha256-51ecf151e590f5e57f28229d4cb36e4932a2f1670e50ddf1a3ccf335a1ee146d.agentorg → sha256-84165e3be5c904fc971d983dab31102e07cca725d8629a6fd7d118fa3a0a88b8.agentorg} +0 -0
  5. package/dist/bundled/sha256-ade9132b3f34b4c39db92adeadc7e540dc745e4a81b5b54f5d45bf9ec92bca75.agentorg +0 -0
  6. package/dist/bundled/{sha256-b76ec31282e5b863ee9569dfd9d50b283a21101cbe1b3fac23d1cbcf16b9a408.agentorg → sha256-f4330f5987f37d8cf3aeb44d2f831b573641a87186daa2f811f0c35ba04804f0.agentorg} +0 -0
  7. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/build.d.ts +2 -2
  8. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/build.js +14 -4
  9. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/hub-actor.js +8 -0
  10. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/index.d.ts +1 -1
  11. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/index.js +1 -1
  12. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/router.js +40 -16
  13. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/state.d.ts +63 -0
  14. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/state.js +177 -36
  15. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/storage.d.ts +2 -1
  16. package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/storage.js +3 -2
  17. package/{node_modules → dist/node_modules}/@agentorg/hub/package.json +3 -0
  18. package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/hub.d.ts +43 -3
  19. package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/hub.js +40 -3
  20. package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/index.d.ts +1 -0
  21. package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/index.js +1 -0
  22. package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/installer.d.ts +37 -0
  23. package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/installer.js +34 -3
  24. package/dist/node_modules/@agentorg/interfaces/dist/src/rules.d.ts +35 -0
  25. package/dist/node_modules/@agentorg/interfaces/dist/src/rules.js +37 -0
  26. package/dist/node_modules/@agentorg/kit/dist/src/chat.d.ts +37 -0
  27. package/dist/node_modules/@agentorg/kit/dist/src/chat.js +131 -0
  28. package/dist/node_modules/@agentorg/kit/dist/src/components.d.ts +94 -0
  29. package/dist/node_modules/@agentorg/kit/dist/src/components.js +66 -0
  30. package/dist/node_modules/@agentorg/kit/dist/src/icons.d.ts +17 -0
  31. package/dist/node_modules/@agentorg/kit/dist/src/icons.js +30 -0
  32. package/dist/node_modules/@agentorg/kit/dist/src/index.d.ts +6 -0
  33. package/dist/node_modules/@agentorg/kit/dist/src/index.js +10 -0
  34. package/dist/node_modules/@agentorg/kit/dist/src/markdown.d.ts +9 -0
  35. package/dist/node_modules/@agentorg/kit/dist/src/markdown.js +14 -0
  36. package/dist/node_modules/@agentorg/kit/dist/src/resizable.d.ts +5 -0
  37. package/dist/node_modules/@agentorg/kit/dist/src/resizable.js +8 -0
  38. package/dist/node_modules/@agentorg/kit/dist/src/styles.d.ts +11 -0
  39. package/dist/node_modules/@agentorg/kit/dist/src/styles.js +166 -0
  40. package/dist/node_modules/@agentorg/kit/package.json +44 -0
  41. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/frame/runtime.js +172 -17
  42. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/host/runner.js +168 -11
  43. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/client.d.ts +18 -0
  44. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/client.js +24 -3
  45. package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.d.ts +8 -0
  46. package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.js +64 -0
  47. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame-entry.js +4 -4
  48. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame-host.d.ts +1 -10
  49. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame-host.js +0 -23
  50. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame-protocol.d.ts +0 -8
  51. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame.d.ts +0 -2
  52. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame.js +0 -8
  53. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/host.js +5 -0
  54. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/index.d.ts +1 -1
  55. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/module-host.d.ts +6 -1
  56. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/module-host.js +24 -1
  57. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/module.d.ts +30 -1
  58. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/package.js +111 -6
  59. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/runtime.d.ts +22 -1
  60. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/runtime.js +114 -0
  61. package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/testing.d.ts +14 -2
  62. package/dist/node_modules/@agentorg/sdk/dist/src/testing.js +89 -0
  63. package/{node_modules → dist/node_modules}/@agentorg/shell/dist/app.css +27 -144
  64. package/dist/node_modules/@agentorg/shell/dist/app.js +219 -0
  65. package/{node_modules → dist/node_modules}/@agentorg/shell/package.json +1 -0
  66. package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/index.d.ts +1 -1
  67. package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/ops.d.ts +14 -1
  68. package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/ops.js +22 -2
  69. package/dist/src/cli.js +23 -0
  70. package/dist/src/gateway.js +42 -1
  71. package/dist/src/rules.d.ts +71 -0
  72. package/dist/src/rules.js +157 -0
  73. package/package.json +13 -16
  74. package/dist/bundled/sha256-e4c0e857cea3a721998effe2ca859c4011978b9bc36e63c058bfc17c27a1772e.agentorg +0 -0
  75. package/node_modules/@agentorg/sdk/dist/src/testing.js +0 -51
  76. package/node_modules/@agentorg/shell/dist/app.js +0 -9
  77. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/hub-actor.d.ts +0 -0
  78. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/logs.d.ts +0 -0
  79. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/logs.js +0 -0
  80. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/net.d.ts +0 -0
  81. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/net.js +0 -0
  82. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/processes.d.ts +0 -0
  83. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/processes.js +0 -0
  84. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/router.d.ts +0 -0
  85. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/server.d.ts +0 -0
  86. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/server.js +0 -0
  87. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/validate-worker.d.ts +0 -0
  88. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/validate-worker.js +0 -0
  89. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/validate.d.ts +0 -0
  90. /package/{node_modules → dist/node_modules}/@agentorg/hub/dist/src/validate.js +0 -0
  91. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/account-login.d.ts +0 -0
  92. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/account-login.js +0 -0
  93. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/chat.d.ts +0 -0
  94. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/chat.js +0 -0
  95. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/http-egress.d.ts +0 -0
  96. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/http-egress.js +0 -0
  97. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/kv.d.ts +0 -0
  98. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/kv.js +0 -0
  99. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/layout.d.ts +0 -0
  100. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/layout.js +0 -0
  101. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/llm-session.d.ts +0 -0
  102. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/llm-session.js +0 -0
  103. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/storage-admin.d.ts +0 -0
  104. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/storage-admin.js +0 -0
  105. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/ui-shell.d.ts +0 -0
  106. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/ui-shell.js +0 -0
  107. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/ui-view.d.ts +0 -0
  108. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/dist/src/ui-view.js +0 -0
  109. /package/{node_modules → dist/node_modules}/@agentorg/interfaces/package.json +0 -0
  110. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/build.d.ts +0 -0
  111. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/build.js +0 -0
  112. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/canonical.d.ts +0 -0
  113. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/canonical.js +0 -0
  114. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/cli.d.ts +0 -0
  115. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/cli.js +0 -0
  116. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/client-http.d.ts +0 -0
  117. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/client-http.js +0 -0
  118. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/describe.d.ts +0 -0
  119. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/describe.js +0 -0
  120. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/errors.d.ts +0 -0
  121. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/errors.js +0 -0
  122. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame-entry.d.ts +0 -0
  123. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/frame-protocol.js +0 -0
  124. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/host-main.d.ts +0 -0
  125. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/host-main.js +0 -0
  126. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/host.d.ts +0 -0
  127. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/index.js +0 -0
  128. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/interface.d.ts +0 -0
  129. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/interface.js +0 -0
  130. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/manifest-api.d.ts +0 -0
  131. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/manifest-api.js +0 -0
  132. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/manifest.d.ts +0 -0
  133. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/manifest.js +0 -0
  134. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/module.js +0 -0
  135. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/package.d.ts +0 -0
  136. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/person-commands.d.ts +0 -0
  137. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/person-commands.js +0 -0
  138. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/tar.d.ts +0 -0
  139. /package/{node_modules → dist/node_modules}/@agentorg/sdk/dist/src/tar.js +0 -0
  140. /package/{node_modules → dist/node_modules}/@agentorg/sdk/package.json +0 -0
  141. /package/{node_modules → dist/node_modules}/@agentorg/shell/dist/agent-bindings.js +0 -0
  142. /package/{node_modules → dist/node_modules}/@agentorg/shell/dist/index.html +0 -0
  143. /package/{node_modules → dist/node_modules}/@agentorg/shell/src/agent-bindings.ts +0 -0
  144. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/bytes.d.ts +0 -0
  145. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/bytes.js +0 -0
  146. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/frames.d.ts +0 -0
  147. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/frames.js +0 -0
  148. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/index.js +0 -0
  149. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/transports.d.ts +0 -0
  150. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/transports.js +0 -0
  151. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/yamux.d.ts +0 -0
  152. /package/{node_modules → dist/node_modules}/@agentorg/wire/dist/src/yamux.js +0 -0
  153. /package/{node_modules → dist/node_modules}/@agentorg/wire/package.json +0 -0
@@ -34,8 +34,8 @@ export const hubPackages = defineInterface({
34
34
  /**
35
35
  * Build a package from its source, given as data (`package.json` and files under `src/`, up to
36
36
  * 768 KiB), and add it as `add` does. It's `agentorg build`'s build, reading no tsconfig; its
37
- * files import only `@agentorg/sdk`, `@agentorg/interfaces` and `zod` by name, and nothing outside
38
- * the package's folder, never by a pattern. A build that fails is
37
+ * files import only `@agentorg/sdk`, `@agentorg/interfaces`, `zod`, `react`, `react-dom` and
38
+ * `@agentorg/kit` by name, and nothing outside the package's folder, never by a pattern. A build that fails is
39
39
  * `Refused("build")` with the build's message, so the source can be fixed and built again.
40
40
  */
41
41
  build: method({
@@ -75,6 +75,12 @@ export const Actor = z.object({
75
75
  host: z.object({ available: z.boolean(), reason: z.string().optional() }).optional(),
76
76
  /** For a package Actor: its view modules, which the person's shell can place. */
77
77
  views: z.array(z.string()).optional(),
78
+ /**
79
+ * The Actor it was created for, when a manager created it on another's behalf (the installer
80
+ * names its caller). Provenance only: the Hub grants nothing from it; only a rule the person
81
+ * turned on may act on it.
82
+ */
83
+ installedFor: Id.optional(),
78
84
  });
79
85
  /** One line of an Actor's log, from its `ctx.log` or its process's own output. */
80
86
  export const LogLine = z.object({
@@ -93,12 +99,14 @@ export const hubActors = defineInterface({
93
99
  /**
94
100
  * With a package, an Actor that runs it; without, an external one, whose credential is returned
95
101
  * once. `bindings` wire the new Actor's slots at once, with the caller's export-side authority
96
- * (the creation is the slot side's yes), for example to its own `hub.grants@1`.
102
+ * (the creation is the slot side's yes), for example to its own `hub.grants@1`. `for` names
103
+ * the Actor it is made for, recorded as `installedFor`; only a manager may give it.
97
104
  */
98
105
  create: method({
99
106
  input: z.object({
100
107
  name: z.string().min(1).max(128),
101
108
  package: Hash.optional(),
109
+ for: Id.optional(),
102
110
  bindings: z
103
111
  .array(z.object({ slot: Name, provider: Id, export: Name }))
104
112
  .max(64)
@@ -127,11 +135,18 @@ export const hubActors = defineInterface({
127
135
  },
128
136
  });
129
137
  const Wiring = { consumer: Id, slot: Name, provider: Id, export: Name };
138
+ /** A slot made at run time: one segment, at most 48 characters, so tools named from it fit. */
139
+ export const SlotName = z
140
+ .string()
141
+ .regex(/^[a-z][A-Za-z0-9_]*$/)
142
+ .max(48);
130
143
  export const Binding = z.object({
131
144
  ...Wiring,
132
145
  interface: z.string(),
133
146
  madeBy: Id,
134
147
  at: z.string(),
148
+ /** A slot made at run time by `hub.grants.expose`: it goes with this binding. */
149
+ exposed: z.literal(true).optional(),
135
150
  });
136
151
  export const BindingRequest = z.object({
137
152
  requestId: Id,
@@ -141,6 +156,11 @@ export const BindingRequest = z.object({
141
156
  reason: z.string(),
142
157
  requestedBy: Id,
143
158
  at: z.string(),
159
+ /**
160
+ * A request to expose: `slot` is the name the slot will have on `consumer`, made when it is
161
+ * approved. Approve it with `expose({provider, export, to: consumer, as: slot})`.
162
+ */
163
+ exposed: z.literal(true).optional(),
144
164
  });
145
165
  /**
146
166
  * `hub.grants@1`: binding with the caller's own authority, so it is safe to give any Actor. A
@@ -164,6 +184,23 @@ export const hubGrants = defineInterface({
164
184
  }),
165
185
  /** The consumer, the provider or a manager may unbind. */
166
186
  unbind: method({ input: z.object({ consumer: Id, slot: Name }), output: Empty }),
187
+ /**
188
+ * Expose an `rpc` export to one Actor: a slot made on `to`, typed by the export's interface,
189
+ * named `as` (by default the provider's name camelCased, `_`, and the export's last part, made
190
+ * unique on `to`), and bound to the export, in one step. Its authority is a binding's: with
191
+ * both ends it is made; with one, it is a request to the other end's approvers, who approve it
192
+ * by calling `expose` with the request's fields. The same export already exposed to `to`
193
+ * gives that slot back.
194
+ */
195
+ expose: method({
196
+ input: z.object({ provider: Id, export: Name, to: Id, as: SlotName.optional() }),
197
+ output: z.union([
198
+ z.object({ exposed: z.literal(true), slot: SlotName }),
199
+ z.object({ exposed: z.literal(false), slot: SlotName, requestId: Id }),
200
+ ]),
201
+ }),
202
+ /** Remove a slot made by `expose`, with its binding: as `unbind`, the consumer, the provider or a manager may. */
203
+ unexpose: method({ input: z.object({ to: Id, slot: SlotName }), output: Empty }),
167
204
  request: method({
168
205
  input: z.object({ ...Wiring, reason: z.string().min(1).max(1000) }),
169
206
  output: z.object({ requestId: Id }),
@@ -6,6 +6,7 @@ export { Composition, installer } from "./installer.js";
6
6
  export { kv } from "./kv.js";
7
7
  export { layout, Placement } from "./layout.js";
8
8
  export { Item, llmSession, OutputItem, Tool } from "./llm-session.js";
9
+ export { appRules, Rule } from "./rules.js";
9
10
  export { storageAdmin } from "./storage-admin.js";
10
11
  export { uiShell } from "./ui-shell.js";
11
12
  export { uiView } from "./ui-view.js";
@@ -6,6 +6,7 @@ export { Composition, installer } from "./installer.js";
6
6
  export { kv } from "./kv.js";
7
7
  export { layout, Placement } from "./layout.js";
8
8
  export { Item, llmSession, OutputItem, Tool } from "./llm-session.js";
9
+ export { appRules, Rule } from "./rules.js";
9
10
  export { storageAdmin } from "./storage-admin.js";
10
11
  export { uiShell } from "./ui-shell.js";
11
12
  export { uiView } from "./ui-view.js";
@@ -39,6 +39,10 @@ export declare const installer: import("@agentorg/sdk").RpcInterface<"installer"
39
39
  */
40
40
  plan: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
41
41
  package: z.ZodString;
42
+ expose: z.ZodOptional<z.ZodArray<z.ZodObject<{
43
+ export: z.ZodString;
44
+ to: z.ZodString;
45
+ }, z.core.$strip>>>;
42
46
  }, z.core.$strip>, z.ZodObject<{
43
47
  slots: z.ZodArray<z.ZodObject<{
44
48
  slot: z.ZodString;
@@ -49,6 +53,14 @@ export declare const installer: import("@agentorg/sdk").RpcInterface<"installer"
49
53
  }, z.core.$strip>>;
50
54
  }, z.core.$strip>>;
51
55
  views: z.ZodArray<z.ZodString>;
56
+ exposes: z.ZodArray<z.ZodObject<{
57
+ export: z.ZodString;
58
+ to: z.ZodString;
59
+ settles: z.ZodEnum<{
60
+ granted: "granted";
61
+ request: "request";
62
+ }>;
63
+ }, z.core.$strip>>;
52
64
  }, z.core.$strip>>;
53
65
  /**
54
66
  * Create an Actor of the package named `name`, with exactly these connections, all or none.
@@ -58,6 +70,12 @@ export declare const installer: import("@agentorg/sdk").RpcInterface<"installer"
58
70
  * slot bound to `storage`'s `kv` gets the package's seed for it (an object of key to value);
59
71
  * a seed whose slot isn't is listed in `unseeded`. Then it is started if `start`. If a seed or
60
72
  * the start fails, the new Actor is closed. Slots left out stay unbound, listed in `unbound`.
73
+ * The Actor is recorded as made for the caller (`installedFor`), which grants nothing.
74
+ *
75
+ * `expose` lists the new Actor's exports to expose (`rpc` exports of its host modules), each to one Actor, all or none like the
76
+ * connections: a manager's are made now (`granted`, with the slot); one to the caller itself
77
+ * is left for the caller to file (`request`, with the exact `hub.grants.expose` call); any
78
+ * other is refused, and nothing is created. Nothing is exposed that isn't listed.
61
79
  */
62
80
  install: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
63
81
  package: z.ZodString;
@@ -67,10 +85,29 @@ export declare const installer: import("@agentorg/sdk").RpcInterface<"installer"
67
85
  export: z.ZodString;
68
86
  }, z.core.$strip>>;
69
87
  start: z.ZodOptional<z.ZodBoolean>;
88
+ expose: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ export: z.ZodString;
90
+ to: z.ZodString;
91
+ }, z.core.$strip>>>;
70
92
  }, z.core.$strip>, z.ZodObject<{
71
93
  actorId: z.ZodString;
72
94
  unbound: z.ZodArray<z.ZodString>;
73
95
  unseeded: z.ZodArray<z.ZodString>;
96
+ exposures: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
97
+ export: z.ZodString;
98
+ to: z.ZodString;
99
+ settles: z.ZodLiteral<"granted">;
100
+ slot: z.ZodString;
101
+ }, z.core.$strip>, z.ZodObject<{
102
+ export: z.ZodString;
103
+ to: z.ZodString;
104
+ settles: z.ZodLiteral<"request">;
105
+ call: z.ZodObject<{
106
+ provider: z.ZodString;
107
+ export: z.ZodString;
108
+ to: z.ZodString;
109
+ }, z.core.$strip>;
110
+ }, z.core.$strip>]>>;
74
111
  }, z.core.$strip>>;
75
112
  /**
76
113
  * The system as it is, as a composition: every package Actor that isn't closed, the
@@ -1,9 +1,17 @@
1
1
  import { defineInterface, method } from "@agentorg/sdk";
2
2
  import { z } from "zod";
3
- import { Id, Name } from "./hub.js";
3
+ import { Id, Name, SlotName } from "./hub.js";
4
4
  const Hash = z.string().regex(/^sha256-[0-9a-f]{64}$/);
5
5
  /** An export of a running Actor, by its id and the export's name. */
6
6
  const Target = z.object({ actor: Id, export: Name });
7
+ /** One of the new Actor's `rpc` exports (`module.export`), to expose to the Actor `to`. */
8
+ const Exposure = z.object({ export: Name, to: Id });
9
+ /**
10
+ * How an exposure settles, by the caller's own authority: `granted`, made now (the caller holds
11
+ * both sides: it is a manager), or `request`, which the caller files itself with
12
+ * `hub.grants.expose` (it holds `to`'s side: it is `to`). Nothing else is exposed.
13
+ */
14
+ const Settles = z.enum(["granted", "request"]);
7
15
  /** An Actor of a composition, by the name it has there. */
8
16
  const ActorName = z.string().min(1).max(128);
9
17
  /**
@@ -46,10 +54,15 @@ export const installer = defineInterface({
46
54
  * can place.
47
55
  */
48
56
  plan: method({
49
- input: z.object({ package: Hash }),
57
+ input: z.object({ package: Hash, expose: z.array(Exposure).max(64).optional() }),
50
58
  output: z.object({
51
59
  slots: z.array(z.object({ slot: Name, interface: z.string(), candidates: z.array(Target) })),
52
60
  views: z.array(z.string()),
61
+ /**
62
+ * Each `expose` entry given, with how `install` would settle it for this caller; an entry
63
+ * `install` would refuse is refused here the same way.
64
+ */
65
+ exposes: z.array(Exposure.extend({ settles: Settles })),
53
66
  }),
54
67
  }),
55
68
  /**
@@ -60,6 +73,12 @@ export const installer = defineInterface({
60
73
  * slot bound to `storage`'s `kv` gets the package's seed for it (an object of key to value);
61
74
  * a seed whose slot isn't is listed in `unseeded`. Then it is started if `start`. If a seed or
62
75
  * the start fails, the new Actor is closed. Slots left out stay unbound, listed in `unbound`.
76
+ * The Actor is recorded as made for the caller (`installedFor`), which grants nothing.
77
+ *
78
+ * `expose` lists the new Actor's exports to expose (`rpc` exports of its host modules), each to one Actor, all or none like the
79
+ * connections: a manager's are made now (`granted`, with the slot); one to the caller itself
80
+ * is left for the caller to file (`request`, with the exact `hub.grants.expose` call); any
81
+ * other is refused, and nothing is created. Nothing is exposed that isn't listed.
63
82
  */
64
83
  install: method({
65
84
  input: z.object({
@@ -67,8 +86,20 @@ export const installer = defineInterface({
67
86
  name: z.string().min(1).max(128),
68
87
  connections: z.record(Name, Target),
69
88
  start: z.boolean().optional(),
89
+ expose: z.array(Exposure).max(64).optional(),
90
+ }),
91
+ output: z.object({
92
+ actorId: Id,
93
+ unbound: z.array(Name),
94
+ unseeded: z.array(Name),
95
+ exposures: z.array(z.union([
96
+ Exposure.extend({ settles: z.literal("granted"), slot: SlotName }),
97
+ Exposure.extend({
98
+ settles: z.literal("request"),
99
+ call: z.object({ provider: Id, export: Name, to: Id }),
100
+ }),
101
+ ])),
70
102
  }),
71
- output: z.object({ actorId: Id, unbound: z.array(Name), unseeded: z.array(Name) }),
72
103
  }),
73
104
  /**
74
105
  * The system as it is, as a composition: every package Actor that isn't closed, the
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * One named rule: a convenience the person turns on, off unless they do. `says` is what it does,
4
+ * in the person's words.
5
+ */
6
+ export declare const Rule: z.ZodObject<{
7
+ id: z.ZodString;
8
+ name: z.ZodString;
9
+ says: z.ZodString;
10
+ on: z.ZodBoolean;
11
+ }, z.core.$strip>;
12
+ /**
13
+ * `app.rules@1`: the person's named rules. Each is held by the person's Actor (the app's gateway),
14
+ * which acts on a rule that is on as the person, a manager, and only within what the person could
15
+ * grant. A rule is the only thing that may act on provenance such as an Actor's `installedFor`.
16
+ */
17
+ export declare const appRules: import("@agentorg/sdk").RpcInterface<"app.rules", {
18
+ /** Every rule the app knows, each with whether it is on. */
19
+ list: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
20
+ rules: z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ name: z.ZodString;
23
+ says: z.ZodString;
24
+ on: z.ZodBoolean;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>>;
27
+ /** Turn a rule on or off. Turning one on settles what already waits for it. */
28
+ set: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
29
+ id: z.ZodString;
30
+ on: z.ZodBoolean;
31
+ }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
32
+ }, {
33
+ /** A rule was turned on or off; read them again with `list`. */
34
+ changed: import("@agentorg/sdk").EventSpec<z.ZodObject<{}, z.core.$strip>>;
35
+ }, 1>;
@@ -0,0 +1,37 @@
1
+ import { defineInterface, event, method } from "@agentorg/sdk";
2
+ import { z } from "zod";
3
+ /** A named rule's id: lowercase words joined by hyphens. */
4
+ const RuleId = z
5
+ .string()
6
+ .regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/)
7
+ .max(64);
8
+ /**
9
+ * One named rule: a convenience the person turns on, off unless they do. `says` is what it does,
10
+ * in the person's words.
11
+ */
12
+ export const Rule = z.object({
13
+ id: RuleId,
14
+ name: z.string().max(200),
15
+ says: z.string().max(1000),
16
+ on: z.boolean(),
17
+ });
18
+ /**
19
+ * `app.rules@1`: the person's named rules. Each is held by the person's Actor (the app's gateway),
20
+ * which acts on a rule that is on as the person, a manager, and only within what the person could
21
+ * grant. A rule is the only thing that may act on provenance such as an Actor's `installedFor`.
22
+ */
23
+ export const appRules = defineInterface({
24
+ name: "app.rules",
25
+ major: 1,
26
+ kind: "rpc",
27
+ methods: {
28
+ /** Every rule the app knows, each with whether it is on. */
29
+ list: method({ input: z.object({}), output: z.object({ rules: z.array(Rule) }) }),
30
+ /** Turn a rule on or off. Turning one on settles what already waits for it. */
31
+ set: method({ input: z.object({ id: RuleId, on: z.boolean() }), output: z.object({}) }),
32
+ },
33
+ events: {
34
+ /** A rule was turned on or off; read them again with `list`. */
35
+ changed: event(z.object({})),
36
+ },
37
+ });
@@ -0,0 +1,37 @@
1
+ import { type ReactNode } from "react";
2
+ /** One message of a chat, as `chat@1` carries it. A `tool` message may say which tool ran. */
3
+ export interface ChatEntry {
4
+ id: string;
5
+ role: "user" | "assistant" | "tool";
6
+ text: string;
7
+ tool?: {
8
+ name: string;
9
+ state: "running" | "done" | "refused";
10
+ input?: string;
11
+ output?: string;
12
+ };
13
+ }
14
+ export interface ChatProps {
15
+ /** In order; a reply still streaming is an `assistant` entry like any other. */
16
+ messages: readonly ChatEntry[];
17
+ /** A turn is running: Send becomes Stop. */
18
+ running: boolean;
19
+ /** Send the person's text; when it rejects, the text goes back in the composer. */
20
+ onSend(text: string): Promise<void>;
21
+ onCancel(): void;
22
+ /** Run the last turn again: offered under the last reply. */
23
+ onRetry?(): void;
24
+ /** Older messages remain: "Earlier messages" loads them. */
25
+ hasEarlier?: boolean;
26
+ onEarlier?(): Promise<void>;
27
+ /** Above the composer: a notice the caller draws (a refusal and its action). */
28
+ notice?: ReactNode;
29
+ /** Beside the send button: the plan line, say. */
30
+ footer?: ReactNode;
31
+ /** The agent's name and avatar, over its replies; its name names the composer. */
32
+ name?: string;
33
+ avatar?: ReactNode;
34
+ /** The composer's accessible name; by default "Message". */
35
+ label?: string;
36
+ }
37
+ export declare function Chat(props: ChatProps): import("react").JSX.Element;
@@ -0,0 +1,131 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // A conversation with an agent, on assistant-ui's primitives (Thread, Message, Composer,
3
+ // ActionBar) over an external store: the caller keeps the messages and runs the turns.
4
+ import { ActionBarPrimitive, AssistantRuntimeProvider, ComposerPrimitive, MessagePrimitive, ThreadPrimitive, useAui, useAuiState, useExternalStoreRuntime, } from "@assistant-ui/react";
5
+ import { createContext, useContext, useEffect, useState } from "react";
6
+ import { IconButton } from "./components.js";
7
+ import { ChevronIcon, CopyIcon, RetryIcon, SendIcon, StopIcon, ToolIcon } from "./icons.js";
8
+ import { Markdown } from "./markdown.js";
9
+ /**
10
+ * The entries as assistant-ui's messages: a person's message each, and every run of replies and
11
+ * tool messages between two of theirs as one reply whose parts are in order. A tool message is a
12
+ * tool-call part that keeps its entry, so a card can be drawn from it.
13
+ */
14
+ function threadOf(entries, running) {
15
+ const thread = [];
16
+ let reply;
17
+ const close = () => {
18
+ if (reply)
19
+ thread.push({ role: "assistant", id: reply.id, content: reply.content });
20
+ reply = undefined;
21
+ };
22
+ for (const entry of entries) {
23
+ if (entry.role === "user") {
24
+ close();
25
+ thread.push({ role: "user", id: entry.id, content: [{ type: "text", text: entry.text }] });
26
+ continue;
27
+ }
28
+ reply ??= { id: entry.id, content: [] };
29
+ reply.content.push(entry.role === "assistant"
30
+ ? { type: "text", text: entry.text }
31
+ : {
32
+ type: "tool-call",
33
+ toolCallId: entry.id,
34
+ toolName: entry.tool?.name ?? "",
35
+ argsText: entry.tool?.input ?? "",
36
+ artifact: entry,
37
+ });
38
+ }
39
+ close();
40
+ const last = thread.at(-1);
41
+ if (running && last?.role === "assistant")
42
+ thread[thread.length - 1] = { ...last, status: { type: "running" } };
43
+ return thread;
44
+ }
45
+ const textOf = (message) => message.content.map((part) => (part.type === "text" ? part.text : "")).join("");
46
+ export function Chat(props) {
47
+ const { messages, running, onSend, onCancel, onRetry, hasEarlier, onEarlier } = props;
48
+ // A refused send puts its text back, into the composer the runtime keeps.
49
+ const [kept, setKept] = useState();
50
+ const runtime = useExternalStoreRuntime({
51
+ messages: threadOf(messages, running),
52
+ convertMessage: (message) => message,
53
+ isRunning: running,
54
+ onNew: async (message) => {
55
+ const text = textOf(message);
56
+ try {
57
+ await onSend(text);
58
+ }
59
+ catch {
60
+ setKept((was) => ({ text, n: (was?.n ?? 0) + 1 }));
61
+ }
62
+ },
63
+ onCancel: async () => onCancel(),
64
+ // The options keep one shape whatever is given: the runtime doesn't take a change of shape.
65
+ onReload: async () => onRetry?.(),
66
+ hasEarlier: !!(hasEarlier && onEarlier),
67
+ onLoadEarlier: async () => onEarlier?.(),
68
+ });
69
+ return (_jsx(AssistantRuntimeProvider, { runtime: runtime, children: _jsx(Thread, { ...props, kept: kept }) }));
70
+ }
71
+ function Thread({ notice, footer, name, avatar, label = "Message", kept, running, onRetry, }) {
72
+ return (_jsx(Agent.Provider, { value: { name, avatar, retry: !!onRetry }, children: _jsxs(ThreadPrimitive.Root, { className: "kit-chat", children: [_jsx(ThreadPrimitive.Viewport, { className: "kit-chat-viewport", role: "log", "aria-label": "Conversation", children: _jsxs("div", { className: "kit-chat-thread", children: [_jsx(Earlier, {}), _jsx(ThreadPrimitive.Messages, { components: { UserMessage, AssistantMessage } }), running && _jsx(Thinking, {})] }) }), notice && (_jsx("div", { className: "kit-chat-notice", role: "alert", children: notice })), _jsx("div", { className: "kit-chat-composer-wrap", children: _jsxs(ComposerPrimitive.Root, { className: "kit-chat-composer", children: [_jsx(ComposerPrimitive.Input, { className: "kit-chat-input", "aria-label": label, placeholder: name ? `Message ${name}` : label, submitMode: "enter" }), _jsx(Restore, { kept: kept }), _jsxs("div", { className: "kit-chat-composer-row", children: [footer, running ? (_jsx(ComposerPrimitive.Cancel, { className: "kit-chat-send", "aria-label": "Stop", children: _jsx(StopIcon, {}) })) : (_jsx(ComposerPrimitive.Send, { className: "kit-chat-send", "aria-label": "Send", children: _jsx(SendIcon, {}) }))] })] }) })] }) }));
73
+ }
74
+ /** "Earlier messages", only while there are some. */
75
+ function Earlier() {
76
+ const some = useAuiState(({ thread }) => thread.hasEarlier);
77
+ if (!some)
78
+ return null;
79
+ return (_jsx(ThreadPrimitive.LoadEarlier, { className: "kit-chat-earlier", children: "Earlier messages" }));
80
+ }
81
+ /** Puts a refused send's text back in the composer, once per refusal. */
82
+ function Restore({ kept }) {
83
+ const aui = useAui();
84
+ useEffect(() => {
85
+ if (kept)
86
+ aui.composer.setText(kept.text);
87
+ }, [aui, kept]);
88
+ return null;
89
+ }
90
+ /** Who the replies are from, and whether they offer Retry: for every reply in the thread. */
91
+ const Agent = createContext({
92
+ name: undefined,
93
+ avatar: undefined,
94
+ retry: false,
95
+ });
96
+ const PlainText = ({ text }) => _jsx(_Fragment, { children: text });
97
+ const MarkdownText = ({ text }) => _jsx(Markdown, { text: text });
98
+ const USER_PARTS = { Text: PlainText };
99
+ const REPLY_PARTS = { Text: MarkdownText, tools: { Override: Tool } };
100
+ const UserMessage = () => (_jsx(MessagePrimitive.Root, { className: "kit-chat-user", children: _jsx(MessagePrimitive.Parts, { components: USER_PARTS }) }));
101
+ /** Dots while the turn has nothing to show yet: before the first text or tool of its reply. */
102
+ function Thinking() {
103
+ const shown = useAuiState(({ thread }) => {
104
+ const last = thread.messages.at(-1);
105
+ return last?.role === "assistant" && last.content.length > 0;
106
+ });
107
+ if (shown)
108
+ return null;
109
+ return (_jsxs("div", { className: "kit-chat-thinking", role: "status", "aria-label": "Thinking", children: [_jsx("i", {}), _jsx("i", {}), _jsx("i", {})] }));
110
+ }
111
+ function AssistantMessage() {
112
+ const { name, avatar, retry } = useContext(Agent);
113
+ const running = useAuiState(({ message }) => message.status?.type === "running");
114
+ // Retry runs the last turn again, so only the last reply offers it; earlier replies show their
115
+ // bar on hover.
116
+ const last = useAuiState(({ message }) => message.isLast);
117
+ return (_jsxs(MessagePrimitive.Root, { className: "kit-chat-assistant", ...(last ? { "data-last": "" } : {}), children: [name && (_jsxs("div", { className: "kit-chat-who", children: [avatar, name] })), _jsx(MessagePrimitive.Parts, { components: REPLY_PARTS }), _jsxs(ActionBarPrimitive.Root, { className: "kit-chat-bar", ...(running ? { "data-hidden": "" } : {}), children: [_jsx(ActionBarPrimitive.Copy, { asChild: true, children: _jsx(IconButton, { label: "Copy", children: _jsx(CopyIcon, {}) }) }), retry && last && (_jsx(ActionBarPrimitive.Reload, { asChild: true, children: _jsx(IconButton, { label: "Retry", children: _jsx(RetryIcon, {}) }) }))] })] }));
118
+ }
119
+ /**
120
+ * A tool message: a card with the tool's name and how it ended, opened for what went in and what
121
+ * came back, when the message says which tool ran; otherwise the one line it is.
122
+ */
123
+ function Tool({ artifact }) {
124
+ const entry = artifact;
125
+ const [open, setOpen] = useState(false);
126
+ const tool = entry.tool;
127
+ if (!tool)
128
+ return _jsx("div", { className: "kit-chat-step", children: entry.text });
129
+ const body = [tool.input, tool.output && `→ ${tool.output}`].filter(Boolean).join("\n");
130
+ return (_jsxs("div", { className: "kit-tool", ...(open ? { "data-open": "" } : {}), children: [_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => setOpen(!open), children: [_jsx(ToolIcon, {}), _jsx("span", { className: "kit-tool-title", children: entry.text }), _jsx("span", { className: "kit-tool-name", children: tool.name }), tool.state === "done" ? (_jsx("span", { className: "kit-tool-done", role: "img", "aria-label": "done", children: "\u2713" })) : tool.state === "refused" ? (_jsx("span", { className: "kit-tool-refused", children: "refused" })) : (_jsx("span", { className: "kit-chat-thinking", role: "status", "aria-label": "running", children: _jsx("i", {}) })), _jsx(ChevronIcon, { className: "kit-tool-chevron" })] }), open && body && _jsx("pre", { className: "kit-tool-body", children: body })] }));
131
+ }
@@ -0,0 +1,94 @@
1
+ import type { ButtonHTMLAttributes, CSSProperties, FormEvent, InputHTMLAttributes, ReactNode, SelectHTMLAttributes } from "react";
2
+ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
3
+ /** `primary` is the accent; `quiet` reads as a link. */
4
+ variant?: "primary" | "quiet";
5
+ };
6
+ export declare function Button({ variant, className, type, ...props }: ButtonProps): import("react").JSX.Element;
7
+ /** A button with only an icon: its `label` is its accessible name, and its tooltip. */
8
+ export declare function IconButton({ label, className, type, ...props }: ButtonHTMLAttributes<HTMLButtonElement> & {
9
+ label: string;
10
+ }): import("react").JSX.Element;
11
+ export declare function Switch({ checked, onChange, label, disabled, }: {
12
+ checked: boolean;
13
+ onChange(checked: boolean): void;
14
+ label: string;
15
+ disabled?: boolean;
16
+ }): import("react").JSX.Element;
17
+ export declare function Field({ className, ...props }: InputHTMLAttributes<HTMLInputElement>): import("react").JSX.Element;
18
+ /** The browser's own select, drawn in the kit's look: accessible and native on every device. */
19
+ export declare function Select({ className, ...props }: SelectHTMLAttributes<HTMLSelectElement>): import("react").JSX.Element;
20
+ /**
21
+ * A modal dialog: focus held inside, Escape and a click outside close it, and focus goes back to
22
+ * what opened it. `title` names it. With `onSubmit` the dialog is a form, so Enter submits it.
23
+ */
24
+ export declare function Dialog({ open, onClose, onSubmit, title, children, }: {
25
+ open?: boolean;
26
+ onClose(): void;
27
+ onSubmit?(event: FormEvent<HTMLFormElement>): void;
28
+ title: ReactNode;
29
+ children: ReactNode;
30
+ }): import("react").JSX.Element;
31
+ /** A row of buttons at the end of a dialog or a form. */
32
+ export declare const Actions: ({ children }: {
33
+ children: ReactNode;
34
+ }) => import("react").JSX.Element;
35
+ /**
36
+ * A menu opened from `trigger` (a button: an `IconButton`, usually): arrow keys move through its
37
+ * items, Escape and a click outside close it.
38
+ */
39
+ export declare function Menu({ trigger, children, open, onOpenChange, align, }: {
40
+ trigger: ReactNode;
41
+ children: ReactNode;
42
+ open?: boolean;
43
+ onOpenChange?(open: boolean): void;
44
+ align?: "start" | "end";
45
+ }): import("react").JSX.Element;
46
+ /** An item: choosing it closes the menu, unless `onSelect` calls `event.preventDefault()`. */
47
+ export declare function MenuItem({ onSelect, disabled, children, }: {
48
+ onSelect(event: Event): void;
49
+ disabled?: boolean;
50
+ children: ReactNode;
51
+ }): import("react").JSX.Element;
52
+ /** Tabs, each a `[value, label]`; `children` is the selected one's panel. */
53
+ export declare function Tabs<T extends string>({ label, tabs, value, onChange, children, className, }: {
54
+ className?: string;
55
+ label: string;
56
+ tabs: readonly (readonly [NoInfer<T>, ReactNode])[];
57
+ value: T;
58
+ onChange(value: T): void;
59
+ children: ReactNode;
60
+ }): import("react").JSX.Element;
61
+ export declare const Card: ({ children, className }: {
62
+ children: ReactNode;
63
+ className?: string;
64
+ }) => import("react").JSX.Element;
65
+ /** Rows divided by lines: each child is an `<li>`. */
66
+ export declare const List: ({ children, label }: {
67
+ children: ReactNode;
68
+ label?: string;
69
+ }) => import("react").JSX.Element;
70
+ export declare function Table({ head, rows }: {
71
+ head: ReactNode[];
72
+ rows: ReactNode[][];
73
+ }): import("react").JSX.Element;
74
+ /** `value` of `max` as segments, one per unit: a board's done cards, say. */
75
+ export declare function Meter({ value, max, label }: {
76
+ value: number;
77
+ max: number;
78
+ label: string;
79
+ }): import("react").JSX.Element;
80
+ type Layout = {
81
+ children: ReactNode;
82
+ gap?: number;
83
+ className?: string;
84
+ style?: CSSProperties;
85
+ };
86
+ /** Children in a column. */
87
+ export declare const Stack: ({ children, gap, className, style }: Layout) => import("react").JSX.Element;
88
+ /** Children in a row, centered on the cross axis. */
89
+ export declare const Row: ({ children, gap, className, style }: Layout) => import("react").JSX.Element;
90
+ /** Takes the room its parent (a `Stack` or `Row`) has left. */
91
+ export declare const Fill: ({ children, className, style }: Layout) => import("react").JSX.Element;
92
+ /** Scrolls what doesn't fit, with no visible scrollbar. */
93
+ export declare const Scroll: ({ children, className, style }: Layout) => import("react").JSX.Element;
94
+ export {};