@agentorg/cli 0.0.4 → 0.0.6

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 (206) hide show
  1. package/README.md +18 -102
  2. package/dist/node_modules/@agentorg/hub/dist/src/hub-actor.d.ts +2 -7
  3. package/dist/node_modules/@agentorg/hub/dist/src/hub-actor.js +4 -111
  4. package/dist/node_modules/@agentorg/hub/dist/src/index.d.ts +1 -3
  5. package/dist/node_modules/@agentorg/hub/dist/src/index.js +1 -3
  6. package/dist/node_modules/@agentorg/hub/dist/src/router.d.ts +6 -57
  7. package/dist/node_modules/@agentorg/hub/dist/src/router.js +38 -413
  8. package/dist/node_modules/@agentorg/hub/dist/src/state.d.ts +20 -298
  9. package/dist/node_modules/@agentorg/hub/dist/src/state.js +73 -456
  10. package/dist/node_modules/@agentorg/hub/dist/src/validate.d.ts +1 -3
  11. package/dist/node_modules/@agentorg/hub/dist/src/validate.js +3 -15
  12. package/dist/node_modules/@agentorg/hub/package.json +0 -3
  13. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.d.ts +132 -0
  14. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-provider.js +105 -0
  15. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-settings.d.ts +42 -0
  16. package/dist/node_modules/@agentorg/interfaces/dist/src/agent-settings.js +53 -0
  17. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.d.ts +15 -0
  18. package/dist/node_modules/@agentorg/interfaces/dist/src/chat.js +14 -0
  19. package/dist/node_modules/@agentorg/interfaces/dist/src/hub.d.ts +16 -267
  20. package/dist/node_modules/@agentorg/interfaces/dist/src/hub.js +17 -145
  21. package/dist/node_modules/@agentorg/interfaces/dist/src/index.d.ts +6 -8
  22. package/dist/node_modules/@agentorg/interfaces/dist/src/index.js +6 -8
  23. package/dist/node_modules/@agentorg/interfaces/dist/src/kv.d.ts +2 -2
  24. package/dist/node_modules/@agentorg/interfaces/dist/src/kv.js +2 -2
  25. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.d.ts +272 -0
  26. package/dist/node_modules/@agentorg/interfaces/dist/src/manager.js +185 -0
  27. package/dist/node_modules/@agentorg/interfaces/dist/src/mcp-provider.d.ts +88 -0
  28. package/dist/node_modules/@agentorg/interfaces/dist/src/mcp-provider.js +78 -0
  29. package/dist/node_modules/@agentorg/interfaces/dist/src/tools.d.ts +39 -0
  30. package/dist/node_modules/@agentorg/interfaces/dist/src/tools.js +43 -0
  31. package/dist/node_modules/@agentorg/manager/dist/src/index.d.ts +1 -0
  32. package/dist/node_modules/@agentorg/manager/dist/src/index.js +1 -0
  33. package/dist/node_modules/@agentorg/manager/dist/src/manager.d.ts +21 -0
  34. package/dist/node_modules/@agentorg/manager/dist/src/manager.js +528 -0
  35. package/dist/node_modules/@agentorg/manager/dist/src/skills.d.ts +25 -0
  36. package/dist/node_modules/@agentorg/manager/dist/src/skills.js +145 -0
  37. package/dist/node_modules/@agentorg/manager/package.json +30 -0
  38. package/dist/node_modules/@agentorg/mcp/dist/src/connection.d.ts +33 -0
  39. package/dist/node_modules/@agentorg/mcp/dist/src/connection.js +290 -0
  40. package/dist/node_modules/@agentorg/mcp/dist/src/index.d.ts +1 -0
  41. package/dist/node_modules/@agentorg/mcp/dist/src/index.js +1 -0
  42. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.d.ts +50 -0
  43. package/dist/node_modules/@agentorg/mcp/dist/src/kinds.js +69 -0
  44. package/dist/node_modules/@agentorg/mcp/dist/src/provider.d.ts +22 -0
  45. package/dist/node_modules/@agentorg/mcp/dist/src/provider.js +167 -0
  46. package/dist/node_modules/@agentorg/mcp/package.json +31 -0
  47. package/dist/node_modules/@agentorg/sdk/dist/src/cli.js +3 -23
  48. package/dist/node_modules/@agentorg/sdk/dist/src/client.d.ts +4 -25
  49. package/dist/node_modules/@agentorg/sdk/dist/src/client.js +5 -55
  50. package/dist/node_modules/@agentorg/sdk/dist/src/errors.d.ts +1 -1
  51. package/dist/node_modules/@agentorg/sdk/dist/src/errors.js +3 -3
  52. package/dist/node_modules/@agentorg/sdk/dist/src/index.d.ts +2 -2
  53. package/dist/node_modules/@agentorg/sdk/dist/src/index.js +1 -1
  54. package/dist/node_modules/@agentorg/sdk/dist/src/interface.d.ts +6 -34
  55. package/dist/node_modules/@agentorg/sdk/dist/src/interface.js +3 -24
  56. package/dist/node_modules/@agentorg/sdk/dist/src/module-host.d.ts +8 -17
  57. package/dist/node_modules/@agentorg/sdk/dist/src/module-host.js +15 -87
  58. package/dist/node_modules/@agentorg/sdk/dist/src/module.d.ts +10 -76
  59. package/dist/node_modules/@agentorg/sdk/dist/src/module.js +3 -23
  60. package/dist/node_modules/@agentorg/sdk/dist/src/person-commands.js +0 -5
  61. package/dist/node_modules/@agentorg/sdk/dist/src/runtime.d.ts +3 -27
  62. package/dist/node_modules/@agentorg/sdk/dist/src/runtime.js +5 -100
  63. package/dist/node_modules/@agentorg/sdk/dist/src/testing.d.ts +7 -8
  64. package/dist/node_modules/@agentorg/sdk/dist/src/testing.js +12 -24
  65. package/dist/node_modules/@agentorg/sdk/package.json +4 -37
  66. package/dist/node_modules/@agentorg/shell/dist/app.css +3435 -739
  67. package/dist/node_modules/@agentorg/shell/dist/app.js +204 -202
  68. package/dist/node_modules/@agentorg/shell/package.json +18 -10
  69. package/dist/node_modules/@agentorg/wire/dist/src/frames.d.ts +2 -3
  70. package/dist/node_modules/@agentorg/wire/dist/src/frames.js +2 -3
  71. package/dist/node_modules/@agentorg/wire/dist/src/ops.d.ts +5 -34
  72. package/dist/node_modules/@agentorg/wire/dist/src/ops.js +2 -17
  73. package/dist/node_modules/assistant/dist/src/agent.d.ts +62 -0
  74. package/dist/node_modules/assistant/dist/src/agent.js +226 -0
  75. package/dist/node_modules/assistant/dist/src/engine.d.ts +23 -0
  76. package/dist/node_modules/assistant/dist/src/engine.js +88 -0
  77. package/dist/node_modules/assistant/dist/src/history.d.ts +97 -0
  78. package/dist/node_modules/assistant/dist/src/history.js +235 -0
  79. package/dist/node_modules/assistant/dist/src/local-store.d.ts +3 -0
  80. package/dist/node_modules/assistant/dist/src/local-store.js +58 -0
  81. package/dist/node_modules/assistant/dist/src/provider.d.ts +21 -0
  82. package/dist/node_modules/assistant/dist/src/provider.js +231 -0
  83. package/dist/node_modules/assistant/dist/src/settings.d.ts +17 -0
  84. package/dist/node_modules/assistant/dist/src/settings.js +43 -0
  85. package/dist/node_modules/assistant/dist/src/tools.d.ts +74 -0
  86. package/dist/node_modules/assistant/dist/src/tools.js +123 -0
  87. package/dist/node_modules/assistant/package.json +29 -0
  88. package/dist/node_modules/chatgpt/dist/src/account.d.ts +52 -0
  89. package/dist/node_modules/chatgpt/dist/src/account.js +270 -0
  90. package/dist/node_modules/chatgpt/dist/src/encoding.d.ts +7 -0
  91. package/dist/node_modules/chatgpt/dist/src/encoding.js +20 -0
  92. package/dist/node_modules/chatgpt/dist/src/file-store.d.ts +9 -0
  93. package/dist/node_modules/chatgpt/dist/src/file-store.js +68 -0
  94. package/dist/node_modules/chatgpt/dist/src/index.d.ts +1 -0
  95. package/dist/node_modules/chatgpt/dist/src/index.js +1 -0
  96. package/dist/node_modules/chatgpt/dist/src/jwt.d.ts +15 -0
  97. package/dist/node_modules/chatgpt/dist/src/jwt.js +37 -0
  98. package/dist/node_modules/chatgpt/dist/src/oauth.d.ts +43 -0
  99. package/dist/node_modules/chatgpt/dist/src/oauth.js +104 -0
  100. package/dist/node_modules/chatgpt/dist/src/program.d.ts +23 -0
  101. package/dist/node_modules/chatgpt/dist/src/program.js +41 -0
  102. package/dist/node_modules/chatgpt/dist/src/responses.d.ts +54 -0
  103. package/dist/node_modules/chatgpt/dist/src/responses.js +300 -0
  104. package/dist/node_modules/chatgpt/dist/src/serve.d.ts +65 -0
  105. package/dist/node_modules/chatgpt/dist/src/serve.js +46 -0
  106. package/dist/node_modules/chatgpt/package.json +33 -0
  107. package/dist/src/api.d.ts +5 -34
  108. package/dist/src/api.js +6 -68
  109. package/dist/src/cli.js +3 -7
  110. package/dist/src/gateway.d.ts +6 -7
  111. package/dist/src/gateway.js +39 -285
  112. package/dist/src/index.d.ts +4 -5
  113. package/dist/src/index.js +3 -4
  114. package/dist/src/notes.d.ts +11 -0
  115. package/dist/src/notes.js +64 -0
  116. package/dist/src/oauth.d.ts +16 -0
  117. package/dist/src/oauth.js +46 -0
  118. package/dist/src/programs.d.ts +29 -0
  119. package/dist/src/programs.js +171 -0
  120. package/package.json +3 -11
  121. package/dist/bundled/index.json +0 -6
  122. package/dist/bundled/sha256-01d69bc3888c2a53963f4413d47de909d129ad27c78e9af6d830bb50c3478419.agentorg +0 -0
  123. package/dist/bundled/sha256-84165e3be5c904fc971d983dab31102e07cca725d8629a6fd7d118fa3a0a88b8.agentorg +0 -0
  124. package/dist/bundled/sha256-ade9132b3f34b4c39db92adeadc7e540dc745e4a81b5b54f5d45bf9ec92bca75.agentorg +0 -0
  125. package/dist/bundled/sha256-f4330f5987f37d8cf3aeb44d2f831b573641a87186daa2f811f0c35ba04804f0.agentorg +0 -0
  126. package/dist/node_modules/@agentorg/hub/dist/src/build.d.ts +0 -17
  127. package/dist/node_modules/@agentorg/hub/dist/src/build.js +0 -120
  128. package/dist/node_modules/@agentorg/hub/dist/src/logs.d.ts +0 -33
  129. package/dist/node_modules/@agentorg/hub/dist/src/logs.js +0 -162
  130. package/dist/node_modules/@agentorg/hub/dist/src/net.d.ts +0 -41
  131. package/dist/node_modules/@agentorg/hub/dist/src/net.js +0 -265
  132. package/dist/node_modules/@agentorg/hub/dist/src/processes.d.ts +0 -78
  133. package/dist/node_modules/@agentorg/hub/dist/src/processes.js +0 -485
  134. package/dist/node_modules/@agentorg/hub/dist/src/storage.d.ts +0 -38
  135. package/dist/node_modules/@agentorg/hub/dist/src/storage.js +0 -194
  136. package/dist/node_modules/@agentorg/interfaces/dist/src/http-egress.d.ts +0 -6
  137. package/dist/node_modules/@agentorg/interfaces/dist/src/http-egress.js +0 -7
  138. package/dist/node_modules/@agentorg/interfaces/dist/src/installer.d.ts +0 -191
  139. package/dist/node_modules/@agentorg/interfaces/dist/src/installer.js +0 -136
  140. package/dist/node_modules/@agentorg/interfaces/dist/src/layout.d.ts +0 -47
  141. package/dist/node_modules/@agentorg/interfaces/dist/src/layout.js +0 -52
  142. package/dist/node_modules/@agentorg/interfaces/dist/src/rules.d.ts +0 -35
  143. package/dist/node_modules/@agentorg/interfaces/dist/src/rules.js +0 -37
  144. package/dist/node_modules/@agentorg/interfaces/dist/src/storage-admin.d.ts +0 -23
  145. package/dist/node_modules/@agentorg/interfaces/dist/src/storage-admin.js +0 -31
  146. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-shell.d.ts +0 -14
  147. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-shell.js +0 -26
  148. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-view.d.ts +0 -27
  149. package/dist/node_modules/@agentorg/interfaces/dist/src/ui-view.js +0 -26
  150. package/dist/node_modules/@agentorg/kit/dist/src/chat.d.ts +0 -37
  151. package/dist/node_modules/@agentorg/kit/dist/src/chat.js +0 -131
  152. package/dist/node_modules/@agentorg/kit/dist/src/components.d.ts +0 -94
  153. package/dist/node_modules/@agentorg/kit/dist/src/components.js +0 -66
  154. package/dist/node_modules/@agentorg/kit/dist/src/icons.d.ts +0 -17
  155. package/dist/node_modules/@agentorg/kit/dist/src/icons.js +0 -30
  156. package/dist/node_modules/@agentorg/kit/dist/src/index.d.ts +0 -6
  157. package/dist/node_modules/@agentorg/kit/dist/src/index.js +0 -10
  158. package/dist/node_modules/@agentorg/kit/dist/src/markdown.d.ts +0 -9
  159. package/dist/node_modules/@agentorg/kit/dist/src/markdown.js +0 -14
  160. package/dist/node_modules/@agentorg/kit/dist/src/resizable.d.ts +0 -5
  161. package/dist/node_modules/@agentorg/kit/dist/src/resizable.js +0 -8
  162. package/dist/node_modules/@agentorg/kit/dist/src/styles.d.ts +0 -11
  163. package/dist/node_modules/@agentorg/kit/dist/src/styles.js +0 -166
  164. package/dist/node_modules/@agentorg/kit/package.json +0 -44
  165. package/dist/node_modules/@agentorg/sdk/dist/frame/runtime.js +0 -753
  166. package/dist/node_modules/@agentorg/sdk/dist/host/runner.js +0 -21963
  167. package/dist/node_modules/@agentorg/sdk/dist/src/build.d.ts +0 -2
  168. package/dist/node_modules/@agentorg/sdk/dist/src/build.js +0 -2
  169. package/dist/node_modules/@agentorg/sdk/dist/src/client-http.d.ts +0 -24
  170. package/dist/node_modules/@agentorg/sdk/dist/src/client-http.js +0 -247
  171. package/dist/node_modules/@agentorg/sdk/dist/src/describe.d.ts +0 -13
  172. package/dist/node_modules/@agentorg/sdk/dist/src/describe.js +0 -16
  173. package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.d.ts +0 -8
  174. package/dist/node_modules/@agentorg/sdk/dist/src/frame-base.js +0 -64
  175. package/dist/node_modules/@agentorg/sdk/dist/src/frame-entry.d.ts +0 -1
  176. package/dist/node_modules/@agentorg/sdk/dist/src/frame-entry.js +0 -35
  177. package/dist/node_modules/@agentorg/sdk/dist/src/frame-host.d.ts +0 -57
  178. package/dist/node_modules/@agentorg/sdk/dist/src/frame-host.js +0 -293
  179. package/dist/node_modules/@agentorg/sdk/dist/src/frame-protocol.d.ts +0 -124
  180. package/dist/node_modules/@agentorg/sdk/dist/src/frame-protocol.js +0 -16
  181. package/dist/node_modules/@agentorg/sdk/dist/src/frame.d.ts +0 -25
  182. package/dist/node_modules/@agentorg/sdk/dist/src/frame.js +0 -248
  183. package/dist/node_modules/@agentorg/sdk/dist/src/host-main.d.ts +0 -1
  184. package/dist/node_modules/@agentorg/sdk/dist/src/host-main.js +0 -60
  185. package/dist/node_modules/@agentorg/sdk/dist/src/host.d.ts +0 -25
  186. package/dist/node_modules/@agentorg/sdk/dist/src/host.js +0 -92
  187. package/dist/node_modules/@agentorg/sdk/dist/src/manifest-api.d.ts +0 -2
  188. package/dist/node_modules/@agentorg/sdk/dist/src/manifest-api.js +0 -2
  189. package/dist/node_modules/@agentorg/sdk/dist/src/manifest.d.ts +0 -56
  190. package/dist/node_modules/@agentorg/sdk/dist/src/manifest.js +0 -165
  191. package/dist/node_modules/@agentorg/sdk/dist/src/package.d.ts +0 -60
  192. package/dist/node_modules/@agentorg/sdk/dist/src/package.js +0 -538
  193. package/dist/node_modules/@agentorg/sdk/dist/src/tar.d.ts +0 -7
  194. package/dist/node_modules/@agentorg/sdk/dist/src/tar.js +0 -71
  195. package/dist/node_modules/@agentorg/shell/dist/agent-bindings.js +0 -59
  196. package/dist/node_modules/@agentorg/shell/src/agent-bindings.ts +0 -107
  197. package/dist/src/frames.d.ts +0 -23
  198. package/dist/src/frames.js +0 -78
  199. package/dist/src/layout.d.ts +0 -44
  200. package/dist/src/layout.js +0 -90
  201. package/dist/src/model.d.ts +0 -51
  202. package/dist/src/model.js +0 -230
  203. package/dist/src/rules.d.ts +0 -71
  204. package/dist/src/rules.js +0 -157
  205. package/dist/src/transfer.d.ts +0 -30
  206. package/dist/src/transfer.js +0 -110
