@alexkroman1/aai-cli 6.1.0 → 6.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.
@@ -164,6 +164,22 @@ export type SupervisedDevServerOptions = {
164
164
  * the shipped 60s that is a minute of wall clock per assertion.
165
165
  */
166
166
  healthTimeoutMs?: number | undefined;
167
+ /**
168
+ * The host `url` names, and so the one `/health` is polled on. Defaults to
169
+ * `127.0.0.1`; a project WITH a client.tsx needs `localhost`.
170
+ *
171
+ * Vite owns `port` there and binds its default `server.host` — the NAME
172
+ * `localhost`, which is `::1` on macOS. Measured with `lsof`:
173
+ *
174
+ * node TCP 127.0.0.1:4834 (LISTEN) <- the backend, IPv4
175
+ * node TCP [::1]:4833 (LISTEN) <- Vite, IPv6 loopback only
176
+ *
177
+ * so the hardcoded `127.0.0.1` this replaces was refused for the full 60s
178
+ * against a server that had already announced itself. `localhost` rather
179
+ * than `::1` because Node connects with `autoSelectFamily`: the name tries
180
+ * both families, and holds on a runner that binds the v4 address instead.
181
+ */
182
+ host?: string | undefined;
167
183
  };
168
184
  /**
169
185
  * Boot `aai dev` as a child and, under a fault profile, keep killing it.
@@ -13,8 +13,8 @@
13
13
  "publish:agent": "aai publish"
14
14
  },
15
15
  "dependencies": {
16
- "@alexkroman1/aai": "^6.1.0",
17
- "@alexkroman1/aai-ui": "^6.1.0",
16
+ "@alexkroman1/aai": "^6.3.0",
17
+ "@alexkroman1/aai-ui": "^6.3.0",
18
18
  "@workflow/world-postgres": "4.3.3",
19
19
  "react": "^19.2.8",
20
20
  "react-dom": "^19.2.8",
@@ -23,7 +23,7 @@
23
23
  "zod": "^4.4.3"
24
24
  },
25
25
  "devDependencies": {
26
- "@alexkroman1/aai-cli": "^6.1.0",
26
+ "@alexkroman1/aai-cli": "^6.3.0",
27
27
  "@tailwindcss/vite": "^4.3.3",
28
28
  "@types/node": "^26.2.0",
29
29
  "@types/react": "^19.2.18",
@@ -33,6 +33,17 @@
33
33
  * never travel in one; this page contains no upload code because the SDK owns
34
34
  * that.
35
35
  *
36
+ * ## Two waits, two bars
37
+ *
38
+ * A recording is the one input big enough that STORING it is itself a wait, and
39
+ * it is a wait nothing else on this page can describe: the run does not EXIST
40
+ * until the bytes are in, so there is no run id, no status and nothing for
41
+ * `<WorkflowProgress>` to read. `<UploadProgressBar>` covers exactly that
42
+ * stretch — `useWorkflowSubmit` reports the bytes as they go and drops the
43
+ * report the moment the last one lands — and `<WorkflowProgress>` takes over
44
+ * from there with what the run itself says. A page with only the second showed a
45
+ * disabled button and nothing else for the length of the upload.
46
+ *
36
47
  * That works because this workflow's input is scalars all the way down. A page
37
48
  * whose schema has an object or array property writes those fields itself, in
38
49
  * the same `<Form>` — every field in `@alexkroman1/aai-ui` is a plain named
@@ -46,6 +57,7 @@ import {
46
57
  isTerminal,
47
58
  page,
48
59
  SubmitButton,
60
+ UploadProgressBar,
49
61
  useWorkflowRuns,
50
62
  useWorkflowSubmit,
51
63
  WorkflowFields,
@@ -71,7 +83,7 @@ const WORKFLOW = "transcribe";
71
83
  const HISTORY_LIMIT = 10;
72
84
 
73
85
  function TranscriptionDesk() {
74
- const { submit, run, pending, error, reset } = useWorkflowSubmit<Transcript>(WORKFLOW);
86
+ const { submit, run, upload, pending, error, reset } = useWorkflowSubmit<Transcript>(WORKFLOW);
75
87
  const history = useWorkflowRuns<Transcript>(WORKFLOW, { limit: HISTORY_LIMIT });
76
88
  // Which past run the reader is looking at, if any. Its own state rather than
77
89
  // a route, because a workflow app is one page and a run id is not a place.
@@ -102,6 +114,9 @@ function TranscriptionDesk() {
102
114
  <Form onSubmit={(values) => submit(values)} error={error}>
103
115
  {/* The NAME, so the schema is fetched here rather than by this page. */}
104
116
  <WorkflowFields workflow={WORKFLOW} />
117
+ {/* Unguarded on purpose: it renders nothing until there are bytes in
118
+ flight, and nothing again once they have landed. */}
119
+ <UploadProgressBar upload={upload} />
105
120
  <SubmitButton pending={pending}>Transcribe</SubmitButton>
106
121
  </Form>
107
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexkroman1/aai-cli",
3
- "version": "6.1.0",
3
+ "version": "6.3.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "aai": "bin.mjs"
@@ -44,8 +44,8 @@
44
44
  "p-timeout": "^7.0.1",
45
45
  "vite": "^8.2.1",
46
46
  "zod": "^4.4.3",
47
- "@alexkroman1/aai": "6.1.0",
48
- "@alexkroman1/aai-ui": "6.1.0"
47
+ "@alexkroman1/aai-ui": "6.3.0",
48
+ "@alexkroman1/aai": "6.3.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "playwright": "^1.62.1",
@@ -53,7 +53,7 @@
53
53
  "verdaccio": "^6.9.2",
54
54
  "vitest": "^4.1.10",
55
55
  "workflow": "4.8.2",
56
- "aai-templates": "0.3.4"
56
+ "aai-templates": "0.3.5"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "vitest": "^4.1.10"