@acorex-platform/extension-ai-software-client 0.0.46
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/fesm2022/acorex-platform-extension-ai-software-client-contracts.mjs +16 -0
- package/fesm2022/acorex-platform-extension-ai-software-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-ai-software-client-propose-software-with-ai.command-EsI__pC0.mjs +190 -0
- package/fesm2022/acorex-platform-extension-ai-software-client-propose-software-with-ai.command-EsI__pC0.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-ai-software-client.mjs +113 -0
- package/fesm2022/acorex-platform-extension-ai-software-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-extension-ai-software-client-contracts.d.ts +6 -0
- package/types/acorex-platform-extension-ai-software-client.d.ts +15 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region ----- Software AI command keys -----
|
|
2
|
+
const AXESoftwareAiCommandKeys = {
|
|
3
|
+
ProposeWithAi: 'SoftwareAiExtension.Software:ProposeWithAi',
|
|
4
|
+
};
|
|
5
|
+
const AXE_SOFTWARE_AI_PROPOSE_ACTION = 'software-ai-propose-with-ai';
|
|
6
|
+
//#endregion
|
|
7
|
+
|
|
8
|
+
//#region ---- Contracts barrel ----
|
|
9
|
+
//#endregion
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Generated bundle index. Do not edit.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export { AXESoftwareAiCommandKeys, AXE_SOFTWARE_AI_PROPOSE_ACTION };
|
|
16
|
+
//# sourceMappingURL=acorex-platform-extension-ai-software-client-contracts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-ai-software-client-contracts.mjs","sources":["../../../../libs/extensions/ai/software/contracts/src/software-ai.constants.ts","../../../../libs/extensions/ai/software/contracts/src/index.ts","../../../../libs/extensions/ai/software/contracts/src/acorex-platform-extension-ai-software-client-contracts.ts"],"sourcesContent":["//#region ----- Software AI command keys -----\n\nexport const AXESoftwareAiCommandKeys = {\n ProposeWithAi: 'SoftwareAiExtension.Software:ProposeWithAi',\n} as const;\n\nexport const AXE_SOFTWARE_AI_PROPOSE_ACTION = 'software-ai-propose-with-ai';\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './software-ai.constants';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AAEO,MAAM,wBAAwB,GAAG;AACtC,IAAA,aAAa,EAAE,4CAA4C;;AAGtD,MAAM,8BAA8B,GAAG;AAE9C;;ACRA;AAIA;;ACJA;;AAEG;;"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
2
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
3
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
4
|
+
import { AXPAiAssistService } from '@acorex-platform/module-ai-management-client';
|
|
5
|
+
import { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';
|
|
6
|
+
import { RootConfig } from '@acorex-platform/module-software-management-client/contracts';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { inject, Injectable } from '@angular/core';
|
|
9
|
+
|
|
10
|
+
function resolveSoftwareText(value) {
|
|
11
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
12
|
+
}
|
|
13
|
+
function asSoftwareRecord(value) {
|
|
14
|
+
return value && typeof value === 'object' ? value : null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#region ---- Imports ----
|
|
18
|
+
//#endregion
|
|
19
|
+
class ProposeSoftwareWithAiCommand {
|
|
20
|
+
constructor() {
|
|
21
|
+
//#region ---- Services & Dependencies ----
|
|
22
|
+
this.entityService = inject(AXPEntityService);
|
|
23
|
+
this.toastService = inject(AXToastService);
|
|
24
|
+
this.translationService = inject(AXTranslationService);
|
|
25
|
+
this.aiAssist = inject(AXPAiAssistService, { optional: true });
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ---- Command Implementation ----
|
|
29
|
+
async execute(input) {
|
|
30
|
+
if (!this.aiAssist) {
|
|
31
|
+
this.toastService.show({
|
|
32
|
+
color: 'warning',
|
|
33
|
+
title: await this.translationService.translateAsync('@general:messages.generic.warning.title'),
|
|
34
|
+
content: await this.translationService.translateAsync('@extensions-ai-software:messages.propose-with-ai.unavailable'),
|
|
35
|
+
closeButton: true,
|
|
36
|
+
timeOut: 8000,
|
|
37
|
+
});
|
|
38
|
+
return { success: false };
|
|
39
|
+
}
|
|
40
|
+
const resolved = resolveEntityActionRef(input);
|
|
41
|
+
const softwareId = resolveSoftwareText(resolved?.refId);
|
|
42
|
+
if (!softwareId) {
|
|
43
|
+
return {
|
|
44
|
+
success: false,
|
|
45
|
+
message: {
|
|
46
|
+
text: await this.translationService.translateAsync('@extensions-ai-software:messages.propose-with-ai.id-required'),
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const software = (await this.entityService
|
|
51
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.software.name)
|
|
52
|
+
.data()
|
|
53
|
+
.byKey(softwareId));
|
|
54
|
+
if (!software) {
|
|
55
|
+
return {
|
|
56
|
+
success: false,
|
|
57
|
+
message: {
|
|
58
|
+
text: await this.translationService.translateAsync('@extensions-ai-software:messages.propose-with-ai.not-found'),
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
const phase = (resolveSoftwareText(software.currentPhase) || 'introduction');
|
|
63
|
+
const target = this.targetForPhase(phase);
|
|
64
|
+
if (!target) {
|
|
65
|
+
this.toastService.show({
|
|
66
|
+
color: 'warning',
|
|
67
|
+
title: await this.translationService.translateAsync('@general:messages.generic.warning.title'),
|
|
68
|
+
content: await this.translationService.translateAsync('@extensions-ai-software:messages.propose-with-ai.phase-unsupported'),
|
|
69
|
+
closeButton: true,
|
|
70
|
+
timeOut: 8000,
|
|
71
|
+
});
|
|
72
|
+
return { success: false };
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const result = await this.aiAssist.run({
|
|
76
|
+
prompt: this.buildPrompt(software, phase),
|
|
77
|
+
expectStructuredOutput: true,
|
|
78
|
+
structuredOutputInstruction: 'Return JSON only: {"items":[{"kind":"string","title":"string","body":"string"}]}',
|
|
79
|
+
structuredOutputSchemaSummary: '{ items: Array<{ kind?: string; title: string; body?: string }> }',
|
|
80
|
+
structuredValidator: (parsed) => this.validateProposal(parsed),
|
|
81
|
+
});
|
|
82
|
+
const payload = asSoftwareRecord(result.structured) ?? asSoftwareRecord(result.data);
|
|
83
|
+
const items = this.validateProposal(payload).items;
|
|
84
|
+
let created = 0;
|
|
85
|
+
for (const item of items) {
|
|
86
|
+
const row = {
|
|
87
|
+
softwareId,
|
|
88
|
+
origin: 'suggestion',
|
|
89
|
+
proposedBy: 'ai',
|
|
90
|
+
needsReview: false,
|
|
91
|
+
sourceNote: 'AI proposal; not authoritative until accepted.',
|
|
92
|
+
};
|
|
93
|
+
if (target.entityName === RootConfig.entities.requirement.name) {
|
|
94
|
+
row['title'] = item.title;
|
|
95
|
+
row['statement'] = item.body || item.title;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
row['title'] = item.title;
|
|
99
|
+
row['body'] = item.body;
|
|
100
|
+
if (target.defaultKind || item.kind) {
|
|
101
|
+
row['kind'] = item.kind || target.defaultKind;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
await this.entityService.withEntity(RootConfig.module.name, target.entityName).data().create(row);
|
|
105
|
+
created += 1;
|
|
106
|
+
}
|
|
107
|
+
this.toastService.show({
|
|
108
|
+
color: 'success',
|
|
109
|
+
title: await this.translationService.translateAsync('@general:messages.generic.success.title'),
|
|
110
|
+
content: await this.translationService.translateAsync('@extensions-ai-software:messages.propose-with-ai.created', { params: { count: String(created) } }),
|
|
111
|
+
closeButton: true,
|
|
112
|
+
timeOut: 6000,
|
|
113
|
+
});
|
|
114
|
+
return { success: true, kind: 'object', data: { created } };
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
118
|
+
this.toastService.show({
|
|
119
|
+
color: 'danger',
|
|
120
|
+
title: await this.translationService.translateAsync('@general:messages.generic.error.title'),
|
|
121
|
+
content: message,
|
|
122
|
+
closeButton: true,
|
|
123
|
+
timeOut: 6000,
|
|
124
|
+
});
|
|
125
|
+
return { success: false, message: { text: message } };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region ---- Helpers ----
|
|
130
|
+
targetForPhase(phase) {
|
|
131
|
+
switch (phase) {
|
|
132
|
+
case 'introduction':
|
|
133
|
+
case 'discovery':
|
|
134
|
+
return { entityName: RootConfig.entities.discoveryItem.name, defaultKind: 'hypothesis' };
|
|
135
|
+
case 'first-version-scope':
|
|
136
|
+
return { entityName: RootConfig.entities.scopeItem.name, defaultKind: 'capability' };
|
|
137
|
+
case 'behavior-specification':
|
|
138
|
+
return { entityName: RootConfig.entities.requirement.name, defaultKind: '' };
|
|
139
|
+
case 'design':
|
|
140
|
+
return { entityName: RootConfig.entities.designDecision.name, defaultKind: 'ux' };
|
|
141
|
+
default:
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
buildPrompt(software, phase) {
|
|
146
|
+
return [
|
|
147
|
+
'Propose draft records for defining a standalone software product.',
|
|
148
|
+
'Do not assume ACoreX as the implementation stack.',
|
|
149
|
+
`Phase: ${phase}`,
|
|
150
|
+
`Title: ${software.title}`,
|
|
151
|
+
`Original idea: ${software.originalIdea || software.idea}`,
|
|
152
|
+
`Initial problem: ${software.initialProblem ?? ''}`,
|
|
153
|
+
`Goal: ${software.goal ?? ''}`,
|
|
154
|
+
'Return 3 to 6 short items. These stay suggestions until a human accepts them.',
|
|
155
|
+
].join('\n');
|
|
156
|
+
}
|
|
157
|
+
validateProposal(parsed) {
|
|
158
|
+
const record = asSoftwareRecord(parsed);
|
|
159
|
+
const rawItems = record?.['items'];
|
|
160
|
+
if (!Array.isArray(rawItems)) {
|
|
161
|
+
throw new Error('AI output must include an items array.');
|
|
162
|
+
}
|
|
163
|
+
const items = [];
|
|
164
|
+
for (const raw of rawItems) {
|
|
165
|
+
const item = asSoftwareRecord(raw);
|
|
166
|
+
const title = resolveSoftwareText(item?.['title']);
|
|
167
|
+
if (!title) {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
items.push({
|
|
171
|
+
kind: resolveSoftwareText(item?.['kind']) || undefined,
|
|
172
|
+
title,
|
|
173
|
+
body: resolveSoftwareText(item?.['body']) || undefined,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (items.length === 0) {
|
|
177
|
+
throw new Error('AI output did not include any usable proposals.');
|
|
178
|
+
}
|
|
179
|
+
return { items };
|
|
180
|
+
}
|
|
181
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ProposeSoftwareWithAiCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
182
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ProposeSoftwareWithAiCommand, providedIn: 'root' }); }
|
|
183
|
+
}
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ProposeSoftwareWithAiCommand, decorators: [{
|
|
185
|
+
type: Injectable,
|
|
186
|
+
args: [{ providedIn: 'root' }]
|
|
187
|
+
}] });
|
|
188
|
+
|
|
189
|
+
export { ProposeSoftwareWithAiCommand };
|
|
190
|
+
//# sourceMappingURL=acorex-platform-extension-ai-software-client-propose-software-with-ai.command-EsI__pC0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-ai-software-client-propose-software-with-ai.command-EsI__pC0.mjs","sources":["../../../../libs/extensions/ai/software/client/src/lib/commands/software-ai-command.util.ts","../../../../libs/extensions/ai/software/client/src/lib/commands/propose-software-with-ai.command.ts"],"sourcesContent":["export function resolveSoftwareText(value: unknown): string {\n return typeof value === 'string' ? value.trim() : '';\n}\n\nexport function asSoftwareRecord(value: unknown): Record<string, unknown> | null {\n return value && typeof value === 'object' ? (value as Record<string, unknown>) : null;\n}\n","//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPAiAssistService } from '@acorex-platform/module-ai-management-client';\nimport { AXPCommand, resolveEntityActionRef, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n RootConfig,\n type SoftwarePhase,\n type AXMSoftwareManagementSoftwareEntityModel,\n} from '@acorex-platform/module-software-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { asSoftwareRecord, resolveSoftwareText } from './software-ai-command.util';\n\n//#endregion\n\n//#region ---- Types ----\n\ninterface ProposedItem {\n kind?: string;\n title: string;\n body?: string;\n}\n\n//#endregion\n\n@Injectable({ providedIn: 'root' })\nexport class ProposeSoftwareWithAiCommand implements AXPCommand<unknown, { created: number }> {\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly aiAssist = inject(AXPAiAssistService, { optional: true });\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<{ created: number }> {\n if (!this.aiAssist) {\n this.toastService.show({\n color: 'warning',\n title: await this.translationService.translateAsync('@general:messages.generic.warning.title'),\n content: await this.translationService.translateAsync(\n '@extensions-ai-software:messages.propose-with-ai.unavailable',\n ),\n closeButton: true,\n timeOut: 8000,\n });\n return { success: false };\n }\n\n const resolved = resolveEntityActionRef(input);\n const softwareId = resolveSoftwareText(resolved?.refId);\n if (!softwareId) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@extensions-ai-software:messages.propose-with-ai.id-required',\n ),\n },\n };\n }\n\n const software = (await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.software.name)\n .data()\n .byKey(softwareId)) as AXMSoftwareManagementSoftwareEntityModel | null;\n\n if (!software) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@extensions-ai-software:messages.propose-with-ai.not-found',\n ),\n },\n };\n }\n\n const phase = (resolveSoftwareText(software.currentPhase) || 'introduction') as SoftwarePhase;\n const target = this.targetForPhase(phase);\n if (!target) {\n this.toastService.show({\n color: 'warning',\n title: await this.translationService.translateAsync('@general:messages.generic.warning.title'),\n content: await this.translationService.translateAsync(\n '@extensions-ai-software:messages.propose-with-ai.phase-unsupported',\n ),\n closeButton: true,\n timeOut: 8000,\n });\n return { success: false };\n }\n\n try {\n const result = await this.aiAssist.run({\n prompt: this.buildPrompt(software, phase),\n expectStructuredOutput: true,\n structuredOutputInstruction: 'Return JSON only: {\"items\":[{\"kind\":\"string\",\"title\":\"string\",\"body\":\"string\"}]}',\n structuredOutputSchemaSummary: '{ items: Array<{ kind?: string; title: string; body?: string }> }',\n structuredValidator: (parsed) => this.validateProposal(parsed),\n });\n\n const payload = asSoftwareRecord(result.structured) ?? asSoftwareRecord(result.data);\n const items = this.validateProposal(payload).items;\n let created = 0;\n\n for (const item of items) {\n const row: Record<string, unknown> = {\n softwareId,\n origin: 'suggestion',\n proposedBy: 'ai',\n needsReview: false,\n sourceNote: 'AI proposal; not authoritative until accepted.',\n };\n\n if (target.entityName === RootConfig.entities.requirement.name) {\n row['title'] = item.title;\n row['statement'] = item.body || item.title;\n } else {\n row['title'] = item.title;\n row['body'] = item.body;\n if (target.defaultKind || item.kind) {\n row['kind'] = item.kind || target.defaultKind;\n }\n }\n\n await this.entityService.withEntity(RootConfig.module.name, target.entityName).data().create(row as never);\n created += 1;\n }\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync('@general:messages.generic.success.title'),\n content: await this.translationService.translateAsync(\n '@extensions-ai-software:messages.propose-with-ai.created',\n { params: { count: String(created) } },\n ),\n closeButton: true,\n timeOut: 6000,\n });\n\n return { success: true, kind: 'object', data: { created } };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: message,\n closeButton: true,\n timeOut: 6000,\n });\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n private targetForPhase(phase: SoftwarePhase): { entityName: string; defaultKind: string } | null {\n switch (phase) {\n case 'introduction':\n case 'discovery':\n return { entityName: RootConfig.entities.discoveryItem.name, defaultKind: 'hypothesis' };\n case 'first-version-scope':\n return { entityName: RootConfig.entities.scopeItem.name, defaultKind: 'capability' };\n case 'behavior-specification':\n return { entityName: RootConfig.entities.requirement.name, defaultKind: '' };\n case 'design':\n return { entityName: RootConfig.entities.designDecision.name, defaultKind: 'ux' };\n default:\n return null;\n }\n }\n\n private buildPrompt(software: AXMSoftwareManagementSoftwareEntityModel, phase: SoftwarePhase): string {\n return [\n 'Propose draft records for defining a standalone software product.',\n 'Do not assume ACoreX as the implementation stack.',\n `Phase: ${phase}`,\n `Title: ${software.title}`,\n `Original idea: ${software.originalIdea || software.idea}`,\n `Initial problem: ${software.initialProblem ?? ''}`,\n `Goal: ${software.goal ?? ''}`,\n 'Return 3 to 6 short items. These stay suggestions until a human accepts them.',\n ].join('\\n');\n }\n\n private validateProposal(parsed: unknown): { items: ProposedItem[] } {\n const record = asSoftwareRecord(parsed);\n const rawItems = record?.['items'];\n if (!Array.isArray(rawItems)) {\n throw new Error('AI output must include an items array.');\n }\n\n const items: ProposedItem[] = [];\n for (const raw of rawItems) {\n const item = asSoftwareRecord(raw);\n const title = resolveSoftwareText(item?.['title']);\n if (!title) {\n continue;\n }\n items.push({\n kind: resolveSoftwareText(item?.['kind']) || undefined,\n title,\n body: resolveSoftwareText(item?.['body']) || undefined,\n });\n }\n\n if (items.length === 0) {\n throw new Error('AI output did not include any usable proposals.');\n }\n\n return { items };\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAM,SAAU,mBAAmB,CAAC,KAAc,EAAA;AAChD,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE;AACtD;AAEM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,GAAI,KAAiC,GAAG,IAAI;AACvF;;ACNA;AA0BA;MAGa,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACjD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AA4L3E,IAAA;;;IAtLC,MAAM,OAAO,CAAC,KAAc,EAAA;AAC1B,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,gBAAA,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,yCAAyC,CAAC;gBAC9F,OAAO,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CACnD,8DAA8D,CAC/D;AACD,gBAAA,WAAW,EAAE,IAAI;AACjB,gB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AAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { actionExists, ensureListActions, AXP_ENTITY_MODIFIER } from '@acorex-platform/framework-client/layout/entity';
|
|
4
|
+
import { provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
5
|
+
import { AXMAiManagementModule } from '@acorex-platform/module-ai-management-client';
|
|
6
|
+
import { AXMSoftwareManagementModule } from '@acorex-platform/module-software-management-client';
|
|
7
|
+
import { AXESoftwareAiCommandKeys, AXE_SOFTWARE_AI_PROPOSE_ACTION } from '@acorex-platform/extension-ai-software-client/contracts';
|
|
8
|
+
import { AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';
|
|
9
|
+
import { AXPSystemActionType } from '@acorex-platform/framework-shared/core';
|
|
10
|
+
import { RootConfig } from '@acorex-platform/module-software-management-client/contracts';
|
|
11
|
+
|
|
12
|
+
//#region ----- Imports -----
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region ----- Modifier config -----
|
|
15
|
+
const PROPOSE_ORDER = 46;
|
|
16
|
+
function buildProposeAction() {
|
|
17
|
+
return {
|
|
18
|
+
name: AXE_SOFTWARE_AI_PROPOSE_ACTION,
|
|
19
|
+
title: '@extensions-ai-software:actions.propose-with-ai.title',
|
|
20
|
+
command: {
|
|
21
|
+
name: AXESoftwareAiCommandKeys.ProposeWithAi,
|
|
22
|
+
options: {
|
|
23
|
+
scope: AXPEntityCommandScope.Individual,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
priority: 'secondary',
|
|
27
|
+
color: 'accent1',
|
|
28
|
+
type: AXPSystemActionType.Generate,
|
|
29
|
+
icon: 'fa-regular fa-sparkles',
|
|
30
|
+
scope: AXPEntityCommandScope.Individual,
|
|
31
|
+
order: PROPOSE_ORDER,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function pushAction(actions) {
|
|
35
|
+
const next = [...(actions ?? [])];
|
|
36
|
+
if (!actionExists(next, AXESoftwareAiCommandKeys.ProposeWithAi, AXE_SOFTWARE_AI_PROPOSE_ACTION)) {
|
|
37
|
+
next.push(buildProposeAction());
|
|
38
|
+
}
|
|
39
|
+
return next;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ----- Software modifier -----
|
|
43
|
+
/**
|
|
44
|
+
* Adds Propose With AI to Software list rows and the Software record page.
|
|
45
|
+
*/
|
|
46
|
+
const AXESoftwareAiActionsModifier = {
|
|
47
|
+
entityName: RootConfig.entities.software.name,
|
|
48
|
+
modifier: (ctx) => {
|
|
49
|
+
ensureListActions(ctx);
|
|
50
|
+
ctx.interfaces.master.list.update((list) => {
|
|
51
|
+
const next = (list ?? { actions: [], views: [] });
|
|
52
|
+
next.actions = pushAction(next.actions);
|
|
53
|
+
return next;
|
|
54
|
+
});
|
|
55
|
+
ctx.interfaces.master.single.update((single) => {
|
|
56
|
+
const next = (single ?? {});
|
|
57
|
+
next.actions = pushAction(next.actions);
|
|
58
|
+
return next;
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
|
|
64
|
+
//#region ----- Imports -----
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ----- Module -----
|
|
67
|
+
/**
|
|
68
|
+
* Optional AI proposals on Software definition records.
|
|
69
|
+
* Register next to {@link AXMSoftwareManagementModule} and {@link AXMAiManagementModule}.
|
|
70
|
+
*/
|
|
71
|
+
class AXEAISoftwareExtensionModule {
|
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEAISoftwareExtensionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
73
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXEAISoftwareExtensionModule, imports: [AXMAiManagementModule, AXMSoftwareManagementModule] }); }
|
|
74
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEAISoftwareExtensionModule, providers: [
|
|
75
|
+
{
|
|
76
|
+
provide: AXP_ENTITY_MODIFIER,
|
|
77
|
+
useValue: AXESoftwareAiActionsModifier,
|
|
78
|
+
multi: true,
|
|
79
|
+
},
|
|
80
|
+
provideCommandSetups([
|
|
81
|
+
{
|
|
82
|
+
key: AXESoftwareAiCommandKeys.ProposeWithAi,
|
|
83
|
+
command: () => import('./acorex-platform-extension-ai-software-client-propose-software-with-ai.command-EsI__pC0.mjs').then((c) => c.ProposeSoftwareWithAiCommand),
|
|
84
|
+
},
|
|
85
|
+
]),
|
|
86
|
+
], imports: [AXMAiManagementModule, AXMSoftwareManagementModule] }); }
|
|
87
|
+
}
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXEAISoftwareExtensionModule, decorators: [{
|
|
89
|
+
type: NgModule,
|
|
90
|
+
args: [{
|
|
91
|
+
imports: [AXMAiManagementModule, AXMSoftwareManagementModule],
|
|
92
|
+
providers: [
|
|
93
|
+
{
|
|
94
|
+
provide: AXP_ENTITY_MODIFIER,
|
|
95
|
+
useValue: AXESoftwareAiActionsModifier,
|
|
96
|
+
multi: true,
|
|
97
|
+
},
|
|
98
|
+
provideCommandSetups([
|
|
99
|
+
{
|
|
100
|
+
key: AXESoftwareAiCommandKeys.ProposeWithAi,
|
|
101
|
+
command: () => import('./acorex-platform-extension-ai-software-client-propose-software-with-ai.command-EsI__pC0.mjs').then((c) => c.ProposeSoftwareWithAiCommand),
|
|
102
|
+
},
|
|
103
|
+
]),
|
|
104
|
+
],
|
|
105
|
+
}]
|
|
106
|
+
}] });
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Generated bundle index. Do not edit.
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
export { AXEAISoftwareExtensionModule };
|
|
113
|
+
//# sourceMappingURL=acorex-platform-extension-ai-software-client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-extension-ai-software-client.mjs","sources":["../../../../libs/extensions/ai/software/client/src/lib/ai-software-actions.modifier.ts","../../../../libs/extensions/ai/software/client/src/lib/ai-software-extension.module.ts","../../../../libs/extensions/ai/software/client/src/acorex-platform-extension-ai-software-client.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPEntityAction, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';\nimport { AXStyleColorType } from '@acorex/cdk/common';\nimport { AXPSystemActionType } from '@acorex-platform/framework-shared/core';\nimport {\n actionExists,\n AXPEntityModifierProvider,\n ensureListActions,\n} from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-software-management-client/contracts';\nimport {\n AXE_SOFTWARE_AI_PROPOSE_ACTION,\n AXESoftwareAiCommandKeys,\n} from '@acorex-platform/extension-ai-software-client/contracts';\n\n//#endregion\n\n//#region ----- Modifier config -----\n\nconst PROPOSE_ORDER = 46;\n\nfunction buildProposeAction(): AXPEntityAction {\n return {\n name: AXE_SOFTWARE_AI_PROPOSE_ACTION,\n title: '@extensions-ai-software:actions.propose-with-ai.title',\n command: {\n name: AXESoftwareAiCommandKeys.ProposeWithAi,\n options: {\n scope: AXPEntityCommandScope.Individual,\n },\n },\n priority: 'secondary',\n color: 'accent1' as AXStyleColorType,\n type: AXPSystemActionType.Generate,\n icon: 'fa-regular fa-sparkles',\n scope: AXPEntityCommandScope.Individual,\n order: PROPOSE_ORDER,\n };\n}\n\nfunction pushAction(actions: AXPEntityAction[] | undefined): AXPEntityAction[] {\n const next = [...(actions ?? [])];\n if (!actionExists(next, AXESoftwareAiCommandKeys.ProposeWithAi, AXE_SOFTWARE_AI_PROPOSE_ACTION)) {\n next.push(buildProposeAction());\n }\n return next;\n}\n\n//#endregion\n\n//#region ----- Software modifier -----\n\n/**\n * Adds Propose With AI to Software list rows and the Software record page.\n */\nexport const AXESoftwareAiActionsModifier: AXPEntityModifierProvider = {\n entityName: RootConfig.entities.software.name,\n modifier: (ctx) => {\n ensureListActions(ctx);\n\n ctx.interfaces.master.list.update((list) => {\n const next = (list ?? { actions: [], views: [] }) as NonNullable<typeof list>;\n next.actions = pushAction(next.actions as AXPEntityAction[]);\n return next;\n });\n\n ctx.interfaces.master.single.update((single) => {\n const next = (single ?? {}) as NonNullable<typeof single>;\n next.actions = pushAction(next.actions as AXPEntityAction[]);\n return next;\n });\n },\n};\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { NgModule } from '@angular/core';\nimport { AXP_ENTITY_MODIFIER } from '@acorex-platform/framework-client/layout/entity';\nimport { provideCommandSetups } from '@acorex-platform/framework-client/runtime';\nimport { AXMAiManagementModule } from '@acorex-platform/module-ai-management-client';\nimport { AXMSoftwareManagementModule } from '@acorex-platform/module-software-management-client';\nimport { AXESoftwareAiCommandKeys } from '@acorex-platform/extension-ai-software-client/contracts';\n\nimport { AXESoftwareAiActionsModifier } from './ai-software-actions.modifier';\n\n//#endregion\n\n//#region ----- Module -----\n\n/**\n * Optional AI proposals on Software definition records.\n * Register next to {@link AXMSoftwareManagementModule} and {@link AXMAiManagementModule}.\n */\n@NgModule({\n imports: [AXMAiManagementModule, AXMSoftwareManagementModule],\n providers: [\n {\n provide: AXP_ENTITY_MODIFIER,\n useValue: AXESoftwareAiActionsModifier,\n multi: true,\n },\n provideCommandSetups([\n {\n key: AXESoftwareAiCommandKeys.ProposeWithAi,\n command: () =>\n import('./commands/propose-software-with-ai.command').then(\n (c) => c.ProposeSoftwareWithAiCommand,\n ),\n },\n ]),\n ],\n})\nexport class AXEAISoftwareExtension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AC;SACH,EAAA,OAAA,EAAA,CAhBS,qBAAqB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;;2FAkBjD,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAnBxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;AAC7D,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,QAAQ,EAAE,4BAA4B;AACtC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA,oBAAoB,CAAC;AACnB,4BAAA;gCACE,GAAG,EAAE,wBAAwB,CAAC,aAAa;AAC3C,gCAAA,OAAO,EAAE,MACP,OAAO,8FAA6C,CAAC,CAAC,IAAI,CACxD,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,CACtC;AACJ,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACrCD;;AAEG;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/extension-ai-software-client",
|
|
3
|
+
"version": "0.0.46",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0 || ^22.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0 || ^22.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-extension-ai-software-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-extension-ai-software-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-extension-ai-software-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-extension-ai-software-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-extension-ai-software-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-extension-ai-software-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const AXESoftwareAiCommandKeys: {
|
|
2
|
+
readonly ProposeWithAi: "SoftwareAiExtension.Software:ProposeWithAi";
|
|
3
|
+
};
|
|
4
|
+
declare const AXE_SOFTWARE_AI_PROPOSE_ACTION = "software-ai-propose-with-ai";
|
|
5
|
+
|
|
6
|
+
export { AXESoftwareAiCommandKeys, AXE_SOFTWARE_AI_PROPOSE_ACTION };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as i1 from '@acorex-platform/module-ai-management-client';
|
|
3
|
+
import * as i2 from '@acorex-platform/module-software-management-client';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Optional AI proposals on Software definition records.
|
|
7
|
+
* Register next to {@link AXMSoftwareManagementModule} and {@link AXMAiManagementModule}.
|
|
8
|
+
*/
|
|
9
|
+
declare class AXEAISoftwareExtensionModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXEAISoftwareExtensionModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXEAISoftwareExtensionModule, never, [typeof i1.AXMAiManagementModule, typeof i2.AXMSoftwareManagementModule], never>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXEAISoftwareExtensionModule>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { AXEAISoftwareExtensionModule };
|