limixbot 0.3.101 → 0.3.103
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/assets/{ActivityPanel-DZZgXWgd.js → ActivityPanel-DdSZ8OXc.js} +1 -1
- package/dist/assets/{App-D24ELMyP.js → App-ftB4PetT.js} +123 -122
- package/dist/assets/{AppEventEditor-BFkEZazQ.js → AppEventEditor-B7KR7gbZ.js} +1 -1
- package/dist/assets/{BotSettingsDialog-BNDFheN0.js → BotSettingsDialog-BntQ38tC.js} +4 -4
- package/dist/assets/{BrowserPanel-BVvlCdxG.js → BrowserPanel-B8zEv2yz.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-CQVN08cF.js → BrowserProfilesManager-eHlKAUFP.js} +1 -1
- package/dist/assets/{CloudAddDialog-BqehN1pz.js → CloudAddDialog-u5oxANAD.js} +1 -1
- package/dist/assets/{ComputerFilesPane-C8Xj3lsj.js → ComputerFilesPane-CyG5dv52.js} +1 -1
- package/dist/assets/{ComputerPanel-BfyIIg7u.js → ComputerPanel-BUjqykLD.js} +2 -2
- package/dist/assets/{DataPanel-CkOWtMCr.js → DataPanel-DWJbbJNX.js} +1 -1
- package/dist/assets/{DesktopViewer-PXMs_Z3h.js → DesktopViewer-CfXOdLV9.js} +1 -1
- package/dist/assets/{GrokMoveDialog-B3PuFwiJ.js → GrokMoveDialog-Cj5HG8AL.js} +1 -1
- package/dist/assets/{InspectorPanel-BCiZLdqU.js → InspectorPanel-CaOmVE1M.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-ffycwWVV.js → KeyboardShortcutsModal-kspIwkDg.js} +1 -1
- package/dist/assets/{LimixResizeHandles-CtazDkY7.js → LimixResizeHandles-SzYhwKNE.js} +1 -1
- package/dist/assets/{LiveDesktop-CJWerWq1.js → LiveDesktop-D3CJ56hW.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-CrdC3MmK.js → LocalVmWorkspace-DEAykEFC.js} +1 -1
- package/dist/assets/{MacLocalControl-Bcdg_u2n.js → MacLocalControl-C1f-JAvN.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-C-XNLE3e.js → MarkdownFilePreview-BkZMg8ux.js} +1 -1
- package/dist/assets/{MenuMotion-BclWiAVe.js → MenuMotion-y3_mgPH0.js} +1 -1
- package/dist/assets/{NewBotDialog-CI3c7n9d.js → NewBotDialog-DUlssZFn.js} +1 -1
- package/dist/assets/{PhoneAppDialog-CR-LtOHi.js → PhoneAppDialog-jl-A35lD.js} +1 -1
- package/dist/assets/{PlacesRail-DyYA64do.js → PlacesRail-Be4MJsKP.js} +1 -1
- package/dist/assets/{PluginsPanel-79V2kP_5.js → PluginsPanel-9DDdusDH.js} +1 -1
- package/dist/assets/{ProIntroduction-BgEaTCd1.js → ProIntroduction-DRl6O52f.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-CpJDLN6F.js → RemoteAgentSettingsPanel-DNUP5pZq.js} +1 -1
- package/dist/assets/{RoomPanel-ByAT8CqS.js → RoomPanel-DAvyN5bX.js} +1 -1
- package/dist/assets/{RoutinesPage-CA1__NjC.js → RoutinesPage-ByrijqT9.js} +2 -2
- package/dist/assets/{SettingsModal-DAymc03s.js → SettingsModal-DhldX0LY.js} +1 -1
- package/dist/assets/{ShareTeamDialog-Dr7BcuEX.js → ShareTeamDialog-hRc_SYb6.js} +1 -1
- package/dist/assets/{SignedInSites-C-DP_jaP.js → SignedInSites-BxJ2YKXx.js} +1 -1
- package/dist/assets/TeamLibraryPanel-CC_SkTIo.js +3 -0
- package/dist/assets/{TeamMapPage-DZlNjWAA.js → TeamMapPage-DAfSlcPu.js} +1 -1
- package/dist/assets/{TriggersPage-CF1DnXkj.js → TriggersPage-Bipd1gYY.js} +1 -1
- package/dist/assets/{VisibilitySection-DnGXDssr.js → VisibilitySection-DbJ_5rwD.js} +1 -1
- package/dist/assets/{WebhookTrigger-CyF3M1mk.js → WebhookTrigger-aLhrK-YU.js} +1 -1
- package/dist/assets/{WorksOnGrid-D195VW8K.js → WorksOnGrid-u1rPeHHO.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-CKc5IYc4.js → abnfDiagram-YUKMZFIV-ChcWlNpY.js} +1 -1
- package/dist/assets/{activity-CwaOixB9.js → activity-SfzB9gft.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-BzQ3blap.js → architectureDiagram-47P4ROYG-DVoUFfCS.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-Cg5etqDi.js → blockDiagram-E7TT5TSB-DqPV7RMZ.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-ChJTr_PL.js → c4Diagram-CRA5TL53-BGmVwlFz.js} +1 -1
- package/dist/assets/{calendar-days-DYBafFRo.js → calendar-days-D3-4I6P4.js} +1 -1
- package/dist/assets/channel-BeYKH3lV.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-DwRap1YG.js → chunk-2Q5K7J3B-B1ypkJ8E.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-BO6BTUz7.js → chunk-5VM5RSS4-CcV9LLDc.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-B2VKEfok.js → chunk-7TKQ45FW-BIxUGZLZ.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-C7vsX4VD.js → chunk-AW2ZBBNX-BeDhUW76.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-CIjSXjvq.js → chunk-FVRAUYC3-ChrQXxWu.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-CCWLt9W1.js → chunk-HTAEGDNF-CoqYrJ09.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-CYUijN37.js → chunk-JWPE2WC7-x_G8N4UY.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-D0cFTyVc.js → chunk-KQW6MTUR-BNgvE0Zx.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-CE20wx8I.js → chunk-XXDRQBXY-B6XLUBJo.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-QBcA1FUG.js → classDiagram-v2-K4WV4PDN-DBiYaY2I.js} +1 -1
- package/dist/assets/{coins-CQDndxZe.js → coins-DkeI1D3d.js} +1 -1
- package/dist/assets/{core-D0gGNfT3.js → core-Bc6arvu2.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-CPygoF45.js → cose-bilkent-JH36ORCC-DcXcgm4G.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-DjRSXXUK.js → cynefin-EF2NZ3EQ-D4661Ow3.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-C4D5WdA1.js → cynefinDiagram-3GCD6N5R-D9JCrRjr.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-CwHowYoX.js → dagre-W4DXFKR2-D7uDOym_.js} +1 -1
- package/dist/assets/de-CrO5MppH.js +8 -0
- package/dist/assets/{diagram-2UJZ2QOL-IOgxIe2m.js → diagram-2UJZ2QOL-C1DYfm72.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-6M2t3aC-.js → diagram-OVF4WLC6-C-nti_Wz.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-C3MDtWX5.js → diagram-PFPMY2P6-B9JKIvnW.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-CpXR83ix.js → diagram-UMYRVEAY-B3XBHAVr.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-DF58kzII.js → diagram-YEKJPTXX-R_DeJtDT.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-BTWYDC1S.js → diagram-ZIFT7M5P-ClA3xuGy.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-DWMxXTtf.js → ebnfDiagram-VR2GEFS7-D3DyL10J.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-ZDF01LK0.js → elk-IJKZMXRS-NoFnL8PW.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-DKeRGnUv.js → erDiagram-O2IAPWRE-BPyOLz1a.js} +1 -1
- package/dist/assets/es-bnXYOspp.js +6 -0
- package/dist/assets/{file-up-Cr20e4wl.js → file-up-BV8p1OPd.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-BTJVRu9A.js → flowDiagram-OXPTDLAJ-CdHiMknj.js} +1 -1
- package/dist/assets/fr-Drpg1nRS.js +8 -0
- package/dist/assets/{ganttDiagram-R7TSEDQI-BrBIiPkW.js → ganttDiagram-R7TSEDQI-B3qyDG4d.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-xBYIjsc8.js → gitGraphDiagram-XJZIOB7I-CN5_yp8t.js} +1 -1
- package/dist/assets/hi-hKAbiCLa.js +1 -0
- package/dist/assets/{import-name-CdyBVR45.js → import-name-baZlXmGk.js} +1 -1
- package/dist/assets/{index-DwYETevf.js → index-BZfn5_k5.js} +3 -3
- package/dist/assets/{index-ShhUWigV.js → index-CyrxXrGh.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-B-FCUMEX.js → infoDiagram-5W2HQ5XZ-C1awaPUj.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-DxhcI9nM.js → ishikawaDiagram-K3B6WC7H-DcG1GTWM.js} +1 -1
- package/dist/assets/it-D6cE_lzY.js +13 -0
- package/dist/assets/ja-5lJcngPy.js +13 -0
- package/dist/assets/{journeyDiagram-COXZFDF6-DSwqQn-4.js → journeyDiagram-COXZFDF6-B-T-4Ss2.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-Bidc1dLu.js → kanban-definition-P3RFRI5V-DhgMKb1S.js} +1 -1
- package/dist/assets/ko-IP18hNxI.js +13 -0
- package/dist/assets/{mcp-servers-scq4KvN-.js → mcp-servers-BFkC95ER.js} +1 -1
- package/dist/assets/{mermaid.core-1-GuV68k.js → mermaid.core-C0Ni5l0v.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-BtlXbTTm.js → mindmap-definition-LZFPQGKD-CljImffi.js} +1 -1
- package/dist/assets/{minimize-CoPseS7J.js → minimize-CkQHJV84.js} +1 -1
- package/dist/assets/{monitor-B9eyPPw6.js → monitor-D_UAFHyW.js} +1 -1
- package/dist/assets/new-bot-peJFipB7.js +2 -0
- package/dist/assets/{org-library-CyWov7QW.js → org-library-Br6VR8QD.js} +1 -1
- package/dist/assets/{package-format-Dx-xCjWb.js → package-format-CPaz8LNO.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-uFZWnUng.js → pegDiagram-BGZESJAR-CgnU1Ac1.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-B2Itft-D.js → pieDiagram-CAPJLFHJ-BJmtZCJF.js} +1 -1
- package/dist/assets/pl-s3VOXZNa.js +13 -0
- package/dist/assets/pt-br-WeqOetEr.js +13 -0
- package/dist/assets/{quadrantDiagram-GDMTTRAM-Btivs4tR.js → quadrantDiagram-GDMTTRAM-Dqg3HXnH.js} +1 -1
- package/dist/assets/{rail-ar9TQRSE.js → rail-Bi4B37ED.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-92CU8YQH.js → railroadDiagram-SM67HX2B-Dh4hx5Fo.js} +1 -1
- package/dist/assets/{remote-desktop-panel-BrVUx9qj.js → remote-desktop-panel-DRsUOxPA.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-5izSc7xN.js → requirementDiagram-X7JNWC4A-DoDrImJb.js} +1 -1
- package/dist/assets/ru-xPDlIHlb.js +13 -0
- package/dist/assets/{sankeyDiagram-UM26HJRW-DPnrZSB2.js → sankeyDiagram-UM26HJRW-4kxKCZbK.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-Bda0M6Hv.js → sequenceDiagram-ZO4K6R2Y-Dfn3sj5H.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-DKRN8tPD.js → sizeCapture-INFHLROL-e4etpscL.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-D6MqFrrx.js → stateDiagram-v2-TBUQTH76-CiH2EjAT.js} +1 -1
- package/dist/assets/{styles-DOwrpvZY.js → styles-BC55IU1j.js} +2 -2
- package/dist/assets/{swimlanes-N4OXWK64-D_pFpyCW.js → swimlanes-N4OXWK64-elz4HcrR.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-C2oR937G.js +8 -0
- package/dist/assets/{team-share-CS8lXIGF.js → team-share-CVGnlnZg.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-CsXwhMm7.js → timeline-definition-YOQAKGHF-CBvNtqBT.js} +1 -1
- package/dist/assets/tr-D52N3H-s.js +6 -0
- package/dist/assets/uk-BgibvZRE.js +1 -0
- package/dist/assets/{usecaseDiagram-VIAY4XPW-XU2vytSZ.js → usecaseDiagram-VIAY4XPW-Cqnlu-5K.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-beqZKO-E.js → vennDiagram-BLWOH2XV-B1DVqqPC.js} +1 -1
- package/dist/assets/vi-Dtr5uxBT.js +15 -0
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-Ci5sPNvX.js → wardleyDiagram-YMQ3BMBF-CQPngjvL.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-BCJ2N2BY.js → xychartDiagram-TAQBALBS-Djna4qxy.js} +1 -1
- package/dist/assets/zh-Cr6ncAKb.js +13 -0
- package/dist/assets/zh-tw-BhYWJRt3.js +13 -0
- package/dist/index.html +2 -2
- package/dist/rail.html +4 -4
- package/dist-server/index.js +90 -82
- package/dist-server/package.json +1 -1
- package/dist-server/server/bot-channels/engine.js +51 -22
- package/dist-server/server/industry-care.js +4 -3
- package/dist-server/server/industry-teams.js +3 -3
- package/dist-server/server/limix-skill-store.js +7 -1
- package/dist-server/server/package-import.js +1 -1
- package/dist-server/server/routes/bots-create.js +12 -1
- package/dist-server/shared/industry-templates.js +4 -0
- package/dist-server/shared/ready-bots.js +15 -0
- package/package.json +1 -1
- package/skills/industry-auto-repair/SKILL.md +32 -0
- package/skills/industry-auto-repair/assets/hybrid-policy.json +10 -0
- package/skills/industry-auto-repair/manifest.json +18 -0
- package/skills/industry-auto-repair/references/vi.md +17 -0
- package/skills/industry-beauty-spa/SKILL.md +32 -0
- package/skills/industry-beauty-spa/assets/hybrid-policy.json +10 -0
- package/skills/industry-beauty-spa/manifest.json +18 -0
- package/skills/industry-beauty-spa/references/vi.md +17 -0
- package/skills/industry-education/SKILL.md +32 -0
- package/skills/industry-education/assets/hybrid-policy.json +10 -0
- package/skills/industry-education/manifest.json +18 -0
- package/skills/industry-education/references/vi.md +17 -0
- package/skills/industry-food-beverage/SKILL.md +32 -0
- package/skills/industry-food-beverage/assets/hybrid-policy.json +10 -0
- package/skills/industry-food-beverage/manifest.json +18 -0
- package/skills/industry-food-beverage/references/vi.md +17 -0
- package/skills/industry-home-services/SKILL.md +32 -0
- package/skills/industry-home-services/assets/hybrid-policy.json +10 -0
- package/skills/industry-home-services/manifest.json +18 -0
- package/skills/industry-home-services/references/vi.md +17 -0
- package/skills/industry-hospitality-travel/SKILL.md +32 -0
- package/skills/industry-hospitality-travel/assets/hybrid-policy.json +10 -0
- package/skills/industry-hospitality-travel/manifest.json +18 -0
- package/skills/industry-hospitality-travel/references/vi.md +17 -0
- package/skills/industry-logistics/SKILL.md +32 -0
- package/skills/industry-logistics/assets/hybrid-policy.json +10 -0
- package/skills/industry-logistics/manifest.json +18 -0
- package/skills/industry-logistics/references/vi.md +17 -0
- package/skills/industry-real-estate/SKILL.md +32 -0
- package/skills/industry-real-estate/assets/hybrid-policy.json +10 -0
- package/skills/industry-real-estate/manifest.json +18 -0
- package/skills/industry-real-estate/references/vi.md +17 -0
- package/skills/industry-retail-ecommerce/SKILL.md +32 -0
- package/skills/industry-retail-ecommerce/assets/hybrid-policy.json +10 -0
- package/skills/industry-retail-ecommerce/manifest.json +18 -0
- package/skills/industry-retail-ecommerce/references/vi.md +17 -0
- package/skills/industry-wholesale-distribution/SKILL.md +32 -0
- package/skills/industry-wholesale-distribution/assets/hybrid-policy.json +10 -0
- package/skills/industry-wholesale-distribution/manifest.json +18 -0
- package/skills/industry-wholesale-distribution/references/vi.md +17 -0
- package/skills/video-workflow/SKILL.md +26 -0
- package/skills/video-workflow/assets/hybrid-policy.json +10 -0
- package/skills/video-workflow/assets/starter/build.svrun +5 -0
- package/skills/video-workflow/assets/starter/main.svml +24 -0
- package/skills/video-workflow/assets/starter/package.json +1 -0
- package/skills/video-workflow/assets/starter/style.svs +4 -0
- package/skills/video-workflow/manifest.json +19 -0
- package/skills/video-workflow/references/vi.md +13 -0
- package/dist/assets/TeamLibraryPanel-CI8JZtpN.js +0 -3
- package/dist/assets/channel-DI8VRWh8.js +0 -1
- package/dist/assets/de-XojPh3_p.js +0 -8
- package/dist/assets/es-C0MD2HR1.js +0 -6
- package/dist/assets/fr-hktiWwtw.js +0 -8
- package/dist/assets/hi-D_Yu59YK.js +0 -1
- package/dist/assets/it-zbTil6cI.js +0 -13
- package/dist/assets/ja-CtqaLHju.js +0 -13
- package/dist/assets/ko-DrT-vz1y.js +0 -13
- package/dist/assets/new-bot-CNLntcgn.js +0 -2
- package/dist/assets/pl-BaR1MZm6.js +0 -13
- package/dist/assets/pt-br-mFy7aZD6.js +0 -13
- package/dist/assets/ru-BJ0ARJtn.js +0 -13
- package/dist/assets/swimlanesDiagram-K3J5GTZL-D6oFbwqj.js +0 -8
- package/dist/assets/tr-DnXBUn9-.js +0 -6
- package/dist/assets/uk-RZHdJ2pL.js +0 -1
- package/dist/assets/vi-Bx9YsUag.js +0 -15
- package/dist/assets/zh-DMiI3Rx1.js +0 -13
- package/dist/assets/zh-tw-DoGBLWPr.js +0 -13
|
@@ -32,7 +32,7 @@ const mediaSchema = z.discriminatedUnion("kind", [
|
|
|
32
32
|
const inboxSchema = z.object({
|
|
33
33
|
id: z.string(), chatId: z.string(), from: z.object({ id: z.string(), name: z.string() }),
|
|
34
34
|
text: z.string(), direct: z.boolean(), media: z.boolean().optional(),
|
|
35
|
-
downloading: z.boolean().optional(), attachment: mediaSchema.optional(), owner: z.boolean(),
|
|
35
|
+
downloading: z.boolean().optional(), attachment: mediaSchema.optional(), owner: z.boolean(), grant: z.string().optional(),
|
|
36
36
|
started: z.boolean().optional(),
|
|
37
37
|
result: z.object({ reply: z.string(), attachments: z.array(mediaSchema).optional() }).optional(),
|
|
38
38
|
sent: z.number().int().min(0).optional(),
|
|
@@ -45,7 +45,8 @@ const botSchema = z.object({
|
|
|
45
45
|
access: z.enum(["owner", "everyone"]).default("owner"),
|
|
46
46
|
groupMentions: z.boolean().optional(),
|
|
47
47
|
owner: z.object({ id: z.union([z.string(), z.number()]).transform(String), name: z.string() }).optional(),
|
|
48
|
-
|
|
48
|
+
admins: z.array(z.object({ id: z.string(), name: z.string(), grant: z.string() })).default([]),
|
|
49
|
+
link: z.object({ role: z.enum(["owner", "admin"]).optional(), hash: z.string(), expiresAt: z.number() }).optional(),
|
|
49
50
|
offset: z.number().default(0),
|
|
50
51
|
chats: z.record(z.string(), z.string()).default({}),
|
|
51
52
|
error: z.string().optional(),
|
|
@@ -53,6 +54,13 @@ const botSchema = z.object({
|
|
|
53
54
|
recent: z.record(z.string(), z.number()).default({}),
|
|
54
55
|
});
|
|
55
56
|
const fileSchema = z.object({ v: z.literal(1), bots: z.record(z.string(), botSchema) });
|
|
57
|
+
function privateGrant(adapter, entry, message) {
|
|
58
|
+
if (!entry?.enabled || !message.direct || adapter.guestsOnly)
|
|
59
|
+
return undefined;
|
|
60
|
+
if (entry.owner?.id === message.from.id)
|
|
61
|
+
return "owner";
|
|
62
|
+
return entry.admins.find(admin => admin.id === message.from.id)?.grant;
|
|
63
|
+
}
|
|
56
64
|
const text = (label) => ({
|
|
57
65
|
start: `Chào bạn! Đây là bot Limix. Nhắn tin để trò chuyện. Chủ bot: gửi /link MÃ để liên kết.`,
|
|
58
66
|
linked: "Đã liên kết. Từ giờ bạn nhắn ở đây như nhắn trong app Limix.",
|
|
@@ -228,8 +236,8 @@ export function createBotChannels(deps) {
|
|
|
228
236
|
log(`${adapter.kind}: send failed (${failure(error)})`);
|
|
229
237
|
}
|
|
230
238
|
}
|
|
231
|
-
async function askWhenReady(botId, input, signal, onQueue) {
|
|
232
|
-
while (!signal.aborted) {
|
|
239
|
+
async function askWhenReady(botId, input, signal, onQueue, authorized) {
|
|
240
|
+
while (!signal.aborted && authorized()) {
|
|
233
241
|
try {
|
|
234
242
|
return await deps.ask(botId, input);
|
|
235
243
|
}
|
|
@@ -255,9 +263,10 @@ export function createBotChannels(deps) {
|
|
|
255
263
|
}
|
|
256
264
|
async function deliverResult(adapter, botId, id, message, signal) {
|
|
257
265
|
const lane = `${adapter.kind}:${botId}`;
|
|
266
|
+
const authorized = () => !message.owner || privateGrant(adapter, read(adapter.kind).bots[botId], message) === (message.grant ?? "owner");
|
|
258
267
|
const result = message.result;
|
|
259
268
|
let sent = message.sent ?? 0;
|
|
260
|
-
while (!signal.aborted) {
|
|
269
|
+
while (!signal.aborted && authorized()) {
|
|
261
270
|
const session = sessions.get(lane);
|
|
262
271
|
if (!session) {
|
|
263
272
|
await sleep(BUSY_RETRY_MS, signal);
|
|
@@ -270,13 +279,13 @@ export function createBotChannels(deps) {
|
|
|
270
279
|
try {
|
|
271
280
|
const file = media[sent];
|
|
272
281
|
await paced(adapter, botId, () => {
|
|
273
|
-
if (signal.aborted || sessions.get(lane) !== session)
|
|
282
|
+
if (signal.aborted || !authorized() || sessions.get(lane) !== session)
|
|
274
283
|
throw new ChannelError("drop", "Connection changed");
|
|
275
284
|
return file ? session.sendMedia(message.chatId, file) : session.send(message.chatId, parts[sent - media.length]);
|
|
276
285
|
});
|
|
277
286
|
}
|
|
278
287
|
catch (error) {
|
|
279
|
-
if (signal.aborted)
|
|
288
|
+
if (signal.aborted || !authorized())
|
|
280
289
|
return;
|
|
281
290
|
if (sessions.get(lane) !== session || error instanceof ChannelError && error.reason === "retry") {
|
|
282
291
|
await sleep(BACKOFF_MS[0], signal);
|
|
@@ -311,17 +320,26 @@ export function createBotChannels(deps) {
|
|
|
311
320
|
const ok = entry.link && entry.link.expiresAt > now() && code && timingSafeEqual(Buffer.from(hashCode(code)), Buffer.from(entry.link.hash));
|
|
312
321
|
if (!ok)
|
|
313
322
|
return void await send(say.badCode);
|
|
314
|
-
patch(kind, botId, (current) => {
|
|
323
|
+
patch(kind, botId, (current) => {
|
|
324
|
+
const { link, ...rest } = current;
|
|
325
|
+
const person = { id: message.from.id, name: message.from.name };
|
|
326
|
+
if (current.owner?.id === person.id || current.admins.some(admin => admin.id === person.id))
|
|
327
|
+
return rest;
|
|
328
|
+
if (!current.owner && link?.role !== "admin")
|
|
329
|
+
return { ...rest, owner: person };
|
|
330
|
+
return { ...rest, admins: [...current.admins, { ...person, grant: randomBytes(16).toString("hex") }] };
|
|
331
|
+
});
|
|
315
332
|
return void await send(say.linked);
|
|
316
333
|
}
|
|
317
|
-
const
|
|
318
|
-
|
|
334
|
+
const grant = privateGrant(adapter, entry, message);
|
|
335
|
+
const owner = !!grant && (saved?.row.owner ?? true);
|
|
336
|
+
const authorized = () => !saved?.row.owner || privateGrant(adapter, read(kind).bots[botId], message) === (saved.row.grant ?? "owner");
|
|
337
|
+
if (!authorized())
|
|
319
338
|
return;
|
|
320
|
-
const owner = isOwner && (saved?.row.owner ?? true);
|
|
321
339
|
const allowsGuest = acceptGuest(kind, entry, message);
|
|
322
340
|
if (!owner && !allowsGuest)
|
|
323
341
|
return message.direct && !adapter.quietToStrangers ? void await send(say.ownerOnly) : undefined;
|
|
324
|
-
const conversation = message.direct ? message.chatId : `${message.chatId}:${message.from.id}`;
|
|
342
|
+
const conversation = owner && grant !== "owner" ? JSON.stringify(["admin", grant, message.chatId]) : message.direct ? message.chatId : `${message.chatId}:${message.from.id}`;
|
|
325
343
|
if (command?.[1] === "new") {
|
|
326
344
|
patch(kind, botId, (current) => { const chats = { ...current.chats }; delete chats[conversation]; return { ...current, chats }; });
|
|
327
345
|
return void await send(say.fresh);
|
|
@@ -359,11 +377,11 @@ export function createBotChannels(deps) {
|
|
|
359
377
|
if (!signal.aborted)
|
|
360
378
|
patch(kind, botId, (current) => ({ ...current, chats: { ...current.chats, [conversation]: threadId } }));
|
|
361
379
|
},
|
|
362
|
-
approval() { if (!signal.aborted)
|
|
380
|
+
approval() { if (!signal.aborted && authorized())
|
|
363
381
|
void send(say.approval); },
|
|
364
382
|
},
|
|
365
|
-
}, signal, saved.queued);
|
|
366
|
-
if (!answer || signal.aborted)
|
|
383
|
+
}, signal, saved.queued, authorized);
|
|
384
|
+
if (!answer || signal.aborted || !authorized())
|
|
367
385
|
return;
|
|
368
386
|
patch(kind, botId, (current) => ({ ...current, chats: { ...current.chats, [conversation]: answer.threadId } }));
|
|
369
387
|
const attachments = answer.attachments;
|
|
@@ -399,9 +417,10 @@ export function createBotChannels(deps) {
|
|
|
399
417
|
if (link && adapter.guestsOnly)
|
|
400
418
|
return;
|
|
401
419
|
const command = link || !message.media && /^\/start(?:@\w+)?$/.test(message.text.trim());
|
|
402
|
-
const
|
|
420
|
+
const grant = privateGrant(adapter, entry, message);
|
|
421
|
+
const owner = !!grant;
|
|
403
422
|
const eligible = (owner || acceptGuest(kind, entry, message)) && !command && (message.text.trim() || message.loadMedia);
|
|
404
|
-
const row = restored ?? (eligible ? inboxSchema.parse({ ...message, owner, downloading: Boolean(message.loadMedia) }) : undefined);
|
|
423
|
+
const row = restored ?? (eligible ? inboxSchema.parse({ ...message, owner, grant, downloading: Boolean(message.loadMedia) }) : undefined);
|
|
405
424
|
if (!row && !firstSight(`${chat}:${id}`))
|
|
406
425
|
return;
|
|
407
426
|
if (row && !restored)
|
|
@@ -520,6 +539,7 @@ export function createBotChannels(deps) {
|
|
|
520
539
|
connected: true, username: entry.username, name: entry.name, enabled: entry.enabled, access: entry.access,
|
|
521
540
|
...(kind === "zalo" ? { groupMentions: entry.groupMentions ?? entry.access === "everyone" } : {}),
|
|
522
541
|
...(entry.owner ? { owner: entry.owner.name } : {}),
|
|
542
|
+
...(entry.admins.length ? { admins: entry.admins.map(({ id, name }) => ({ id, name })) } : {}),
|
|
523
543
|
...(entry.link && entry.link.expiresAt > now() ? { linkExpiresAt: entry.link.expiresAt } : {}),
|
|
524
544
|
...(entry.error ? { error: entry.error } : {}),
|
|
525
545
|
...(login ? { login } : {}),
|
|
@@ -535,7 +555,7 @@ export function createBotChannels(deps) {
|
|
|
535
555
|
data.bots[botId] = botSchema.parse({
|
|
536
556
|
sealed: seal(secret), username: account.username, name: account.name, enabled: true, access: kept?.access ?? (adapter.guestsOnly ? "everyone" : "owner"),
|
|
537
557
|
groupMentions: kept?.groupMentions,
|
|
538
|
-
...(sameAccount && kept.owner ? { owner: kept.owner } : {}), offset: sameAccount ? kept.offset : 0, chats: sameAccount ? kept.chats : {},
|
|
558
|
+
...(sameAccount && kept.owner ? { owner: kept.owner } : {}), admins: sameAccount ? kept.admins : [], offset: sameAccount ? kept.offset : 0, chats: sameAccount ? kept.chats : {},
|
|
539
559
|
inbox: sameAccount ? kept.inbox : {}, recent: sameAccount ? kept.recent : {},
|
|
540
560
|
});
|
|
541
561
|
write(kind, data);
|
|
@@ -559,7 +579,7 @@ export function createBotChannels(deps) {
|
|
|
559
579
|
.catch((error) => { if (live() && !abort.signal.aborted)
|
|
560
580
|
current.state = { error: failure(error) }; });
|
|
561
581
|
}
|
|
562
|
-
const PATH = /^\/api\/bots\/([\w-]{1,128})\/(telegram|discord|zalo|facebook|messenger)(?:\/(link|unlink|login))?$/;
|
|
582
|
+
const PATH = /^\/api\/bots\/([\w-]{1,128})\/(telegram|discord|zalo|facebook|messenger)(?:\/(link|unlink|login|remove-admin))?$/;
|
|
563
583
|
const changeSchema = z.object({ token: z.string().max(400).optional(), enabled: z.boolean().optional(), access: z.enum(["owner", "everyone"]).optional(), groupMentions: z.boolean().optional() }).strict();
|
|
564
584
|
const routes = async ({ req, res, path, method, auth, json, readBody }) => {
|
|
565
585
|
const match = PATH.exec(path);
|
|
@@ -593,14 +613,23 @@ export function createBotChannels(deps) {
|
|
|
593
613
|
return json(res, 202, view(kind, botId));
|
|
594
614
|
}
|
|
595
615
|
if (action === "link") {
|
|
616
|
+
if (adapters.get(kind).guestsOnly)
|
|
617
|
+
return json(res, 400, { error: "Guest-only channel" });
|
|
596
618
|
if (!read(kind).bots[botId])
|
|
597
619
|
return json(res, 409, { error: `Kết nối ${adapters.get(kind).label} trước.` });
|
|
598
|
-
const code = randomBytes(
|
|
599
|
-
patch(kind, botId, (current) => ({ ...current, link: { hash: hashCode(code), expiresAt: now() + LINK_MS } }));
|
|
620
|
+
const code = randomBytes(8).toString("hex").toUpperCase();
|
|
621
|
+
patch(kind, botId, (current) => ({ ...current, link: { role: current.owner ? "admin" : "owner", hash: hashCode(code), expiresAt: now() + LINK_MS } }));
|
|
600
622
|
return json(res, 200, { code, ...view(kind, botId) });
|
|
601
623
|
}
|
|
624
|
+
if (action === "remove-admin") {
|
|
625
|
+
const input = z.object({ id: z.string().min(1) }).strict().safeParse(await readBody(req));
|
|
626
|
+
if (!input.success)
|
|
627
|
+
return json(res, 400, { error: "Invalid administrator ID" });
|
|
628
|
+
patch(kind, botId, current => ({ ...current, admins: current.admins.filter(admin => admin.id !== input.data.id) }));
|
|
629
|
+
return json(res, 200, view(kind, botId));
|
|
630
|
+
}
|
|
602
631
|
if (action === "unlink") {
|
|
603
|
-
patch(kind, botId, (current) => { const { owner: _gone, ...rest } = current; return rest; });
|
|
632
|
+
patch(kind, botId, (current) => { const { owner: _gone, link: _cancelled, ...rest } = current; return rest; });
|
|
604
633
|
return json(res, 200, view(kind, botId));
|
|
605
634
|
}
|
|
606
635
|
const parsed = changeSchema.safeParse(await readBody(req));
|
|
@@ -9,7 +9,7 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { join, resolve } from "node:path";
|
|
11
11
|
import { pathToFileURL } from "node:url";
|
|
12
|
-
import { INDUSTRY_CARE_SERVER, INDUSTRY_CARE_SKILL } from "../shared/industry-templates.js";
|
|
12
|
+
import { industrySkillsForTemplate, INDUSTRY_CARE_SERVER, INDUSTRY_CARE_SKILL } from "../shared/industry-templates.js";
|
|
13
13
|
import { allowsTool, canUseMcpServer } from "../shared/tool-scope.js";
|
|
14
14
|
import { DATA_DIR } from "./config.js";
|
|
15
15
|
import { bundledPicks, limixBundledSwitch } from "./limix-skill-store.js";
|
|
@@ -22,8 +22,9 @@ function careLocation(botId) {
|
|
|
22
22
|
entry: resolve(process.env.OMB_SKILLS_DIR || "skills", INDUSTRY_CARE_SKILL, "scripts", "care.mjs"),
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
export function enableIndustryCare(botId) {
|
|
26
|
-
|
|
25
|
+
export function enableIndustryCare(botId, templateId = INDUSTRY_CARE_SKILL) {
|
|
26
|
+
const skills = industrySkillsForTemplate(templateId);
|
|
27
|
+
if (!existsSync(careLocation(botId).entry) || !skills.length || skills.some(id => limixBundledSwitch(botId, id, true)?.status !== 200)) {
|
|
27
28
|
throw new Error("Thiếu bộ công cụ CSKH trong bản cài Limix Bot.");
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { industryTeamLabel, industryWords } from "../shared/industry-display.js";
|
|
2
2
|
import { INDUSTRY_PROFILES } from "../shared/industry-profiles.js";
|
|
3
|
-
import { industryRoleBot, industryTemplate, INDUSTRY_CARE_SKILL } from "../shared/industry-templates.js";
|
|
3
|
+
import { industryRoleBot, industrySkillsForTemplate, industryTemplate, INDUSTRY_CARE_SKILL } from "../shared/industry-templates.js";
|
|
4
4
|
import { parsePackageDocument } from "../shared/package-format.js";
|
|
5
5
|
const teamSlug = (profile) => `industry-${profile.slug}`;
|
|
6
6
|
export const industryTeamCatalog = INDUSTRY_PROFILES.map((profile) => ({
|
|
7
|
-
slug: teamSlug(profile), ...industryTeamLabel(profile), members: profile.roles.length + 1, skills:
|
|
7
|
+
slug: teamSlug(profile), ...industryTeamLabel(profile), members: profile.roles.length + 1, skills: industrySkillsForTemplate(teamSlug(profile)),
|
|
8
8
|
requires: { apps: [] }, manifest: `/api/team-library/teams/${teamSlug(profile)}`, builtIn: true,
|
|
9
9
|
}));
|
|
10
10
|
export function industryTeam(slug, locale = "en") {
|
|
@@ -31,7 +31,7 @@ export function industryTeam(slug, locale = "en") {
|
|
|
31
31
|
return parsePackageDocument({
|
|
32
32
|
format: "openmaus.package", version: 2,
|
|
33
33
|
package: {
|
|
34
|
-
id: slug, release: "1.
|
|
34
|
+
id: slug, release: "1.1.0", name: label.name, tagline: label.summary, summary: label.summary,
|
|
35
35
|
category: label.category, author: { name: "Limix Bot" }, license: "Apache-2.0",
|
|
36
36
|
outcomes: [words.supportDescription], setupMinutes: 5,
|
|
37
37
|
requirements: { apps: [], capabilities: [] },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { INDUSTRY_PROFILES } from "../shared/industry-profiles.js";
|
|
1
2
|
// Limix Bot: skills are chosen per bot. A new bot starts with only Limix's core skills (learning new skills, reading
|
|
2
3
|
// links with Agent Reach, operating Windows, the phone helpers) plus the skills it learns itself; everything else waits
|
|
3
4
|
// in the store ("Kho Kĩ Năng (Skills)") until a person adds it to one bot. Settings → Kĩ Năng (Skills) only downloads and
|
|
@@ -23,6 +24,7 @@ export const LIMIX_CORE_SKILLS = new Set([
|
|
|
23
24
|
]);
|
|
24
25
|
/** What a shipped skill does, in the app's language (the manifest has one language; the skill itself is unchanged). */
|
|
25
26
|
const BUNDLED_TEXT = {
|
|
27
|
+
"video-workflow": ["Lên kịch bản phân cảnh, tạo dự án video Hypit và kiểm tra phim xuất ra.", "Storyboard short videos, author Hypit projects and verify rendered files."],
|
|
26
28
|
"limix-bot-factory": ["Tạo bản nháp bot và kỹ năng, kiểm tra quyền và xuất gói mẫu.", "Draft bots and skills, check permissions and export template packages."],
|
|
27
29
|
"agent-reach": ["Tìm và đọc (chỉ đọc) X/Twitter, Reddit, YouTube (phụ đề), GitHub, Bilibili, XiaoHongShu, V2EX, LinkedIn… bằng lệnh agent-reach.", "Read-only search and reading on X/Twitter, Reddit, YouTube (subtitles), GitHub, Bilibili, XiaoHongShu, V2EX, LinkedIn and more through the agent-reach command."],
|
|
28
30
|
"create-verification-skill": ["Viết một kĩ năng kiểm chứng cho một ứng dụng hoặc dự án cụ thể.", "Write one verification skill for a specific app or project."],
|
|
@@ -35,7 +37,11 @@ const BUNDLED_TEXT = {
|
|
|
35
37
|
"ui-ux-pro-max": ["Trợ lý thiết kế UI/UX: phong cách, bảng màu, cặp phông chữ, luật UX và hướng dẫn theo nền tảng, tra bằng script Python trên máy.", "Design intelligence for UI/UX: styles, colour palettes, font pairings, UX rules and stack guidance, searched with a local Python script."],
|
|
36
38
|
"windows-computer-automation": ["Điều khiển Windows an toàn: đọc màn hình, thao tác cửa sổ, nhập liệu, trình duyệt, ứng dụng, tệp và tiến trình qua Agent Desktop và Windows-MCP; chọn đúng công cụ, xác minh kết quả, chống lặp thao tác.", "Control Windows safely: read the screen, work windows, type, browse, and manage apps, files and processes through Agent Desktop and Windows-MCP; pick the right tool, check the result, never repeat an action blindly."],
|
|
37
39
|
};
|
|
40
|
+
const industrySkills = new Map(INDUSTRY_PROFILES.map(p => [`industry-${p.slug}`, p]));
|
|
38
41
|
export function limixSkillText(id, fallback) {
|
|
42
|
+
const industry = industrySkills.get(id);
|
|
43
|
+
if (industry)
|
|
44
|
+
return lxs(industry.vi.description, industry.description);
|
|
39
45
|
const text = BUNDLED_TEXT[id];
|
|
40
46
|
return text ? lxs(text[0], text[1]) : fallback;
|
|
41
47
|
}
|
|
@@ -81,7 +87,7 @@ export function limixSelectBundled(text, capabilities, skills) {
|
|
|
81
87
|
const folded = foldVietnamese(text);
|
|
82
88
|
const unaccented = usable.filter(({ manifest }) => manifest.defaultEnabled && manifest.triggerTerms.some((term) => folded.includes(foldVietnamese(term))));
|
|
83
89
|
const called = usable.filter(({ manifest }) => slashCalled(text, manifest.id));
|
|
84
|
-
return mergeSkills(mergeSkills(selectBundledSkills(text, available, skills), unaccented), called);
|
|
90
|
+
return mergeSkills(mergeSkills(selectBundledSkills(text, available, skills), unaccented), [...called, ...usable.filter(skill => skill.manifest.id === "video-workflow" || industrySkills.has(skill.manifest.id))]);
|
|
85
91
|
}
|
|
86
92
|
/** The bot's shipped skills as rows of its Skills page. */
|
|
87
93
|
export function limixBundledListings(botId, helperFactory = false) {
|
|
@@ -224,7 +224,7 @@ function runImport(source, options, deps) {
|
|
|
224
224
|
...avatar,
|
|
225
225
|
});
|
|
226
226
|
if (options.builtInIndustry)
|
|
227
|
-
enableIndustryCare(created.id);
|
|
227
|
+
enableIndustryCare(created.id, pkg.id);
|
|
228
228
|
for (const skillName of agent?.skills ?? []) {
|
|
229
229
|
const skill = skillByName.get(skillName);
|
|
230
230
|
if (!skill)
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { industryBotSettings, industryTemplate } from "../../shared/industry-templates.js";
|
|
2
|
+
import { VIDEO_WORKFLOW } from "../../shared/ready-bots.js";
|
|
3
|
+
import { limixBundledSwitch } from "../limix-skill-store.js";
|
|
2
4
|
import { enableIndustryCare } from "../industry-care.js";
|
|
3
5
|
import { freshLook } from "../bot-look.js";
|
|
4
6
|
import { validateBotCwd } from "../bot-cwd.js";
|
|
@@ -58,6 +60,11 @@ export function createBotCreateRoutes(deps) {
|
|
|
58
60
|
const industry = typeof body.industryTemplate === "string" ? industryTemplate(body.industryTemplate, typeof body.templateLocale === "string" ? body.templateLocale : "en") : undefined;
|
|
59
61
|
if (body.industryTemplate !== undefined && !industry)
|
|
60
62
|
return json(res, 400, { error: "Unknown built-in industry template" });
|
|
63
|
+
const video = body.videoTemplate === true;
|
|
64
|
+
if (video && (industry || body.preset !== undefined))
|
|
65
|
+
return json(res, 400, { error: "Choose one bot template" });
|
|
66
|
+
if (video && auth.kind === "session" && !auth.scopes.includes("admin"))
|
|
67
|
+
return json(res, 403, { error: "Installing a video template requires the admin scope" });
|
|
61
68
|
if (industry && body.preset !== undefined)
|
|
62
69
|
return json(res, 400, { error: "Choose one bot template" });
|
|
63
70
|
if (industry && auth.kind === "session" && !auth.scopes.includes("admin")) {
|
|
@@ -70,6 +77,8 @@ export function createBotCreateRoutes(deps) {
|
|
|
70
77
|
},
|
|
71
78
|
} : body);
|
|
72
79
|
const settings = template.profile;
|
|
80
|
+
if (video)
|
|
81
|
+
settings.soul = VIDEO_WORKFLOW.soul;
|
|
73
82
|
if (auth.kind === "session" && !auth.scopes.includes("admin")) {
|
|
74
83
|
const field = clientBotPatchViolation(settings);
|
|
75
84
|
if (field || body.preset !== undefined || template.skills.length || template.routines.length || Object.keys(template.memory).length) {
|
|
@@ -228,8 +237,10 @@ export function createBotCreateRoutes(deps) {
|
|
|
228
237
|
if (ownersRoutines)
|
|
229
238
|
cloudRoutineAuthors?.wrote(created.id, ownersRoutines);
|
|
230
239
|
}
|
|
240
|
+
if (video && limixBundledSwitch(bot.id, VIDEO_WORKFLOW.id, true)?.status !== 200)
|
|
241
|
+
throw new Error("Could not install the video workflow skill");
|
|
231
242
|
if (industry)
|
|
232
|
-
enableIndustryCare(bot.id);
|
|
243
|
+
enableIndustryCare(bot.id, industry.id);
|
|
233
244
|
}
|
|
234
245
|
catch (error) {
|
|
235
246
|
for (const routine of createdRoutines)
|
|
@@ -3,6 +3,10 @@ import { INDUSTRY_PROFILES } from "./industry-profiles.js";
|
|
|
3
3
|
import { templateMascot } from "./template-mascot.js";
|
|
4
4
|
export const INDUSTRY_CARE_SKILL = "industry-customer-care";
|
|
5
5
|
export const INDUSTRY_CARE_SERVER = "industry-care";
|
|
6
|
+
export function industrySkillsForTemplate(id) {
|
|
7
|
+
const profile = INDUSTRY_PROFILES.find(p => id === `industry-${p.slug}` || p.roles.some(r => id === `industry-${p.slug}-${r.slug}`));
|
|
8
|
+
return profile ? [INDUSTRY_CARE_SKILL, `industry-${profile.slug}`] : id === INDUSTRY_CARE_SKILL ? [INDUSTRY_CARE_SKILL] : [];
|
|
9
|
+
}
|
|
6
10
|
export function industryBotSettings() {
|
|
7
11
|
return {
|
|
8
12
|
approvalMode: "ask", alwaysAllow: [], computer: "off",
|
|
@@ -2,7 +2,19 @@ import { industryBotSettings, industryTemplate } from "./industry-templates.js";
|
|
|
2
2
|
export const READY_BOT_CATEGORIES = ["everyday", "work", "writing", "design", "sales", "personal"];
|
|
3
3
|
const WEEKDAYS = [1, 2, 3, 4, 5];
|
|
4
4
|
const paused = (name, prompt, time, weekdays) => ({ name, prompt, schedule: { type: "daily", time, weekdays }, enabled: false, overlap: "skip" });
|
|
5
|
+
export const VIDEO_WORKFLOW = {
|
|
6
|
+
id: "video-workflow", category: "design", name: "Kino", title: "Short-form video producer",
|
|
7
|
+
description: "Turn a brief or reference into an editable Hypit project with a shot list, captions and video variants.",
|
|
8
|
+
soul: [
|
|
9
|
+
"Use the video-workflow skill to produce short videos from a brief or an authorized reference. Speak the user's language.",
|
|
10
|
+
"Deliver an original shot list, script and caption timings. Use editable Hypit project files and keep approved source media intact.",
|
|
11
|
+
"Check and plan the composition before building. Ask before paid generation, uploads or publication. Verify exported media before calling a render complete.",
|
|
12
|
+
].join("\n"),
|
|
13
|
+
look: { color: "purple", mascotBody: "star" }, apps: [], skills: ["video-workflow"],
|
|
14
|
+
tryAsking: ["Storyboard a 30-second vertical video for this product.", "Create two different openings for this clip."],
|
|
15
|
+
};
|
|
5
16
|
export const READY_BOTS = [
|
|
17
|
+
VIDEO_WORKFLOW,
|
|
6
18
|
{
|
|
7
19
|
id: "assistant",
|
|
8
20
|
category: "everyday",
|
|
@@ -306,6 +318,9 @@ export function readyBotTemplate(defaults, bot, locale = "en") {
|
|
|
306
318
|
const template = industry ? {
|
|
307
319
|
profile: { ...industryBotSettings(), ...(defaults.profile.modelSelection ? { modelSelection: structuredClone(defaults.profile.modelSelection) } : {}) },
|
|
308
320
|
skills: [], routines: [], memory: {},
|
|
321
|
+
} : bot.id === VIDEO_WORKFLOW.id ? {
|
|
322
|
+
profile: { approvalMode: "ask", ...(defaults.profile.modelSelection ? { modelSelection: structuredClone(defaults.profile.modelSelection) } : {}) },
|
|
323
|
+
skills: [], routines: [], memory: {},
|
|
309
324
|
} : structuredClone(defaults);
|
|
310
325
|
bot = industry ?? bot;
|
|
311
326
|
template.profile = {
|
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: industry-auto-repair
|
|
3
|
+
description: Book inspections, estimate repairs and handle warranty requests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Auto repair
|
|
7
|
+
|
|
8
|
+
## English Core
|
|
9
|
+
|
|
10
|
+
Separate customer-reported symptoms, signed inspection findings, a repair estimate and authorization to start work. When recalls are relevant, use the applicable manufacturer's or authority's vehicle-specific lookup and record the scope and date.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
Use the procedure for the assigned role. The intake coordinator selects the responsible role and records the missing evidence. Use the customer's language for replies.
|
|
15
|
+
|
|
16
|
+
- Vehicle service intake. Ask for model, year, symptoms and preferred workshop. Distinguish customer observations from technical findings. Escalate safety concerns immediately. Required evidence: Lift and technician schedules, services and workshop intake rules. Handoff: Send the work order to the estimator after inspection. Share vehicle details only within verified access.
|
|
17
|
+
- Parts estimator. Use signed inspection findings. Check vehicle variant and part compatibility. Itemize labour, materials and taxes. Obtain owner and workshop confirmation for revised estimates before work. Required evidence: Inspection record, labour rates, compatible parts, selling prices and available stock. Handoff: Refer shortages and overruns to the service advisor. Send the finalized job reference to warranty support.
|
|
18
|
+
- Workshop warranty advisor. Verify ownership and repair record. Compare time and mileage limits for the specific part. Arrange inspection for recurring faults before determining coverage. Required evidence: Handover sheet, component warranty terms and reinspection schedule. Handoff: Refer replacement and refund decisions to the workshop manager with case ID.
|
|
19
|
+
|
|
20
|
+
## Safety Boundaries
|
|
21
|
+
|
|
22
|
+
Use approved business records. A reference below informs the workflow and does not establish local law, inventory, eligibility or permission. Keep private identifiers in the verified channel. Obtain the business system's acknowledgement before confirming a change.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
A model appears in a recall notice. Verify the individual vehicle privately before describing its recall status and route the result to a service advisor.
|
|
27
|
+
|
|
28
|
+
The handoff should identify the case reference, observed evidence, pending decision and responsible department. Mark missing evidence explicitly.
|
|
29
|
+
|
|
30
|
+
[NHTSA recall lookup](https://www.nhtsa.gov/recalls)
|
|
31
|
+
|
|
32
|
+
Vietnamese usage examples are in `references/vi.md`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "hybrid-en-core-vi-layer/v1",
|
|
3
|
+
"core_locale": "en",
|
|
4
|
+
"user_locale": "vi",
|
|
5
|
+
"core_entrypoint": "SKILL.md",
|
|
6
|
+
"vietnamese_layer": "references/vi.md",
|
|
7
|
+
"core_authoritative": true,
|
|
8
|
+
"load_mode": "progressive",
|
|
9
|
+
"external_skill_policy": "reviewed_only"
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "industry-auto-repair",
|
|
3
|
+
"name": "Auto repair",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Book inspections, estimate repairs and handle warranty requests.",
|
|
6
|
+
"defaultEnabled": true,
|
|
7
|
+
"triggerTerms": [
|
|
8
|
+
"Auto repair",
|
|
9
|
+
"Dịch vụ và sửa chữa ô tô",
|
|
10
|
+
"Vehicle service intake",
|
|
11
|
+
"Parts estimator",
|
|
12
|
+
"Workshop warranty advisor",
|
|
13
|
+
"Tiếp nhận xe",
|
|
14
|
+
"Dự toán phụ tùng",
|
|
15
|
+
"Bảo hành xưởng xe"
|
|
16
|
+
],
|
|
17
|
+
"requiredCapabilities": []
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Dịch vụ và sửa chữa ô tô
|
|
2
|
+
|
|
3
|
+
## Mục đích
|
|
4
|
+
|
|
5
|
+
Tiếp nhận xe, lập dự toán từ kết quả kiểm tra và chăm sóc sau sửa chữa.
|
|
6
|
+
|
|
7
|
+
## Cách dùng
|
|
8
|
+
|
|
9
|
+
Một dòng xe xuất hiện trong thông báo triệu hồi. Tra cứu đúng xe qua kênh riêng trước khi báo tình trạng và chuyển kết quả cho cố vấn dịch vụ.
|
|
10
|
+
|
|
11
|
+
- Tiếp nhận xe. Ghi triệu chứng bằng lời khách và đề xuất lịch kiểm tra phù hợp.
|
|
12
|
+
- Dự toán phụ tùng. Đối chiếu mã phụ tùng, công sửa, tồn và hạng mục phát sinh.
|
|
13
|
+
- Bảo hành xưởng xe. Đối chiếu phiếu sửa, kỳ bảo dưỡng và điều kiện bảo hành.
|
|
14
|
+
|
|
15
|
+
## Giới hạn
|
|
16
|
+
|
|
17
|
+
Quy trình xử lý nằm trong `SKILL.md`. Khi chuyển yêu cầu, ghi nguồn đã kiểm tra, thông tin còn thiếu và bộ phận tiếp nhận. Chỉ xác nhận hoàn tất khi hệ thống nghiệp vụ đã ghi nhận.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: industry-beauty-spa
|
|
3
|
+
description: Compare treatments, book appointments and follow up after a visit.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Beauty and spa
|
|
7
|
+
|
|
8
|
+
## English Core
|
|
9
|
+
|
|
10
|
+
Distinguish treatment suitability from scheduling. Record branch, service, duration and room turnover. For a reported reaction, route the concern privately to qualified staff using the branch incident procedure.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
Use the procedure for the assigned role. The intake coordinator selects the responsible role and records the missing evidence. Use the customer's language for replies.
|
|
15
|
+
|
|
16
|
+
- Spa service advisor. Ask for the location and customer goals. Distinguish session and package prices. Refer health assessments to a qualified professional. Required evidence: Published services, branch prices, durations and package terms. Handoff: Send selected package and location to scheduling. Share health information only with authorized staff.
|
|
17
|
+
- Spa scheduler. Check staff, room and service duration. For changes check both appointments and confirm only after the scheduling system acknowledges the update. Required evidence: Staff and room schedules, cleaning time, deposit rules and verified appointment. Handoff: Refer deposit changes and off-roster requests to the shift lead.
|
|
18
|
+
- Spa aftercare. Verify the appointment and service. Share official aftercare instructions. For unusual reactions, direct the customer to a qualified professional and escalate privately. Required evidence: Service-specific aftercare sheet, verified appointment and branch feedback procedure. Handoff: Refer assessments, complaints and compensation to the branch manager.
|
|
19
|
+
|
|
20
|
+
## Safety Boundaries
|
|
21
|
+
|
|
22
|
+
Use approved business records. A reference below informs the workflow and does not establish local law, inventory, eligibility or permission. Keep private identifiers in the verified channel. Obtain the business system's acknowledgement before confirming a change.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
A customer reports irritation after a nail treatment. Record the service and timing, refer for professional follow-up and avoid diagnosing the cause.
|
|
27
|
+
|
|
28
|
+
The handoff should identify the case reference, observed evidence, pending decision and responsible department. Mark missing evidence explicitly.
|
|
29
|
+
|
|
30
|
+
[OSHA nail salon hazards](https://www.osha.gov/nail-salons)
|
|
31
|
+
|
|
32
|
+
Vietnamese usage examples are in `references/vi.md`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "hybrid-en-core-vi-layer/v1",
|
|
3
|
+
"core_locale": "en",
|
|
4
|
+
"user_locale": "vi",
|
|
5
|
+
"core_entrypoint": "SKILL.md",
|
|
6
|
+
"vietnamese_layer": "references/vi.md",
|
|
7
|
+
"core_authoritative": true,
|
|
8
|
+
"load_mode": "progressive",
|
|
9
|
+
"external_skill_policy": "reviewed_only"
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "industry-beauty-spa",
|
|
3
|
+
"name": "Beauty and spa",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Compare treatments, book appointments and follow up after a visit.",
|
|
6
|
+
"defaultEnabled": true,
|
|
7
|
+
"triggerTerms": [
|
|
8
|
+
"Beauty and spa",
|
|
9
|
+
"Làm đẹp và spa",
|
|
10
|
+
"Spa service advisor",
|
|
11
|
+
"Spa scheduler",
|
|
12
|
+
"Spa aftercare",
|
|
13
|
+
"Tư vấn dịch vụ spa",
|
|
14
|
+
"Điều phối lịch spa",
|
|
15
|
+
"Chăm sóc sau dịch vụ"
|
|
16
|
+
],
|
|
17
|
+
"requiredCapabilities": []
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Làm đẹp và spa
|
|
2
|
+
|
|
3
|
+
## Mục đích
|
|
4
|
+
|
|
5
|
+
Hỗ trợ chọn dịch vụ, xếp lịch theo cơ sở và tiếp nhận phản hồi sau buổi hẹn.
|
|
6
|
+
|
|
7
|
+
## Cách dùng
|
|
8
|
+
|
|
9
|
+
Khách phản ánh kích ứng sau khi làm móng. Ghi dịch vụ và thời điểm, chuyển người phụ trách theo dõi riêng và tránh tự kết luận nguyên nhân.
|
|
10
|
+
|
|
11
|
+
- Tư vấn dịch vụ spa. So sánh gói dịch vụ theo thời lượng, giá và điều kiện sử dụng.
|
|
12
|
+
- Điều phối lịch spa. Kiểm tra đồng thời lịch nhân sự, phòng và thời lượng dịch vụ.
|
|
13
|
+
- Chăm sóc sau dịch vụ. Gửi hướng dẫn đã duyệt và chuyển phản hồi tới đúng cơ sở.
|
|
14
|
+
|
|
15
|
+
## Giới hạn
|
|
16
|
+
|
|
17
|
+
Quy trình xử lý nằm trong `SKILL.md`. Khi chuyển yêu cầu, ghi nguồn đã kiểm tra, thông tin còn thiếu và bộ phận tiếp nhận. Chỉ xác nhận hoàn tất khi hệ thống nghiệp vụ đã ghi nhận.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: industry-education
|
|
3
|
+
description: Advise applicants, coordinate classes and explain tuition.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Education and training
|
|
7
|
+
|
|
8
|
+
## English Core
|
|
9
|
+
|
|
10
|
+
Distinguish public course information from individual attendance, grades and balances. Check the institution's recorded relationship and authorization before sharing private records. Record course code and intake term for fee comparisons.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
Use the procedure for the assigned role. The intake coordinator selects the responsible role and records the missing evidence. Use the customer's language for replies.
|
|
15
|
+
|
|
16
|
+
- Admissions advisor. Ask about goals, level and availability. Compare prerequisites, content and duration. Distinguish tentative from confirmed classes and use published outcomes. Required evidence: Approved syllabus, start dates, prerequisites and intake fees. Handoff: Send course reference and agreed time to class administration for placement.
|
|
17
|
+
- Class coordinator. Share public schedules by class code. Verify student or guardian access privately before sharing attendance or results. Check capacity for make-up classes. Required evidence: Class schedule, make-up rules, verified access and enrollment status. Handoff: Refer class changes for approval and deferments or refunds to tuition support.
|
|
18
|
+
- Tuition advisor. Use the correct intake fee schedule. Separate amounts owed and received. Check receipts before confirming payment. Explain deadlines and missing deferment documents. Required evidence: Approved fee schedule, student ledger, term policies and forms. Handoff: Refer waivers, discrepancies and refunds to school accounting with the case reference.
|
|
19
|
+
|
|
20
|
+
## Safety Boundaries
|
|
21
|
+
|
|
22
|
+
Use approved business records. A reference below informs the workflow and does not establish local law, inventory, eligibility or permission. Keep private identifiers in the verified channel. Obtain the business system's acknowledgement before confirming a change.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
A caller asks about an adult learner's attendance. Share the public timetable while staff verify access to the individual record.
|
|
27
|
+
|
|
28
|
+
The handoff should identify the case reference, observed evidence, pending decision and responsible department. Mark missing evidence explicitly.
|
|
29
|
+
|
|
30
|
+
[Student Privacy Policy Office education record guidance](https://studentprivacy.ed.gov/legal-basics)
|
|
31
|
+
|
|
32
|
+
Vietnamese usage examples are in `references/vi.md`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "hybrid-en-core-vi-layer/v1",
|
|
3
|
+
"core_locale": "en",
|
|
4
|
+
"user_locale": "vi",
|
|
5
|
+
"core_entrypoint": "SKILL.md",
|
|
6
|
+
"vietnamese_layer": "references/vi.md",
|
|
7
|
+
"core_authoritative": true,
|
|
8
|
+
"load_mode": "progressive",
|
|
9
|
+
"external_skill_policy": "reviewed_only"
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "industry-education",
|
|
3
|
+
"name": "Education and training",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Advise applicants, coordinate classes and explain tuition.",
|
|
6
|
+
"defaultEnabled": true,
|
|
7
|
+
"triggerTerms": [
|
|
8
|
+
"Education and training",
|
|
9
|
+
"Giáo dục và đào tạo",
|
|
10
|
+
"Admissions advisor",
|
|
11
|
+
"Class coordinator",
|
|
12
|
+
"Tuition advisor",
|
|
13
|
+
"Tư vấn tuyển sinh",
|
|
14
|
+
"Giáo vụ lớp học",
|
|
15
|
+
"Học vụ tài chính"
|
|
16
|
+
],
|
|
17
|
+
"requiredCapabilities": []
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Giáo dục và đào tạo
|
|
2
|
+
|
|
3
|
+
## Mục đích
|
|
4
|
+
|
|
5
|
+
Hỗ trợ tuyển sinh, tổ chức lớp và giải đáp thủ tục học phí theo từng khóa.
|
|
6
|
+
|
|
7
|
+
## Cách dùng
|
|
8
|
+
|
|
9
|
+
Người thân hỏi một học viên đã trưởng thành có đi học hay không. Có thể gửi lịch lớp công khai và chuyển yêu cầu tra điểm danh qua bước xác minh quyền.
|
|
10
|
+
|
|
11
|
+
- Tư vấn tuyển sinh. Đối chiếu đầu vào, lịch mở lớp và mục tiêu học tập.
|
|
12
|
+
- Giáo vụ lớp học. Hỗ trợ lịch học, học bù và thông báo thay đổi theo lớp.
|
|
13
|
+
- Học vụ tài chính. Giải thích học phí, công nợ đã xác minh và điều kiện bảo lưu.
|
|
14
|
+
|
|
15
|
+
## Giới hạn
|
|
16
|
+
|
|
17
|
+
Quy trình xử lý nằm trong `SKILL.md`. Khi chuyển yêu cầu, ghi nguồn đã kiểm tra, thông tin còn thiếu và bộ phận tiếp nhận. Chỉ xác nhận hoàn tất khi hệ thống nghiệp vụ đã ghi nhận.
|