iterate 0.2.7 → 0.3.0

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 (218) hide show
  1. package/README.md +86 -76
  2. package/THIRD_PARTY_NOTICES.md +55 -0
  3. package/bin/iterate.js +11 -3
  4. package/dist/api-url-B6404M82.mjs +17 -0
  5. package/dist/api-url-B6404M82.mjs.map +1 -0
  6. package/dist/app-ref-BipL0feU.mjs +35 -0
  7. package/dist/app-ref-BipL0feU.mjs.map +1 -0
  8. package/dist/app-ref-C1CrgXqX.mjs +7 -0
  9. package/dist/app-ref-C1CrgXqX.mjs.map +1 -0
  10. package/dist/app-ref-DYai_om1.mjs +7 -0
  11. package/dist/app-ref-DYai_om1.mjs.map +1 -0
  12. package/dist/cli-D0c-pDL_.mjs +1010 -0
  13. package/dist/cli-D0c-pDL_.mjs.map +1 -0
  14. package/dist/client.d.ts +3 -0
  15. package/dist/client.mjs +4 -0
  16. package/dist/cloudflare-BTm90gQ4.mjs +951 -0
  17. package/dist/cloudflare-BTm90gQ4.mjs.map +1 -0
  18. package/dist/contract-s4FW4eES.mjs +309 -0
  19. package/dist/contract-s4FW4eES.mjs.map +1 -0
  20. package/dist/document-review/index.d.ts +5 -0
  21. package/dist/document-review/types.d.ts +107 -0
  22. package/dist/document-review.mjs +7015 -0
  23. package/dist/document-review.mjs.map +1 -0
  24. package/dist/durable-object-processor-durability-CNsTjAJS.mjs +205 -0
  25. package/dist/durable-object-processor-durability-CNsTjAJS.mjs.map +1 -0
  26. package/dist/idempotency-DleloJNt.mjs +28 -0
  27. package/dist/idempotency-DleloJNt.mjs.map +1 -0
  28. package/dist/index.mjs +1 -1
  29. package/dist/itx/api-url.d.ts +6 -0
  30. package/dist/itx/itx-node-client.d.ts +65 -0
  31. package/dist/itx/itx-session.d.ts +215 -0
  32. package/dist/itx/owned-rpc-session.d.ts +14 -0
  33. package/dist/itx/query-client.d.ts +10 -0
  34. package/dist/itx-api.generated.d.ts +6195 -0
  35. package/dist/itx-session-sjud8GiT.mjs +534 -0
  36. package/dist/itx-session-sjud8GiT.mjs.map +1 -0
  37. package/dist/live-state-BJNqOwFw.mjs +299 -0
  38. package/dist/live-state-BJNqOwFw.mjs.map +1 -0
  39. package/dist/next/api.d.ts +479 -0
  40. package/dist/next/api.mjs +0 -0
  41. package/dist/next/app-server.d.ts +44 -0
  42. package/dist/next/app-server.mjs +479 -0
  43. package/dist/next/app-server.mjs.map +1 -0
  44. package/dist/next/app-session.d.ts +49 -0
  45. package/dist/next/app-session.mjs +238 -0
  46. package/dist/next/app-session.mjs.map +1 -0
  47. package/dist/next/app.d.ts +29 -0
  48. package/dist/next/app.mjs +141 -0
  49. package/dist/next/app.mjs.map +1 -0
  50. package/dist/next/client/live-state.d.ts +63 -0
  51. package/dist/next/client/oauth.d.ts +12 -0
  52. package/dist/next/client/react.d.ts +109 -0
  53. package/dist/next/client/socket.d.ts +6 -0
  54. package/dist/next/client.mjs +156 -0
  55. package/dist/next/client.mjs.map +1 -0
  56. package/dist/next/expression.d.ts +146 -0
  57. package/dist/next/expression.mjs +399 -0
  58. package/dist/next/expression.mjs.map +1 -0
  59. package/dist/next/lib.d.ts +56 -0
  60. package/dist/next/lib.mjs +199 -0
  61. package/dist/next/lib.mjs.map +1 -0
  62. package/dist/next/oauth-scopes.d.ts +32 -0
  63. package/dist/next/oauth-scopes.mjs +40 -0
  64. package/dist/next/oauth-scopes.mjs.map +1 -0
  65. package/dist/next/oauth.mjs +29 -0
  66. package/dist/next/oauth.mjs.map +1 -0
  67. package/dist/next/principal.d.ts +64 -0
  68. package/dist/next/principal.mjs +98 -0
  69. package/dist/next/principal.mjs.map +1 -0
  70. package/dist/next/project-ingress.d.ts +37 -0
  71. package/dist/next/project-ingress.mjs +75 -0
  72. package/dist/next/project-ingress.mjs.map +1 -0
  73. package/dist/next/react.mjs +285 -0
  74. package/dist/next/react.mjs.map +1 -0
  75. package/dist/next/sdk/auth.d.ts +5 -0
  76. package/dist/next/sdk/index.d.ts +112 -0
  77. package/dist/next/sdk.mjs +139 -0
  78. package/dist/next/sdk.mjs.map +1 -0
  79. package/dist/next/stream/processor.d.ts +378 -0
  80. package/dist/next/stream/processor.mjs +582 -0
  81. package/dist/next/stream/processor.mjs.map +1 -0
  82. package/dist/next/stream/run.d.ts +58 -0
  83. package/dist/next/stream/run.mjs +40 -0
  84. package/dist/next/stream/run.mjs.map +1 -0
  85. package/dist/next-node.d.ts +15 -0
  86. package/dist/next-node.mjs +51 -0
  87. package/dist/next-node.mjs.map +1 -0
  88. package/dist/node.d.ts +3 -0
  89. package/dist/node.mjs +185 -0
  90. package/dist/node.mjs.map +1 -0
  91. package/dist/processor-host-capabilities-BMFH3KTM.mjs +56 -0
  92. package/dist/processor-host-capabilities-BMFH3KTM.mjs.map +1 -0
  93. package/dist/processors/cloudflare.d.ts +3 -0
  94. package/dist/processors/durable-object-processor-durability.d.ts +79 -0
  95. package/dist/processors/event-consumption-metrics.d.ts +82 -0
  96. package/dist/processors/idempotency.d.ts +13 -0
  97. package/dist/processors/index.d.ts +12 -0
  98. package/dist/processors/processor-contracts.d.ts +342 -0
  99. package/dist/processors/processor-facet.d.ts +186 -0
  100. package/dist/processors/processor-host-capabilities.d.ts +60 -0
  101. package/dist/processors/prompt-sections.d.ts +17 -0
  102. package/dist/processors/rpc-types.d.ts +515 -0
  103. package/dist/processors/schemas.d.ts +102 -0
  104. package/dist/processors/stream-handle.d.ts +45 -0
  105. package/dist/processors/stream-processor-keepalive.d.ts +95 -0
  106. package/dist/processors/stream-processor-registry.d.ts +233 -0
  107. package/dist/processors/stream-processor-runner.d.ts +289 -0
  108. package/dist/processors/stream-processor.d.ts +339 -0
  109. package/dist/processors/stream-runtime-metrics.d.ts +107 -0
  110. package/dist/processors/testing.d.ts +302 -0
  111. package/dist/processors-BoNyeBfQ.mjs +10 -0
  112. package/dist/processors-BoNyeBfQ.mjs.map +1 -0
  113. package/dist/processors-cloudflare.mjs +3 -0
  114. package/dist/processors-testing.mjs +435 -0
  115. package/dist/processors-testing.mjs.map +1 -0
  116. package/dist/processors.mjs +52 -0
  117. package/dist/processors.mjs.map +1 -0
  118. package/dist/protocol-DnK_f2m6.mjs +251 -0
  119. package/dist/protocol-DnK_f2m6.mjs.map +1 -0
  120. package/dist/sdk/capnweb/index.d.ts +2 -0
  121. package/dist/sdk/capnweb/live-state/compact.d.ts +5 -0
  122. package/dist/sdk/capnweb/live-state/diff.d.ts +41 -0
  123. package/dist/sdk/capnweb/live-state/engine.d.ts +44 -0
  124. package/dist/sdk/capnweb/live-state/index.d.ts +41 -0
  125. package/dist/sdk/capnweb/live-state/protocol.d.ts +87 -0
  126. package/dist/sdk/capnweb/live-state/retain.d.ts +23 -0
  127. package/dist/sdk/capnweb/live-state/store.d.ts +20 -0
  128. package/dist/sdk/capnweb/live-state/types.d.ts +11 -0
  129. package/dist/sdk/capnweb/react.d.ts +45 -0
  130. package/dist/sdk/capnweb/react.mjs +316 -0
  131. package/dist/sdk/capnweb/react.mjs.map +1 -0
  132. package/dist/sdk/capnweb.mjs +4 -0
  133. package/dist/sdk/itx/react.d.ts +191 -0
  134. package/dist/sdk/itx/react.mjs +383 -0
  135. package/dist/sdk/itx/react.mjs.map +1 -0
  136. package/dist/sdk-DMB-IM11.mjs +933 -0
  137. package/dist/sdk-DMB-IM11.mjs.map +1 -0
  138. package/dist/sdk.d.ts +339 -0
  139. package/dist/sdk.mjs +2 -0
  140. package/dist/serve-itx.d.ts +46 -0
  141. package/dist/starter-apps/flake-dashboard/app-ref.d.ts +31 -0
  142. package/dist/starter-apps/flake-dashboard/configured-worker.mjs +1055 -0
  143. package/dist/starter-apps/flake-dashboard/configured-worker.mjs.map +1 -0
  144. package/dist/starter-apps/flake-dashboard/contract.d.ts +4839 -0
  145. package/dist/starter-apps/flake-dashboard/contract.mjs +2 -0
  146. package/dist/starter-apps/flake-dashboard/index.d.ts +17 -0
  147. package/dist/starter-apps/flake-dashboard/index.mjs +56 -0
  148. package/dist/starter-apps/flake-dashboard/index.mjs.map +1 -0
  149. package/dist/starter-apps/flake-dashboard/worker.d.ts +4607 -0
  150. package/dist/starter-apps/github-ai-linter/ai-linter.d.ts +8914 -0
  151. package/dist/starter-apps/github-ai-linter/configured-worker.mjs +17987 -0
  152. package/dist/starter-apps/github-ai-linter/configured-worker.mjs.map +1 -0
  153. package/dist/starter-apps/github-ai-linter/contract.d.ts +9193 -0
  154. package/dist/starter-apps/github-ai-linter/index.d.ts +10 -0
  155. package/dist/starter-apps/github-ai-linter/index.mjs +36 -0
  156. package/dist/starter-apps/github-ai-linter/index.mjs.map +1 -0
  157. package/dist/starter-apps/github-ai-linter/prompt.d.ts +13 -0
  158. package/dist/starter-apps/github-ai-linter/review-bot.d.ts +808 -0
  159. package/dist/starter-apps/github-ai-linter/rules.d.ts +34 -0
  160. package/dist/starter-apps/github-ai-linter/worker-ref.d.ts +19 -0
  161. package/dist/starter-apps/github-ai-linter/worker.d.ts +19 -0
  162. package/dist/starter-apps/github-ai-linter/worker.mjs +947 -0
  163. package/dist/starter-apps/github-ai-linter/worker.mjs.map +1 -0
  164. package/dist/starter-apps/guestbook/app-ref.d.ts +27 -0
  165. package/dist/starter-apps/guestbook/client.d.ts +7 -0
  166. package/dist/starter-apps/guestbook/client.mjs +59 -0
  167. package/dist/starter-apps/guestbook/configured-worker.mjs +205 -0
  168. package/dist/starter-apps/guestbook/configured-worker.mjs.map +1 -0
  169. package/dist/starter-apps/guestbook/index.d.ts +9 -0
  170. package/dist/starter-apps/guestbook/index.mjs +31 -0
  171. package/dist/starter-apps/guestbook/index.mjs.map +1 -0
  172. package/dist/starter-apps/guestbook/processor.d.ts +2267 -0
  173. package/dist/starter-apps/guestbook/worker.d.ts +26 -0
  174. package/dist/starter-apps/guestbook/worker.mjs +191 -0
  175. package/dist/starter-apps/guestbook/worker.mjs.map +1 -0
  176. package/dist/starter-apps/media/configured-worker.mjs +577 -0
  177. package/dist/starter-apps/media/configured-worker.mjs.map +1 -0
  178. package/dist/starter-apps/media/index.mjs +36 -0
  179. package/dist/starter-apps/media/index.mjs.map +1 -0
  180. package/dist/starter-apps/media/ref.mjs +20 -0
  181. package/dist/starter-apps/media/ref.mjs.map +1 -0
  182. package/dist/starter-apps/media/worker.mjs +579 -0
  183. package/dist/starter-apps/media/worker.mjs.map +1 -0
  184. package/dist/starter-apps/notes/configured-worker.mjs +6134 -0
  185. package/dist/starter-apps/notes/configured-worker.mjs.map +1 -0
  186. package/dist/starter-apps/notes/index.mjs +23 -0
  187. package/dist/starter-apps/notes/index.mjs.map +1 -0
  188. package/dist/starter-apps/notes/ref.mjs +21 -0
  189. package/dist/starter-apps/notes/ref.mjs.map +1 -0
  190. package/dist/starter-apps/notes/worker.mjs +427 -0
  191. package/dist/starter-apps/notes/worker.mjs.map +1 -0
  192. package/dist/starter-apps/todo/client.mjs +59 -0
  193. package/dist/starter-apps/todo/configured-worker.mjs +2864 -0
  194. package/dist/starter-apps/todo/configured-worker.mjs.map +1 -0
  195. package/dist/starter-apps/todo/index.d.ts +8 -0
  196. package/dist/starter-apps/todo/index.mjs +29 -0
  197. package/dist/starter-apps/todo/index.mjs.map +1 -0
  198. package/dist/stream-processor-keepalive-DAQTP6m3.mjs +2082 -0
  199. package/dist/stream-processor-keepalive-DAQTP6m3.mjs.map +1 -0
  200. package/dist/usingCtx-inzbY1Qz.mjs +57 -0
  201. package/dist/usingCtx-mZx5nsAW.mjs +11800 -0
  202. package/dist/usingCtx-mZx5nsAW.mjs.map +1 -0
  203. package/dist/worker-ref-DZxPDmb_.mjs +390 -0
  204. package/dist/worker-ref-DZxPDmb_.mjs.map +1 -0
  205. package/menubar/Iterate.entitlements +12 -0
  206. package/menubar/Iterate.swift +914 -0
  207. package/menubar/IterateIcon.swift +145 -0
  208. package/menubar/README.md +28 -0
  209. package/menubar/build-menubar-app.sh +59 -0
  210. package/package.json +235 -18
  211. package/dist/cli-DMS4kJph.mjs +0 -868
  212. package/dist/cli-DMS4kJph.mjs.map +0 -1
  213. package/dist/config-DtnR7Lv7.mjs +0 -170
  214. package/dist/config-DtnR7Lv7.mjs.map +0 -1
  215. package/dist/index.d.mts.map +0 -1
  216. package/dist/stream-tui/agent-chat-terminal.d.mts +0 -1
  217. package/dist/stream-tui/agent-chat-terminal.mjs +0 -933
  218. package/dist/stream-tui/agent-chat-terminal.mjs.map +0 -1
