@backstage/plugin-catalog-backend-module-ai-model 0.1.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 ADDED
@@ -0,0 +1,14 @@
1
+ # @backstage/plugin-catalog-backend-module-ai-model
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3664148: Introduced the `AiResource` catalog entity kind. Entity types, validators, type guards, and the model layer are exported from `@backstage/catalog-model/alpha`. Install `@backstage/plugin-catalog-backend-module-ai-model` in your backend to register the kind with the catalog.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @backstage/catalog-model@1.9.0
13
+ - @backstage/backend-plugin-api@1.9.1
14
+ - @backstage/plugin-catalog-node@2.2.1
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @backstage/plugin-catalog-backend-module-ai-model
2
+
3
+ Adds support for the `AiResource` entity kind to the catalog backend plugin. AI resources represent contextual information consumed by AI coding tools, such as skills and rules.
4
+
5
+ ## Installation
6
+
7
+ Add the module to your backend:
8
+
9
+ ```ts
10
+ backend.add(import('@backstage/plugin-catalog-backend-module-ai-model'));
11
+ ```
12
+
13
+ ## Entity shape
14
+
15
+ ```yaml
16
+ apiVersion: backstage.io/v1alpha1
17
+ kind: AiResource
18
+ metadata:
19
+ name: frontend-design
20
+ description: Skill for creating production-grade frontend interfaces
21
+ spec:
22
+ type: skill
23
+ lifecycle: production
24
+ owner: ai-platform-team
25
+ system: ai-tooling
26
+ disciplines:
27
+ - web
28
+ categories:
29
+ - framework
30
+ agents:
31
+ - claude-code
32
+ dependsOn:
33
+ - airesource:default/base-coding-standards
34
+ ```
35
+
36
+ The `type` field determines which spec fields are available. Currently supported types:
37
+
38
+ - **`skill`** — reusable contextual knowledge for AI coding tools. Supports additional fields: `disciplines`, `categories`, `agents`, `dependsOn`.
39
+ - **`rule`** — governance rules and constraints for AI coding tools. Supports additional fields: `disciplines`, `category` (required), `rationale` (required).
40
+
41
+ Any other `type` value is accepted with the base spec fields: `type`, `lifecycle`, `owner`, and optionally `system`.
42
+
43
+ ## Accessing skill and rule content
44
+
45
+ The actual content of skills and rules is not stored in the entity spec. Instead, the source file is referenced via the standard `backstage.io/source-location` annotation, consistent with how other Backstage entities reference their source files. Entity providers that generate `AiResource` entities from `SKILL.md` or rule files should set this annotation to point to the source file.
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var module$1 = require('./module.cjs.js');
6
+
7
+
8
+
9
+ exports.default = module$1.catalogModuleAiResourceEntityModel;
10
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
+
3
+ /**
4
+ * Registers support for the AiResource entity kind in the catalog.
5
+ *
6
+ * @public
7
+ */
8
+ declare const catalogModuleAiResourceEntityModel: _backstage_backend_plugin_api.BackendFeature;
9
+
10
+ export { catalogModuleAiResourceEntityModel as default };
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var backendPluginApi = require('@backstage/backend-plugin-api');
4
+ var alpha$1 = require('@backstage/catalog-model/alpha');
5
+ var alpha = require('@backstage/plugin-catalog-node/alpha');
6
+
7
+ const catalogModuleAiResourceEntityModel = backendPluginApi.createBackendModule({
8
+ pluginId: "catalog",
9
+ moduleId: "ai-model",
10
+ register(reg) {
11
+ reg.registerInit({
12
+ deps: {
13
+ model: alpha.catalogModelExtensionPoint
14
+ },
15
+ async init({ model }) {
16
+ model.addModelSource(
17
+ alpha$1.CatalogModelSources.static([
18
+ alpha$1.aiResourceEntityModel,
19
+ alpha$1.mcpServerApiEntityModel
20
+ ])
21
+ );
22
+ }
23
+ });
24
+ }
25
+ });
26
+
27
+ exports.catalogModuleAiResourceEntityModel = catalogModuleAiResourceEntityModel;
28
+ //# sourceMappingURL=module.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createBackendModule } from '@backstage/backend-plugin-api';\nimport {\n CatalogModelSources,\n aiResourceEntityModel,\n mcpServerApiEntityModel,\n} from '@backstage/catalog-model/alpha';\nimport { catalogModelExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\n\n/**\n * Registers support for the AiResource entity kind in the catalog.\n *\n * @public\n */\nexport const catalogModuleAiResourceEntityModel = createBackendModule({\n pluginId: 'catalog',\n moduleId: 'ai-model',\n register(reg) {\n reg.registerInit({\n deps: {\n model: catalogModelExtensionPoint,\n },\n async init({ model }) {\n model.addModelSource(\n CatalogModelSources.static([\n aiResourceEntityModel,\n mcpServerApiEntityModel,\n ]),\n );\n },\n });\n },\n});\n"],"names":["createBackendModule","catalogModelExtensionPoint","CatalogModelSources","aiResourceEntityModel","mcpServerApiEntityModel"],"mappings":";;;;;;AA6BO,MAAM,qCAAqCA,oCAAA,CAAoB;AAAA,EACpE,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,UAAA;AAAA,EACV,SAAS,GAAA,EAAK;AACZ,IAAA,GAAA,CAAI,YAAA,CAAa;AAAA,MACf,IAAA,EAAM;AAAA,QACJ,KAAA,EAAOC;AAAA,OACT;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,KAAA,EAAM,EAAG;AACpB,QAAA,KAAA,CAAM,cAAA;AAAA,UACJC,4BAAoB,MAAA,CAAO;AAAA,YACzBC,6BAAA;AAAA,YACAC;AAAA,WACD;AAAA,SACH;AAAA,MACF;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@backstage/plugin-catalog-backend-module-ai-model",
3
+ "version": "0.1.0",
4
+ "description": "Adds support for the AiResource entity kind to the catalog backend plugin.",
5
+ "backstage": {
6
+ "role": "backend-plugin-module",
7
+ "pluginId": "catalog",
8
+ "pluginPackage": "@backstage/plugin-catalog-backend",
9
+ "features": {
10
+ ".": "@backstage/BackendFeature"
11
+ }
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/backstage/backstage",
19
+ "directory": "plugins/catalog-backend-module-ai-model"
20
+ },
21
+ "license": "Apache-2.0",
22
+ "exports": {
23
+ ".": {
24
+ "backstage": "@backstage/BackendFeature",
25
+ "require": "./dist/index.cjs.js",
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.cjs.js"
28
+ },
29
+ "./package.json": "./package.json"
30
+ },
31
+ "main": "./dist/index.cjs.js",
32
+ "types": "./dist/index.d.ts",
33
+ "typesVersions": {
34
+ "*": {
35
+ "package.json": [
36
+ "package.json"
37
+ ]
38
+ }
39
+ },
40
+ "files": [
41
+ "dist"
42
+ ],
43
+ "scripts": {
44
+ "build": "backstage-cli package build",
45
+ "clean": "backstage-cli package clean",
46
+ "lint": "backstage-cli package lint",
47
+ "prepack": "backstage-cli package prepack",
48
+ "postpack": "backstage-cli package postpack",
49
+ "start": "backstage-cli package start",
50
+ "test": "backstage-cli package test"
51
+ },
52
+ "dependencies": {
53
+ "@backstage/backend-plugin-api": "^1.9.1",
54
+ "@backstage/catalog-model": "^1.9.0",
55
+ "@backstage/plugin-catalog-node": "^2.2.1"
56
+ },
57
+ "devDependencies": {
58
+ "@backstage/backend-test-utils": "^1.11.3",
59
+ "@backstage/cli": "^0.36.2"
60
+ }
61
+ }