@trackunit/iris-app 2.17.2 → 2.17.5-alpha-da6778f0891.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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.17.3 (2026-12-01)
2
+
3
+ This was a version bump only for iris-app to align it with other projects, there were no code changes.
4
+
1
5
  ## 2.17.2 (2026-12-01)
2
6
 
3
7
  This was a version bump only for iris-app to align it with other projects, there were no code changes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app",
3
- "version": "2.17.2",
3
+ "version": "2.17.5-alpha-da6778f0891.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "main": "src/index.js",
6
6
  "generators": "./generators.json",
@@ -10,7 +10,7 @@
10
10
  "node": ">=24.x"
11
11
  },
12
12
  "dependencies": {
13
- "@trackunit/css-classname-utils": "~0.0.155",
13
+ "@trackunit/css-classname-utils": "0.0.156-alpha-da6778f0891.0",
14
14
  "@typescript-eslint/types": "8.71.2",
15
15
  "@typescript-eslint/typescript-estree": "8.71.2",
16
16
  "pacote": "^21.5.1",
@@ -27,10 +27,10 @@
27
27
  "@npmcli/arborist": "^9.1.9",
28
28
  "win-ca": "^3.5.1",
29
29
  "node-forge": "^1.4.3",
30
- "@trackunit/iris-app-build-utilities": "^3.0.59",
31
- "@trackunit/react-graphql-tools": "^1.23.79",
32
- "@trackunit/shared-utils": "^1.22.74",
33
- "@trackunit/iris-app-api": "^2.14.4",
30
+ "@trackunit/iris-app-build-utilities": "3.0.60-alpha-da6778f0891.0",
31
+ "@trackunit/react-graphql-tools": "1.23.80-alpha-da6778f0891.0",
32
+ "@trackunit/shared-utils": "1.22.75-alpha-da6778f0891.0",
33
+ "@trackunit/iris-app-api": "2.14.5-alpha-da6778f0891.0",
34
34
  "tslib": "^2.6.2",
35
35
  "@clack/prompts": "^1.8.1",
36
36
  "@nx/devkit": "23.3.0",
@@ -38,17 +38,18 @@
38
38
  },
39
39
  "migrations": "./migrations.json",
40
40
  "pinnedVersions": {
41
- "@trackunit/iris-app-api": "2.14.4",
42
- "@trackunit/react-components": "10.0.2",
43
- "@trackunit/react-core-contexts": "3.1.11",
44
- "@trackunit/css-core": "1.22.79",
45
- "@trackunit/iris-app-sdk-vite": "1.12.42",
46
- "@trackunit/react-core-contexts-test": "1.28.71",
47
- "@trackunit/react-vite-test-setup": "0.0.246",
48
- "@trackunit/iris-app-runtime-core": "2.0.15",
49
- "@trackunit/serverside-utils": "0.5.362",
50
- "@trackunit/migrations": "0.2.189",
51
- "@trackunit/eslint-plugin-trackunit": "0.9.27"
41
+ "@trackunit/iris-app-api": "2.14.5-alpha-da6778f0891.0",
42
+ "@trackunit/react-components": "10.0.4-alpha-da6778f0891.0",
43
+ "@trackunit/react-core-contexts": "3.1.13-alpha-da6778f0891.0",
44
+ "@trackunit/css-core": "1.22.80-alpha-da6778f0891.0",
45
+ "@trackunit/iris-app-sdk-vite": "1.12.45-alpha-da6778f0891.0",
46
+ "@trackunit/react-core-contexts-test": "1.28.72-alpha-da6778f0891.0",
47
+ "@trackunit/react-vite-test-setup": "0.0.247-alpha-da6778f0891.0",
48
+ "@trackunit/iris-app-runtime-core": "2.0.16-alpha-da6778f0891.0",
49
+ "@trackunit/serverside-utils": "0.5.364-alpha-da6778f0891.0",
50
+ "@trackunit/migrations": "0.2.190-alpha-da6778f0891.0",
51
+ "@trackunit/eslint-plugin-trackunit": "0.9.28-alpha-da6778f0891.0",
52
+ "@trackunit/serverside-mcp-tools": "0.0.2-alpha-da6778f0891.0"
52
53
  },
53
54
  "types": "./src/index.d.ts",