@@ -0,0 +1,145 @@
1
+ // The 𝑖 menu-bar mark, drawn from the brand logo's own vector paths
2
+ // (packages/ui/src/assets/iterate-logo.svg) so there's no asset catalog and
3
+ // no rasterization step. The glyph is pure polygons (M/L/H/V/Z, absolute), so
4
+ // a tiny path reader turns it straight into an NSBezierPath. Rendered as a
5
+ // template image: white on the dark menu bar, adapting on light.
6
+
7
+ import AppKit
8
+
9
+ enum IterateIcon {
10
+ /// The two `i` paths from iterate-logo.svg (viewBox 0 0 500 500), verbatim.
11
+ private static let paths = [
12
+ "M264.649 170.149H289.821L286.092 186.904L276.303 233.444L270.709 259.971L263.717 293.015L258.124 320.008L251.131 352.586L249.267 364.687V371.668L249.733 372.133H253.462L259.522 369.806L266.048 365.617L275.371 357.24L282.829 349.328L286.558 345.14L288.888 346.071L294.948 350.725L308 360.498L307.068 362.36L303.339 367.944L296.813 376.322L291.685 382.837L286.558 388.422L282.363 393.076L275.837 399.592L272.108 402.849L267.446 406.573L262.785 409.83L256.725 413.554L247.869 417.742L238.08 420.535L231.554 421H224.096L216.637 420.069L211.51 418.673L206.382 416.811L201.255 413.088L196.594 408.434L192.865 400.988L191.466 394.938L191 389.818V383.768L193.797 365.152L199.857 335.832L207.315 301.392L224.096 223.205L225.028 216.224V206.916L224.562 205.054L222.231 204.123L219.434 203.193L206.382 203.658L196.127 204.589H193.331V178.526L194.263 175.734L258.59 170.615L264.649 170.149Z",
13
+ "M264.649 78H268.844L275.836 78.9308L282.362 80.7924L287.49 83.5848L292.151 87.7734L295.414 92.8928L297.278 96.616L299.143 105.924L299.609 113.836L299.143 118.49L298.677 122.213L296.812 128.729L293.549 134.779L290.286 138.502L286.091 141.76L282.362 143.621L278.167 145.018L274.438 145.948L267.912 146.414H260.92L254.394 145.483L249.267 144.087L244.139 141.294L239.944 138.037L236.681 133.383L233.884 127.332L232.486 121.282L232.02 117.559V108.716L232.952 101.735L234.816 95.6852L237.613 90.1004L240.41 86.3772L246.936 82.1886L252.529 79.8616L259.522 78.4654L264.649 78Z",
14
+ ]
15
+
16
+ /// The template 𝑖, sized for the menu bar (~16pt tall, aspect-preserved).
17
+ static let mark: NSImage = render(height: 16)
18
+
19
+ /// The two `i` paths combined, in SVG coordinate space (y-down, 0..500).
20
+ private static func glyph() -> NSBezierPath {
21
+ let combined = NSBezierPath()
22
+ for path in paths { combined.append(parse(path)) }
23
+ return combined
24
+ }
25
+
26
+ private static func render(height: CGFloat) -> NSImage {
27
+ let glyph = glyph()
28
+ let bounds = glyph.bounds
29
+
30
+ let scale = height / bounds.height
31
+ let width = bounds.width * scale
32
+ // Map SVG space (y-down) into the image (y-up): flip Y, then scale.
33
+ var transform = AffineTransform()
34
+ transform.translate(x: -bounds.minX * scale, y: height + bounds.minY * scale)
35
+ transform.scale(x: scale, y: -scale)
36
+ glyph.transform(using: transform)
37
+
38
+ let image = NSImage(size: NSSize(width: ceil(width), height: height))
39
+ image.lockFocus()
40
+ NSColor.black.setFill()
41
+ glyph.fill()
42
+ image.unlockFocus()
43
+ image.isTemplate = true
44
+ return image
45
+ }
46
+
47
+ /// A square brand tile (black rounded rect, white 𝑖) written to a temp PNG,
48
+ /// for use as a notification attachment. Cached; nil if writing fails.
49
+ static let logoPNGURL: URL? = renderLogoPNG(side: 128)
50
+
51
+ private static func renderLogoPNG(side: CGFloat) -> URL? {
52
+ let glyph = glyph()
53
+ let bounds = glyph.bounds
54
+ // Fit the 𝑖 to ~62% of the tile height, centered, y-flipped into image space.
55
+ let target = side * 0.62
56
+ let scale = target / bounds.height
57
+ let width = bounds.width * scale
58
+ let originX = (side - width) / 2
59
+ let originY = (side - target) / 2
60
+ var transform = AffineTransform()
61
+ transform.translate(x: originX - bounds.minX * scale, y: side - originY + bounds.minY * scale)
62
+ transform.scale(x: scale, y: -scale)
63
+ glyph.transform(using: transform)
64
+
65
+ let image = NSImage(size: NSSize(width: side, height: side))
66
+ image.lockFocus()
67
+ NSColor.black.setFill()
68
+ NSBezierPath(roundedRect: NSRect(x: 0, y: 0, width: side, height: side), xRadius: side * 0.22, yRadius: side * 0.22).fill()
69
+ NSColor.white.setFill()
70
+ glyph.fill()
71
+ image.unlockFocus()
72
+
73
+ guard let tiff = image.tiffRepresentation,
74
+ let png = NSBitmapImageRep(data: tiff)?.representation(using: .png, properties: [:])
75
+ else { return nil }
76
+ let url = FileManager.default.temporaryDirectory.appendingPathComponent("iterate-approval-logo.png")
77
+ do {
78
+ try png.write(to: url)
79
+ return url
80
+ } catch {
81
+ return nil
82
+ }
83
+ }
84
+
85
+ /// Minimal SVG path reader: absolute M/L/H/V/Z with implicit-repeat args.
86
+ private static func parse(_ d: String) -> NSBezierPath {
87
+ let path = NSBezierPath()
88
+ var current = NSPoint.zero
89
+ var command: Character = " "
90
+ var numbers: [CGFloat] = []
91
+
92
+ func flush() {
93
+ guard command != " " else { return }
94
+ switch command {
95
+ case "M":
96
+ for i in stride(from: 0, to: numbers.count - 1, by: 2) {
97
+ current = NSPoint(x: numbers[i], y: numbers[i + 1])
98
+ // First pair moves; subsequent pairs are implicit lineto (SVG rule).
99
+ if i == 0 { path.move(to: current) } else { path.line(to: current) }
100
+ }
101
+ case "L":
102
+ for i in stride(from: 0, to: numbers.count - 1, by: 2) {
103
+ current = NSPoint(x: numbers[i], y: numbers[i + 1])
104
+ path.line(to: current)
105
+ }
106
+ case "H":
107
+ for x in numbers {
108
+ current = NSPoint(x: x, y: current.y)
109
+ path.line(to: current)
110
+ }
111
+ case "V":
112
+ for y in numbers {
113
+ current = NSPoint(x: current.x, y: y)
114
+ path.line(to: current)
115
+ }
116
+ case "Z":
117
+ path.close()
118
+ default:
119
+ break
120
+ }
121
+ numbers = []
122
+ }
123
+
124
+ var token = ""
125
+ func takeNumber() {
126
+ if !token.isEmpty, let value = Double(token) { numbers.append(CGFloat(value)) }
127
+ token = ""
128
+ }
129
+
130
+ for char in d {
131
+ if char.isLetter {
132
+ takeNumber()
133
+ flush()
134
+ command = char
135
+ } else if char == " " {
136
+ takeNumber()
137
+ } else {
138
+ token.append(char) // digit or "."
139
+ }
140
+ }
141
+ takeNumber()
142
+ flush()
143
+ return path
144
+ }
145
+ }
@@ -0,0 +1,28 @@
1
+ # Iterate menu bar
2
+
3
+ A macOS companion for OS Next sign-in and opt-in computer sharing:
4
+
5
+ ```bash
6
+ iterate menubar --project <id-or-slug>
7
+ ```
8
+
9
+ The launcher compiles the shipped Swift source on first use with `swiftc`, caches
10
+ it by source hash, and writes `menubar.json` next to the CLI config. Relaunching
11
+ with a different project stops the old share and loads the new configuration. Install the
12
+ Xcode command-line tools if needed (`xcode-select --install`).
13
+
14
+ The app checks authentication with `iterate ping`; **Sign in** starts
15
+ `iterate login`. Switching on **Use my computer** starts
16
+ `iterate use-my-computer --json`. NDJSON reports connection and local call
17
+ activity. Switching off, quitting, or closing the child's stdin releases the
18
+ provision. A disconnected share must be enabled again explicitly.
19
+
20
+ Approval source, signing helpers and UI are retained for a future OS Next
21
+ implementation. They are dormant: no approval watcher or notification permission
22
+ request starts, and the CLI exposes no `approve` command. The TypeScript approval
23
+ modules still target legacy OS and are not included in the active CLI bundle.
24
+
25
+ Build manually with `./build-menubar-app.sh`; the icon is drawn from vector
26
+ paths in `IterateIcon.swift`. The launcher normally configures everything, but
27
+ `~/.config/iterate/menubar.json` can also specify `command`, `args`, `config`,
28
+ `project`, and an optional `cwd`.
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env bash
2
+ # Build Iterate.app — a minimal menu-bar bundle from the two Swift files here.
3
+ # No Xcode project: swiftc compiles, then we hand-assemble the .app (LSUIElement
4
+ # so it's menu-bar-only). Run from anywhere.
5
+ #
6
+ # ./build-menubar-app.sh [output-dir] (default: ./build)
7
+ #
8
+ # Then: open "<output-dir>/Iterate.app"
9
+ # First launch reads ~/.config/iterate/menubar.json for the CLI + project;
10
+ # see menubar/README.md.
11
+ set -euo pipefail
12
+
13
+ here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ out="${1:-$here/build}"
15
+ app="$out/Iterate.app"
16
+ macos="$app/Contents/MacOS"
17
+
18
+ rm -rf "$app"
19
+ mkdir -p "$macos"
20
+
21
+ echo "Compiling (swiftc)…"
22
+ swiftc -O -o "$macos/Iterate" "$here/Iterate.swift" "$here/IterateIcon.swift"
23
+
24
+ cat >"$app/Contents/Info.plist" <<'PLIST'
25
+ <?xml version="1.0" encoding="UTF-8"?>
26
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
27
+ <plist version="1.0">
28
+ <dict>
29
+ <key>CFBundleName</key><string>Iterate</string>
30
+ <key>CFBundleDisplayName</key><string>Iterate</string>
31
+ <key>CFBundleIdentifier</key><string>com.iterate.app</string>
32
+ <key>CFBundleVersion</key><string>1</string>
33
+ <key>CFBundleShortVersionString</key><string>0.1</string>
34
+ <key>CFBundlePackageType</key><string>APPL</string>
35
+ <key>CFBundleExecutable</key><string>Iterate</string>
36
+ <key>LSMinimumSystemVersion</key><string>13.0</string>
37
+ <key>LSUIElement</key><true/>
38
+ </dict>
39
+ </plist>
40
+ PLIST
41
+
42
+ # Signing. Default: ad-hoc, so LaunchServices gives it a stable identity (Touch
43
+ # ID from the CLI still works — signing lives with the enclave key) and the
44
+ # osascript notification path is used. Set SIGN_IDENTITY to a real Developer ID
45
+ # to unlock UserNotifications' rich, actionable Approve/Reject banners:
46
+ #
47
+ # SIGN_IDENTITY="Developer ID Application: You (TEAMID)" ./build-menubar-app.sh
48
+ #
49
+ if [ -n "${SIGN_IDENTITY:-}" ]; then
50
+ codesign --force --deep --options runtime \
51
+ --entitlements "$here/Iterate.entitlements" \
52
+ --sign "$SIGN_IDENTITY" "$app"
53
+ echo "Signed with: $SIGN_IDENTITY (actionable notifications enabled)"
54
+ else
55
+ codesign --force --deep --sign - "$app" >/dev/null 2>&1 || true
56
+ fi
57
+
58
+ echo "Built: $app"
59
+ echo "Launch: open \"$app\""
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iterate",
3
- "version": "0.2.7",
4
- "description": "CLI for iterate",
3
+ "version": "0.3.0",
4
+ "description": "CLI and SDK for iterate",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "repository": {
@@ -19,19 +19,211 @@
19
19
  "orpc"
20
20
  ],
