@iloveagents/foundry-agent 0.1.5 → 1.0.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @iloveagents/foundry-agent
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e54a336: chore(release): republish web-shell + web-ui (npm refused 1.0.0 — version was previously reserved)
8
+
9
+ No source changes. The 1.0.0 release ran successfully for
10
+ `@iloveagents/foundry-agent` and `@iloveagents/foundry-web-primitives`,
11
+ but the npm publish for `@iloveagents/foundry-web-shell@1.0.0` and
12
+ `@iloveagents/foundry-web-ui@1.0.0` failed with E400 "Cannot publish
13
+ over previously published version" — those exact version numbers
14
+ appear to have been reserved on the registry from an earlier
15
+ publish-then-unpublish cycle. Bumping the fixed group to 1.0.1 so
16
+ the four packages stay version-aligned and the publish goes through.
17
+
18
+ ## 1.0.0
19
+
20
+ ### Minor Changes
21
+
22
+ - 9105483: shell: ChatConversationConfig API + sticky-runtime threadId
23
+
24
+ Lets a downstream module (e.g. `@ltwlf/spaces-web-ui`) attach a
25
+ `ChatConversationConfig` to its `ChatModule`. The shell then:
26
+ - Pre-mints a fresh thread UUID via `useRef` so the AG-UI runtime's
27
+ `threadId` is defined from first render — no `undefined → defined`
28
+ remount mid-conversation when the user sends the first message.
29
+ - Calls `config.useStickyConversationId()` (when declared) and
30
+ feeds the resulting id into the runtime so the chat stays "live"
31
+ while the user browses non-chat routes (Workspaces, Jobs, etc.).
32
+ - Per-config keyed child components (`StickyAwareRuntime` vs
33
+ `UrlOnlyRuntime`) so optional hooks satisfy Rules-of-Hooks across
34
+ multi-module config swaps.
35
+
36
+ UI: collapsible nav groups in `sidebar.tsx` with persisted state via
37
+ `useSyncExternalStore` + localStorage, plus stable group ordering via
38
+ new `priority` field in `nav-config.ts`.
39
+
40
+ `ag-ui-runtime-provider.tsx` accepts an external `threadId` and
41
+ `historyAdapterFactory` so the consuming app can wire its own
42
+ persistence (e.g. `ThreadHistoryAdapter` → REST `/api/conversations`).
43
+
44
+ ### Patch Changes
45
+
46
+ - 2b10540: Fix `citationStore.clear()` so the registered handler survives per-conversation resets.
47
+
48
+ The previous implementation wiped both `results` AND `handler`. `useNewConversation` calls `clear()` on every "New Thread" click. Combined with the `registerOnce`-style handler registration in feature modules (e.g. SPACES' `registerSpacesCitationHandler`), the result was that all `[n]` citation markers in chat became inert non-clickable spans for the rest of the session after the first new-thread click. `clear()` now resets `results` only — the handler is module-level state and must persist.
49
+
3
50
  ## 0.1.5
4
51
 
5
52
  ## 0.1.4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iloveagents/foundry-agent",
3
- "version": "0.1.5",
3
+ "version": "1.0.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "types": "./src/index.ts",
@@ -33,14 +33,20 @@ describe("citationStore", () => {
33
33
  });
34
34
 
35
35
  describe("clear", () => {
36
- it("resets results and handler", () => {
36
+ it("resets results but preserves the registered handler", () => {
37
+ // The handler is registered once at app boot by a feature module
38
+ // (e.g. SPACES). It MUST survive "New Thread" / per-conversation
39
+ // resets — otherwise every [n] marker in chat becomes inert after
40
+ // the first new-thread click, since the registration guard
41
+ // suppresses re-binding for the rest of the session.
42
+ const handler: CitationHandler = { openCitation: () => {} };
37
43
  citationStore.getState().setResults([mockResult]);
38
- citationStore.getState().setHandler({ openCitation: () => {} });
44
+ citationStore.getState().setHandler(handler);
39
45
 
40
46
  citationStore.getState().clear();
41
47
 
42
48
  expect(citationStore.getState().results).toEqual([]);
43
- expect(citationStore.getState().handler).toBeNull();
49
+ expect(citationStore.getState().handler).toBe(handler);
44
50
  });
45
51
  });
46
52
  });
@@ -26,7 +26,14 @@ interface CitationState {
26
26
  setResults: (results: CitationResult[]) => void;
27
27
  /** Register a handler for citation click actions */
28
28
  setHandler: (handler: CitationHandler) => void;
29
- /** Clear all citations (e.g. on new conversation) */
29
+ /**
30
+ * Reset per-conversation state. Clears ``results`` only — the handler
31
+ * is module-level state registered once at app boot by feature modules
32
+ * (e.g. ``registerSpacesCitationHandler``) and must persist across
33
+ * conversations. Wiping it on "New Thread" produced inert ``[n]``
34
+ * markers for the rest of the session, since the registration guard
35
+ * (``registerOnce`` in spaces ``use-spaces-init``) suppresses re-binding.
36
+ */
30
37
  clear: () => void;
31
38
  }
32
39
 
@@ -41,5 +48,5 @@ export const citationStore = createStore<CitationState>((set) => ({
41
48
  handler: null,
42
49
  setResults: (results) => set({ results }),
43
50
  setHandler: (handler) => set({ handler }),
44
- clear: () => set({ results: [], handler: null }),
51
+ clear: () => set({ results: [] }),
45
52
  }));