@trackunit/iris-app 2.15.16 → 2.16.4-alpha-563d99d17d6.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,77 +1,3 @@
1
- ## 2.15.16 (2026-11-04)
2
-
3
- ### 🧱 Updated Dependencies
4
-
5
- - Updated iris-app-build-utilities to 3.0.14
6
- - Updated iris-app-api to 2.13.2
7
- - Updated react-vite-test-setup to 0.0.200
8
- - Updated css-classname-utils to 0.0.108
9
- - Updated react-graphql-tools to 1.23.31
10
- - Updated shared-utils to 1.22.27
11
-
12
- ## 2.15.15 (2026-11-03)
13
-
14
- ### 🩹 Fixes
15
-
16
- - **iris-app:** retry submit when iris-app-sdk-server's upstream fetch fails ([#27291](https://github.com/Trackunit/manager/pull/27291))
17
-
18
- ### ❤️ Thank You
19
-
20
- - mta
21
- - Nick Lediet
22
-
23
- ## 2.15.14 (2026-11-03)
24
-
25
- ### 🧱 Updated Dependencies
26
-
27
- - Updated iris-app-build-utilities to 3.0.13
28
- - Updated iris-app-api to 2.13.1
29
- - Updated react-vite-test-setup to 0.0.199
30
- - Updated css-classname-utils to 0.0.107
31
- - Updated react-graphql-tools to 1.23.30
32
- - Updated shared-utils to 1.22.26
33
-
34
- ## 2.15.13 (2026-11-03)
35
-
36
- ### 🧱 Updated Dependencies
37
-
38
- - Updated iris-app-build-utilities to 3.0.12
39
- - Updated iris-app-api to 2.13.0
40
- - Updated react-graphql-tools to 1.23.29
41
-
42
- ## 2.15.12 (2026-11-03)
43
-
44
- ### 🧱 Updated Dependencies
45
-
46
- - Updated iris-app-build-utilities to 3.0.11
47
- - Updated iris-app-api to 2.12.28
48
- - Updated react-vite-test-setup to 0.0.198
49
- - Updated css-classname-utils to 0.0.106
50
- - Updated react-graphql-tools to 1.23.28
51
- - Updated shared-utils to 1.22.25
52
-
53
- ## 2.15.11 (2026-11-03)
54
-
55
- ### 🧱 Updated Dependencies
56
-
57
- - Updated iris-app-build-utilities to 3.0.10
58
- - Updated iris-app-api to 2.12.27
59
- - Updated react-vite-test-setup to 0.0.197
60
- - Updated css-classname-utils to 0.0.105
61
- - Updated react-graphql-tools to 1.23.27
62
- - Updated shared-utils to 1.22.24
63
-
64
- ## 2.15.10 (2026-11-03)
65
-
66
- ### 🧱 Updated Dependencies
67
-
68
- - Updated iris-app-build-utilities to 3.0.9
69
- - Updated iris-app-api to 2.12.26
70
- - Updated react-vite-test-setup to 0.0.196
71
- - Updated css-classname-utils to 0.0.104
72
- - Updated react-graphql-tools to 1.23.26
73
- - Updated shared-utils to 1.22.23
74
-
75
1
  ## 2.15.9 (2026-11-02)
76
2
 
77
3
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app",
3
- "version": "2.15.16",
3
+ "version": "2.16.4-alpha-563d99d17d6.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.108",
13
+ "@trackunit/css-classname-utils": "0.0.113-alpha-563d99d17d6.0",
14
14
  "@typescript-eslint/types": "8.71.2",
15
15
  "@typescript-eslint/typescript-estree": "8.71.2",
16
16
  "pacote": "^21.5.1",
@@ -26,10 +26,10 @@
26
26
  "@nx/react": "23.3.0",
27
27
  "@npmcli/arborist": "^9.1.9",
28
28
  "win-ca": "^3.5.1",
29
- "@trackunit/iris-app-build-utilities": "3.0.14",
30
- "@trackunit/react-graphql-tools": "1.23.31",
31
- "@trackunit/shared-utils": "1.22.27",
32
- "@trackunit/iris-app-api": "2.13.2",
29
+ "@trackunit/iris-app-build-utilities": "3.0.19-alpha-563d99d17d6.0",
30
+ "@trackunit/react-graphql-tools": "1.23.36-alpha-563d99d17d6.0",
31
+ "@trackunit/shared-utils": "1.22.32-alpha-563d99d17d6.0",
32
+ "@trackunit/iris-app-api": "2.13.7-alpha-563d99d17d6.0",
33
33
  "tslib": "^2.6.2",
34
34
  "@clack/prompts": "^1.8.1",
35
35
  "@nx/devkit": "23.3.0",
@@ -90,20 +90,6 @@ function isRetryableError(statusCode, code, type) {
90
90
  }
91
91
  return RETRYABLE_TRANSPORT_CODES.has(code) || (code === "FETCH_ERROR" && type === "request-timeout");
92
92
  }
