@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-agent 0.2.1
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 +30 -0
- package/dist/index.cjs.js +10 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/module.cjs.js +28 -0
- package/dist/module.cjs.js.map +1 -0
- package/package.json +54 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-agent
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8bf7bc3: Add AiModelServerAPI kind (`spec.type: ai-model-server`) in a dedicated
|
|
8
|
+
catalog-model package with types, JSON schema, KindValidator, type guard,
|
|
9
|
+
and CatalogModelLayer registration. Uses a dedicated kind to avoid
|
|
10
|
+
colliding with the upstream API kind; the schema mirrors
|
|
11
|
+
backstage/backstage#34476 exactly. The backend module registers the
|
|
12
|
+
AiModelServerAPI kind with the catalog via `catalogModelExtensionPoint`.
|
|
13
|
+
|
|
14
|
+
The model catalog entity provider now emits a single AiModelServerAPI
|
|
15
|
+
entity per model server instead of separate Component, Resource, and API
|
|
16
|
+
entities. Model names are collected into `spec.models.available`.
|
|
17
|
+
|
|
18
|
+
## 0.2.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 51a6bc2: Add AiResource agent typed schema (`spec.type: agent`) in a dedicated
|
|
23
|
+
catalog-model package with types, JSON schema, KindValidator, type guard,
|
|
24
|
+
and CatalogModelLayer registration. The backend module registers the agent
|
|
25
|
+
specType with the catalog via `catalogModelExtensionPoint`.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [51a6bc2]
|
|
30
|
+
- @red-hat-developer-hub/backstage-plugin-catalog-model-ai-resource-agent@0.2.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Registers the agent specType for the AiResource kind in the catalog.
|
|
5
|
+
*
|
|
6
|
+
* Follows the upstream pattern established by
|
|
7
|
+
* `@backstage/plugin-catalog-backend-module-ai-model` which registers
|
|
8
|
+
* skill/rule via `catalogModelExtensionPoint.addModelSource`.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
declare const catalogModuleAiResourceAgent: _backstage_backend_plugin_api.BackendFeature;
|
|
13
|
+
|
|
14
|
+
export { catalogModuleAiResourceAgent as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
5
|
+
var backstagePluginCatalogModelAiResourceAgent = require('@red-hat-developer-hub/backstage-plugin-catalog-model-ai-resource-agent');
|
|
6
|
+
|
|
7
|
+
const catalogModuleAiResourceAgent = backendPluginApi.createBackendModule({
|
|
8
|
+
pluginId: "catalog",
|
|
9
|
+
moduleId: "ai-resource-agent",
|
|
10
|
+
register(reg) {
|
|
11
|
+
reg.registerInit({
|
|
12
|
+
deps: {
|
|
13
|
+
model: alpha.catalogModelExtensionPoint
|
|
14
|
+
},
|
|
15
|
+
async init({ model }) {
|
|
16
|
+
const source = {
|
|
17
|
+
async *read() {
|
|
18
|
+
yield { data: [{ layer: backstagePluginCatalogModelAiResourceAgent.agentAiResourceEntityModel }] };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
model.addModelSource(source);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
exports.catalogModuleAiResourceAgent = catalogModuleAiResourceAgent;
|
|
28
|
+
//# sourceMappingURL=module.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.cjs.js","sources":["../src/module.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 type { CatalogModelSource } from '@backstage/catalog-model/alpha';\nimport { catalogModelExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { agentAiResourceEntityModel } from '@red-hat-developer-hub/backstage-plugin-catalog-model-ai-resource-agent';\n\n/**\n * Registers the agent specType for the AiResource kind in the catalog.\n *\n * Follows the upstream pattern established by\n * `@backstage/plugin-catalog-backend-module-ai-model` which registers\n * skill/rule via `catalogModelExtensionPoint.addModelSource`.\n *\n * @public\n */\nexport const catalogModuleAiResourceAgent = createBackendModule({\n pluginId: 'catalog',\n moduleId: 'ai-resource-agent',\n register(reg) {\n reg.registerInit({\n deps: {\n model: catalogModelExtensionPoint,\n },\n async init({ model }) {\n const source: CatalogModelSource = {\n async *read() {\n yield { data: [{ layer: agentAiResourceEntityModel }] };\n },\n };\n model.addModelSource(source);\n },\n });\n },\n});\n"],"names":["createBackendModule","catalogModelExtensionPoint","agentAiResourceEntityModel"],"mappings":";;;;;;AA8BO,MAAM,+BAA+BA,oCAAA,CAAoB;AAAA,EAC9D,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,mBAAA;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,MAAM,MAAA,GAA6B;AAAA,UACjC,OAAO,IAAA,GAAO;AACZ,YAAA,MAAM,EAAE,IAAA,EAAM,CAAC,EAAE,KAAA,EAAOC,qEAAA,EAA4B,CAAA,EAAE;AAAA,UACxD;AAAA,SACF;AACA,QAAA,KAAA,CAAM,eAAe,MAAM,CAAA;AAAA,MAC7B;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@red-hat-developer-hub/backstage-plugin-catalog-backend-module-ai-resource-agent",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"description": "The ai-resource-agent backend module for the catalog plugin. Registers the agent specType for AiResource entities.",
|
|
6
|
+
"main": "dist/index.cjs.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"main": "dist/index.cjs.js",
|
|
11
|
+
"types": "dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/redhat-developer/rhdh-plugins",
|
|
16
|
+
"directory": "workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-agent"
|
|
17
|
+
},
|
|
18
|
+
"backstage": {
|
|
19
|
+
"role": "backend-plugin-module",
|
|
20
|
+
"pluginId": "catalog",
|
|
21
|
+
"pluginPackage": "@backstage/plugin-catalog-backend",
|
|
22
|
+
"features": {
|
|
23
|
+
".": "@backstage/BackendFeature"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"start": "backstage-cli package start",
|
|
28
|
+
"build": "backstage-cli package build",
|
|
29
|
+
"lint": "backstage-cli package lint",
|
|
30
|
+
"test": "backstage-cli package test",
|
|
31
|
+
"clean": "backstage-cli package clean",
|
|
32
|
+
"prepack": "backstage-cli package prepack",
|
|
33
|
+
"postpack": "backstage-cli package postpack"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@backstage/backend-plugin-api": "^1.9.2",
|
|
37
|
+
"@backstage/catalog-model": "^1.9.0",
|
|
38
|
+
"@backstage/plugin-catalog-node": "^2.2.2",
|
|
39
|
+
"@red-hat-developer-hub/backstage-plugin-catalog-model-ai-resource-agent": "^0.2.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@backstage/cli": "^0.36.3"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist"
|
|
46
|
+
],
|
|
47
|
+
"typesVersions": {
|
|
48
|
+
"*": {
|
|
49
|
+
"package.json": [
|
|
50
|
+
"package.json"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|