@axiom-lattice/protocols 6.3.0 → 6.4.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@6.3.0 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@6.4.0 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,11 +10,11 @@
10
10
  ESM Build start
11
11
  ESM dist/index.mjs 49.18 KB
12
12
  ESM dist/index.mjs.map 221.12 KB
13
- ESM ⚡️ Build success in 537ms
13
+ ESM ⚡️ Build success in 562ms
14
14
  CJS dist/index.js 55.56 KB
15
15
  CJS dist/index.js.map 225.48 KB
16
- CJS ⚡️ Build success in 538ms
16
+ CJS ⚡️ Build success in 563ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 18568ms
19
- DTS dist/index.d.ts 290.75 KB
20
- DTS dist/index.d.mts 290.75 KB
18
+ DTS ⚡️ Build success in 15528ms
19
+ DTS dist/index.d.ts 291.04 KB
20
+ DTS dist/index.d.mts 291.04 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 6.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b86cff5: Replace the `share_app` agent tool with `publish_target`, which publishes project files (including directories and artifact apps) or sandbox-plugin MCP Apps as links or workspace menu items. Add `list_menu_groups` for choosing pin groups, compact file/MCP share cards, and live re-execution for pinned MCP Apps. `share_app` is removed without a compatibility alias.
8
+
3
9
  ## 6.3.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -4592,10 +4592,11 @@ interface CustomMenuConfig {
4592
4592
  * A pinned MCP App menu item.
4593
4593
  *
4594
4594
  * The identity (`kind` + server/plugin + resource) is enough to re-open the
4595
- * App; `toolInput` lets a self-refreshing App re-run the same query. The pin
4596
- * flow also captures the current `toolResult` and `ui` so the pinned view has
4597
- * the same initial data as the chat view did (an App that refreshes itself can
4598
- * still re-query).
4595
+ * App; `toolInput` lets the pinned view re-run the same tool on mount. New pins
4596
+ * do not capture a result snapshot: the live re-run is the source of truth.
4597
+ * `toolResult` and `ui` are legacy fallback fields kept for pins written by
4598
+ * older clients — they are only rendered when there is no tool to re-run or the
4599
+ * live call fails.
4599
4600
  */