@@ -1,37 +0,0 @@
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
- });
@@ -1,23 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * `storage.admin@1`: how a package's `seed` reaches its new Actor's `kv@1` stores. Only the
4
- * installer is bound to it. It seeds empty stores only, any consumer's, and every seed is
5
- * audited (the consumer, the slot and how many entries; never the values).
6
- */
7
- export declare const storageAdmin: import("@agentorg/sdk").RpcInterface<"storage.admin", {
8
- /**
9
- * Write `entries` into the store of (`consumer`, `slot`), all or none. The slot must be the
10
- * consumer's and bound to `storage.kv` (`Refused("invalid")` otherwise). `Refused("not_empty")`
11
- * unless the store holds nothing, `Refused("quota")` past kv@1's limits or the consumer's
12
- * quota, `Refused("invalid")` for a key given twice or one that isn't well-formed text. A
13
- * seed travels in one frame, so it is under 1 MiB.
14
- */
15
- seed: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
16
- consumer: z.ZodString;
17
- slot: z.ZodString;
18
- entries: z.ZodArray<z.ZodObject<{
19
- key: z.ZodString;
20
- value: z.ZodJSONSchema;
21
- }, z.core.$strip>>;
22
- }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
23
- }, {}, 1>;
@@ -1,31 +0,0 @@
1
- import { defineInterface, method } from "@agentorg/sdk";
2
- import { z } from "zod";
3
- import { Id, Name } from "./hub.js";
4
- const Key = z.string().min(1).max(1024);
5
- /**
6
- * `storage.admin@1`: how a package's `seed` reaches its new Actor's `kv@1` stores. Only the
7
- * installer is bound to it. It seeds empty stores only, any consumer's, and every seed is
8
- * audited (the consumer, the slot and how many entries; never the values).
9
- */
10
- export const storageAdmin = defineInterface({
11
- name: "storage.admin",
12
- major: 1,
13
- kind: "rpc",
14
- methods: {
15
- /**
16
- * Write `entries` into the store of (`consumer`, `slot`), all or none. The slot must be the
17
- * consumer's and bound to `storage.kv` (`Refused("invalid")` otherwise). `Refused("not_empty")`
18
- * unless the store holds nothing, `Refused("quota")` past kv@1's limits or the consumer's
19
- * quota, `Refused("invalid")` for a key given twice or one that isn't well-formed text. A
20
- * seed travels in one frame, so it is under 1 MiB.
21
- */
22
- seed: method({
23
- input: z.object({
24
- consumer: Id,
25
- slot: Name,
26
- entries: z.array(z.object({ key: Key, value: z.json() })).max(10_000),
27
- }),
28
- output: z.object({}),
29
- }),
30
- },
31
- });
@@ -1,14 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * `ui.shell@1`: what the shell offers a view in its frame, the mirror of `ui.view@1`. A view's
4
- * sandbox can't open a tab or start a sign-in, so it asks the shell, whose frame runtime serves
5
- * this slot.
6
- */
7
- export declare const uiShell: import("@agentorg/sdk").RpcInterface<"ui.shell", {
8
- /** Open an `https:` address in a browser tab, outside the frame. */
9
- openExternal: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
10
- url: z.ZodString;
11
- }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
12
- /** Start the person's sign-in to the model's account, as the shell's own button does. */
13
- signIn: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
14
- }, {}, 1>;
@@ -1,26 +0,0 @@
1
- import { defineInterface, method } from "@agentorg/sdk";
2
- import { z } from "zod";
3
- /**
4
- * `ui.shell@1`: what the shell offers a view in its frame, the mirror of `ui.view@1`. A view's
5
- * sandbox can't open a tab or start a sign-in, so it asks the shell, whose frame runtime serves
6
- * this slot.
7
- */
8
- export const uiShell = defineInterface({
9
- name: "ui.shell",
10
- major: 1,
11
- kind: "rpc",
12
- methods: {
13
- /** Open an `https:` address in a browser tab, outside the frame. */
14
- openExternal: method({
15
- input: z.object({
16
- url: z
17
- .string()
18
- .max(2048)
19
- .regex(/^https:\/\/\S+$/),
20
- }),
21
- output: z.object({}),
22
- }),
23
- /** Start the person's sign-in to the model's account, as the shell's own button does. */
24
- signIn: method({ input: z.object({}), output: z.object({}) }),
25
- },
26
- });
@@ -1,27 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * `ui.view@1`: a view module's render surface, which a shell imports to place the view.
4
- *
5
- * It is the one in-frame interface. The view renders into its own frame's DOM, which no wire
6
- * message can carry, so the SDK gives its export a handle of its own:
7
- * `implement({ mount(el, { theme, size }), resize?(size) })`, where `el` is the frame's root
8
- * element. The frame runtime maps these wire methods onto that handle. No other interface should
9
- * copy this shape: everything else crosses the wire as schemas.
10
- */
11
- export declare const uiView: import("@agentorg/sdk").RpcInterface<"ui.view", {
12
- /** Render. `theme` holds design tokens as CSS variables, from `ui.theme@1`. */
13
- mount: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
14
- theme: z.ZodRecord<z.ZodString, z.ZodString>;
15
- size: z.ZodObject<{
16
- width: z.ZodNumber;
17
- height: z.ZodNumber;
18
- }, z.core.$strip>;
19
- }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
20
- resize: import("@agentorg/sdk").MethodSpec<z.ZodObject<{
21
- size: z.ZodObject<{
22
- width: z.ZodNumber;
23
- height: z.ZodNumber;
24
- }, z.core.$strip>;
25
- }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
26
- unmount: import("@agentorg/sdk").MethodSpec<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>>;
27
- }, {}, 1>;
@@ -1,26 +0,0 @@
1
- import { defineInterface, method } from "@agentorg/sdk";
2
- import { z } from "zod";
3
- const Size = z.object({ width: z.number().nonnegative(), height: z.number().nonnegative() });
4
- /**
5
- * `ui.view@1`: a view module's render surface, which a shell imports to place the view.
6
- *
7
- * It is the one in-frame interface. The view renders into its own frame's DOM, which no wire
8
- * message can carry, so the SDK gives its export a handle of its own:
9
- * `implement({ mount(el, { theme, size }), resize?(size) })`, where `el` is the frame's root
10
- * element. The frame runtime maps these wire methods onto that handle. No other interface should
11
- * copy this shape: everything else crosses the wire as schemas.
12
- */
13
- export const uiView = defineInterface({
14
- name: "ui.view",
15
- major: 1,
16
- kind: "rpc",
17
- methods: {
18
- /** Render. `theme` holds design tokens as CSS variables, from `ui.theme@1`. */
19
- mount: method({
20
- input: z.object({ theme: z.record(z.string(), z.string()), size: Size }),
21
- output: z.object({}),
22
- }),
23
- resize: method({ input: z.object({ size: Size }), output: z.object({}) }),
24
- unmount: method({ input: z.object({}), output: z.object({}) }),
25
- },
26
- });
@@ -1,37 +0,0 @@
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;
@@ -1,131 +0,0 @@
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
- }
@@ -1,94 +0,0 @@
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 {};
@@ -1,66 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // The shell's own components: Radix primitives for what has behavior (dialogs, menus, switches,
3
- // tabs), plain elements for the rest, all drawn by the kit's classes.
4
- import { DropdownMenu, Dialog as RadixDialog, Switch as RadixSwitch, Tabs as RadixTabs, } from "radix-ui";
5
- const cx = (...names) => names.filter(Boolean).join(" ");
6
- export function Button({ variant, className, type = "button", ...props }) {
7
- return (_jsx("button", { type: type, className: cx("kit-button", variant && `kit-${variant}`, className), ...props }));
8
- }
9
- /** A button with only an icon: its `label` is its accessible name, and its tooltip. */
10
- export function IconButton({ label, className, type = "button", ...props }) {
11
- return (_jsx("button", { type: type, "aria-label": label, title: label, className: cx("kit-icon-button", className), ...props }));
12
- }
13
- export function Switch({ checked, onChange, label, disabled, }) {
14
- return (_jsx(RadixSwitch.Root, { className: "kit-switch", checked: checked, onCheckedChange: onChange, "aria-label": label, disabled: disabled, children: _jsx(RadixSwitch.Thumb, { className: "kit-switch-thumb" }) }));
15
- }
16
- export function Field({ className, ...props }) {
17
- return _jsx("input", { className: cx("kit-field", className), ...props });
18
- }
19
- /** The browser's own select, drawn in the kit's look: accessible and native on every device. */
20
- export function Select({ className, ...props }) {
21
- return _jsx("select", { className: cx("kit-select", className), ...props });
22
- }
23
- /**
24
- * A modal dialog: focus held inside, Escape and a click outside close it, and focus goes back to
25
- * what opened it. `title` names it. With `onSubmit` the dialog is a form, so Enter submits it.
26
- */
27
- export function Dialog({ open = true, onClose, onSubmit, title, children, }) {
28
- const inner = (_jsxs(_Fragment, { children: [_jsx(RadixDialog.Title, { className: "kit-dialog-title", children: title }), children] }));
29
- return (_jsx(RadixDialog.Root, { open: open, onOpenChange: (next) => !next && onClose(), children: _jsxs(RadixDialog.Portal, { children: [_jsx(RadixDialog.Overlay, { className: "kit-scrim" }), _jsx(RadixDialog.Content, { className: "kit-dialog", "aria-describedby": undefined, asChild: !!onSubmit, children: onSubmit ? _jsx("form", { onSubmit: onSubmit, children: inner }) : inner })] }) }));
30
- }
31
- /** A row of buttons at the end of a dialog or a form. */
32
- export const Actions = ({ children }) => (_jsx("div", { className: "kit-actions", children: children }));
33
- /**
34
- * A menu opened from `trigger` (a button: an `IconButton`, usually): arrow keys move through its
35
- * items, Escape and a click outside close it.
36
- */
37
- export function Menu({ trigger, children, open, onOpenChange, align = "end", }) {
38
- return (_jsxs(DropdownMenu.Root, { ...(open !== undefined ? { open } : {}), ...(onOpenChange ? { onOpenChange } : {}), modal: false, children: [_jsx(DropdownMenu.Trigger, { asChild: true, children: trigger }), _jsx(DropdownMenu.Portal, { children: _jsx(DropdownMenu.Content, { className: "kit-menu", align: align, sideOffset: 4, children: children }) })] }));
39
- }
40
- /** An item: choosing it closes the menu, unless `onSelect` calls `event.preventDefault()`. */
41
- export function MenuItem({ onSelect, disabled, children, }) {
42
- return (_jsx(DropdownMenu.Item, { className: "kit-menu-item", onSelect: onSelect, disabled: disabled, children: children }));
43
- }
44
- /** Tabs, each a `[value, label]`; `children` is the selected one's panel. */
45
- export function Tabs({ label, tabs, value, onChange, children, className, }) {
46
- return (_jsxs(RadixTabs.Root, { value: value, onValueChange: (next) => onChange(next), className: cx("kit-stack", className), children: [_jsx(RadixTabs.List, { className: "kit-tabs-list", "aria-label": label, children: tabs.map(([key, name]) => (_jsx(RadixTabs.Trigger, { value: key, className: "kit-tab", children: name }, key))) }), _jsx(RadixTabs.Content, { value: value, className: "kit-fill kit-scroll", children: children })] }));
47
- }
48
- export const Card = ({ children, className }) => (_jsx("div", { className: cx("kit-card", className), children: children }));
49
- /** Rows divided by lines: each child is an `<li>`. */
50
- export const List = ({ children, label }) => (_jsx("ul", { className: "kit-list", "aria-label": label, children: children }));
51
- export function Table({ head, rows }) {
52
- return (_jsxs("table", { className: "kit-table", children: [_jsx("thead", { children: _jsx("tr", { children: head.map((cell, i) => (_jsx("th", { children: cell }, i))) }) }), _jsx("tbody", { children: rows.map((row, r) => (_jsx("tr", { children: row.map((cell, c) => (_jsx("td", { children: cell }, c))) }, r))) })] }));
53
- }
54
- /** `value` of `max` as segments, one per unit: a board's done cards, say. */
55
- export function Meter({ value, max, label }) {
56
- return (_jsx("div", { className: "kit-meter", role: "img", "aria-label": label, children: Array.from({ length: max }, (_, i) => (_jsx("i", { className: i < value ? "kit-on" : undefined }, i))) }));
57
- }
58
- const gapped = (gap, style) => gap === undefined ? style : { ...style, "--kit-gap": `${gap}px` };
59
- /** Children in a column. */
60
- export const Stack = ({ children, gap, className, style }) => (_jsx("div", { className: cx("kit-stack", className), style: gapped(gap, style), children: children }));
61
- /** Children in a row, centered on the cross axis. */
62
- export const Row = ({ children, gap, className, style }) => (_jsx("div", { className: cx("kit-row", className), style: gapped(gap, style), children: children }));
63
- /** Takes the room its parent (a `Stack` or `Row`) has left. */
64
- export const Fill = ({ children, className, style }) => (_jsx("div", { className: cx("kit-fill", className), style: style, children: children }));
65
- /** Scrolls what doesn't fit, with no visible scrollbar. */
66
- export const Scroll = ({ children, className, style }) => (_jsx("div", { className: cx("kit-scroll", className), style: style, children: children }));
@@ -1,17 +0,0 @@
1
- export declare const HomeIcon: () => import("react").JSX.Element;
2
- export declare const PlusIcon: () => import("react").JSX.Element;
3
- export declare const ChatGptIcon: () => import("react").JSX.Element;
4
- export declare const MoonIcon: () => import("react").JSX.Element;
5
- export declare const GearIcon: () => import("react").JSX.Element;
6
- export declare const MoreIcon: () => import("react").JSX.Element;
7
- export declare const UploadIcon: () => import("react").JSX.Element;
8
- export declare const DownloadIcon: () => import("react").JSX.Element;
9
- export declare const SendIcon: () => import("react").JSX.Element;
10
- export declare const StopIcon: () => import("react").JSX.Element;
11
- export declare const CopyIcon: () => import("react").JSX.Element;
12
- export declare const RetryIcon: () => import("react").JSX.Element;
13
- export declare const ToolIcon: () => import("react").JSX.Element;
14
- export declare const ChevronIcon: ({ className }: {
15
- className?: string;
16
- }) => import("react").JSX.Element;
17
- export declare const ArrowDownIcon: () => import("react").JSX.Element;
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /** The shell's icons, drawn with the text's color and hidden from assistive technology: the control they sit on carries the name. */
3
- const svg = {
4
- fill: "none",
5
- stroke: "currentColor",
6
- strokeWidth: 2,
7
- viewBox: "0 0 24 24",
8
- };
9
- export const HomeIcon = () => (_jsx("svg", { width: "16", height: "16", "aria-hidden": "true", ...svg, children: _jsx("path", { d: "M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z" }) }));
10
- export const PlusIcon = () => (_jsx("svg", { width: "16", height: "16", "aria-hidden": "true", ...svg, children: _jsx("path", { d: "M12 5v14M5 12h14" }) }));
11
- export const ChatGptIcon = () => (_jsxs("svg", { width: "16", height: "16", "aria-hidden": "true", ...svg, children: [_jsx("circle", { cx: "12", cy: "12", r: "9" }), _jsx("path", { d: "M8.5 12h7M12 8.5v7" })] }));
12
- export const MoonIcon = () => (_jsx("svg", { width: "15", height: "15", "aria-hidden": "true", ...svg, children: _jsx("path", { d: "M21 13A9 9 0 1 1 11 3a7 7 0 0 0 10 10z" }) }));
13
- export const GearIcon = () => (_jsxs("svg", { width: "15", height: "15", "aria-hidden": "true", ...svg, children: [_jsx("circle", { cx: "12", cy: "12", r: "3" }), _jsx("path", { d: "M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z" })] }));
14
- export const MoreIcon = () => (_jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: [_jsx("circle", { cx: "5", cy: "12", r: "1.6" }), _jsx("circle", { cx: "12", cy: "12", r: "1.6" }), _jsx("circle", { cx: "19", cy: "12", r: "1.6" })] }));
15
- const stroke = {
16
- fill: "none",
17
- stroke: "currentColor",
18
- strokeWidth: 2,
19
- strokeLinecap: "round",
20
- strokeLinejoin: "round",
21
- };
22
- export const UploadIcon = () => (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", ...stroke, "aria-hidden": "true", children: _jsx("path", { d: "M12 15V3M7 8l5-5 5 5M5 21h14" }) }));
23
- export const DownloadIcon = () => (_jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", ...stroke, "aria-hidden": "true", children: _jsx("path", { d: "M12 3v12M7 10l5 5 5-5M5 21h14" }) }));
24
- export const SendIcon = () => (_jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", ...stroke, strokeWidth: 2.4, "aria-hidden": "true", children: _jsx("path", { d: "M12 19V5M5 12l7-7 7 7" }) }));
25
- export const StopIcon = () => (_jsx("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: _jsx("rect", { x: "4", y: "4", width: "16", height: "16", rx: "3" }) }));
26
- export const CopyIcon = () => (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", ...stroke, "aria-hidden": "true", children: [_jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }), _jsx("path", { d: "M5 15V5a2 2 0 0 1 2-2h8" })] }));
27
- export const RetryIcon = () => (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", ...stroke, "aria-hidden": "true", children: [_jsx("path", { d: "M3 12a9 9 0 1 0 3-6.7L3 8" }), _jsx("path", { d: "M3 3v5h5" })] }));
28
- export const ToolIcon = () => (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", ...stroke, "aria-hidden": "true", children: _jsx("path", { d: "M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18v3h3l6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z" }) }));
29
- export const ChevronIcon = ({ className }) => (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", ...stroke, className: className, "aria-hidden": "true", children: _jsx("path", { d: "M9 6l6 6-6 6" }) }));
30
- export const ArrowDownIcon = () => (_jsx("svg", { width: "15", height: "15", viewBox: "0 0 24 24", ...stroke, strokeWidth: 2.2, "aria-hidden": "true", children: _jsx("path", { d: "M12 5v14M5 12l7 7 7-7" }) }));
@@ -1,6 +0,0 @@
1
- export { Chat, type ChatEntry, type ChatProps } from "./chat.tsx";
2
- export { Actions, Button, type ButtonProps, Card, Dialog, Field, Fill, IconButton, List, Menu, MenuItem, Meter, Row, Scroll, Select, Stack, Switch, Table, Tabs, } from "./components.tsx";
3
- export * from "./icons.tsx";
4
- export { Markdown } from "./markdown.tsx";
5
- export { ResizableGroup, ResizablePanel, ResizeHandle } from "./resizable.tsx";
6
- export { ensureKitStyles, KIT_CSS } from "./styles.ts";
@@ -1,10 +0,0 @@
1
- // @agentorg/kit: the shell's own components, for the shell and for every view. Importing it puts
2
- // the kit's styles in the document it runs in (a view's frame, or the shell's page).
3
- import { ensureKitStyles } from "./styles.js";
4
- ensureKitStyles();
5
- export { Chat } from "./chat.js";
6
- export { Actions, Button, Card, Dialog, Field, Fill, IconButton, List, Menu, MenuItem, Meter, Row, Scroll, Select, Stack, Switch, Table, Tabs, } from "./components.js";
7
- export * from "./icons.js";
8
- export { Markdown } from "./markdown.js";
9
- export { ResizableGroup, ResizablePanel, ResizeHandle } from "./resizable.js";
10
- export { ensureKitStyles, KIT_CSS } from "./styles.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * Markdown as an agent writes it, GitHub-flavored (tables, lists, strikethrough), safe to render
3
- * as it streams: remend first closes what is still open (a `**` without its pair, an unfinished
4
- * fence or table row), so a reply doesn't flicker between markup and text. Raw HTML is shown as
5
- * text, never rendered.
6
- */
7
- export declare function Markdown({ text }: {
8
- text: string;
9
- }): import("react").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import ReactMarkdown from "react-markdown";
3
- import remarkGfm from "remark-gfm";
4
- import remend from "remend";
5
- const PLUGINS = [remarkGfm];
6
- /**
7
- * Markdown as an agent writes it, GitHub-flavored (tables, lists, strikethrough), safe to render
8
- * as it streams: remend first closes what is still open (a `**` without its pair, an unfinished
9
- * fence or table row), so a reply doesn't flicker between markup and text. Raw HTML is shown as
10
- * text, never rendered.
11
- */
12
- export function Markdown({ text }) {
13
- return (_jsx("div", { className: "kit-md", children: _jsx(ReactMarkdown, { remarkPlugins: PLUGINS, children: remend(text) }) }));
14
- }
@@ -1,5 +0,0 @@
1
- export { Group as ResizableGroup, Panel as ResizablePanel } from "react-resizable-panels";
2
- /** The handle between two panels: dragged, or moved with the arrow keys; only its line shows. */
3
- export declare function ResizeHandle({ label }: {
4
- label: string;
5
- }): import("react").JSX.Element;