93
- /**
94
- * Older iris-app-sdk-server releases answer a failed outbound fetch of their own with
95
- * 400 `{ error: "fetch failed" }`, which npm-registry-fetch appends to the message as " - fetch failed".
96
- * That is a transient server-side failure, not a rejected package.
97
- *
98
- * @param {NpmGeneralError} error The failed upload attempt.
99
- * @returns {boolean} Whether the attempt should be retried.
100
- */
101
- function isRetryableUploadError(error) {
102
- if (error.statusCode === 400 && error.message.includes(" - fetch failed.")) {
103
- return true;
104
- }
105
- return isRetryableError(error.statusCode, error.code, error.type);
106
- }
107
93
  function isRetryableApproveError(statusCode, code, type) {
108
94
  // Same as isRetryableError but also accept 404 for approvals.
109
95
  // 404 can happen spuriously on approval
@@ -167,7 +153,7 @@ async function doUploadAppWithRetry(accessToken, manifest, tarData, settings, re
167
153
  console.error("❌ Unable to ship app package. Got error from Iris App SDK repository.", e);
168
154
  return { success: false };
169
155
  }
170
- if (!isRetryableUploadError(e)) {
156
+ if (!isRetryableError(e.statusCode, e.code, e.type)) {
171
157
  console.error("❌ Unable to ship app package.", e.message);
172
158
  return { success: false };
173
159
  }
@@ -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 { AiToolsExtensionManifest } from '@trackunit/iris-app-api';
2
+ import { toManifestAiTools } from '@trackunit/serverside-ai-tools';
3
+ import { tools } from './src/tools';
4
+
5
+ const aiToolsExtensionManifest: AiToolsExtensionManifest = {
6
+ id: "<%= projectName %>",
7
+ type: "AI_TOOLS_EXTENSION",
8
+ runtime: "DENO",
9
+ sourceRoot: "dist/<%= projectRoot %>/",
10
+ dependencyDefinitionFile: "dist/<%= dependencyDefinitionFile %>",
11
+ name: "AI tools <%= projectName %>",
12
+ main: "index.js",
13
+ aiTools: toManifestAiTools(tools),
14
+ };
15
+
16
+ export default aiToolsExtensionManifest;
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "<%= importPath %>",
3
+ "type": "commonjs",
4
+ "dependencies": {
5
+ "@hono/node-server": "^1.19.17",
6
+ "dotenv": "16.3.1",
7
+ "hono": "^4.13.5",
8
+ "zod": "^3.25.76"
9
+ }
10
+ }
@@ -0,0 +1,9 @@
1
+ import { createAiToolsApp } from "@trackunit/serverside-ai-tools";
2
+ import { tools } from "./tools";
3
+
4
+ export default createAiToolsApp(tools, {
5
+ requiredScope: "account.view",
6
+ handlers: {
7
+ get_greeting: (_context, { name }) => ({ content: [{ type: "text", text: `Hello, ${name}!` }] }),
8
+ },
9
+ }).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 handler from "./index";
8
+
9
+ const port = Number(process.env.PORT) || 8000;
10
+
11
+ serve({ fetch: handler, port });
@@ -0,0 +1,16 @@
1
+ import { defineAiTools } from "@trackunit/serverside-ai-tools";
2
+ import { z } from "zod";
3
+
4
+ // Definitions only: extension-manifest.ts imports this file at build time.
5
+ // AI clients see the tools as `<namespace>_<name>`; the namespace must be unique across Trackunit.
6
+ export const tools = defineAiTools({
7
+ namespace: "<%= projectName %>",
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
+ inputSchema: { name: z.string().min(1).describe("Who to greet.") },
13
+ annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
14
+ },
15
+ },
16
+ });
@@ -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 === 'AI_TOOLS_EXTENSION') { %>dist/<%= projectRoot %>/<% } else { %><%= sourceRoot %><% } %>",
9
9
  });
10
10
  });
11
11
  });
@@ -230,6 +230,20 @@ const IrisAppExtensionGenerator = async function (tree, options) {
230
230
  return projectJson;
231
231
  });
232
232
  }
233
+ if (irisAppExtensionType === "AI_TOOLS_EXTENSION") {
234
+ const serversideAiToolsVersion = await getPackageVersion("@trackunit/serverside-ai-tools");
235
+ (0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(normalizedOptions.projectRoot, "package.json"), packageJson => {
236
+ packageJson.dependencies = {
237
+ ...packageJson.dependencies,
238
+ "@trackunit/serverside-ai-tools": serversideAiToolsVersion,
239
+ };
240
+ return packageJson;
241
+ });
242
+ if (normalizedOptions.updatePackageJson) {
243
+ // The extension manifest imports the package at build time, from the workspace.
244
+ (0, devkit_1.addDependenciesToPackageJson)(tree, { "@trackunit/serverside-ai-tools": serversideAiToolsVersion }, {});
245
+ }
246
+ }
233
247
  if (normalizedOptions.graphql) {
234
248
  await (0, exports.addServersideGraphql)(tree, {
235
249
  projectName: normalizedOptions.projectName,
@@ -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
+ | "AI_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
+ "AI_TOOLS_EXTENSION"
60
61
  ]
61
62
  }
62
63
  },