@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.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +12 -4
- package/dist/index.d.ts +12 -4
- package/package.json +1 -1
- package/src/McpAppShareProtocol.ts +3 -0
- package/src/MenuProtocol.ts +10 -4
- package/src/__tests__/MenuProtocol.test.ts +40 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/protocols@6.
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[32mESM[39m [1mdist/index.mjs [22m[32m49.18 KB[39m
|
|
12
12
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m221.12 KB[39m
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 562ms
|
|
14
14
|
[32mCJS[39m [1mdist/index.js [22m[32m55.56 KB[39m
|
|
15
15
|
[32mCJS[39m [1mdist/index.js.map [22m[32m225.48 KB[39m
|
|
16
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 563ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 15528ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m291.04 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m291.04 KB[39m
|
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
|
|
4596
|
-
*
|
|
4597
|
-
*
|
|
4598
|
-
*
|
|
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
|
|
4596
|
-
*
|
|
4597
|
-
*
|
|
4598
|
-
*
|
|
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,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[];
|
package/src/MenuProtocol.ts
CHANGED
|
@@ -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
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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
|
});
|