@iloveagents/foundry-agent 0.1.5 → 0.2.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,72 @@
|
|
|
1
1
|
# @iloveagents/foundry-agent
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- No source changes. The 0.2.0 publish for `@iloveagents/foundry-agent` and
|
|
8
|
+
`@iloveagents/foundry-web-primitives` failed because npm had `0.2.0`
|
|
9
|
+
reserved for those two packages from an older publish-then-unpublish
|
|
10
|
+
cycle (the version was reserved before the recent v1 incident — see
|
|
11
|
+
git tag history). `@iloveagents/foundry-web-shell@0.2.0` and
|
|
12
|
+
`@iloveagents/foundry-web-ui@0.2.0` published cleanly. Bumping the
|
|
13
|
+
whole fixed group to 0.2.1 so all four publish together at a version
|
|
14
|
+
number that's free across all four packages.
|
|
15
|
+
|
|
16
|
+
## 0.2.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- shell: ChatConversationConfig API + sticky-runtime threadId
|
|
21
|
+
|
|
22
|
+
Lets a downstream module (e.g. `@ltwlf/spaces-web-ui`) attach a
|
|
23
|
+
`ChatConversationConfig` to its `ChatModule`. The shell then:
|
|
24
|
+
- Pre-mints a fresh thread UUID via `useRef` so the AG-UI runtime's
|
|
25
|
+
`threadId` is defined from first render — no `undefined → defined`
|
|
26
|
+
remount mid-conversation when the user sends the first message.
|
|
27
|
+
- Calls `config.useStickyConversationId()` (when declared) and
|
|
28
|
+
feeds the resulting id into the runtime so the chat stays "live"
|
|
29
|
+
while the user browses non-chat routes (Workspaces, Jobs, etc.).
|
|
30
|
+
- Per-config keyed child components (`StickyAwareRuntime` vs
|
|
31
|
+
`UrlOnlyRuntime`) so optional hooks satisfy Rules-of-Hooks across
|
|
32
|
+
multi-module config swaps.
|
|
33
|
+
|
|
34
|
+
UI: collapsible nav groups in `sidebar.tsx` with persisted state via
|
|
35
|
+
`useSyncExternalStore` + localStorage, plus stable group ordering via
|
|
36
|
+
new `priority` field in `nav-config.ts`.
|
|
37
|
+
|
|
38
|
+
`ag-ui-runtime-provider.tsx` accepts an external `threadId` and
|
|
39
|
+
`historyAdapterFactory` so the consuming app can wire its own
|
|
40
|
+
persistence (e.g. `ThreadHistoryAdapter` → REST `/api/conversations`).
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Fix `citationStore.clear()` so the registered handler survives per-conversation resets.
|
|
45
|
+
|
|
46
|
+
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.
|
|
47
|
+
|
|
48
|
+
- Move sibling `@iloveagents/foundry-*` declarations from `peerDependencies`
|
|
49
|
+
to `dependencies` in `foundry-web-shell` and `foundry-web-ui`. These four
|
|
50
|
+
packages always ship together as a coordinated fixed group from the same
|
|
51
|
+
monorepo — they were never independently-versioned peers, so declaring
|
|
52
|
+
them as peerDeps caused changesets' `shouldBumpMajor` cascade to promote
|
|
53
|
+
the entire group to a major version on every minor changeset (a single
|
|
54
|
+
minor on any of the four would exit the sibling's `^0.x.y` peerDep range
|
|
55
|
+
→ all dependents promoted to major → fixed group synced all four to
|
|
56
|
+
major → 0.1.5 unexpectedly jumped to 1.0.0). Moving to `dependencies`
|
|
57
|
+
eliminates the cascade entirely; `dependencies` never trigger
|
|
58
|
+
`shouldBumpMajor`. Consumers that already install each foundry-\* package
|
|
59
|
+
directly are unaffected — pnpm hoists by name, so a single instance
|
|
60
|
+
resolves across the dep graph regardless of declaration site.
|
|
61
|
+
|
|
62
|
+
### NOTE: 1.0.0 / 1.0.1 were accidental
|
|
63
|
+
|
|
64
|
+
These version numbers were published briefly on 2026-05-27 due to the
|
|
65
|
+
peerDep cascade bug described above, then unpublished. The version
|
|
66
|
+
numbers themselves are now permanently reserved on npm and CANNOT be
|
|
67
|
+
re-published. This 0.2.0 release captures all the work that was in
|
|
68
|
+
the accidental 1.0.x releases. Do not depend on 1.0.x.
|
|
69
|
+
|
|
3
70
|
## 0.1.5
|
|
4
71
|
|
|
5
72
|
## 0.1.4
|
package/package.json
CHANGED
|
@@ -33,14 +33,20 @@ describe("citationStore", () => {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
describe("clear", () => {
|
|
36
|
-
it("resets results
|
|
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(
|
|
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).
|
|
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
|
-
/**
|
|
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: []
|
|
51
|
+
clear: () => set({ results: [] }),
|
|
45
52
|
}));
|