4600
4601
  type McpAppMenuConfig = {
4601
4602
  kind: 'mcp';
@@ -4607,6 +4608,8 @@ type McpAppMenuConfig = {
4607
4608
  toolInput?: Record<string, unknown>;
4608
4609
  toolResult?: unknown;
4609
4610
  ui?: ToolCallUi;
4611
+ workspaceId?: string;
4612
+ projectId?: string;
4610
4613
  } | {
4611
4614
  kind: 'plugin';
4612
4615
  pluginType: string;
@@ -4619,11 +4622,14 @@ type McpAppMenuConfig = {
4619
4622
  toolInput?: Record<string, unknown>;
4620
4623
  toolResult?: unknown;
4621
4624
  ui?: ToolCallUi;
4625
+ workspaceId?: string;
4626
+ projectId?: string;
4622
4627
  };
4623
4628
  /** A pinned workspace file rendered by the file viewer. */
4624
4629
  interface FileMenuConfig {
4625
4630
  resourcePath: string;
4626
4631
  fileName?: string;
4632
+ tenantId?: string;
4627
4633
  workspaceId?: string;
4628
4634
  projectId?: string;
4629
4635
  assistantId?: string;
@@ -7755,6 +7761,8 @@ interface ShareCardData {
7755
7761
  /** Optional absolute URL from a deployment-level public base URL. */
7756
7762
  url?: string;
7757
7763
  title: string;
7764
+ /** New results always set this; legacy cards default to mcpApp. */
7765
+ kind?: ShareKind;
7758
7766
  visibility: "public" | "password";
7759
7767
  password?: string;
7760
7768
  warnings?: string[];
package/dist/index.d.ts CHANGED
@@ -4592,10 +4592,11 @@ interface CustomMenuConfig {
4592
4592
  * A pinned MCP App menu item.
4593
4593
  *
4594
4594
  * The identity (`kind` + server/plugin + resource) is enough to re-open the
4595
- * App; `toolInput` lets a self-refreshing App re-run the same query. The pin
4596
- * flow also captures the current `toolResult` and `ui` so the pinned view has
4597
- * the same initial data as the chat view did (an App that refreshes itself can
4598
- * still re-query).
4595
+ * App; `toolInput` lets the pinned view re-run the same tool on mount. New pins
4596
+ * do not capture a result snapshot: the live re-run is the source of truth.
4597
+ * `toolResult` and `ui` are legacy fallback fields kept for pins written by
4598
+ * older clients — they are only rendered when there is no tool to re-run or the
4599
+ * live call fails.
4599
4600
  */
4600
4601
  type McpAppMenuConfig = {
4601
4602
  kind: 'mcp';
@@ -4607,6 +4608,8 @@ type McpAppMenuConfig = {
4607
4608
  toolInput?: Record<string, unknown>;
4608
4609
  toolResult?: unknown;
4609
4610
  ui?: ToolCallUi;
4611
+ workspaceId?: string;
4612
+ projectId?: string;
4610
4613
  } | {
4611
4614
  kind: 'plugin';
4612
4615
  pluginType: string;
@@ -4619,11 +4622,14 @@ type McpAppMenuConfig = {
4619
4622
  toolInput?: Record<string, unknown>;
4620
4623
  toolResult?: unknown;
4621
4624
  ui?: ToolCallUi;
4625
+ workspaceId?: string;
4626
+ projectId?: string;
4622
4627
  };
4623
4628
  /** A pinned workspace file rendered by the file viewer. */
4624
4629
  interface FileMenuConfig {
4625
4630
  resourcePath: string;
4626
4631
  fileName?: string;
4632
+ tenantId?: string;
4627
4633
  workspaceId?: string;
4628
4634
  projectId?: string;
4629
4635
  assistantId?: string;
@@ -7755,6 +7761,8 @@ interface ShareCardData {
7755
7761
  /** Optional absolute URL from a deployment-level public base URL. */
7756
7762
  url?: string;
7757
7763
  title: string;
7764
+ /** New results always set this; legacy cards default to mcpApp. */
7765
+ kind?: ShareKind;
7758
7766
  visibility: "public" | "password";
7759
7767
  password?: string;
7760
7768
  warnings?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiom-lattice/protocols",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "Unified protocol type definitions for Axiom Lattice framework",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,4 +1,5 @@
1
1
  import type { McpUiRef } from "./McpUiProtocol";
2
+ import type { ShareKind } from "./SandboxResourceProtocol";
2
3
 
3
4
  /** Public-facing description of a shared MCP App. */
4
5
  export interface McpAppShareBootstrap {
@@ -23,6 +24,8 @@ export interface ShareCardData {
23
24
  /** Optional absolute URL from a deployment-level public base URL. */
24
25
  url?: string;
25
26
  title: string;
27
+ /** New results always set this; legacy cards default to mcpApp. */
28
+ kind?: ShareKind;
26
29
  visibility: "public" | "password";
27
30
  password?: string;
28
31
  warnings?: string[];
@@ -32,10 +32,11 @@ export interface CustomMenuConfig {
32
32
  * A pinned MCP App menu item.
33
33
  *
34
34
  * The identity (`kind` + server/plugin + resource) is enough to re-open the
35
- * App; `toolInput` lets a self-refreshing App re-run the same query. The pin
36
- * flow also captures the current `toolResult` and `ui` so the pinned view has
37
- * the same initial data as the chat view did (an App that refreshes itself can
38
- * still re-query).
35
+ * App; `toolInput` lets the pinned view re-run the same tool on mount. New pins
36
+ * do not capture a result snapshot: the live re-run is the source of truth.
37
+ * `toolResult` and `ui` are legacy fallback fields kept for pins written by
38
+ * older clients — they are only rendered when there is no tool to re-run or the
39
+ * live call fails.
39
40
  */
40
41
  export type McpAppMenuConfig =
41
42
  | {
@@ -48,6 +49,8 @@ export type McpAppMenuConfig =
48
49
  toolInput?: Record<string, unknown>;
49
50
  toolResult?: unknown;
50
51
  ui?: ToolCallUi;
52
+ workspaceId?: string;
53
+ projectId?: string;
51
54
  }
52
55
  | {
53
56
  kind: 'plugin';
@@ -61,12 +64,15 @@ export type McpAppMenuConfig =
61
64
  toolInput?: Record<string, unknown>;
62
65
  toolResult?: unknown;
63
66
  ui?: ToolCallUi;
67
+ workspaceId?: string;
68
+ projectId?: string;
64
69
  };
65
70
 
66
71
  /** A pinned workspace file rendered by the file viewer. */
67
72
  export interface FileMenuConfig {
68
73
  resourcePath: string;
69
74
  fileName?: string;
75
+ tenantId?: string;
70
76
  workspaceId?: string;
71
77
  projectId?: string;
72
78
  assistantId?: string;
@@ -1,4 +1,5 @@
1
- import type { McpAppMenuConfig, MenuContentConfig, MenuContentType } from "../MenuProtocol";
1
+ import type { McpAppMenuConfig, FileMenuConfig, MenuContentConfig, MenuContentType } from "../MenuProtocol";
2
+ import type { ShareCardData } from "../McpAppShareProtocol";
2
3
 
3
4
  describe("MenuProtocol mcpApp content type", () => {
4
5
  it("round-trips both mcp and plugin McpAppMenuConfig variants", () => {
@@ -29,4 +30,42 @@ describe("MenuProtocol mcpApp content type", () => {
29
30
  const types: MenuContentType[] = ["agent", "html", "custom", "file", "mcpApp"];
30
31
  expect(new Set(types).size).toBe(5);
31
32
  });
33
+
34
+ it("exposes persisted scope fields and share card kind", () => {
35
+ const app: McpAppMenuConfig = {
36
+ kind: "plugin",
37
+ pluginType: "demo",
38
+ resource: "ui/app.html",
39
+ scope: "signed",
40
+ toolName: "render",
41
+ toolInput: {},
42
+ workspaceId: "w1",
43
+ projectId: "p1",
44
+ };
45
+ const mcpApp: McpAppMenuConfig = {
46
+ kind: "mcp",
47
+ serverKey: "srv",
48
+ resourceUri: "ui://srv/app.html",
49
+ workspaceId: "w1",
50
+ projectId: "p1",
51
+ };
52
+ const file: FileMenuConfig = {
53
+ resourcePath: "dashboard",
54
+ fileName: "dashboard",
55
+ tenantId: "t1",
56
+ workspaceId: "w1",
57
+ projectId: "p1",
58
+ };
59
+ const card: ShareCardData = {
60
+ token: "t",
61
+ path: "/s/t",
62
+ title: "Demo",
63
+ kind: "mcpApp",
64
+ visibility: "public",
65
+ };
66
+ expect(app.workspaceId).toBe("w1");
67
+ expect(mcpApp.workspaceId).toBe("w1");
68
+ expect(file.tenantId).toBe("t1");
69
+ expect(card.kind).toBe("mcpApp");
70
+ });
32
71
  });