@duct-sdk/sdk 0.2.1 → 0.2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Public release notes for the Duct SDK. Versioning follows [semver](https://semver.org).
4
4
 
5
+ ## [0.2.2] — 2026-06-07
6
+
7
+ ### Changed
8
+ - `RouteManifest.searchAction` docs updated — runtime now invokes the declared action in-shell for data queries instead of deeplink navigation
9
+ - `dataModel` field docs clarified; entity-resolution runtime wiring tracked separately
10
+
5
11
  ## [0.2.1] — 2026-06-06
6
12
 
7
13
  ### Changed
@@ -122,8 +122,7 @@ export declare function useShellStatus(shellId: string, shellHost?: string): She
122
122
  * const res = await fetch("/api/duct/token", { method: "POST" });
123
123
  * const { token } = await res.json();
124
124
  * return token;
125
- * }}
126
- * />
125
+ * }} />
127
126
  * ```
128
127
  */
129
128
  export declare function DuctShell({ shellId, userContext, onTokenRequest, onNavigate, onPageContext, open, onOpenChange, defaultOpen, shellHost, position, panelWidth, panelHeight, style, className, launcherIconSrc, readyCheck, }: DuctShellProps): React.ReactElement | null;
@@ -58,8 +58,7 @@ const DUCT_LAUNCHER_ICON_LOCAL_FALLBACK = "/assets/logo.png";
58
58
  * const res = await fetch("/api/duct/token", { method: "POST" });
59
59
  * const { token } = await res.json();
60
60
  * return token;
61
- * }}
62
- * />
61
+ * }} />
63
62
  * ```
64
63
  */
65
64
  export function DuctShell({ shellId, userContext, onTokenRequest, onNavigate, onPageContext, open, onOpenChange, defaultOpen = false, shellHost = DUCT_SHELL_HOST_DEFAULT, position = "bottom-right", panelWidth = 420, panelHeight = 640, style, className, launcherIconSrc, readyCheck = false, }) {
@@ -299,12 +298,20 @@ export function DuctShell({ shellId, userContext, onTokenRequest, onNavigate, on
299
298
  e.currentTarget.style.transform = "scale(1)";
300
299
  e.currentTarget.style.boxShadow =
301
300
  "0 4px 16px rgba(0,0,0,0.40), 0 2px 8px rgba(0,0,0,0.20)";
302
- }, children: !iconLoadFailed ? (_jsx("img", { src: currentIconSrc, alt: "Duct", width: 28, height: 28, onError: handleIconError, style: { width: "28px", height: "28px", objectFit: "contain" } })) : (_jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M18 12c0-3.3-2.2-5.5-5.5-5.5C9 6.5 7 8.7 7 12s2 5.5 5.5 5.5c2 0 3.6-.8 4.6-2.2l-2.2-1.6c-.6.8-1.4 1.3-2.4 1.3-1.6 0-2.8-1.2-2.8-3s1.2-3 2.8-3c1 0 1.8.5 2.3 1.3L18 12z", fill: "white" }) })) })), _jsx("div", { style: panelStyle, "data-duct-shell": shellId, children: _jsx("iframe", { ref: iframeRef, src: shellUrl, title: "Duct Shell", sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox", allow: "clipboard-write", referrerPolicy: "no-referrer-when-downgrade", style: {
301
+ }, children: !iconLoadFailed ? (_jsx("img", { src: currentIconSrc, alt: "Duct", width: 28, height: 28, onError: handleIconError, style: { width: "28px", height: "28px", objectFit: "contain" } })) : (_jsx("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M18 12c0-3.3-2.2-5.5-5.5-5.5C9 6.5 7 8.7 7 12s2 5.5 5.5 5.5c2 0 3.6-.8 4.6-2.2l-2.2-1.6c-.6.8-1.4 1.3-2.4 1.3-1.6 0-2.8-1.2-2.8-3s1.2-3 2.8-3c1 0 1.8.5 2.3 1.3L18 12z", fill: "white" }) })) })), _jsx("div", { style: panelStyle, "data-duct-shell": shellId, children: React.createElement("iframe", {
302
+ ref: iframeRef,
303
+ src: shellUrl,
304
+ title: "Duct Shell",
305
+ sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
306
+ allow: "clipboard-write",
307
+ referrerPolicy: "no-referrer-when-downgrade",
308
+ style: {
303
309
  width: "100%",
304
310
  height: "100%",
305
311
  border: "none",
306
312
  display: "block",
307
- }, loading: "lazy" }) })] }));
313
+ },
314
+ }) })] }));
308
315
  }
309
316
  /**
310
317
  * Headless launch button — use when you want a custom trigger.
@@ -315,7 +315,7 @@ export function DuctShell({ shellId, userContext, onTokenRequest, onNavigate, on
315
315
  height: "100%",
316
316
  border: "none",
317
317
  display: "block",
318
- }, loading: "lazy" }) })] }));
318
+ } }) })] }));
319
319
  }
320
320
  /**
321
321
  * Headless launch button — use when you want a custom trigger.
@@ -38,8 +38,8 @@ export interface RouteManifest {
38
38
  evidence?: string[];
39
39
  /**
40
40
  * Maps URL query params to an action for structured data access.
41
- * Used by the shell to call a search action instead of scraping HTML.
42
- * [NOT YET IMPLEMENTED in shell runtime]
41
+ * When set, the shell invokes this action instead of firing a deeplink handoff
42
+ * for data_query intents on this route — keeping users in-shell with rich results.
43
43
  */
44
44
  searchAction?: {
45
45
  actionId: string;
@@ -321,9 +321,9 @@ export interface DuctConfig {
321
321
  /** Shell widget display config */
322
322
  widget?: WidgetConfig;
323
323
  /**
324
- * Backend data entity declarations for Backend Intelligence.
325
- * Links entity types to their discovery/fetch actions.
326
- * [NOT YET IMPLEMENTED in shell runtime — see BACKEND_INTELLIGENCE.md]
324
+ * Backend data entity declarations — links entity types to discovery/fetch actions.
325
+ * Powers automatic entity resolution in multi-step agent loops.
326
+ * Declare your entities now; runtime enforcement is in active development.
327
327
  */
328
328
  dataModel?: DataModel;
329
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duct-sdk/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "Duct SDK — A shell (like terminal) that knows when to talk, when to show, and when to hand off.",
6
6
  "main": "dist/index.js",