@alisio/core 0.5.0 → 0.5.2

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.
@@ -320,6 +320,16 @@ export declare function createApplication(options?: AppOptions): Promise<{
320
320
  resolveModel: (reference: string, signal?: AbortSignal) => Promise<ResolvedProviderModel>;
321
321
  /** Creates and binds a fresh session to an optional configured model selector. */
322
322
  createSession(reference?: string): Promise<import("./index.ts").Session>;
323
+ /**
324
+ * Re-binds an existing session to the provider that owns `model` (a configured profile), else
325
+ * to the active provider. The session keeps a single provider+model binding, so choosing a
326
+ * model of the now-active provider makes it usable even when the session's original provider
327
+ * is gone. The persisted transcript is provider-neutral: no new session is needed.
328
+ */
329
+ rebindSession(sessionId: string, model?: string): Promise<{
330
+ provider: string;
331
+ model: string;
332
+ }>;
323
333
  /** Persists and activates only after construction succeeds; programmatic overrides stay fixed. */
324
334
  activateProvider(id: string, profile: Record<string, import("@alisio/sdk").ProviderConfigurationValue>, credentials: Record<string, string>, model: string, profileName?: string): Promise<void>;
325
335
  /** Activates a stored profile without exposing its credentials. Returns false for a no-op. */
@@ -1400,6 +1400,30 @@ export async function createApplication(options = {}) {
1400
1400
  sessionProviders.set(session.id, runtime);
1401
1401
  return session;
1402
1402
  },
1403
+ /**
1404
+ * Re-binds an existing session to the provider that owns `model` (a configured profile), else
1405
+ * to the active provider. The session keeps a single provider+model binding, so choosing a
1406
+ * model of the now-active provider makes it usable even when the session's original provider
1407
+ * is gone. The persisted transcript is provider-neutral: no new session is needed.
1408
+ */
1409
+ async rebindSession(sessionId, model) {
1410
+ const requested = model?.trim();
1411
+ if (requested) {
1412
+ const target = await resolveModel(requested).catch(() => undefined);
1413
+ if (target) {
1414
+ const runtime = await runtimeFor(target);
1415
+ store.updateBinding(sessionId, runtime.id, target.model.id);
1416
+ sessionProviders.set(sessionId, runtime);
1417
+ return { provider: runtime.id, model: target.model.id };
1418
+ }
1419
+ }
1420
+ // No configured profile owns it (or none requested): keep the active provider.
1421
+ const next = requested || provider.model;
1422
+ store.updateBinding(sessionId, provider.id, next);
1423
+ sessionProviders.set(sessionId, provider.currentProvider);
1424
+ retainedProviders.add(provider.currentProvider);
1425
+ return { provider: provider.id, model: next };
1426
+ },
1403
1427
  /** Persists and activates only after construction succeeds; programmatic overrides stay fixed. */
1404
1428
  async activateProvider(id, profile, credentials, model, profileName = id) {
1405
1429
  if (options.provider)
@@ -2,6 +2,44 @@
2
2
  export const CHANGELOG_DATA = {
3
3
  schema: 1,
4
4
  entries: [
5
+ {
6
+ version: "0.5.2",
7
+ date: "2026-10-08",
8
+ sections: [
9
+ {
10
+ title: "Fixed",
11
+ items: [
12
+ "Changing the model in a chat re-binds the session to the model's provider, so you can pick any model of the current provider and keep using the same conversation even when the session's original provider is gone, without starting a new chat.",
13
+ ],
14
+ },
15
+ ],
16
+ },
17
+ {
18
+ version: "0.5.1",
19
+ date: "2026-10-08",
20
+ sections: [
21
+ {
22
+ title: "Fixed",
23
+ items: [
24
+ 'The file panel previews PDFs again: the server no longer blocks the same-origin frame, which showed "refused to connect" instead of the document.',
25
+ ],
26
+ },
27
+ ],
28
+ },
29
+ {
30
+ version: "0.5.0",
31
+ date: "2026-10-07",
32
+ sections: [
33
+ {
34
+ title: "Added",
35
+ items: [
36
+ "The Trajectory tab offers a Table/Timeline switch: the timeline is an execution trace with lanes for the model, the tools and the user waits, plus tokens per turn and time per tool.",
37
+ "The file panel adds a right-click menu to copy a file's absolute path, relative path or name, and previews PDFs and HTML (with a source toggle for HTML).",
38
+ "Icon-theme plugins: choose one in Settings, Appearance (for example the Material Icon Theme plugin).",
39
+ ],
40
+ },
41
+ ],
42
+ },
5
43
  {
6
44
  version: "0.4.5",
7
45
  date: "2026-10-07",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alisio/core",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Embeddable provider-agnostic Alisio agent core: tool loop, context compaction, local tools, MCP, plugin host and SQLite session store. Runs on Node >=22.16 and Bun.",
5
5
  "author": "Gustavo Gutiérrez",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "node": ">=22.16"
42
42
  },
43
43
  "dependencies": {
44
- "@alisio/sdk": "0.5.0",
44
+ "@alisio/sdk": "0.5.2",
45
45
  "@mixmark-io/domino": "2.2.0",
46
46
  "@modelcontextprotocol/client": "2.1.0",
47
47
  "ajv": "8.20.0",