54
55
  "type": "commonjs"
@@ -56,6 +56,7 @@ Available extension types:
56
56
  - `ASSET_EVENTS_ACTIONS_EXTENSION` - UI in Asset Home Events
57
57
  - `LIFECYCLE_EXTENSION` - Handles app install/uninstall events
58
58
  - `SERVERSIDE_API_EXTENSION` - Serverside backend functions
59
+ - `MCP_TOOLS_EXTENSION` - MCP tools for the Manager AI assistant and MCP clients
59
60
 
60
61
  ## Quality Assurance
61
62
 
@@ -0,0 +1,9 @@
1
+ # Environment variables for local development
2
+ # Copy this file to .env and fill in your values
3
+ #
4
+ # These variables are read by getSecret() from @trackunit/serverside-utils
5
+ # The env var name must match the secretKey parameter exactly
6
+ #
7
+ # Example:
8
+ # const apiKey = await getSecret({ context: c, secretKey: "API_KEY" });
9
+ # API_KEY=your_api_key_here
@@ -0,0 +1,16 @@
1
+ import { McpToolsExtensionManifest } from '@trackunit/iris-app-api';
2
+ import { toManifestMcpTools } from '@trackunit/serverside-mcp-tools';
3
+ import { tools } from './src/tools';
4
+
5
+ const mcpToolsExtensionManifest: McpToolsExtensionManifest = {
6
+ id: "<%= projectName %>",
7
+ type: "MCP_TOOLS_EXTENSION",
8
+ runtime: "DENO",
9
+ sourceRoot: "dist/<%= projectRoot %>/",
10
+ dependencyDefinitionFile: "dist/<%= dependencyDefinitionFile %>",
11
+ name: "MCP tools <%= projectName %>",
12
+ main: "index.js",
13
+ mcpTools: toManifestMcpTools(tools),
14
+ };
15
+
16
+ export default mcpToolsExtensionManifest;
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "<%= importPath %>",
3
+ "type": "commonjs",
4
+ "dependencies": {
5
+ "@hono/node-server": "^2.1.9",
6
+ "dotenv": "16.3.1",
7
+ "hono": "^4.13.5"
8
+ }
9
+ }
@@ -0,0 +1,11 @@
1
+ import { createMcpToolsApp } from "@trackunit/serverside-mcp-tools";
2
+ import { tools } from "./tools";
3
+
4
+ const app = createMcpToolsApp(tools, {
5
+ handlers: {
6
+ get_greeting: (_context, { name }) => ({ content: [{ type: "text", text: `Hello, ${name}!` }] }),
7
+ },
8
+ });
9
+
10
+ const handler = app.fetch;
11
+ export { handler as fetch };
@@ -0,0 +1,11 @@
1
+ // Auto-generated: mimics the production serverside runtime for local development.
2
+ // Do not edit — SDK updates may overwrite changes.
3
+ import "dotenv/config";
4
+
5
+ import { serve } from "@hono/node-server";
6
+
7
+ import { fetch as handler } from "./index";
8
+
9
+ const port = Number(process.env.PORT) || 8000;
10
+
11
+ serve({ fetch: handler, port });
@@ -0,0 +1,17 @@
1
+ import { defineMcpTools } from "@trackunit/serverside-mcp-tools";
2
+ import { z } from "zod";
3
+
4
+ // Definitions only: extension-manifest.ts imports this file at build time.
5
+ // Each tool's requiredScope must be one of the scopes in the app's iris-app-manifest.ts; the build fails otherwise.
6
+ // The package README lists which scopes the check supports.
7
+ export const tools = defineMcpTools({
8
+ tools: {
9
+ get_greeting: {
10
+ title: "Get greeting",
11
+ description: "Returns a greeting for the given name. Replace this example with your app's tools.",
12
+ requiredScope: "account.manage",
13
+ inputSchema: { name: z.string().min(1).describe("Who to greet.") },
14
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
15
+ },
16
+ },
17
+ });
@@ -5,7 +5,7 @@ describe("extension manifest", () => {
5
5
  expect(extensionManifest).toMatchObject({
6
6
  id: "<%= projectName %>",
7
7
  type: "<%= type %>",
8
- sourceRoot: "<% if (type === 'SERVERSIDE_API_EXTENSION') { %>dist/<%= projectRoot %>/<% } else { %><%= sourceRoot %><% } %>",
8
+ sourceRoot: "<% if (type === 'SERVERSIDE_API_EXTENSION' || type === 'MCP_TOOLS_EXTENSION') { %>dist/<%= projectRoot %>/<% } else { %><%= sourceRoot %><% } %>",
9
9
  });
10
10
  });
