@open-mercato/core 0.6.1-develop.3187.1.4c96d17341 → 0.6.1-develop.3188.1.499d530779
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/dist/modules/customers/widgets/injection/ai-assistant-trigger/widget.js +1 -0
- package/dist/modules/customers/widgets/injection/ai-assistant-trigger/widget.js.map +2 -2
- package/dist/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.js +1 -0
- package/dist/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.js.map +2 -2
- package/dist/modules/widgets/lib/injection.js +5 -1
- package/dist/modules/widgets/lib/injection.js.map +2 -2
- package/package.json +5 -5
- package/src/modules/customers/widgets/injection/ai-assistant-trigger/widget.ts +1 -0
- package/src/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.ts +1 -0
- package/src/modules/widgets/lib/injection.ts +2 -0
|
@@ -5,6 +5,7 @@ const widget = {
|
|
|
5
5
|
title: "Customers AI Assistant Trigger",
|
|
6
6
|
description: 'Renders an "Ask AI" button in the people list header that opens a sheet embedding the customers account assistant.',
|
|
7
7
|
features: ["customers.people.view", "ai_assistant.view"],
|
|
8
|
+
requiredModules: ["ai_assistant"],
|
|
8
9
|
priority: 100,
|
|
9
10
|
enabled: true
|
|
10
11
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/customers/widgets/injection/ai-assistant-trigger/widget.ts"],
|
|
4
|
-
"sourcesContent": ["import type { InjectionWidgetModule } from '@open-mercato/shared/modules/widgets/injection'\nimport AiAssistantTriggerWidget from './widget.client'\n\n/**\n * Step 4.10 \u2014 Backend AiChat injection example.\n *\n * Demonstrates how a third-party module can drop `<AiChat>` onto a page\n * it does NOT own (the customers People list) via the existing widget\n * injection system. Targets spot `data-table:customers.people.list:header`,\n * which is owned by the `DataTable` primitive in `packages/ui`.\n *\n * The trigger button opens a right-side sheet embedding\n * `<AiChat agent=\"customers.account_assistant\" pageContext={...} />`.\n * `pageContext` follows the spec \u00A710.1 shape:\n *\n * { view: 'customers.people.list',\n * recordType: null,\n * recordId: string, // \"\" or comma-separated UUIDs\n * extra: { selectedCount, totalMatching } }\n *\n * Feature-gated behind `customers.people.view` + `ai_assistant.view`.\n */\nconst widget: InjectionWidgetModule<Record<string, unknown>, Record<string, unknown>> = {\n metadata: {\n id: 'customers.injection.ai-assistant-trigger',\n title: 'Customers AI Assistant Trigger',\n description:\n 'Renders an \"Ask AI\" button in the people list header that opens a sheet embedding the customers account assistant.',\n features: ['customers.people.view', 'ai_assistant.view'],\n priority: 100,\n enabled: true,\n },\n Widget: AiAssistantTriggerWidget,\n}\n\nexport default widget\n"],
|
|
5
|
-
"mappings": "AACA,OAAO,8BAA8B;AAqBrC,MAAM,SAAkF;AAAA,EACtF,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aACE;AAAA,IACF,UAAU,CAAC,yBAAyB,mBAAmB;AAAA,IACvD,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AACV;AAEA,IAAO,iBAAQ;",
|
|
4
|
+
"sourcesContent": ["import type { InjectionWidgetModule } from '@open-mercato/shared/modules/widgets/injection'\nimport AiAssistantTriggerWidget from './widget.client'\n\n/**\n * Step 4.10 \u2014 Backend AiChat injection example.\n *\n * Demonstrates how a third-party module can drop `<AiChat>` onto a page\n * it does NOT own (the customers People list) via the existing widget\n * injection system. Targets spot `data-table:customers.people.list:header`,\n * which is owned by the `DataTable` primitive in `packages/ui`.\n *\n * The trigger button opens a right-side sheet embedding\n * `<AiChat agent=\"customers.account_assistant\" pageContext={...} />`.\n * `pageContext` follows the spec \u00A710.1 shape:\n *\n * { view: 'customers.people.list',\n * recordType: null,\n * recordId: string, // \"\" or comma-separated UUIDs\n * extra: { selectedCount, totalMatching } }\n *\n * Feature-gated behind `customers.people.view` + `ai_assistant.view`.\n */\nconst widget: InjectionWidgetModule<Record<string, unknown>, Record<string, unknown>> = {\n metadata: {\n id: 'customers.injection.ai-assistant-trigger',\n title: 'Customers AI Assistant Trigger',\n description:\n 'Renders an \"Ask AI\" button in the people list header that opens a sheet embedding the customers account assistant.',\n features: ['customers.people.view', 'ai_assistant.view'],\n requiredModules: ['ai_assistant'],\n priority: 100,\n enabled: true,\n },\n Widget: AiAssistantTriggerWidget,\n}\n\nexport default widget\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,8BAA8B;AAqBrC,MAAM,SAAkF;AAAA,EACtF,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aACE;AAAA,IACF,UAAU,CAAC,yBAAyB,mBAAmB;AAAA,IACvD,iBAAiB,CAAC,cAAc;AAAA,IAChC,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AACV;AAEA,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,6 +5,7 @@ const widget = {
|
|
|
5
5
|
title: "Customers AI Deal Detail Trigger",
|
|
6
6
|
description: 'Renders an "Ask AI" button in the deal detail header that opens a sheet embedding the customers account assistant with deal-scoped page context.',
|
|
7
7
|
features: ["customers.deals.view", "ai_assistant.view"],
|
|
8
|
+
requiredModules: ["ai_assistant"],
|
|
8
9
|
priority: 100,
|
|
9
10
|
enabled: true
|
|
10
11
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.ts"],
|
|
4
|
-
"sourcesContent": ["import type { InjectionWidgetModule } from '@open-mercato/shared/modules/widgets/injection'\nimport AiDealDetailTriggerWidget from './widget.client'\n\n/**\n * Step 5.15 (Phase 3 WS-D) \u2014 Customers Deal detail AiChat injection.\n *\n * Extends the Step 4.10 pattern to a record-level surface. Drops an\n * \"Ask AI\" trigger on the deal detail page (`detail:customers.deal:header`)\n * and opens a sheet embedding\n * `<AiChat agent=\"customers.account_assistant\" pageContext={\u2026} />` with a\n * deal-scoped `pageContext` shape:\n *\n * { view: 'customers.deal.detail',\n * recordType: 'deal',\n * recordId: <dealId>,\n * extra: { stage, pipelineStageId } }\n *\n * Wires the stable conversation id so the Step 5.13\n * `customers.update_deal_stage` mutation tool's idempotency hash stays\n * constant across repeated confirms / retries within the same chat.\n *\n * Feature-gated behind `customers.deals.view` + `ai_assistant.view`.\n */\nconst widget: InjectionWidgetModule<Record<string, unknown>, Record<string, unknown>> = {\n metadata: {\n id: 'customers.injection.ai-deal-detail-trigger',\n title: 'Customers AI Deal Detail Trigger',\n description:\n 'Renders an \"Ask AI\" button in the deal detail header that opens a sheet embedding the customers account assistant with deal-scoped page context.',\n features: ['customers.deals.view', 'ai_assistant.view'],\n priority: 100,\n enabled: true,\n },\n Widget: AiDealDetailTriggerWidget,\n}\n\nexport default widget\n"],
|
|
5
|
-
"mappings": "AACA,OAAO,+BAA+B;AAsBtC,MAAM,SAAkF;AAAA,EACtF,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aACE;AAAA,IACF,UAAU,CAAC,wBAAwB,mBAAmB;AAAA,IACtD,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AACV;AAEA,IAAO,iBAAQ;",
|
|
4
|
+
"sourcesContent": ["import type { InjectionWidgetModule } from '@open-mercato/shared/modules/widgets/injection'\nimport AiDealDetailTriggerWidget from './widget.client'\n\n/**\n * Step 5.15 (Phase 3 WS-D) \u2014 Customers Deal detail AiChat injection.\n *\n * Extends the Step 4.10 pattern to a record-level surface. Drops an\n * \"Ask AI\" trigger on the deal detail page (`detail:customers.deal:header`)\n * and opens a sheet embedding\n * `<AiChat agent=\"customers.account_assistant\" pageContext={\u2026} />` with a\n * deal-scoped `pageContext` shape:\n *\n * { view: 'customers.deal.detail',\n * recordType: 'deal',\n * recordId: <dealId>,\n * extra: { stage, pipelineStageId } }\n *\n * Wires the stable conversation id so the Step 5.13\n * `customers.update_deal_stage` mutation tool's idempotency hash stays\n * constant across repeated confirms / retries within the same chat.\n *\n * Feature-gated behind `customers.deals.view` + `ai_assistant.view`.\n */\nconst widget: InjectionWidgetModule<Record<string, unknown>, Record<string, unknown>> = {\n metadata: {\n id: 'customers.injection.ai-deal-detail-trigger',\n title: 'Customers AI Deal Detail Trigger',\n description:\n 'Renders an \"Ask AI\" button in the deal detail header that opens a sheet embedding the customers account assistant with deal-scoped page context.',\n features: ['customers.deals.view', 'ai_assistant.view'],\n requiredModules: ['ai_assistant'],\n priority: 100,\n enabled: true,\n },\n Widget: AiDealDetailTriggerWidget,\n}\n\nexport default widget\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,+BAA+B;AAsBtC,MAAM,SAAkF;AAAA,EACtF,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,aACE;AAAA,IACF,UAAU,CAAC,wBAAwB,mBAAmB;AAAA,IACtD,iBAAiB,CAAC,cAAc;AAAA,IAChC,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA,QAAQ;AACV;AAEA,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
getCoreInjectionWidgets,
|
|
4
4
|
registerCoreInjectionTables,
|
|
5
5
|
getCoreInjectionTables,
|
|
6
|
+
registerEnabledModuleIds,
|
|
7
|
+
getEnabledModuleIds,
|
|
6
8
|
invalidateInjectionWidgetCache,
|
|
7
9
|
loadAllInjectionWidgets,
|
|
8
10
|
loadInjectionDataWidgetById,
|
|
@@ -13,6 +15,7 @@ import {
|
|
|
13
15
|
export {
|
|
14
16
|
getCoreInjectionTables,
|
|
15
17
|
getCoreInjectionWidgets,
|
|
18
|
+
getEnabledModuleIds,
|
|
16
19
|
invalidateInjectionWidgetCache,
|
|
17
20
|
loadAllInjectionWidgets,
|
|
18
21
|
loadInjectionDataWidgetById,
|
|
@@ -20,6 +23,7 @@ export {
|
|
|
20
23
|
loadInjectionWidgetById,
|
|
21
24
|
loadInjectionWidgetsForSpot,
|
|
22
25
|
registerCoreInjectionTables,
|
|
23
|
-
registerCoreInjectionWidgets
|
|
26
|
+
registerCoreInjectionWidgets,
|
|
27
|
+
registerEnabledModuleIds
|
|
24
28
|
};
|
|
25
29
|
//# sourceMappingURL=injection.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/modules/widgets/lib/injection.ts"],
|
|
4
|
-
"sourcesContent": ["// Re-export from shared for backward compatibility\n// New code should import directly from @open-mercato/shared/modules/widgets/injection-loader\nexport {\n registerCoreInjectionWidgets,\n getCoreInjectionWidgets,\n registerCoreInjectionTables,\n getCoreInjectionTables,\n invalidateInjectionWidgetCache,\n loadAllInjectionWidgets,\n loadInjectionDataWidgetById,\n loadInjectionDataWidgetsForSpot,\n loadInjectionWidgetById,\n loadInjectionWidgetsForSpot,\n type LoadedInjectionDataWidget,\n type LoadedInjectionWidget,\n} from '@open-mercato/shared/modules/widgets/injection-loader'\n"],
|
|
5
|
-
"mappings": "AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;",
|
|
4
|
+
"sourcesContent": ["// Re-export from shared for backward compatibility\n// New code should import directly from @open-mercato/shared/modules/widgets/injection-loader\nexport {\n registerCoreInjectionWidgets,\n getCoreInjectionWidgets,\n registerCoreInjectionTables,\n getCoreInjectionTables,\n registerEnabledModuleIds,\n getEnabledModuleIds,\n invalidateInjectionWidgetCache,\n loadAllInjectionWidgets,\n loadInjectionDataWidgetById,\n loadInjectionDataWidgetsForSpot,\n loadInjectionWidgetById,\n loadInjectionWidgetsForSpot,\n type LoadedInjectionDataWidget,\n type LoadedInjectionWidget,\n} from '@open-mercato/shared/modules/widgets/injection-loader'\n"],
|
|
5
|
+
"mappings": "AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/core",
|
|
3
|
-
"version": "0.6.1-develop.
|
|
3
|
+
"version": "0.6.1-develop.3188.1.499d530779",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -237,12 +237,12 @@
|
|
|
237
237
|
"ts-pattern": "^5.0.0"
|
|
238
238
|
},
|
|
239
239
|
"peerDependencies": {
|
|
240
|
-
"@open-mercato/ai-assistant": "0.6.1-develop.
|
|
241
|
-
"@open-mercato/shared": "0.6.1-develop.
|
|
240
|
+
"@open-mercato/ai-assistant": "0.6.1-develop.3188.1.499d530779",
|
|
241
|
+
"@open-mercato/shared": "0.6.1-develop.3188.1.499d530779"
|
|
242
242
|
},
|
|
243
243
|
"devDependencies": {
|
|
244
|
-
"@open-mercato/ai-assistant": "0.6.1-develop.
|
|
245
|
-
"@open-mercato/shared": "0.6.1-develop.
|
|
244
|
+
"@open-mercato/ai-assistant": "0.6.1-develop.3188.1.499d530779",
|
|
245
|
+
"@open-mercato/shared": "0.6.1-develop.3188.1.499d530779",
|
|
246
246
|
"@testing-library/dom": "^10.4.1",
|
|
247
247
|
"@testing-library/jest-dom": "^6.9.1",
|
|
248
248
|
"@testing-library/react": "^16.3.1",
|
|
@@ -27,6 +27,7 @@ const widget: InjectionWidgetModule<Record<string, unknown>, Record<string, unkn
|
|
|
27
27
|
description:
|
|
28
28
|
'Renders an "Ask AI" button in the people list header that opens a sheet embedding the customers account assistant.',
|
|
29
29
|
features: ['customers.people.view', 'ai_assistant.view'],
|
|
30
|
+
requiredModules: ['ai_assistant'],
|
|
30
31
|
priority: 100,
|
|
31
32
|
enabled: true,
|
|
32
33
|
},
|
|
@@ -28,6 +28,7 @@ const widget: InjectionWidgetModule<Record<string, unknown>, Record<string, unkn
|
|
|
28
28
|
description:
|
|
29
29
|
'Renders an "Ask AI" button in the deal detail header that opens a sheet embedding the customers account assistant with deal-scoped page context.',
|
|
30
30
|
features: ['customers.deals.view', 'ai_assistant.view'],
|
|
31
|
+
requiredModules: ['ai_assistant'],
|
|
31
32
|
priority: 100,
|
|
32
33
|
enabled: true,
|
|
33
34
|
},
|