21
21
  "engines": {
22
- "node": ">=22"
22
+ "node": ">=22.15"
23
23
  },
24
24
  "bin": {
25
25
  "iterate": "./bin/iterate.js"
26
26
  },
27
27
  "exports": {
28
28
  ".": {
29
+ "types": "./dist/index.d.mts",
29
30
  "import": "./dist/index.mjs",
30
- "types": "./dist/index.d.mts"
31
+ "default": "./dist/index.mjs"
32
+ },
33
+ "./client": {
34
+ "types": "./dist/client.d.ts",
35
+ "import": "./dist/client.mjs",
36
+ "default": "./dist/client.mjs"
37
+ },
38
+ "./node": {
39
+ "types": "./dist/node.d.ts",
40
+ "import": "./dist/node.mjs",
41
+ "default": "./dist/node.mjs"
42
+ },
43
+ "./starter-apps/flake-dashboard": {
44
+ "types": "./dist/starter-apps/flake-dashboard/index.d.ts",
45
+ "import": "./dist/starter-apps/flake-dashboard/index.mjs",
46
+ "default": "./dist/starter-apps/flake-dashboard/index.mjs"
47
+ },
48
+ "./starter-apps/flake-dashboard/contract": {
49
+ "types": "./dist/starter-apps/flake-dashboard/contract.d.ts",
50
+ "import": "./dist/starter-apps/flake-dashboard/contract.mjs",
51
+ "default": "./dist/starter-apps/flake-dashboard/contract.mjs"
52
+ },
53
+ "./starter-apps/flake-dashboard/configured-worker": {
54
+ "types": "./dist/starter-apps/flake-dashboard/worker.d.ts",
55
+ "import": "./dist/starter-apps/flake-dashboard/configured-worker.mjs",
56
+ "default": "./dist/starter-apps/flake-dashboard/configured-worker.mjs"
57
+ },
58
+ "./starter-apps/github-ai-linter": {
59
+ "types": "./dist/starter-apps/github-ai-linter/index.d.ts",
60
+ "import": "./dist/starter-apps/github-ai-linter/index.mjs",
61
+ "default": "./dist/starter-apps/github-ai-linter/index.mjs"
62
+ },
63
+ "./starter-apps/github-ai-linter/worker": {
64
+ "types": "./dist/starter-apps/github-ai-linter/worker.d.ts",
65
+ "import": "./dist/starter-apps/github-ai-linter/worker.mjs",
66
+ "default": "./dist/starter-apps/github-ai-linter/worker.mjs"
67
+ },
68
+ "./starter-apps/guestbook": {
69
+ "types": "./dist/starter-apps/guestbook/index.d.ts",
70
+ "import": "./dist/starter-apps/guestbook/index.mjs",
71
+ "default": "./dist/starter-apps/guestbook/index.mjs"
72
+ },
73
+ "./starter-apps/guestbook/client": {
74
+ "types": "./dist/starter-apps/guestbook/client.d.ts",
75
+ "import": "./dist/starter-apps/guestbook/client.mjs",
76
+ "default": "./dist/starter-apps/guestbook/client.mjs"
77
+ },
78
+ "./starter-apps/guestbook/configured-worker": {
79
+ "types": "./dist/starter-apps/guestbook/worker.d.ts",
80
+ "import": "./dist/starter-apps/guestbook/configured-worker.mjs",
81
+ "default": "./dist/starter-apps/guestbook/configured-worker.mjs"
82
+ },
83
+ "./starter-apps/media": {
84
+ "types": "./dist/starter-apps/media/index.d.ts",
85
+ "import": "./dist/starter-apps/media/index.mjs",
86
+ "default": "./dist/starter-apps/media/index.mjs"
87
+ },
88
+ "./starter-apps/media/configured-worker": {
89
+ "types": "./dist/starter-apps/media/worker.d.ts",
90
+ "import": "./dist/starter-apps/media/configured-worker.mjs",
91
+ "default": "./dist/starter-apps/media/configured-worker.mjs"
92
+ },
93
+ "./starter-apps/media/ref": {
94
+ "types": "./dist/starter-apps/media/ref.d.ts",
95
+ "import": "./dist/starter-apps/media/ref.mjs",
96
+ "default": "./dist/starter-apps/media/ref.mjs"
97
+ },
98
+ "./starter-apps/notes": {
99
+ "types": "./dist/starter-apps/notes/index.d.ts",
100
+ "import": "./dist/starter-apps/notes/index.mjs",
101
+ "default": "./dist/starter-apps/notes/index.mjs"
102
+ },
103
+ "./starter-apps/notes/configured-worker": {
104
+ "types": "./dist/starter-apps/notes/worker.d.ts",
105
+ "import": "./dist/starter-apps/notes/configured-worker.mjs",
106
+ "default": "./dist/starter-apps/notes/configured-worker.mjs"
107
+ },
108
+ "./starter-apps/notes/ref": {
109
+ "types": "./dist/starter-apps/notes/ref.d.ts",
110
+ "import": "./dist/starter-apps/notes/ref.mjs",
111
+ "default": "./dist/starter-apps/notes/ref.mjs"
112
+ },
113
+ "./starter-apps/todo": {
114
+ "types": "./dist/starter-apps/todo/index.d.ts",
115
+ "import": "./dist/starter-apps/todo/index.mjs",
116
+ "default": "./dist/starter-apps/todo/index.mjs"
117
+ },
118
+ "./processors": {
119
+ "types": "./dist/processors/index.d.ts",
120
+ "import": "./dist/processors.mjs",
121
+ "default": "./dist/processors.mjs"
122
+ },
123
+ "./processors/cloudflare": {
124
+ "types": "./dist/processors/cloudflare.d.ts",
125
+ "import": "./dist/processors-cloudflare.mjs",
126
+ "default": "./dist/processors-cloudflare.mjs"
127
+ },
128
+ "./processors/testing": {
129
+ "types": "./dist/processors/testing.d.ts",
130
+ "import": "./dist/processors-testing.mjs",
131
+ "default": "./dist/processors-testing.mjs"
132
+ },
133
+ "./sdk": {
134
+ "types": "./dist/sdk.d.ts",
135
+ "import": "./dist/sdk.mjs",
136
+ "default": "./dist/sdk.mjs"
137
+ },
138
+ "./sdk/capnweb": {
139
+ "types": "./dist/sdk/capnweb/index.d.ts",
140
+ "import": "./dist/sdk/capnweb.mjs",
141
+ "default": "./dist/sdk/capnweb.mjs"
142
+ },
143
+ "./sdk/capnweb/react": {
144
+ "types": "./dist/sdk/capnweb/react.d.ts",
145
+ "import": "./dist/sdk/capnweb/react.mjs",
146
+ "default": "./dist/sdk/capnweb/react.mjs"
147
+ },
148
+ "./sdk/itx/react": {
149
+ "types": "./dist/sdk/itx/react.d.ts",
150
+ "import": "./dist/sdk/itx/react.mjs",
151
+ "default": "./dist/sdk/itx/react.mjs"
31
152
  },
32
153
  "./worker": {
154
+ "types": "./dist/worker.d.mts",
33
155
  "import": "./dist/worker.mjs",
34
- "types": "./dist/worker.d.mts"
156
+ "default": "./dist/worker.mjs"
157
+ },
158
+ "./document-review": {
159
+ "types": "./dist/document-review/index.d.ts",
160
+ "import": "./dist/document-review.mjs",
161
+ "default": "./dist/document-review.mjs"
162
+ },
163
+ "./next/sdk": {
164
+ "types": "./dist/next/sdk/index.d.ts",
165
+ "import": "./dist/next/sdk.mjs"
166
+ },
167
+ "./next/app": {
168
+ "types": "./dist/next/app.d.ts",
169
+ "import": "./dist/next/app.mjs"
170
+ },
171
+ "./next/app-server": {
172
+ "types": "./dist/next/app-server.d.ts",
173
+ "import": "./dist/next/app-server.mjs"
174
+ },
175
+ "./next/app-session": {
176
+ "types": "./dist/next/app-session.d.ts",
177
+ "import": "./dist/next/app-session.mjs"
178
+ },
179
+ "./next/client": {
180
+ "types": "./dist/next/client/live-state.d.ts",
181
+ "import": "./dist/next/client.mjs"
182
+ },
183
+ "./next/react": {
184
+ "types": "./dist/next/client/react.d.ts",
185
+ "import": "./dist/next/react.mjs"
186
+ },
187
+ "./next/api": {
188
+ "types": "./dist/next/api.d.ts",
189
+ "import": "./dist/next/api.mjs"
190
+ },
191
+ "./next/lib": {
192
+ "types": "./dist/next/lib.d.ts",
193
+ "import": "./dist/next/lib.mjs"
194
+ },
195
+ "./next/expression": {
196
+ "types": "./dist/next/expression.d.ts",
197
+ "import": "./dist/next/expression.mjs"
198
+ },
199
+ "./next/principal": {
200
+ "types": "./dist/next/principal.d.ts",
201
+ "import": "./dist/next/principal.mjs"
202
+ },
203
+ "./next/stream/processor": {
204
+ "types": "./dist/next/stream/processor.d.ts",
205
+ "import": "./dist/next/stream/processor.mjs"
206
+ },
207
+ "./next/oauth-scopes": {
208
+ "types": "./dist/next/oauth-scopes.d.ts",
209
+ "import": "./dist/next/oauth-scopes.mjs"
210
+ },
211
+ "./next/project-ingress": {
212
+ "types": "./dist/next/project-ingress.d.ts",
213
+ "import": "./dist/next/project-ingress.mjs"
214
+ },
215
+ "./next/oauth": {
216
+ "types": "./dist/next/client/oauth.d.ts",
217
+ "import": "./dist/next/oauth.mjs"
218
+ },
219
+ "./next/stream/run": {
220
+ "types": "./dist/next/stream/run.d.ts",
221
+ "import": "./dist/next/stream/run.mjs",
222
+ "default": "./dist/next/stream/run.mjs"
223
+ },
224
+ "./next/node": {
225
+ "types": "./dist/next-node.d.ts",
226
+ "import": "./dist/next-node.mjs"
35
227
  }
36
228
  },
