@really-knows-ai/foundry 3.2.2 → 3.2.3

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.
@@ -149,10 +149,12 @@ function resolveOpt(opts, key, fallback) {
149
149
  return (opts && opts[key] !== undefined) ? opts[key] : fallback;
150
150
  }
151
151
 
152
+ const STARTUP_MSG_MAX_MS = 3000;
153
+
152
154
  async function retryUntilReady(fn, opts) {
153
155
  const sleep = resolveOpt(opts, 'sleep', defaultSleep);
154
156
  const now = resolveOpt(opts, 'now', Date.now);
155
- const maxMs = resolveOpt(opts, 'maxMs', 30000);
157
+ const maxMs = resolveOpt(opts, 'maxMs', STARTUP_MSG_MAX_MS);
156
158
  const deadline = now() + maxMs;
157
159
  while (now() < deadline) {
158
160
  try {
@@ -230,7 +232,8 @@ export const FoundryPlugin = async ({ directory, client }) => {
230
232
  }
231
233
 
232
234
  restartNeeded = runPluginBootstrap(directory, packageRoot);
233
- await showStartupMessage(restartNeeded, directory, client);
235
+ // Fire-and-forget: don't block startup. messages.transform is the fallback.
236
+ showStartupMessage(restartNeeded, directory, client);
234
237
  },
235
238
 
236
239
  'experimental.chat.messages.transform': async (_input, output) => {
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.2.3] - 2026-05-14
4
+
5
+ ### Fixed
6
+
7
+ - **Config hook blocked startup waiting for TUI client.** `showStartupMessage`
8
+ was awaited in the config hook, and its `retryUntilReady` loop could block
9
+ opencode startup for up to 30 seconds if the TUI client wasn't immediately
10
+ available. The call is now fire-and-forget: the config hook returns
11
+ immediately, and the message either shows within the 3-second retry window
12
+ or falls back to the `messages.transform` hook.
13
+
3
14
  ## [3.2.2] - 2026-05-14
4
15
 
5
16
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@really-knows-ai/foundry",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "A skill-driven framework for governed artefact generation with AI coding tools. Define your own artefact types, laws, and flows — Foundry handles the forge → quench → appraise pipeline with deterministic routing, quality gates, and iterative refinement.",
5
5
  "type": "module",
6
6
  "main": "dist/.opencode/plugins/foundry.js",