11
11
  });
@@ -16,6 +16,8 @@ const pinned_versions_1 = require("../utils/pinned-versions/pinned-versions");
16
16
  const uses_trackunit_eslint_plugin_1 = require("../utils/uses-trackunit-eslint-plugin");
17
17
  const write_trackunit_project_eslint_config_1 = require("../utils/write-trackunit-project-eslint-config");
18
18
  const dependencies_1 = require("./dependencies");
19
+ /** The zod major `@trackunit/serverside-mcp-tools` types tool definitions against. */
20
+ const MCP_TOOLS_ZOD_VERSION = "^3.25.76";
19
21
  const addGraphqlDependency = (target) => {
20
22
  if (!target) {
21
23
  return;
@@ -230,6 +232,21 @@ const IrisAppExtensionGenerator = async function (tree, options) {
230
232
  return projectJson;
231
233
  });
232
234
  }
235
+ if (irisAppExtensionType === "MCP_TOOLS_EXTENSION") {
236
+ const serversideMcpToolsVersion = (0, pinned_versions_1.getPinnedVersion)("@trackunit/serverside-mcp-tools");
237
+ (0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(normalizedOptions.projectRoot, "package.json"), packageJson => {
238
+ packageJson.dependencies = {
239
+ ...packageJson.dependencies,
240
+ "@trackunit/serverside-mcp-tools": serversideMcpToolsVersion,
241
+ zod: MCP_TOOLS_ZOD_VERSION,
242
+ };
243
+ return packageJson;
244
+ });
245
+ if (normalizedOptions.updatePackageJson) {
246
+ // The extension manifest imports the tool definitions, and with them zod, at build time from the workspace.
247
+ (0, devkit_1.addDependenciesToPackageJson)(tree, { "@trackunit/serverside-mcp-tools": serversideMcpToolsVersion, zod: MCP_TOOLS_ZOD_VERSION }, {});
248
+ }
249
+ }
233
250
  if (normalizedOptions.graphql) {
234
251
  await (0, exports.addServersideGraphql)(tree, {
235
252
  projectName: normalizedOptions.projectName,
@@ -290,6 +307,9 @@ const IrisAppExtensionGenerator = async function (tree, options) {
290
307
  (0, devkit_1.installPackagesTask)(tree, true);
291
308
  // eslint-disable-next-line no-console
292
309
  console.log("🥳 Successfully created an app extensions and it is already added to the Iris App!");
310
+ if (irisAppExtensionType === "MCP_TOOLS_EXTENSION") {
311
+ devkit_1.logger.info(`👉 Add each tool's requiredScope to the scopes in ${manifestPath}, e.g. { scope: "account.manage", optional: true }; the build fails until you do.`);
312
+ }
293
313
  };
294
314
  };
295
315
  exports.IrisAppExtensionGenerator = IrisAppExtensionGenerator;
@@ -14,6 +14,7 @@ export interface IrisAppExtensionGeneratorSchema {
14
14
  | "ASSET_HOME_EXTENSION"
15
15
  | "ASSET_EVENTS_ACTIONS_EXTENSION"
16
16
  | "LIFECYCLE_EXTENSION"
17
- | "SERVERSIDE_API_EXTENSION";
17
+ | "SERVERSIDE_API_EXTENSION"
18
+ | "MCP_TOOLS_EXTENSION";
18
19
  graphql?: boolean;
19
20
  }
@@ -56,7 +56,8 @@
56
56
  "CUSTOMER_HOME_EXTENSION",
57
57
  "IRIS_APP_SETTINGS_EXTENSION",
58
58
  "LIFECYCLE_EXTENSION",
59
- "SERVERSIDE_API_EXTENSION"
59
+ "SERVERSIDE_API_EXTENSION",
60
+ "MCP_TOOLS_EXTENSION"
60
61
  ]
61
62
  }
62
63
  },