37
229
  "publishConfig": {
@@ -40,30 +232,55 @@
40
232
  "files": [
41
233
  "bin",
42
234
  "dist",
43
- "README.md"
235
+ "README.md",
236
+ "THIRD_PARTY_NOTICES.md",
237
+ "menubar"
44
238
  ],
45
239
  "dependencies": {
46
240
  "@clack/prompts": "^1.0.0",
47
- "@opentui/core": "0.1.102",
48
- "@opentui/react": "0.1.102",
49
- "@orpc/client": "1.13.14",
241
+ "@cloudflare/workers-types": "^5.20260831.1",
242
+ "@iterate-com/capnweb": "^0.10.0",
50
243
  "@orpc/server": "1.13.14",
51
- "capnweb": "^0.8.0",
52
- "react": "^19.2.0",
244
+ "@tanstack/react-query": "^5.101.2",
245
+ "capnweb": "npm:@iterate-com/capnweb@0.12.2",
246
+ "json5": "^2.2.3",
247
+ "oauth4webapi": "^3.8.5",
248
+ "react": "^19.2.7",
249
+ "sqlfu": "0.1.1",
53
250
  "trpc-cli": "0.15.1",
54
251
  "ws": "8.19.0",
55
- "zod": "4.1.12"
252
+ "yaml": "^2.9.0",
253
+ "zod": "4.5.4"
254
+ },
255
+ "peerDependencies": {
256
+ "@tanstack/react-query": "^5",
257
+ "octokit": "^5.0.5",
258
+ "react": "^19.1.0"
259
+ },
260
+ "peerDependenciesMeta": {
261
+ "octokit": {
262
+ "optional": true
263
+ }
56
264
  },
57
265
  "devDependencies": {
58
266
  "@types/node": "^22.0.0",
59
- "@types/react": "^19.2.14",
267
+ "@types/react": "^19.2.17",
268
+ "@types/react-dom": "^19.2.3",
269
+ "@types/ws": "^8.18.1",
270
+ "esbuild": "^0.27.4",
271
+ "fflate": "^0.8.3",
272
+ "jsdom": "27.4.0",
273
+ "miniflare": "4.20260701.0",
274
+ "octokit": "^5.0.5",
275
+ "react-dom": "^19.2.7",
276
+ "roughdraft": "0.1.10",
60
277
  "tsdown": "0.22.2",
61
- "vitest": "4.0.15",
62
- "@iterate-com/ui": "0.0.1"
278
+ "typescript": "^5.9.3",
279
+ "vitest": "4.0.15"
63
280
  },
64
281
  "scripts": {
65
- "build": "tsdown",
66
- "typecheck": "tsgo --noEmit",
67
- "test": "vitest run"
282
+ "build": "node scripts/build.ts",
283
+ "typecheck": "tsgo --noEmit && tsc --noEmit -p tsconfig.next.json",
284
+ "test": "vitest run --reporter=default --reporter=../shared/src/test-support/e2e-policy/retry-telemetry-reporter.ts"
68
285
  }
69
286
  }