@trackunit/iris-app 2.16.73 → 2.17.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 +34 -0
- package/package.json +17 -17
- package/src/generators/ai-agent-sync/README.md +5 -2
- package/src/generators/ai-agent-sync/generator.d.ts +1 -1
- package/src/generators/ai-agent-sync/generator.js +41 -7
- package/src/generators/ai-agent-sync/legacy-agents-md/v1-prettier.md +98 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v1.md +95 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v2-prettier.md +93 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v2.md +90 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v3-prettier.md +94 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v3.md +91 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v4.md +43 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v5.md +43 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v6.md +62 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v7.md +62 -0
- package/src/generators/ai-agent-sync/legacy-agents-md/v8.md +62 -0
- package/src/generators/preset/files/.agents/skills/create-app/SKILL.md +2 -2
- package/src/generators/preset/files/.agents/skills/databricks-unity-catalog/SKILL.md +1 -1
- package/src/generators/preset/files/.agents/skills/graphql/SKILL.md +1 -1
- package/src/generators/preset/files/.agents/skills/irisx-app-sdk/SKILL.md +1 -1
- package/src/generators/preset/files/.agents/skills/set-up-react-map/SKILL.md +1 -1
- package/src/generators/preset/files/.agents/skills/widget-extensions/SKILL.md +1 -1
- package/src/generators/preset/generator.js +2 -0
- package/src/generators/preset/root-files/AGENTS-iris-app-sdk.md +78 -0
- package/src/generators/utils/sdk-agents-md/sdk-agents-md.d.ts +7 -0
- package/src/generators/utils/sdk-agents-md/sdk-agents-md.js +20 -0
- package/migrations/entry.js.map +0 -1
- package/migrations/p-content-space-codemod/invent-content-space.js.map +0 -1
- package/migrations/p-content-space-codemod/orchestrator.js.map +0 -1
- package/migrations/p-content-space-codemod/remove-redundant-padding.js.map +0 -1
- package/migrations/p-content-space-codemod/report-run-messaging.js.map +0 -1
- package/migrations/p-content-space-codemod/report-unresolved.js.map +0 -1
- package/migrations/p-content-space-codemod/resolve-content-shell.js.map +0 -1
- package/migrations/p-content-space-codemod/rewrite-page-content.js.map +0 -1
- package/migrations/p-content-space-codemod/shell-skip-reason.js.map +0 -1
- package/migrations/repair-tsconfig/repair-tsconfig.js.map +0 -1
- package/migrations/utils/classname-ast-rewrite.js.map +0 -1
- package/migrations/utils/resolve-extension-types.js.map +0 -1
- package/src/executors/submit/executor.js.map +0 -1
- package/src/executors/unpublish/executor.js.map +0 -1
- package/src/executors/utils/authentication.js.map +0 -1
- package/src/executors/utils/irisAppServerSettings.js.map +0 -1
- package/src/executors/utils/src/index.js.map +0 -1
- package/src/generators/ai-agent-sync/generator.js.map +0 -1
- package/src/generators/create/generator.js.map +0 -1
- package/src/generators/extend/dependencies.js.map +0 -1
- package/src/generators/extend/generator.js.map +0 -1
- package/src/generators/preset/generator.js.map +0 -1
- package/src/generators/utils/get-package-manifest.js.map +0 -1
- package/src/generators/utils/link-claude-skills.js.map +0 -1
- package/src/generators/utils/own-package-json/own-package-json.js.map +0 -1
- package/src/generators/utils/pinned-versions/pinned-versions.js.map +0 -1
- package/src/generators/utils/uses-trackunit-eslint-plugin.js.map +0 -1
- package/src/generators/utils/write-trackunit-project-eslint-config.js.map +0 -1
- package/src/index.js.map +0 -1
- package/src/utils/ast/astUtils.js.map +0 -1
- package/src/utils/fileUpdater.js.map +0 -1
- /package/src/generators/{preset/root-files/AGENTS.md → ai-agent-sync/legacy-agents-md/v9.md} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
## 2.17.0 (2026-12-01)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **iris-app:** ai-agent-sync keeps the workspace's AGENTS.md and ships the SDK guide in AGENTS-iris-app-sdk.md [SDK-785] ([#27824](https://github.com/Trackunit/manager/pull/27824))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated iris-app-build-utilities to 3.0.58
|
|
10
|
+
- Updated iris-app-api to 2.14.3
|
|
11
|
+
- Updated react-vite-test-setup to 0.0.246
|
|
12
|
+
- Updated css-classname-utils to 0.0.154
|
|
13
|
+
- Updated react-graphql-tools to 1.23.78
|
|
14
|
+
- Updated shared-utils to 1.22.73
|
|
15
|
+
|
|
16
|
+
### ❤️ Thank You
|
|
17
|
+
|
|
18
|
+
- Ulrik Jørgensen @ujo-trackunit
|
|
19
|
+
|
|
20
|
+
## 2.16.75 (2026-11-30)
|
|
21
|
+
|
|
22
|
+
### 🧱 Updated Dependencies
|
|
23
|
+
|
|
24
|
+
- Updated iris-app-build-utilities to 3.0.57
|
|
25
|
+
- Updated iris-app-api to 2.14.2
|
|
26
|
+
- Updated react-vite-test-setup to 0.0.245
|
|
27
|
+
- Updated css-classname-utils to 0.0.153
|
|
28
|
+
- Updated react-graphql-tools to 1.23.77
|
|
29
|
+
- Updated shared-utils to 1.22.72
|
|
30
|
+
|
|
31
|
+
## 2.16.74 (2026-11-30)
|
|
32
|
+
|
|
33
|
+
This was a version bump only for iris-app to align it with other projects, there were no code changes.
|
|
34
|
+
|
|
1
35
|
## 2.16.73 (2026-11-30)
|
|
2
36
|
|
|
3
37
|
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.
|
|
3
|
+
"version": "2.17.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.
|
|
13
|
+
"@trackunit/css-classname-utils": "~0.0.154",
|
|
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.
|
|
31
|
-
"@trackunit/react-graphql-tools": "^1.23.
|
|
32
|
-
"@trackunit/shared-utils": "^1.22.
|
|
33
|
-
"@trackunit/iris-app-api": "^2.14.
|
|
30
|
+
"@trackunit/iris-app-build-utilities": "^3.0.58",
|
|
31
|
+
"@trackunit/react-graphql-tools": "^1.23.78",
|
|
32
|
+
"@trackunit/shared-utils": "^1.22.73",
|
|
33
|
+
"@trackunit/iris-app-api": "^2.14.3",
|
|
34
34
|
"tslib": "^2.6.2",
|
|
35
35
|
"@clack/prompts": "^1.8.1",
|
|
36
36
|
"@nx/devkit": "23.3.0",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
},
|
|
39
39
|
"migrations": "./migrations.json",
|
|
40
40
|
"pinnedVersions": {
|
|
41
|
-
"@trackunit/iris-app-api": "2.14.
|
|
42
|
-
"@trackunit/react-components": "
|
|
43
|
-
"@trackunit/react-core-contexts": "3.1.
|
|
44
|
-
"@trackunit/css-core": "1.22.
|
|
45
|
-
"@trackunit/iris-app-sdk-vite": "1.12.
|
|
46
|
-
"@trackunit/react-core-contexts-test": "1.28.
|
|
47
|
-
"@trackunit/react-vite-test-setup": "0.0.
|
|
48
|
-
"@trackunit/iris-app-runtime-core": "2.0.
|
|
49
|
-
"@trackunit/serverside-utils": "0.5.
|
|
50
|
-
"@trackunit/migrations": "0.2.
|
|
51
|
-
"@trackunit/eslint-plugin-trackunit": "0.9.
|
|
41
|
+
"@trackunit/iris-app-api": "2.14.3",
|
|
42
|
+
"@trackunit/react-components": "10.0.0",
|
|
43
|
+
"@trackunit/react-core-contexts": "3.1.9",
|
|
44
|
+
"@trackunit/css-core": "1.22.78",
|
|
45
|
+
"@trackunit/iris-app-sdk-vite": "1.12.40",
|
|
46
|
+
"@trackunit/react-core-contexts-test": "1.28.70",
|
|
47
|
+
"@trackunit/react-vite-test-setup": "0.0.246",
|
|
48
|
+
"@trackunit/iris-app-runtime-core": "2.0.14",
|
|
49
|
+
"@trackunit/serverside-utils": "0.5.360",
|
|
50
|
+
"@trackunit/migrations": "0.2.188",
|
|
51
|
+
"@trackunit/eslint-plugin-trackunit": "0.9.26"
|
|
52
52
|
},
|
|
53
53
|
"types": "./src/index.d.ts",
|
|
54
54
|
"type": "commonjs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI Agent Sync Generator
|
|
2
2
|
|
|
3
|
-
Syncs agent skills,
|
|
3
|
+
Syncs agent skills, the SDK agent guide, and AI agent configuration files to the latest version. Ensures the SDK is at the latest version before applying updates.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -13,7 +13,10 @@ nx g @trackunit/iris-app:ai-agent-sync
|
|
|
13
13
|
- `.agents/skills/` - AI agent skills for the IrisX App SDK (editor-agnostic)
|
|
14
14
|
- `.mcp.json` - project-scoped MCP configuration for coding agents
|
|
15
15
|
- `.cursor/mcp.json` - Cursor MCP configuration
|
|
16
|
-
- `AGENTS.md` -
|
|
16
|
+
- `AGENTS-iris-app-sdk.md` - The IrisX App SDK agent instructions. Overwritten on every run, so don't edit it.
|
|
17
|
+
- `AGENTS.md` - Your workspace's agent instructions, read by Cursor and Claude Code. Created with a link to `AGENTS-iris-app-sdk.md` and an `@AGENTS-iris-app-sdk.md` import for Claude Code if missing. Earlier SDK versions wrote the SDK guide itself to `AGENTS.md`: an unmodified copy (see `legacy-agents-md/`), optionally after the circleci-configuration `AGENTS-managed.md` link, is replaced by the link. Any other `AGENTS.md` is kept as is; the link is appended if the file doesn't mention `AGENTS-iris-app-sdk.md` yet. A symlinked `AGENTS.md` is left alone.
|
|
18
|
+
|
|
19
|
+
The generator writes no ESLint config.
|
|
17
20
|
|
|
18
21
|
It also removes the `CLAUDE.md` that earlier SDK versions generated, since Claude Code reads `AGENTS.md` natively. Only an unmodified copy is removed (see `legacy-claude-md/`), and not while a `CLAUDE.local.md` or `.claude/CLAUDE.md` exists, since its `@AGENTS.md` import is then what loads `AGENTS.md`. A `CLAUDE.md` you wrote or edited is kept.
|
|
19
22
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from "@nx/devkit";
|
|
2
2
|
import { AiAgentSyncGeneratorSchema } from "./schema";
|
|
3
3
|
/**
|
|
4
|
-
* Syncs
|
|
4
|
+
* Syncs agent skills, the SDK guide that AGENTS.md points to, and AI agent configuration files.
|
|
5
5
|
* Requires the SDK to be at the latest version before running.
|
|
6
6
|
*/
|
|
7
7
|
export declare function aiAgentSyncGenerator(tree: Tree, options: AiAgentSyncGeneratorSchema): Promise<GeneratorCallback>;
|
|
@@ -9,11 +9,14 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
9
9
|
const semver = tslib_1.__importStar(require("semver"));
|
|
10
10
|
const get_package_manifest_1 = require("../utils/get-package-manifest");
|
|
11
11
|
const link_claude_skills_1 = require("../utils/link-claude-skills");
|
|
12
|
+
const sdk_agents_md_1 = require("../utils/sdk-agents-md/sdk-agents-md");
|
|
12
13
|
const IRIS_APP_PACKAGE = "@trackunit/iris-app";
|
|
13
14
|
const MIGRATIONS_PACKAGE = "@trackunit/migrations";
|
|
14
15
|
const CLAUDE_MD = "CLAUDE.md";
|
|
15
16
|
const CLAUDE_MEMORY_FILES = [CLAUDE_MD, ".claude/CLAUDE.md", "CLAUDE.local.md"];
|
|
16
17
|
const LEGACY_CLAUDE_MD_DIR = path.join(__dirname, "legacy-claude-md");
|
|
18
|
+
const LEGACY_AGENTS_MD_DIR = path.join(__dirname, "legacy-agents-md");
|
|
19
|
+
const CIRCLECI_AGENTS_MANAGED_LINK = "See [AGENTS-managed.md](AGENTS-managed.md) for this repo's managed build, test and verify commands.";
|
|
17
20
|
function getStringValue(obj, key) {
|
|
18
21
|
if (typeof obj === "object" && obj !== null && key in obj) {
|
|
19
22
|
const value = obj[key];
|
|
@@ -57,14 +60,45 @@ function normalizeWhitespace(content) {
|
|
|
57
60
|
return content.replace(/\s+/g, " ").trim();
|
|
58
61
|
}
|
|
59
62
|
/**
|
|
60
|
-
* Every
|
|
63
|
+
* Every template of a file earlier SDK versions shipped, whitespace-normalized so a
|
|
61
64
|
* workspace formatter's line wrapping or line endings do not hide a match.
|
|
62
65
|
*/
|
|
63
|
-
function
|
|
66
|
+
function readLegacyTemplates(directory) {
|
|
64
67
|
return new Set(fs
|
|
65
|
-
.readdirSync(
|
|
68
|
+
.readdirSync(directory)
|
|
66
69
|
.filter(file => file.endsWith(".md"))
|
|
67
|
-
.map(file => normalizeWhitespace(fs.readFileSync(path.join(
|
|
70
|
+
.map(file => normalizeWhitespace(fs.readFileSync(path.join(directory, file), "utf-8"))));
|
|
71
|
+
}
|
|
72
|
+
function isSymlink(filePath) {
|
|
73
|
+
return fs.lstatSync(filePath, { throwIfNoEntry: false })?.isSymbolicLink() ?? false;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Makes AGENTS.md point to the SDK guide. Earlier SDK versions wrote the guide itself
|
|
77
|
+
* to AGENTS.md, so an unmodified copy is replaced by the pointer, keeping the
|
|
78
|
+
* circleci-configuration link in front of it. Any other content is the workspace's and
|
|
79
|
+
* is kept; the pointer is appended unless the file already mentions the guide.
|
|
80
|
+
*/
|
|
81
|
+
function syncAgentsMd(tree) {
|
|
82
|
+
if (isSymlink(path.join(tree.root, sdk_agents_md_1.AGENTS_MD))) {
|
|
83
|
+
devkit_1.logger.warn(`[iris-app:ai-agent-sync] Not updating ${sdk_agents_md_1.AGENTS_MD}: it is a symlink. ` +
|
|
84
|
+
`Make it point to ${sdk_agents_md_1.SDK_AGENTS_MD} yourself.`);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const content = tree.read(sdk_agents_md_1.AGENTS_MD, "utf-8") ?? "";
|
|
88
|
+
const eol = content.includes("\r\n") ? "\r\n" : "\n";
|
|
89
|
+
const normalized = normalizeWhitespace(content);
|
|
90
|
+
const legacyTemplates = readLegacyTemplates(LEGACY_AGENTS_MD_DIR);
|
|
91
|
+
const circleCiLink = normalizeWhitespace(CIRCLECI_AGENTS_MANAGED_LINK);
|
|
92
|
+
if (normalized === "" || legacyTemplates.has(normalized)) {
|
|
93
|
+
tree.write(sdk_agents_md_1.AGENTS_MD, (0, sdk_agents_md_1.sdkAgentsMdPointer)(eol));
|
|
94
|
+
}
|
|
95
|
+
else if (normalized.startsWith(circleCiLink) && legacyTemplates.has(normalized.slice(circleCiLink.length).trim())) {
|
|
96
|
+
tree.write(sdk_agents_md_1.AGENTS_MD, `${CIRCLECI_AGENTS_MANAGED_LINK}${eol}${eol}${(0, sdk_agents_md_1.sdkAgentsMdPointer)(eol)}`);
|
|
97
|
+
}
|
|
98
|
+
else if (!content.includes(sdk_agents_md_1.SDK_AGENTS_MD)) {
|
|
99
|
+
const separator = content.endsWith("\n") ? eol : `${eol}${eol}`;
|
|
100
|
+
tree.write(sdk_agents_md_1.AGENTS_MD, `${content}${separator}${(0, sdk_agents_md_1.sdkAgentsMdPointer)(eol)}`);
|
|
101
|
+
}
|
|
68
102
|
}
|
|
69
103
|
function importsAgentsMd(content) {
|
|
70
104
|
return /^@AGENTS\.md\s*$/m.test(content);
|
|
@@ -83,7 +117,7 @@ function removeSdkGeneratedClaudeMd(tree) {
|
|
|
83
117
|
const otherMemoryFiles = CLAUDE_MEMORY_FILES.filter(file => file !== CLAUDE_MD && tree.exists(file));
|
|
84
118
|
if (content !== null &&
|
|
85
119
|
otherMemoryFiles.length === 0 &&
|
|
86
|
-
|
|
120
|
+
readLegacyTemplates(LEGACY_CLAUDE_MD_DIR).has(normalizeWhitespace(content))) {
|
|
87
121
|
tree.delete(CLAUDE_MD);
|
|
88
122
|
}
|
|
89
123
|
const presentMemoryFiles = CLAUDE_MEMORY_FILES.filter(file => tree.exists(file));
|
|
@@ -94,7 +128,7 @@ function removeSdkGeneratedClaudeMd(tree) {
|
|
|
94
128
|
}
|
|
95
129
|
}
|
|
96
130
|
/**
|
|
97
|
-
* Syncs
|
|
131
|
+
* Syncs agent skills, the SDK guide that AGENTS.md points to, and AI agent configuration files.
|
|
98
132
|
* Requires the SDK to be at the latest version before running.
|
|
99
133
|
*/
|
|
100
134
|
async function aiAgentSyncGenerator(tree, options) {
|
|
@@ -142,10 +176,10 @@ async function aiAgentSyncGenerator(tree, options) {
|
|
|
142
176
|
// Copy MCP configuration and agent skills shared with the preset generator.
|
|
143
177
|
const managedFilesTemplatePath = path.join(__dirname, "../preset/files");
|
|
144
178
|
(0, devkit_1.generateFiles)(tree, managedFilesTemplatePath, ".", {});
|
|
145
|
-
// Copy AGENTS.md to workspace root
|
|
146
179
|
const rootTemplatePath = path.join(__dirname, "../preset/root-files");
|
|
147
180
|
(0, devkit_1.generateFiles)(tree, rootTemplatePath, ".", {});
|
|
148
181
|
await (0, devkit_1.formatFiles)(tree);
|
|
182
|
+
syncAgentsMd(tree);
|
|
149
183
|
// After tree flush, create a symlink at .claude/skills -> ../.agents/skills
|
|
150
184
|
// so Claude Code auto-discovers the same skills Cursor and Codex consume.
|
|
151
185
|
// The Tree API has no symlink primitive, so this runs as a post-generation
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# IrisX App SDK Workspace
|
|
2
|
+
|
|
3
|
+
This is an IrisX App workspace. Follow these rules for all development.
|
|
4
|
+
|
|
5
|
+
## Package Management
|
|
6
|
+
|
|
7
|
+
Use npm as the package manager for this workspace.
|
|
8
|
+
|
|
9
|
+
## Building Real Applications
|
|
10
|
+
|
|
11
|
+
You are building real applications that work with actual Trackunit data.
|
|
12
|
+
|
|
13
|
+
- Never mock data unless explicitly requested by the user
|
|
14
|
+
- Always use Trackunit's GraphQL API to fetch real data
|
|
15
|
+
- If data is not available via GraphQL, ask the user how they want to obtain the data
|
|
16
|
+
- Only use mock data if the user explicitly requests it for testing purposes
|
|
17
|
+
|
|
18
|
+
When building any feature:
|
|
19
|
+
|
|
20
|
+
1. Identify what data you need
|
|
21
|
+
2. Check if it's available via Trackunit's GraphQL API
|
|
22
|
+
3. If available, use the GraphQL API (see graphql skill)
|
|
23
|
+
4. If not available, ask the user
|
|
24
|
+
|
|
25
|
+
## IrisX App Commands
|
|
26
|
+
|
|
27
|
+
**ALWAYS use these specific commands** (never generic React/Node.js commands):
|
|
28
|
+
|
|
29
|
+
- **Create new app:** `npx nx generate @trackunit/iris-app:create [name-of-your-app]`
|
|
30
|
+
- **Create new extension:** `npx nx g @trackunit/iris-app:extend --name=[my-extension-name] --app=[app-name] --directory=[feature] --type=[extension-type]`
|
|
31
|
+
- **Run app:** `npx nx run [name-of-your-app]:serve`
|
|
32
|
+
|
|
33
|
+
Available extension types:
|
|
34
|
+
|
|
35
|
+
- `ASSET_HOME_EXTENSION` - Tabs in Asset Home screen
|
|
36
|
+
- `SITE_HOME_EXTENSION` - Tabs in Site Home screen
|
|
37
|
+
- `FLEET_EXTENSION` - Menu items in Main Menu
|
|
38
|
+
- `REPORT_EXTENSION` - Reports in Reports screen
|
|
39
|
+
- `WIDGET_EXTENSION` - Dashboard widgets
|
|
40
|
+
- `APP_SETTINGS_EXTENSION` - Configuration in App library
|
|
41
|
+
- `ADMINISTRATION_EXTENSION` - Admin UI tabs (admin-only)
|
|
42
|
+
- `CUSTOMER_HOME_EXTENSION` - UI within Customer Home
|
|
43
|
+
- `ASSET_EVENTS_ACTIONS_EXTENSION` - UI in Asset Home Events
|
|
44
|
+
- `APP_LIFECYCLE_EXTENSION` - Handles app install/uninstall events
|
|
45
|
+
|
|
46
|
+
## Security Configuration
|
|
47
|
+
|
|
48
|
+
IrisX Apps are locked down by default. External API requests and embedded content require proper CSP configuration in the app manifest:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
cspHeader: {
|
|
52
|
+
'frame-src': ['https://api.example.com'],
|
|
53
|
+
'script-src': ['https://api.example.com'],
|
|
54
|
+
'connect-src': ['https://api.example.com'],
|
|
55
|
+
},
|
|
56
|
+
scopes: [
|
|
57
|
+
{scope: "required.scope.1", optional: false},
|
|
58
|
+
{scope: "required.scope.2", optional: true},
|
|
59
|
+
],
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Never submit apps automatically - always instruct the user to do so.
|
|
63
|
+
|
|
64
|
+
## Runtime Hooks
|
|
65
|
+
|
|
66
|
+
IrisX Apps have access to runtime hooks from `@trackunit/react-core-hooks`:
|
|
67
|
+
|
|
68
|
+
- `useAssetRuntime()` - Asset information in asset-scoped extensions
|
|
69
|
+
- `useCustomerRuntime()` - Customer data
|
|
70
|
+
- `useEventRuntime()` - Event details
|
|
71
|
+
- `useSiteRuntime()` - Site information
|
|
72
|
+
- Plus navigation, user context, and utility hooks (see react-core-hooks skill)
|
|
73
|
+
|
|
74
|
+
## Quality Assurance
|
|
75
|
+
|
|
76
|
+
Before completing any task: Always check for and fix all ESLint and TypeScript errors in modified files.
|
|
77
|
+
|
|
78
|
+
## Browser Testing
|
|
79
|
+
|
|
80
|
+
IrisX Apps are ALWAYS tested at `https://new.manager.trackunit.com/goto/iris-app-dev` - NEVER on localhost.
|
|
81
|
+
|
|
82
|
+
When the dev server runs locally via `npx nx run [app-name]:serve`, test the app in the Trackunit Manager environment at the URL above. IrisX apps are extensions that integrate into Trackunit Manager and require the host platform to function.
|
|
83
|
+
|
|
84
|
+
## Agent Skills
|
|
85
|
+
|
|
86
|
+
When working on specific tasks, read the relevant skill from `.cursor/skills/`:
|
|
87
|
+
|
|
88
|
+
| Skill | Use When |
|
|
89
|
+
| -------------------- | ------------------------------ |
|
|
90
|
+
| `widget-extensions` | Building Widget Extensions |
|
|
91
|
+
| `react-core-hooks` | Using runtime hooks |
|
|
92
|
+
| `graphql` | Working with GraphQL API |
|
|
93
|
+
| `customfields` | Storing/reading CustomFields |
|
|
94
|
+
| `graphql-timeseries` | Time series data queries |
|
|
95
|
+
| `browser-testing` | Testing in browser |
|
|
96
|
+
| `tables-and-sorting` | Building data tables |
|
|
97
|
+
| `feature-docs` | Creating feature documentation |
|
|
98
|
+
| `create-app` | Creating new apps step-by-step |
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# IrisX App SDK Workspace
|
|
2
|
+
|
|
3
|
+
This is an IrisX App workspace. Follow these rules for all development.
|
|
4
|
+
|
|
5
|
+
## Package Management
|
|
6
|
+
|
|
7
|
+
Use npm as the package manager for this workspace.
|
|
8
|
+
|
|
9
|
+
## Building Real Applications
|
|
10
|
+
|
|
11
|
+
You are building real applications that work with actual Trackunit data.
|
|
12
|
+
|
|
13
|
+
- Never mock data unless explicitly requested by the user
|
|
14
|
+
- Always use Trackunit's GraphQL API to fetch real data
|
|
15
|
+
- If data is not available via GraphQL, ask the user how they want to obtain the data
|
|
16
|
+
- Only use mock data if the user explicitly requests it for testing purposes
|
|
17
|
+
|
|
18
|
+
When building any feature:
|
|
19
|
+
1. Identify what data you need
|
|
20
|
+
2. Check if it's available via Trackunit's GraphQL API
|
|
21
|
+
3. If available, use the GraphQL API (see graphql skill)
|
|
22
|
+
4. If not available, ask the user
|
|
23
|
+
|
|
24
|
+
## IrisX App Commands
|
|
25
|
+
|
|
26
|
+
**ALWAYS use these specific commands** (never generic React/Node.js commands):
|
|
27
|
+
|
|
28
|
+
- **Create new app:** `npx nx generate @trackunit/iris-app:create [name-of-your-app]`
|
|
29
|
+
- **Create new extension:** `npx nx g @trackunit/iris-app:extend --name=[my-extension-name] --app=[app-name] --directory=[feature] --type=[extension-type]`
|
|
30
|
+
- **Run app:** `npx nx run [name-of-your-app]:serve`
|
|
31
|
+
|
|
32
|
+
Available extension types:
|
|
33
|
+
- `ASSET_HOME_EXTENSION` - Tabs in Asset Home screen
|
|
34
|
+
- `SITE_HOME_EXTENSION` - Tabs in Site Home screen
|
|
35
|
+
- `FLEET_EXTENSION` - Menu items in Main Menu
|
|
36
|
+
- `REPORT_EXTENSION` - Reports in Reports screen
|
|
37
|
+
- `WIDGET_EXTENSION` - Dashboard widgets
|
|
38
|
+
- `APP_SETTINGS_EXTENSION` - Configuration in App library
|
|
39
|
+
- `ADMINISTRATION_EXTENSION` - Admin UI tabs (admin-only)
|
|
40
|
+
- `CUSTOMER_HOME_EXTENSION` - UI within Customer Home
|
|
41
|
+
- `ASSET_EVENTS_ACTIONS_EXTENSION` - UI in Asset Home Events
|
|
42
|
+
- `APP_LIFECYCLE_EXTENSION` - Handles app install/uninstall events
|
|
43
|
+
|
|
44
|
+
## Security Configuration
|
|
45
|
+
|
|
46
|
+
IrisX Apps are locked down by default. External API requests and embedded content require proper CSP configuration in the app manifest:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
cspHeader: {
|
|
50
|
+
'frame-src': ['https://api.example.com'],
|
|
51
|
+
'script-src': ['https://api.example.com'],
|
|
52
|
+
'connect-src': ['https://api.example.com'],
|
|
53
|
+
},
|
|
54
|
+
scopes: [
|
|
55
|
+
{scope: "required.scope.1", optional: false},
|
|
56
|
+
{scope: "required.scope.2", optional: true},
|
|
57
|
+
],
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Never submit apps automatically - always instruct the user to do so.
|
|
61
|
+
|
|
62
|
+
## Runtime Hooks
|
|
63
|
+
|
|
64
|
+
IrisX Apps have access to runtime hooks from `@trackunit/react-core-hooks`:
|
|
65
|
+
- `useAssetRuntime()` - Asset information in asset-scoped extensions
|
|
66
|
+
- `useCustomerRuntime()` - Customer data
|
|
67
|
+
- `useEventRuntime()` - Event details
|
|
68
|
+
- `useSiteRuntime()` - Site information
|
|
69
|
+
- Plus navigation, user context, and utility hooks (see react-core-hooks skill)
|
|
70
|
+
|
|
71
|
+
## Quality Assurance
|
|
72
|
+
|
|
73
|
+
Before completing any task: Always check for and fix all ESLint and TypeScript errors in modified files.
|
|
74
|
+
|
|
75
|
+
## Browser Testing
|
|
76
|
+
|
|
77
|
+
IrisX Apps are ALWAYS tested at `https://new.manager.trackunit.com/goto/iris-app-dev` - NEVER on localhost.
|
|
78
|
+
|
|
79
|
+
When the dev server runs locally via `npx nx run [app-name]:serve`, test the app in the Trackunit Manager environment at the URL above. IrisX apps are extensions that integrate into Trackunit Manager and require the host platform to function.
|
|
80
|
+
|
|
81
|
+
## Agent Skills
|
|
82
|
+
|
|
83
|
+
When working on specific tasks, read the relevant skill from `.cursor/skills/`:
|
|
84
|
+
|
|
85
|
+
| Skill | Use When |
|
|
86
|
+
|-------|----------|
|
|
87
|
+
| `widget-extensions` | Building Widget Extensions |
|
|
88
|
+
| `react-core-hooks` | Using runtime hooks |
|
|
89
|
+
| `graphql` | Working with GraphQL API |
|
|
90
|
+
| `customfields` | Storing/reading CustomFields |
|
|
91
|
+
| `graphql-timeseries` | Time series data queries |
|
|
92
|
+
| `browser-testing` | Testing in browser |
|
|
93
|
+
| `tables-and-sorting` | Building data tables |
|
|
94
|
+
| `feature-docs` | Creating feature documentation |
|
|
95
|
+
| `create-app` | Creating new apps step-by-step |
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# IrisX App SDK Workspace
|
|
2
|
+
|
|
3
|
+
This is an IrisX App workspace. Follow these rules for all development.
|
|
4
|
+
|
|
5
|
+
## Building Real Applications
|
|
6
|
+
|
|
7
|
+
You are building real applications that work with actual Trackunit data.
|
|
8
|
+
|
|
9
|
+
- Never mock data unless explicitly requested by the user
|
|
10
|
+
- Always use Trackunit's GraphQL API to fetch real data
|
|
11
|
+
- If data is not available via GraphQL, ask the user how they want to obtain the data
|
|
12
|
+
- Only use mock data if the user explicitly requests it for testing purposes
|
|
13
|
+
|
|
14
|
+
When building any feature:
|
|
15
|
+
|
|
16
|
+
1. Identify what data you need
|
|
17
|
+
2. Check if it's available via Trackunit's GraphQL API
|
|
18
|
+
3. If available, use the GraphQL API (see graphql skill)
|
|
19
|
+
4. If not available, ask the user
|
|
20
|
+
|
|
21
|
+
## IrisX App Commands
|
|
22
|
+
|
|
23
|
+
**ALWAYS use these specific commands** (never generic React/Node.js commands):
|
|
24
|
+
|
|
25
|
+
- **Create new app:** `npx nx generate @trackunit/iris-app:create [name-of-your-app]`
|
|
26
|
+
- **Create new extension:** `npx nx g @trackunit/iris-app:extend --name=[my-extension-name] --app=[app-name] --directory=[feature] --type=[extension-type]`
|
|
27
|
+
- **Run app:** `npx nx run [name-of-your-app]:serve`
|
|
28
|
+
|
|
29
|
+
Available extension types:
|
|
30
|
+
|
|
31
|
+
- `ASSET_HOME_EXTENSION` - Tabs in Asset Home screen
|
|
32
|
+
- `SITE_HOME_EXTENSION` - Tabs in Site Home screen
|
|
33
|
+
- `FLEET_EXTENSION` - Menu items in Main Menu
|
|
34
|
+
- `REPORT_EXTENSION` - Reports in Reports screen
|
|
35
|
+
- `WIDGET_EXTENSION` - Dashboard widgets
|
|
36
|
+
- `APP_SETTINGS_EXTENSION` - Configuration in App library
|
|
37
|
+
- `ADMINISTRATION_EXTENSION` - Admin UI tabs (admin-only)
|
|
38
|
+
- `CUSTOMER_HOME_EXTENSION` - UI within Customer Home
|
|
39
|
+
- `ASSET_EVENTS_ACTIONS_EXTENSION` - UI in Asset Home Events
|
|
40
|
+
- `APP_LIFECYCLE_EXTENSION` - Handles app install/uninstall events
|
|
41
|
+
|
|
42
|
+
## Security Configuration
|
|
43
|
+
|
|
44
|
+
IrisX Apps are locked down by default. External API requests and embedded content require proper CSP configuration in the app manifest:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
cspHeader: {
|
|
48
|
+
'frame-src': ['https://api.example.com'],
|
|
49
|
+
'script-src': ['https://api.example.com'],
|
|
50
|
+
'connect-src': ['https://api.example.com'],
|
|
51
|
+
},
|
|
52
|
+
scopes: [
|
|
53
|
+
{scope: "required.scope.1", optional: false},
|
|
54
|
+
{scope: "required.scope.2", optional: true},
|
|
55
|
+
],
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Never submit apps automatically - always instruct the user to do so.
|
|
59
|
+
|
|
60
|
+
## Runtime Hooks
|
|
61
|
+
|
|
62
|
+
IrisX Apps have access to runtime hooks from `@trackunit/react-core-hooks`:
|
|
63
|
+
|
|
64
|
+
- `useAssetRuntime()` - Asset information in asset-scoped extensions
|
|
65
|
+
- `useCustomerRuntime()` - Customer data
|
|
66
|
+
- `useEventRuntime()` - Event details
|
|
67
|
+
- `useSiteRuntime()` - Site information
|
|
68
|
+
- Plus navigation, user context, and utility hooks (see react-core-hooks skill)
|
|
69
|
+
|
|
70
|
+
## Quality Assurance
|
|
71
|
+
|
|
72
|
+
Before completing any task: Always check for and fix all ESLint and TypeScript errors in modified files.
|
|
73
|
+
|
|
74
|
+
## Browser Testing
|
|
75
|
+
|
|
76
|
+
IrisX Apps are ALWAYS tested at `https://new.manager.trackunit.com/goto/iris-app-dev` - NEVER on localhost.
|
|
77
|
+
|
|
78
|
+
When the dev server runs locally via `npx nx run [app-name]:serve`, test the app in the Trackunit Manager environment at the URL above. IrisX apps are extensions that integrate into Trackunit Manager and require the host platform to function.
|
|
79
|
+
|
|
80
|
+
## Agent Skills
|
|
81
|
+
|
|
82
|
+
When working on specific tasks, read the relevant skill from `.agents/skills/`:
|
|
83
|
+
|
|
84
|
+
| Skill | Use When |
|
|
85
|
+
| -------------------- | ------------------------------ |
|
|
86
|
+
| `widget-extensions` | Building Widget Extensions |
|
|
87
|
+
| `react-core-hooks` | Using runtime hooks |
|
|
88
|
+
| `graphql` | Working with GraphQL API |
|
|
89
|
+
| `customfields` | Storing/reading CustomFields |
|
|
90
|
+
| `graphql-timeseries` | Time series data queries |
|
|
91
|
+
| `browser-testing` | Testing in browser |
|
|
92
|
+
| `tables-and-sorting` | Building data tables |
|
|
93
|
+
| `create-app` | Creating new apps step-by-step |
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# IrisX App SDK Workspace
|
|
2
|
+
|
|
3
|
+
This is an IrisX App workspace. Follow these rules for all development.
|
|
4
|
+
|
|
5
|
+
## Building Real Applications
|
|
6
|
+
|
|
7
|
+
You are building real applications that work with actual Trackunit data.
|
|
8
|
+
|
|
9
|
+
- Never mock data unless explicitly requested by the user
|
|
10
|
+
- Always use Trackunit's GraphQL API to fetch real data
|
|
11
|
+
- If data is not available via GraphQL, ask the user how they want to obtain the data
|
|
12
|
+
- Only use mock data if the user explicitly requests it for testing purposes
|
|
13
|
+
|
|
14
|
+
When building any feature:
|
|
15
|
+
1. Identify what data you need
|
|
16
|
+
2. Check if it's available via Trackunit's GraphQL API
|
|
17
|
+
3. If available, use the GraphQL API (see graphql skill)
|
|
18
|
+
4. If not available, ask the user
|
|
19
|
+
|
|
20
|
+
## IrisX App Commands
|
|
21
|
+
|
|
22
|
+
**ALWAYS use these specific commands** (never generic React/Node.js commands):
|
|
23
|
+
|
|
24
|
+
- **Create new app:** `npx nx generate @trackunit/iris-app:create [name-of-your-app]`
|
|
25
|
+
- **Create new extension:** `npx nx g @trackunit/iris-app:extend --name=[my-extension-name] --app=[app-name] --directory=[feature] --type=[extension-type]`
|
|
26
|
+
- **Run app:** `npx nx run [name-of-your-app]:serve`
|
|
27
|
+
|
|
28
|
+
Available extension types:
|
|
29
|
+
- `ASSET_HOME_EXTENSION` - Tabs in Asset Home screen
|
|
30
|
+
- `SITE_HOME_EXTENSION` - Tabs in Site Home screen
|
|
31
|
+
- `FLEET_EXTENSION` - Menu items in Main Menu
|
|
32
|
+
- `REPORT_EXTENSION` - Reports in Reports screen
|
|
33
|
+
- `WIDGET_EXTENSION` - Dashboard widgets
|
|
34
|
+
- `APP_SETTINGS_EXTENSION` - Configuration in App library
|
|
35
|
+
- `ADMINISTRATION_EXTENSION` - Admin UI tabs (admin-only)
|
|
36
|
+
- `CUSTOMER_HOME_EXTENSION` - UI within Customer Home
|
|
37
|
+
- `ASSET_EVENTS_ACTIONS_EXTENSION` - UI in Asset Home Events
|
|
38
|
+
- `APP_LIFECYCLE_EXTENSION` - Handles app install/uninstall events
|
|
39
|
+
|
|
40
|
+
## Security Configuration
|
|
41
|
+
|
|
42
|
+
IrisX Apps are locked down by default. External API requests and embedded content require proper CSP configuration in the app manifest:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
cspHeader: {
|
|
46
|
+
'frame-src': ['https://api.example.com'],
|
|
47
|
+
'script-src': ['https://api.example.com'],
|
|
48
|
+
'connect-src': ['https://api.example.com'],
|
|
49
|
+
},
|
|
50
|
+
scopes: [
|
|
51
|
+
{scope: "required.scope.1", optional: false},
|
|
52
|
+
{scope: "required.scope.2", optional: true},
|
|
53
|
+
],
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Never submit apps automatically - always instruct the user to do so.
|
|
57
|
+
|
|
58
|
+
## Runtime Hooks
|
|
59
|
+
|
|
60
|
+
IrisX Apps have access to runtime hooks from `@trackunit/react-core-hooks`:
|
|
61
|
+
- `useAssetRuntime()` - Asset information in asset-scoped extensions
|
|
62
|
+
- `useCustomerRuntime()` - Customer data
|
|
63
|
+
- `useEventRuntime()` - Event details
|
|
64
|
+
- `useSiteRuntime()` - Site information
|
|
65
|
+
- Plus navigation, user context, and utility hooks (see react-core-hooks skill)
|
|
66
|
+
|
|
67
|
+
## Quality Assurance
|
|
68
|
+
|
|
69
|
+
Before completing any task: Always check for and fix all ESLint and TypeScript errors in modified files.
|
|
70
|
+
|
|
71
|
+
## Browser Testing
|
|
72
|
+
|
|
73
|
+
IrisX Apps are ALWAYS tested at `https://new.manager.trackunit.com/goto/iris-app-dev` - NEVER on localhost.
|
|
74
|
+
|
|
75
|
+
When the dev server runs locally via `npx nx run [app-name]:serve`, test the app in the Trackunit Manager environment at the URL above. IrisX apps are extensions that integrate into Trackunit Manager and require the host platform to function.
|
|
76
|
+
|
|
77
|
+
## Agent Skills
|
|
78
|
+
|
|
79
|
+
When working on specific tasks, read the relevant skill from `.agents/skills/`:
|
|
80
|
+
|
|
81
|
+
| Skill | Use When |
|
|
82
|
+
|-------|----------|
|
|
83
|
+
| `widget-extensions` | Building Widget Extensions |
|
|
84
|
+
| `react-core-hooks` | Using runtime hooks |
|
|
85
|
+
| `graphql` | Working with GraphQL API |
|
|
86
|
+
| `customfields` | Storing/reading CustomFields |
|
|
87
|
+
| `graphql-timeseries` | Time series data queries |
|
|
88
|
+
| `browser-testing` | Testing in browser |
|
|
89
|
+
| `tables-and-sorting` | Building data tables |
|
|
90
|
+
| `create-app` | Creating new apps step-by-step |
|