limixbot 0.3.47 → 0.3.49
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-D9DH7QQT.js → ActivityPanel-DOLj6vdX.js} +1 -1
- package/dist/assets/{App-CRytEYmf.js → App-D81V4ldd.js} +111 -111
- package/dist/assets/{AppEventEditor-ByyWdEmQ.js → AppEventEditor-ab3UR4LS.js} +1 -1
- package/dist/assets/BotSettingsDialog-D_cLgiH4.js +16 -0
- package/dist/assets/{BrowserPanel-lqwAXdsq.js → BrowserPanel-BMzs1O8G.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-CMSW58zY.js → BrowserProfilesManager-DOVv9QX0.js} +1 -1
- package/dist/assets/{CloudAddDialog-y-XFvKEO.js → CloudAddDialog-DrhnkBjW.js} +1 -1
- package/dist/assets/{ComputerFilesPane-C0z_fUxp.js → ComputerFilesPane-CN8QMnw3.js} +1 -1
- package/dist/assets/{ComputerPanel-fhqM1MI7.js → ComputerPanel-CaIt9MKD.js} +2 -2
- package/dist/assets/{DataPanel-CzWBtsrD.js → DataPanel-BNVcp6of.js} +1 -1
- package/dist/assets/{DesktopViewer-CatGjsxo.js → DesktopViewer-DFhYwHIq.js} +1 -1
- package/dist/assets/{FilesView-DHBAO8On.js → FilesView-DW9SCyV-.js} +1 -1
- package/dist/assets/{GrokMoveDialog-BW9jks3G.js → GrokMoveDialog-mHb6IcFC.js} +1 -1
- package/dist/assets/{InspectorPanel-C7zR-TPA.js → InspectorPanel-Ce4_qW9h.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-CQmC8Ps5.js → KeyboardShortcutsModal-CLNFMSjb.js} +1 -1
- package/dist/assets/{LiveDesktop-DGo25IvC.js → LiveDesktop-BjRurHnb.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-IS50mkCo.js → LocalVmWorkspace-CqsCtYlw.js} +1 -1
- package/dist/assets/{MacLocalControl-CXz59XDG.js → MacLocalControl-CKBC29SJ.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-DXxv1BAA.js → MarkdownFilePreview-Dmulebe8.js} +1 -1
- package/dist/assets/{MenuMotion-CRa18DdV.js → MenuMotion-CtV49YrJ.js} +1 -1
- package/dist/assets/{NewBotDialog-B4p0ZS3l.js → NewBotDialog-D9rstuqs.js} +1 -1
- package/dist/assets/{PhoneAppDialog-8oAj_PHB.js → PhoneAppDialog-CaCKkATB.js} +1 -1
- package/dist/assets/{PlacesRail-D9DIqIqh.js → PlacesRail-COZEZH0n.js} +1 -1
- package/dist/assets/{PluginsPanel-DLojCasI.js → PluginsPanel-DYY_IXSa.js} +1 -1
- package/dist/assets/{ProIntroduction-B1pkCz55.js → ProIntroduction-DfpCTBHe.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-4j4Hyn6g.js → RemoteAgentSettingsPanel-OSSdthdZ.js} +1 -1
- package/dist/assets/{RoomPanel-Dvibvu5e.js → RoomPanel-BQA73L-t.js} +1 -1
- package/dist/assets/{RoutinesPage-DshYZrBi.js → RoutinesPage-CXOMn_kl.js} +1 -1
- package/dist/assets/{SettingsModal-D5L4X9-Z.js → SettingsModal-BsiCQwg6.js} +1 -1
- package/dist/assets/{ShareTeamDialog-reoNYl9E.js → ShareTeamDialog-IqLImhjS.js} +1 -1
- package/dist/assets/{SignedInSites-ChH47Lo4.js → SignedInSites-BpHOfApd.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-R6EbRi4i.js → TeamLibraryPanel-4ktTFM-N.js} +1 -1
- package/dist/assets/{TeamMapPage-dxL2EH3z.js → TeamMapPage-9nuEqxdk.js} +1 -1
- package/dist/assets/{TriggersPage-DqdM2Sm2.js → TriggersPage-CS8Xxzuy.js} +1 -1
- package/dist/assets/VisibilitySection-DNZ4sulC.js +22 -0
- package/dist/assets/{WebhookTrigger-BWsCeUup.js → WebhookTrigger-CwZdLciz.js} +1 -1
- package/dist/assets/{WorksOnGrid-yy_heVj5.js → WorksOnGrid-CYzp7YXl.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-CpNoKE-c.js → abnfDiagram-YUKMZFIV-DmWI1Mtg.js} +1 -1
- package/dist/assets/{activity-CL5_cKC_.js → activity-WfPBvs3Z.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-CXBxo__B.js → architectureDiagram-47P4ROYG-rzc3-Q0w.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-D0Ax2ysq.js → blockDiagram-E7TT5TSB-VPDyKlQ7.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-Kz4KD2-1.js → c4Diagram-CRA5TL53-C9OGckku.js} +1 -1
- package/dist/assets/{calendar-days-CS_Kp5OX.js → calendar-days-W4JHp6-m.js} +1 -1
- package/dist/assets/channel-DAFePtOr.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-IBBt4Aog.js → chunk-2Q5K7J3B-EpYkwMC8.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-DKga0mDA.js → chunk-5VM5RSS4-DyJEI8X6.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-D76NyZtN.js → chunk-7TKQ45FW-CJvVxQ2I.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-CCKzt9Rj.js → chunk-AW2ZBBNX-s78zNrhy.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-cArKlPV9.js → chunk-FVRAUYC3-CUPjaz9e.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-Cuk7FC9I.js → chunk-HTAEGDNF-BhuM2dxl.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-B7cITGVx.js → chunk-JWPE2WC7-DAj1UgJ8.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-G7MLCIru.js → chunk-KQW6MTUR-BgfdtkJI.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-EaVKIxsv.js → chunk-XXDRQBXY-Vak43p0S.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-QRbaNskT.js → classDiagram-v2-K4WV4PDN-Cjvbs86l.js} +1 -1
- package/dist/assets/{coins-CuUli9U7.js → coins-B1tpScHw.js} +1 -1
- package/dist/assets/{core-COCa-1nW.js → core-CmGeFi0y.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-CnINQkjz.js → cose-bilkent-JH36ORCC-BEekB3gO.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-CZYPrV79.js → cynefin-EF2NZ3EQ-D3g3_jPk.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-BxcEpP_o.js → cynefinDiagram-3GCD6N5R-13xmjXZj.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-wZAe6Pg1.js → dagre-W4DXFKR2-CHAV8s2t.js} +1 -1
- package/dist/assets/de-CJcRve_J.js +8 -0
- package/dist/assets/{diagram-2UJZ2QOL-MPcgLour.js → diagram-2UJZ2QOL-DgwdzZN7.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-DT5Oet1j.js → diagram-OVF4WLC6-DobmWwa_.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-Bnw2drh-.js → diagram-PFPMY2P6-CWjTVc0N.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-BTThjNZQ.js → diagram-UMYRVEAY-CAruZkhk.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-BAqwmvuH.js → diagram-YEKJPTXX-Bcs89mQN.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-BOEaVdqm.js → diagram-ZIFT7M5P-Dz-O18tl.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-BbGyW5j_.js → ebnfDiagram-VR2GEFS7-CJX4rMIs.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-UIqFV-IQ.js → elk-IJKZMXRS-Byop6FtW.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-CSVvM6OX.js → erDiagram-O2IAPWRE-ChpLnNCF.js} +1 -1
- package/dist/assets/es-DL-LT7LK.js +6 -0
- package/dist/assets/{file-up-z3QDjWVa.js → file-up-G3qWGpEB.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-B2FpsRFz.js → flowDiagram-OXPTDLAJ-CWWhkNOE.js} +1 -1
- package/dist/assets/fr-Cqgsh6FT.js +8 -0
- package/dist/assets/{ganttDiagram-R7TSEDQI-BfHWa9Nz.js → ganttDiagram-R7TSEDQI-DMXicWgq.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-ggAplh9D.js → gitGraphDiagram-XJZIOB7I-CpiCnPUQ.js} +1 -1
- package/dist/assets/hi-DRlAa-mm.js +1 -0
- package/dist/assets/{import-name-CeaNA31z.js → import-name-bz0My-IU.js} +1 -1
- package/dist/assets/{index-BIybgsMd.js → index-D_0hmaNc.js} +2 -2
- package/dist/assets/{index-BVUg6lAs.js → index-arIlKsXK.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-2HcTW0yC.js → infoDiagram-5W2HQ5XZ-BU9zbv9f.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-BKQmSUSJ.js → ishikawaDiagram-K3B6WC7H-KEjUVvmG.js} +1 -1
- package/dist/assets/it-BapR4fyG.js +13 -0
- package/dist/assets/ja-rH-EVVS5.js +13 -0
- package/dist/assets/{journeyDiagram-COXZFDF6-DIXUKldZ.js → journeyDiagram-COXZFDF6-DGU1V_40.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-B0ziraAk.js → kanban-definition-P3RFRI5V-weJ2OFB2.js} +1 -1
- package/dist/assets/ko-DXzDBiEb.js +13 -0
- package/dist/assets/{mcp-servers-CXqpBVsG.js → mcp-servers-DJbj8A-F.js} +1 -1
- package/dist/assets/{mermaid.core-DnRWCL0-.js → mermaid.core-DhSRukyE.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-DDwKN-dh.js → mindmap-definition-LZFPQGKD-DKKO0DWj.js} +1 -1
- package/dist/assets/{minimize-DKqTWoHf.js → minimize-C16JX5N8.js} +1 -1
- package/dist/assets/{monitor-DG6KsnA9.js → monitor-Bben4nuu.js} +1 -1
- package/dist/assets/{new-bot-Kfd38wm0.js → new-bot-Dr5oueeD.js} +1 -1
- package/dist/assets/{org-library-ZSvTNjUC.js → org-library-kDl9eWm6.js} +1 -1
- package/dist/assets/{package-format-BIP87sBK.js → package-format-DigdVa67.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-BMP96fj9.js → pegDiagram-BGZESJAR-CNNprTkt.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-BFWKyvSD.js → pieDiagram-CAPJLFHJ-pS8U8zdK.js} +1 -1
- package/dist/assets/pl-BV7GtmiM.js +13 -0
- package/dist/assets/pt-br-Dr9a700a.js +13 -0
- package/dist/assets/{quadrantDiagram-GDMTTRAM-DY0vatrx.js → quadrantDiagram-GDMTTRAM-CLk_fr2j.js} +1 -1
- package/dist/assets/{rail-Ixm4oru-.js → rail-CpM5o3ti.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-e_sZ0DMx.js → railroadDiagram-SM67HX2B-DH8VPMJG.js} +1 -1
- package/dist/assets/{remote-desktop-panel-D6XdCjIK.js → remote-desktop-panel-B0yyDRuX.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-NwkOCuRQ.js → requirementDiagram-X7JNWC4A-CoHRI7dx.js} +1 -1
- package/dist/assets/ru-DSSPfQyi.js +13 -0
- package/dist/assets/{sankeyDiagram-UM26HJRW-BD-3hfIS.js → sankeyDiagram-UM26HJRW-2zcVfvWw.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-a42nZI5f.js → sequenceDiagram-ZO4K6R2Y-B0d21eid.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-CoHyc2KP.js → sizeCapture-INFHLROL-CcYkvoh7.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-C9RIH9QC.js → stateDiagram-v2-TBUQTH76-B5EilR72.js} +1 -1
- package/dist/assets/{styles-3PyvvS8Z.js → styles-Cbtcp5Re.js} +2 -2
- package/dist/assets/styles-rYmbSF4Y.css +1 -0
- package/dist/assets/{swimlanes-N4OXWK64-B9Ww6AP3.js → swimlanes-N4OXWK64-xM7mNll9.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-CnVwW_RC.js +8 -0
- package/dist/assets/{team-share-jXYUoEov.js → team-share-Bp69YR8I.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-ZruSIpuA.js → timeline-definition-YOQAKGHF-DM6SmhCQ.js} +1 -1
- package/dist/assets/tr-DJNxAMAd.js +6 -0
- package/dist/assets/uk-SbiO0vE9.js +1 -0
- package/dist/assets/{usecaseDiagram-VIAY4XPW-BVqVCNoM.js → usecaseDiagram-VIAY4XPW-DiUdGN3G.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-ft1pmNur.js → vennDiagram-BLWOH2XV-DrtmNBp4.js} +1 -1
- package/dist/assets/{vi-DYUrvBf7.js → vi-vTat5qyz.js} +2 -2
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-tD0k35aX.js → wardleyDiagram-YMQ3BMBF-D7jihWm5.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-DsMJpryR.js → xychartDiagram-TAQBALBS-BCk-D9Uj.js} +1 -1
- package/dist/assets/zh-Ce8h_nYy.js +13 -0
- package/dist/assets/zh-tw-DXbqGzsI.js +13 -0
- package/dist/index.html +3 -3
- package/dist/rail.html +5 -5
- package/dist-server/container-mcp.js +2 -2
- package/dist-server/drivers/agents-proxy.js +92 -89
- package/dist-server/index.js +1614 -1568
- package/dist-server/openmausbot.js +561 -632
- package/dist-server/package.json +1 -1
- package/dist-server/pair-cli.js +65 -62
- package/dist-server/server/activity.js +1 -0
- package/dist-server/server/chief-of-staff.js +3 -2
- package/dist-server/server/container-computer.js +31 -4
- package/dist-server/server/default-bot.js +2 -2
- package/dist-server/server/drivers/agents-call.js +3 -0
- package/dist-server/server/drivers/agents-catalog.js +16 -6
- package/dist-server/server/index.js +76 -15
- package/dist-server/server/limix-assistant-name.js +18 -0
- package/dist-server/server/limix-channel-identity.js +1 -0
- package/dist-server/server/limix-channel-media.js +1 -0
- package/dist-server/server/limix-desktop-resources.js +26 -0
- package/dist-server/server/limix-diagnose.js +41 -0
- package/dist-server/server/limix-gateway-sidecar.js +23 -0
- package/dist-server/server/limix-managed-grant.js +110 -0
- package/dist-server/server/limix-team-desktop.js +32 -0
- package/dist-server/server/routes/bot-messages.js +2 -2
- package/dist-server/server/routes/bot-patch.js +24 -0
- package/dist-server/server/routes/internal-chief-team.js +15 -5
- package/dist-server/server/team-setup-requests.js +60 -5
- package/dist-server/shared/default-bot.js +3 -1
- package/dist-server/shared/new-bot-defaults.js +1 -0
- package/dist-server/shared/ready-bots.js +331 -0
- package/dist-server/vps-container-mcp.js +8 -8
- package/package.json +1 -1
- package/dist/assets/BotSettingsDialog-Dz-psx65.js +0 -16
- package/dist/assets/VisibilitySection-CSKsxdvx.js +0 -22
- package/dist/assets/channel-lcZJVnhb.js +0 -1
- package/dist/assets/de-BZ9nuzrz.js +0 -8
- package/dist/assets/es-BxLq0ePd.js +0 -6
- package/dist/assets/fr-BoXnQ5F8.js +0 -8
- package/dist/assets/hi-CcIxinfW.js +0 -1
- package/dist/assets/it-I6t2VEkh.js +0 -13
- package/dist/assets/ja-XTlk5V47.js +0 -13
- package/dist/assets/ko-BplWTKGd.js +0 -13
- package/dist/assets/pl-Bv2R8H4r.js +0 -13
- package/dist/assets/pt-br-CM02ONwa.js +0 -15
- package/dist/assets/ru-CJcyvxC6.js +0 -13
- package/dist/assets/styles-3v-vHlNV.css +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-DjVtYZbG.js +0 -8
- package/dist/assets/tr-CTl25e95.js +0 -6
- package/dist/assets/uk-B_psMXqm.js +0 -1
- package/dist/assets/zh-BPHbGe7C.js +0 -13
- package/dist/assets/zh-tw-BMYbS8NC.js +0 -15
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { limixDesktopResources } from "../limix-desktop-resources.js";
|
|
2
3
|
import { approvalModeFor, isApprovalMode } from "../../shared/approval-mode.js";
|
|
3
4
|
import { normalizeConnectorScopes } from "../../shared/connector-scopes.js";
|
|
4
5
|
import { normalizeOutboundPolicy } from "../../shared/outbound.js";
|
|
@@ -323,6 +324,29 @@ export function createBotPatchRoutes(deps) {
|
|
|
323
324
|
return json(res, 400, { error: "cacheKeepWarm must be true, false or null" });
|
|
324
325
|
patch.cacheKeepWarm = body.cacheKeepWarm ?? undefined;
|
|
325
326
|
}
|
|
327
|
+
if (body.desktopResources !== undefined) {
|
|
328
|
+
const parsed = limixDesktopResources(body.desktopResources);
|
|
329
|
+
if ("error" in parsed)
|
|
330
|
+
return json(res, 400, { error: parsed.error });
|
|
331
|
+
patch.desktopResources = parsed.value;
|
|
332
|
+
}
|
|
333
|
+
if (body.hideChannelGuests !== undefined) {
|
|
334
|
+
if (typeof body.hideChannelGuests !== "boolean")
|
|
335
|
+
return json(res, 400, { error: "hideChannelGuests must be true or false" });
|
|
336
|
+
patch.hideChannelGuests = body.hideChannelGuests || undefined;
|
|
337
|
+
}
|
|
338
|
+
if (body.desktopTeamFolder !== undefined) {
|
|
339
|
+
if (typeof body.desktopTeamFolder !== "boolean")
|
|
340
|
+
return json(res, 400, { error: "desktopTeamFolder must be true or false" });
|
|
341
|
+
patch.desktopTeamFolder = body.desktopTeamFolder || undefined;
|
|
342
|
+
}
|
|
343
|
+
if (body.desktopTeam !== undefined) {
|
|
344
|
+
if (typeof body.desktopTeam !== "boolean")
|
|
345
|
+
return json(res, 400, { error: "desktopTeam must be true or false" });
|
|
346
|
+
if (existingBot?.busy && body.desktopTeam !== Boolean(existingBot.desktopTeam))
|
|
347
|
+
return json(res, 409, { error: "Wait for this bot's work to finish before moving it to another desktop" });
|
|
348
|
+
patch.desktopTeam = body.desktopTeam || undefined;
|
|
349
|
+
}
|
|
326
350
|
if (body.helperModel !== undefined) {
|
|
327
351
|
if (typeof body.helperModel !== "boolean")
|
|
328
352
|
return json(res, 400, { error: "helperModel must be true or false" });
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { hasTeamAuthority, peerAllowed } from "../peer-roster.js";
|
|
2
2
|
import { chiefLevel } from "../chief-level.js";
|
|
3
3
|
import { libraryTeamRoles } from "../team-library.js";
|
|
4
|
+
import { diagnoseLimix } from "../limix-diagnose.js";
|
|
5
|
+
import { READY_BOTS } from "../../shared/ready-bots.js";
|
|
6
|
+
const BOT_TEMPLATES = READY_BOTS.map((bot) => ({ id: bot.id, name: bot.name, title: bot.title, description: bot.description, category: bot.category }));
|
|
4
7
|
import { PASS } from "./table.js";
|
|
5
8
|
const NOT_CHIEF = "Only an active Chief may plan team setup";
|
|
6
9
|
/** Only dispatch inside the internal capability gate. What a Chief of Staff reads before it changes its team. */
|
|
@@ -10,20 +13,27 @@ export function createInternalChiefTeamRoutes(deps) {
|
|
|
10
13
|
return chiefLevel(bot) && !bot.hidden ? bot : null;
|
|
11
14
|
};
|
|
12
15
|
return async ({ res, path, method, json }) => {
|
|
13
|
-
if (method !== "GET" || (path !== "/api/internal/team-setup-catalog" && path !== "/api/internal/team-library"))
|
|
16
|
+
if (method !== "GET" || (path !== "/api/internal/team-setup-catalog" && path !== "/api/internal/team-library" && path !== "/api/internal/limix-diagnosis"))
|
|
14
17
|
return PASS;
|
|
15
18
|
if (!chief())
|
|
16
19
|
return json(res, 403, { error: NOT_CHIEF });
|
|
20
|
+
if (path === "/api/internal/limix-diagnosis") {
|
|
21
|
+
const [instances, channels] = await Promise.all([deps.instances(), (deps.channels?.() ?? Promise.resolve(null)).catch(() => null)]);
|
|
22
|
+
deps.requireActive();
|
|
23
|
+
return chief() ? json(res, 200, diagnoseLimix({ engines: instances.map((item) => ({ instanceId: item.instanceId, displayName: item.displayName, state: item.snapshot.state, reason: item.snapshot.reason })),
|
|
24
|
+
channels, bots: deps.bots() })) : json(res, 403, { error: NOT_CHIEF });
|
|
25
|
+
}
|
|
17
26
|
if (path === "/api/internal/team-library") {
|
|
18
|
-
let teams;
|
|
27
|
+
let teams = [];
|
|
28
|
+
let note;
|
|
19
29
|
try {
|
|
20
30
|
teams = await (deps.library ?? libraryTeamRoles)();
|
|
21
31
|
}
|
|
22
32
|
catch {
|
|
23
|
-
|
|
33
|
+
note = "The ready-made team library can't be reached right now; use botTemplates or build the team from what the person asked.";
|
|
24
34
|
}
|
|
25
35
|
deps.requireActive();
|
|
26
|
-
return chief() ? json(res, 200, { teams }) : json(res, 403, { error: NOT_CHIEF });
|
|
36
|
+
return chief() ? json(res, 200, { teams, botTemplates: BOT_TEMPLATES, ...(note ? { note } : {}) }) : json(res, 403, { error: NOT_CHIEF });
|
|
27
37
|
}
|
|
28
38
|
const instances = await deps.instances();
|
|
29
39
|
deps.requireActive();
|
|
@@ -36,7 +46,7 @@ export function createInternalChiefTeamRoutes(deps) {
|
|
|
36
46
|
.map((bot) => ({ id: bot.id, name: bot.name, title: bot.title, section: bot.section ?? "", modelSelection: bot.modelSelection, chiefOfStaff: Boolean(bot.chiefOfStaff) })),
|
|
37
47
|
instances: instances.map((instance) => ({ instanceId: instance.instanceId, driverKind: instance.driverKind, displayName: instance.displayName,
|
|
38
48
|
state: instance.snapshot.state, models: instance.models, effortLevels: instance.capabilities?.effortLevels ?? [] })),
|
|
39
|
-
scope: "Bot model defaults apply to groups and new threads; existing threads retain their models. Requested team setup
|
|
49
|
+
scope: "Bot model defaults apply to groups and new threads; existing threads retain their models. Requested team setup waits for the person's decision on a card. Existing unauthorized teams remain outside this Chief's scope.",
|
|
40
50
|
});
|
|
41
51
|
};
|
|
42
52
|
}
|
|
@@ -12,6 +12,7 @@ import { harnessCapabilityLines } from "./harness-capabilities.js";
|
|
|
12
12
|
import { redactSecretsInText } from "./redact.js";
|
|
13
13
|
import { chiefLevel } from "./chief-level.js";
|
|
14
14
|
import { defaultBotRefusal } from "./default-bot.js";
|
|
15
|
+
import { READY_BOTS, readyBot } from "../shared/ready-bots.js";
|
|
15
16
|
const section = (value) => value?.trim() || "";
|
|
16
17
|
const teamName = z.string().trim().min(1).max(60).refine(fitsOnOneLine).refine((value) => redactSecretsInText(value) === value, "Team names cannot contain credentials");
|
|
17
18
|
const FIELD_LABELS = { name: "Name", title: "Title", description: "Description", section: "Department", cwd: "Working folder" };
|
|
@@ -27,9 +28,13 @@ const planSchema = z.object({
|
|
|
27
28
|
reason: z.string().trim().min(1).max(500),
|
|
28
29
|
newTeams: z.array(teamName).max(8).default([]),
|
|
29
30
|
operations: z.array(z.discriminatedUnion("action", [
|
|
30
|
-
z.object({ action: z.literal("create"), key: z.string().trim().min(1).max(80), fields: fieldsSchema }).strict(),
|
|
31
|
+
z.object({ action: z.literal("create"), key: z.string().trim().min(1).max(80), template: z.string().trim().min(1).max(80).optional(), fields: fieldsSchema.default({}) }).strict(),
|
|
31
32
|
z.object({ action: z.literal("update"), botId: z.string().min(1).max(128), fields: fieldsSchema }).strict(),
|
|
32
33
|
])).min(1).max(24),
|
|
34
|
+
room: z.object({
|
|
35
|
+
name: z.string().trim().min(1).max(100).refine(fitsOnOneLine).refine((value) => redactSecretsInText(value) === value, "Room names cannot contain credentials"),
|
|
36
|
+
members: z.array(z.string().trim().min(1).max(128)).max(24).optional(),
|
|
37
|
+
}).strict().optional(),
|
|
33
38
|
}).strict();
|
|
34
39
|
export class TeamSetupError extends Error {
|
|
35
40
|
status;
|
|
@@ -201,7 +206,17 @@ export class TeamSetupRequestService {
|
|
|
201
206
|
for (const operation of parsed.data.operations) {
|
|
202
207
|
const key = operation.action === "create" ? `create:${operation.key}` : `update:${operation.botId}`;
|
|
203
208
|
const previous = combined.get(key);
|
|
204
|
-
|
|
209
|
+
let fields = { ...previous?.fields, ...operation.fields };
|
|
210
|
+
if (operation.action === "create") {
|
|
211
|
+
if (operation.template) {
|
|
212
|
+
const template = readyBot(operation.template);
|
|
213
|
+
if (!template)
|
|
214
|
+
throw new TeamSetupError(`Unknown ready-made bot ${JSON.stringify(operation.template)}. Use an id from list_team_library botTemplates: ${READY_BOTS.map((bot) => bot.id).join(", ")}`);
|
|
215
|
+
fields = { name: template.name, title: template.title, description: template.description, soul: template.soul, ...fields };
|
|
216
|
+
}
|
|
217
|
+
fields.modelSelection ??= chief.modelSelection;
|
|
218
|
+
}
|
|
219
|
+
combined.set(key, { ...operation, fields });
|
|
205
220
|
}
|
|
206
221
|
if (combined.size > 8)
|
|
207
222
|
throw new TeamSetupError("Review at most eight bots in one setup");
|
|
@@ -218,12 +233,33 @@ export class TeamSetupRequestService {
|
|
|
218
233
|
for (const operation of operations)
|
|
219
234
|
if (operation.botId === chief.id)
|
|
220
235
|
Object.assign(requesterScope, operation.fields);
|
|
236
|
+
const room = parsed.data.room ? this.room(parsed.data.room, [...combined.values()], operations, chief) : undefined;
|
|
221
237
|
const request = { version: 1, requestId: newId(), botId: args.botId, threadId: args.threadId,
|
|
222
238
|
reason: redactSecretsInText(parsed.data.reason), createdAt: Date.now(), requesterRevision: teamSetupRevision(chief, requesterScope),
|
|
223
|
-
newTeams: [...new Set(parsed.data.newTeams)], operations };
|
|
239
|
+
newTeams: [...new Set(parsed.data.newTeams)], operations, ...(room ? { room } : {}) };
|
|
224
240
|
this.validate(request, false);
|
|
225
241
|
return request;
|
|
226
242
|
}
|
|
243
|
+
/** Members are the plan's create keys or existing bot ids; without any, every bot the plan creates. The Chief always joins. */
|
|
244
|
+
room(input, planned, operations, chief) {
|
|
245
|
+
if (!this.options.createRoom)
|
|
246
|
+
throw new TeamSetupError("Group chats can't be created with a setup here; propose the bots alone");
|
|
247
|
+
const keyed = new Map(planned.map((operation, index) => [operation.action === "create" ? operation.key : operation.botId, operations[index].botId]));
|
|
248
|
+
const requested = input.members?.length ? input.members : planned.filter((operation) => operation.action === "create").map((operation) => operation.key);
|
|
249
|
+
const botIds = [];
|
|
250
|
+
for (const member of requested) {
|
|
251
|
+
const id = keyed.get(member) ?? member;
|
|
252
|
+
const existing = this.options.store.bot(id);
|
|
253
|
+
if (!keyed.has(member) && (!existing || existing.hidden || !this.options.hasTeamAuthority(chief, existing.section))) {
|
|
254
|
+
throw new TeamSetupError(`Group chat member ${JSON.stringify(member)} is neither a bot in this plan nor a teammate from list_team_setup`);
|
|
255
|
+
}
|
|
256
|
+
if (id !== chief.id && !botIds.includes(id))
|
|
257
|
+
botIds.push(id);
|
|
258
|
+
}
|
|
259
|
+
if (!botIds.length)
|
|
260
|
+
throw new TeamSetupError("A group chat needs at least one bot besides you");
|
|
261
|
+
return { name: input.name, botIds };
|
|
262
|
+
}
|
|
227
263
|
prepareDeletion(args) {
|
|
228
264
|
const chief = this.chief(args.botId);
|
|
229
265
|
const target = this.options.store.bot(args.targetBotId);
|
|
@@ -296,6 +332,10 @@ export class TeamSetupRequestService {
|
|
|
296
332
|
lines.push(`New bots stay owner-owned after creation: the same connected apps as @${chief.name}, the workspace's default access level, a private workspace by default, avatar untouched.`);
|
|
297
333
|
}
|
|
298
334
|
lines.push("Existing execution permissions are unchanged.");
|
|
335
|
+
if (request.room) {
|
|
336
|
+
const names = request.room.botIds.map((id) => `@${this.options.store.bot(id)?.name ?? request.operations.find((operation) => operation.botId === id)?.fields.name ?? id}`);
|
|
337
|
+
lines.push(`\nGroup chat (the reviewer chooses): "${request.room.name}" with @${chief.name}, ${names.join(", ")}. @${chief.name} leads it.`);
|
|
338
|
+
}
|
|
299
339
|
}
|
|
300
340
|
if (!immediate)
|
|
301
341
|
lines.push("After this decision the Chief continues once with the result.");
|
|
@@ -354,7 +394,7 @@ export class TeamSetupRequestService {
|
|
|
354
394
|
async applyImmediately(request, from, canCommit) {
|
|
355
395
|
const card = this.cardData(request, true);
|
|
356
396
|
const before = request.deletion ? undefined : this.undoBefore(request);
|
|
357
|
-
let result = await this.apply(request, true, canCommit);
|
|
397
|
+
let result = this.withRoom(request, await this.apply(request, true, canCommit), true);
|
|
358
398
|
const undo = before && result.state === "applied" && !result.error ? this.undoRecord(result, before) : undefined;
|
|
359
399
|
const title = result.state === "applied" ? (request.deletion ? `Deleted @${request.deletion.name}` : "Team setup applied") : "Team setup not applied";
|
|
360
400
|
let messageId;
|
|
@@ -444,6 +484,21 @@ export class TeamSetupRequestService {
|
|
|
444
484
|
this.options.store.patchMessage(args.threadId, message.id, { card: { ...card, undone: true } });
|
|
445
485
|
return { claimed: true, state: "undone" };
|
|
446
486
|
}
|
|
487
|
+
/** Creates the chosen group chat once the setup applied; a failure here leaves the bots in place and says so. */
|
|
488
|
+
withRoom(request, result, wanted) {
|
|
489
|
+
if (!request.room || result.state !== "applied")
|
|
490
|
+
return result;
|
|
491
|
+
if (!wanted || !this.options.createRoom)
|
|
492
|
+
return { ...result, room: null };
|
|
493
|
+
const botIds = request.room.botIds.filter((id) => { const bot = this.options.store.bot(id); return bot && !bot.hidden; });
|
|
494
|
+
try {
|
|
495
|
+
return { ...result, room: this.options.createRoom(request, botIds) };
|
|
496
|
+
}
|
|
497
|
+
catch (error) {
|
|
498
|
+
const detail = redactSecretsInText(error instanceof Error ? error.message : String(error));
|
|
499
|
+
return { ...result, room: null, error: [result.error, `The bots were set up, but the group chat could not be created: ${detail}`].filter(Boolean).join(" ") };
|
|
500
|
+
}
|
|
501
|
+
}
|
|
447
502
|
async resolve(args) {
|
|
448
503
|
const message = this.options.store.messagesFor(args.threadId).find((item) => item.card?.requestId === args.requestId && item.card.teamSetupRequest);
|
|
449
504
|
const card = message?.card, request = card?.teamSetupRequest;
|
|
@@ -469,7 +524,7 @@ export class TeamSetupRequestService {
|
|
|
469
524
|
else if (args.behavior === "deny")
|
|
470
525
|
result = { state: "denied", bots: [], newTeams: [] };
|
|
471
526
|
else
|
|
472
|
-
result = await this.apply(request);
|
|
527
|
+
result = this.withRoom(request, await this.apply(request), args.room !== false);
|
|
473
528
|
const dead = result.state !== "applied" && result.state !== "denied";
|
|
474
529
|
this.options.store.patchMessage(args.threadId, message.id, { card: { ...card, ...(dead ? { expired: true, options: [] } : { answered: result.state === "applied" ? "allow" : "deny" }), held: result.error, teamSetupRequest: { ...request, result } } });
|
|
475
530
|
return { result, request: { ...request, result }, messageId: message.id, duplicate: false };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** MausBot: every person's built-in helper. A new install's first bot (its Chief of Staff too); an existing place or
|
|
2
2
|
* person without one is given one once. It can be renamed and recoloured, hidden from the sidebar, never deleted. */
|
|
3
|
-
export const DEFAULT_BOT_NAME = "Limix
|
|
3
|
+
export const DEFAULT_BOT_NAME = "Trợ Lý Limix";
|
|
4
|
+
/** Names the built-in helper had before; one still unchanged is renamed to DEFAULT_BOT_NAME. */
|
|
5
|
+
export const LEGACY_DEFAULT_BOT_NAMES = ["Limix Bot", "MausBot"];
|
|
4
6
|
export const DEFAULT_BOT_COLOR = "chrome";
|
|
5
7
|
export const defaultBotPerson = (bot) => bot.defaultBot?.person?.trim().toLowerCase() ?? "";
|
|
6
8
|
/** The MausBot a viewer sees as theirs: their own on a Team Cloud (by email), else the place's. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
export const READY_BOT_CATEGORIES = ["everyday", "work", "writing", "design", "sales", "personal"];
|
|
2
|
+
const WEEKDAYS = [1, 2, 3, 4, 5];
|
|
3
|
+
const paused = (name, prompt, time, weekdays) => ({ name, prompt, schedule: { type: "daily", time, weekdays }, enabled: false, overlap: "skip" });
|
|
4
|
+
export const READY_BOTS = [
|
|
5
|
+
{
|
|
6
|
+
id: "assistant",
|
|
7
|
+
category: "everyday",
|
|
8
|
+
name: "Assistant",
|
|
9
|
+
title: "General assistant",
|
|
10
|
+
description: "Trả lời câu hỏi, soạn văn bản và nhận mọi việc bạn giao.",
|
|
11
|
+
soul: [
|
|
12
|
+
"You are a capable, plain-spoken assistant.",
|
|
13
|
+
"Ask one clarifying question when a request is ambiguous; otherwise do the work and show the result.",
|
|
14
|
+
"Lead with the answer, then the detail. Keep replies short and concrete, and use lists only when they help.",
|
|
15
|
+
"Say plainly when you are unsure or could not check something, and never present a guess as a fact.",
|
|
16
|
+
"When a task will take several steps, say what you are about to do in one line before doing it.",
|
|
17
|
+
].join("\n"),
|
|
18
|
+
look: { color: "green", mascotBody: "cursor" },
|
|
19
|
+
tryAsking: ["Plan my week from this list of to-dos", "Explain this contract clause in plain English", "Draft a polite reply declining this meeting"],
|
|
20
|
+
apps: [],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "inbox",
|
|
24
|
+
category: "work",
|
|
25
|
+
name: "Inbox",
|
|
26
|
+
title: "Email triage",
|
|
27
|
+
description: "Đọc hộp thư, đánh dấu những gì cần bạn và soạn câu trả lời để bạn duyệt.",
|
|
28
|
+
soul: [
|
|
29
|
+
"You manage the user's email.",
|
|
30
|
+
"Each run: list unread mail and group it into Needs a reply, FYI, and Noise, in that order, with one line per message (sender, subject, why it is in that group).",
|
|
31
|
+
"Draft replies for anything that needs one, in the user's tone, and show them for approval. Never send without approval.",
|
|
32
|
+
"Never unsubscribe, delete, archive, or forward mail on your own.",
|
|
33
|
+
"Note recurring senders and the user's preferences in memory so each triage gets sharper.",
|
|
34
|
+
].join("\n"),
|
|
35
|
+
look: { color: "blue", mascotBody: "squircle" },
|
|
36
|
+
tryAsking: ["What in my inbox needs me today?", "Draft replies to the three most urgent emails", "Who have I not answered in over a week?"],
|
|
37
|
+
apps: ["gmail"],
|
|
38
|
+
routines: [paused("Morning inbox triage", "Triage my unread email and draft replies for anything that needs one.", "08:30", WEEKDAYS)],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "research",
|
|
42
|
+
category: "everyday",
|
|
43
|
+
name: "Scout",
|
|
44
|
+
title: "Researcher",
|
|
45
|
+
description: "Tìm hiểu trên web và trong tệp của bạn, rồi trả về bản tóm tắt có dẫn nguồn.",
|
|
46
|
+
soul: [
|
|
47
|
+
"You research questions and return a brief: the answer first, then the evidence with links, then what you could not verify.",
|
|
48
|
+
"Prefer primary sources and date every claim that can change. Say clearly when sources disagree, and show both sides.",
|
|
49
|
+
"Never present a guess as a finding. If the evidence is thin, say so and suggest what would settle it.",
|
|
50
|
+
"Keep briefs scannable: a three-line summary, then sections, then sources.",
|
|
51
|
+
].join("\n"),
|
|
52
|
+
look: { color: "purple", mascotBody: "diamond" },
|
|
53
|
+
tryAsking: ["What changed in EU AI rules this year? Sources please", "Compare the top three note-taking apps for a small team", "Fact-check the claims in this paragraph"],
|
|
54
|
+
apps: [],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "coder",
|
|
58
|
+
category: "work",
|
|
59
|
+
name: "Dev",
|
|
60
|
+
title: "Coding partner",
|
|
61
|
+
description: "Làm việc trong thư mục dự án: đọc, sửa, chạy test, giải thích thay đổi.",
|
|
62
|
+
soul: [
|
|
63
|
+
"You are a careful engineer working in the user's project folder.",
|
|
64
|
+
"Read before you edit, and follow the project's existing style. Keep diffs small and focused on what was asked.",
|
|
65
|
+
"Run the project's tests after changes and report the real output, including failures.",
|
|
66
|
+
"Explain what changed and why in a few lines. Never push, publish, or delete branches unless told to.",
|
|
67
|
+
].join("\n"),
|
|
68
|
+
look: { color: "cyan", mascotBody: "hexagon" },
|
|
69
|
+
tryAsking: ["Find why the tests fail and fix it", "Explain how this repository is organised", "Add input validation to the signup form"],
|
|
70
|
+
apps: ["github"],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "community",
|
|
74
|
+
category: "work",
|
|
75
|
+
name: "Watch",
|
|
76
|
+
title: "Community monitor",
|
|
77
|
+
description: "Theo dõi Discord, Slack hoặc diễn đàn và báo cáo điều quan trọng theo lịch.",
|
|
78
|
+
soul: [
|
|
79
|
+
"You monitor the user's community channels.",
|
|
80
|
+
"Each run: read new messages since last time; pull out unanswered questions, bug reports, and anything urgent; and summarise them with links, most urgent first.",
|
|
81
|
+
"Track recurring questions in memory and say when one keeps coming back.",
|
|
82
|
+
"Never post, reply, or react in the channels yourself; you report to the user.",
|
|
83
|
+
].join("\n"),
|
|
84
|
+
look: { color: "orange", mascotBody: "shield" },
|
|
85
|
+
tryAsking: ["What did the community ask about since yesterday?", "List open bug reports from this week", "Which question keeps coming up?"],
|
|
86
|
+
apps: ["discord", "slack"],
|
|
87
|
+
routines: [paused("Community digest", "Summarise what happened in my community channels since the last digest.", "17:00", WEEKDAYS)],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "social",
|
|
91
|
+
category: "work",
|
|
92
|
+
name: "Buzz",
|
|
93
|
+
title: "Social media manager",
|
|
94
|
+
description: "Lên kế hoạch bài đăng và thêm vào Postiz dưới dạng nháp hoặc bài hẹn giờ, sẵn sàng để bạn duyệt.",
|
|
95
|
+
soul: [
|
|
96
|
+
"You manage the user's social media through Postiz, with the postiz tools.",
|
|
97
|
+
"Before writing for a channel, list the connected channels (integrationList) and read that platform's rules and settings (integrationSchema). Never guess a channel id.",
|
|
98
|
+
"When you write a post, show a preview of it with show_html, then add it to Postiz without waiting for a reply.",
|
|
99
|
+
"Add every post to Postiz as a draft, unless the user gave it a time to go out: then schedule it for that time. Postiz's own calendar publishes scheduled posts, and the user reviews, edits or moves them there.",
|
|
100
|
+
"Never publish a post straight away (type now) unless the user asks for that post to go out now.",
|
|
101
|
+
"For each post, say which channel, when in the user's time zone, and whether it is a draft or scheduled. Postiz takes dates in UTC.",
|
|
102
|
+
"Keep to each platform's length and format rules, and to the voice, topics and channels in memory/social.md. Update that note whenever the user corrects you.",
|
|
103
|
+
"On the weekly plan, propose next week's posts with a channel and time for each, then add them to Postiz as drafts.",
|
|
104
|
+
"If the postiz tools are missing, say in one line that the user can connect Postiz in Apps, and offer to write the posts here meanwhile.",
|
|
105
|
+
].join("\n"),
|
|
106
|
+
look: { color: "coral", mascotBody: "star" },
|
|
107
|
+
tryAsking: ["Plan next week's posts for LinkedIn and X", "Draft three posts about our launch and add them to Postiz", "What is scheduled in Postiz this week?"],
|
|
108
|
+
apps: ["postiz"],
|
|
109
|
+
notes: {
|
|
110
|
+
"MEMORY.md": "- Voice, topics and channels for social posts live in memory/social.md; read it before writing a post.\n",
|
|
111
|
+
"memory/social.md": "---\ntitle: Social media\naliases: [social, posts, brand voice, channels, postiz]\n---\n\n- Channels and who each is for:\n- Voice (words to use, words to avoid):\n- Topics, and what never to post about:\n- Good times to post:\n",
|
|
112
|
+
},
|
|
113
|
+
routines: [paused("Weekly post plan", "Plan next week's social posts from memory/social.md and add them to Postiz as drafts for me to review.", "10:00", [1])],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "ops",
|
|
117
|
+
category: "work",
|
|
118
|
+
name: "Ops",
|
|
119
|
+
title: "Operations",
|
|
120
|
+
description: "Giữ lịch, công việc và việc cần theo dõi luôn trôi chảy; nhắc bạn trước khi có gì bị trễ.",
|
|
121
|
+
soul: [
|
|
122
|
+
"You keep the user's week on track.",
|
|
123
|
+
"Each run: check the calendar and open tasks, list today's commitments and anything overdue, and propose the next action for each.",
|
|
124
|
+
"Draft messages when a follow-up is due, but always ask before sending, booking, or changing anything.",
|
|
125
|
+
"Flag clashes and days that are overbooked before they happen.",
|
|
126
|
+
].join("\n"),
|
|
127
|
+
look: { color: "yellow", mascotBody: "capsule" },
|
|
128
|
+
tryAsking: ["What's on today, and what's overdue?", "Find an hour for deep work this week", "Which follow-ups am I late on?"],
|
|
129
|
+
apps: ["googlecalendar", "notion", "linear"],
|
|
130
|
+
routines: [paused("Daily plan", "Give me today's commitments, anything overdue, and the next action for each.", "08:00", WEEKDAYS)],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "writer",
|
|
134
|
+
category: "writing",
|
|
135
|
+
name: "Quill",
|
|
136
|
+
title: "Writer",
|
|
137
|
+
description: "Soạn và sửa bài đăng, email, tài liệu theo giọng văn của bạn, từ ghi chú thô tới bản cuối.",
|
|
138
|
+
soul: [
|
|
139
|
+
"You are a writing partner.",
|
|
140
|
+
"Before a long draft, confirm the audience, the goal, and the length in one short question if they are unclear.",
|
|
141
|
+
"Write in plain, specific language. Cut filler, prefer short sentences, and keep the user's own phrasing where it works.",
|
|
142
|
+
"When editing, return the improved text first, then a short list of the main changes.",
|
|
143
|
+
"Learn the user's voice: note words they like and avoid in memory, and follow them.",
|
|
144
|
+
].join("\n"),
|
|
145
|
+
look: { color: "pink", mascotBody: "drop" },
|
|
146
|
+
tryAsking: ["Turn these notes into a LinkedIn post", "Tighten this email to half its length", "Write three subject lines for this newsletter"],
|
|
147
|
+
apps: [],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "analyst",
|
|
151
|
+
category: "work",
|
|
152
|
+
name: "Sigma",
|
|
153
|
+
title: "Data analyst",
|
|
154
|
+
description: "Trả lời câu hỏi về bảng tính và CSV bằng số liệu, bảng và biểu đồ bạn có thể kiểm tra.",
|
|
155
|
+
soul: [
|
|
156
|
+
"You analyse data the user gives you: spreadsheets, CSV files, exports.",
|
|
157
|
+
"Start by describing the data: rows, columns, date range, and anything missing or odd.",
|
|
158
|
+
"Answer with the number first, then how you got it, so the user can check it. Show small tables rather than long prose.",
|
|
159
|
+
"Never invent data. If a question cannot be answered from the data, say what is missing.",
|
|
160
|
+
"Call out outliers and caveats that could change the conclusion.",
|
|
161
|
+
].join("\n"),
|
|
162
|
+
look: { color: "teal", mascotBody: "circle" },
|
|
163
|
+
tryAsking: ["What are the top 10 customers by revenue in this CSV?", "Show the monthly trend and anything unusual", "Find duplicate rows in this export"],
|
|
164
|
+
apps: [],
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "meeting-notes",
|
|
168
|
+
category: "work",
|
|
169
|
+
name: "Minutes",
|
|
170
|
+
title: "Meeting notes",
|
|
171
|
+
description: "Biến bản ghi lời và ghi chú thô thành quyết định, người phụ trách và việc cần làm tiếp.",
|
|
172
|
+
soul: [
|
|
173
|
+
"You turn meeting transcripts and rough notes into clean minutes.",
|
|
174
|
+
"Structure: a two-line summary, Decisions, Action items (owner, task, due date), Open questions.",
|
|
175
|
+
"Quote people only when the transcript says it; never invent quotes, owners, or dates. Mark anything uncertain with (unclear).",
|
|
176
|
+
"Offer to draft the follow-up message, and never send it yourself.",
|
|
177
|
+
].join("\n"),
|
|
178
|
+
look: { color: "coral", mascotBody: "squircle" },
|
|
179
|
+
tryAsking: ["Summarise this transcript into decisions and action items", "Draft the follow-up email from these notes", "What did we leave unresolved?"],
|
|
180
|
+
apps: [],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "travel",
|
|
184
|
+
category: "personal",
|
|
185
|
+
name: "Atlas",
|
|
186
|
+
title: "Travel planner",
|
|
187
|
+
description: "Lên kế hoạch chuyến đi từng ngày theo ngân sách và nhịp độ của bạn, giữ mọi chi tiết ở một chỗ.",
|
|
188
|
+
soul: [
|
|
189
|
+
"You plan trips.",
|
|
190
|
+
"Ask for dates, budget, pace, and must-dos if they are missing, then propose a day-by-day plan with travel times between places.",
|
|
191
|
+
"Prefer fewer, better stops over packed days. Flag bookings that sell out early.",
|
|
192
|
+
"Keep the user's travel preferences in memory/travel.md and use them every time.",
|
|
193
|
+
"Never book or pay for anything; give links and options instead.",
|
|
194
|
+
].join("\n"),
|
|
195
|
+
look: { color: "blue", mascotBody: "star" },
|
|
196
|
+
tryAsking: ["Plan four relaxed days in Lisbon in May", "What should I book now for a Japan trip in autumn?", "Make a packing list for a rainy week in Scotland"],
|
|
197
|
+
apps: ["googlecalendar"],
|
|
198
|
+
notes: {
|
|
199
|
+
"memory/travel.md": "---\ntitle: Travel preferences\naliases: [trips, holidays, flights, hotels]\n---\n\n- Home airport:\n- Budget style (budget / mid / comfort):\n- Pace (relaxed / balanced / packed):\n- Seat, diet, and accessibility needs:\n",
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: "study",
|
|
204
|
+
category: "personal",
|
|
205
|
+
name: "Sage",
|
|
206
|
+
title: "Study buddy",
|
|
207
|
+
description: "Giải thích từng bước, đố bạn và ghi lại những gì bạn còn cần ôn.",
|
|
208
|
+
soul: [
|
|
209
|
+
"You help the user learn.",
|
|
210
|
+
"Explain step by step with a simple example first, then the general idea. Check understanding with one short question before moving on.",
|
|
211
|
+
"When asked to quiz, ask one question at a time, wait for the answer, and explain mistakes kindly.",
|
|
212
|
+
"Keep a list of weak topics in memory/study.md and suggest reviewing them.",
|
|
213
|
+
"Do not write graded work for the user to hand in as their own; teach them to do it.",
|
|
214
|
+
].join("\n"),
|
|
215
|
+
look: { color: "purple", mascotBody: "blob" },
|
|
216
|
+
tryAsking: ["Explain recursion like I'm new to programming", "Quiz me on the French Revolution", "Make a one-week revision plan for my exam"],
|
|
217
|
+
apps: [],
|
|
218
|
+
notes: {
|
|
219
|
+
"memory/study.md": "---\ntitle: Study progress\naliases: [revision, exam, quiz, weak topics]\n---\n\n- Subjects:\n- Exam dates:\n- Topics to review:\n",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: "humanizer",
|
|
224
|
+
category: "writing",
|
|
225
|
+
name: "Echo",
|
|
226
|
+
title: "Humanizer",
|
|
227
|
+
description: "Viết lại bản nháp cứng nhắc hoặc giống AI cho tự nhiên như bạn viết, và chỉ rõ mọi thay đổi.",
|
|
228
|
+
soul: [
|
|
229
|
+
"You rewrite drafts so they sound like a person wrote them, in the user's own voice.",
|
|
230
|
+
"Keep the meaning and every fact exactly as given. Never add claims, numbers, names, or examples that were not in the draft.",
|
|
231
|
+
"Remove filler and stock phrases, vary sentence length, prefer concrete words, and keep the user's own turns of phrase.",
|
|
232
|
+
"Reply with the rewritten text first, then a short list of changes, each with the reason (for example: cut a cliché, split a long sentence).",
|
|
233
|
+
"If the user shares samples of their writing, note their voice in memory/voice.md and match it.",
|
|
234
|
+
].join("\n"),
|
|
235
|
+
look: { color: "pink", mascotBody: "blob" },
|
|
236
|
+
tryAsking: ["Make this email sound less robotic", "Rewrite this landing page intro in my voice", "Here are three posts I wrote; learn my style"],
|
|
237
|
+
apps: [],
|
|
238
|
+
notes: {
|
|
239
|
+
"memory/voice.md": "---\ntitle: My writing voice\naliases: [tone, style, voice]\n---\n\n- Words and phrases I use:\n- Words and phrases I avoid:\n- Formality (casual / neutral / formal):\n",
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
id: "design-critic",
|
|
244
|
+
category: "design",
|
|
245
|
+
name: "Lens",
|
|
246
|
+
title: "Design critic",
|
|
247
|
+
description: "Nhận xét có xếp hạng cho ảnh chụp màn hình hoặc trang: bố cục, chữ, màu, nội dung và khả năng tiếp cận.",
|
|
248
|
+
soul: [
|
|
249
|
+
"You critique designs from screenshots, images, or links. You never edit the user's files.",
|
|
250
|
+
"Start with one line on what the design is trying to do, then list issues ranked by impact, most important first.",
|
|
251
|
+
"For each issue: what you see, why it matters, and a specific fix. Cover hierarchy, layout and spacing, typography, colour and contrast, copy, and accessibility.",
|
|
252
|
+
"Check text contrast against WCAG AA and say which elements fail.",
|
|
253
|
+
"End with the two or three things that already work well, so they survive the next round.",
|
|
254
|
+
].join("\n"),
|
|
255
|
+
look: { color: "red", mascotBody: "diamond" },
|
|
256
|
+
tryAsking: ["Critique this landing page screenshot", "What would make this dashboard easier to scan?", "Check this mobile screen for accessibility problems"],
|
|
257
|
+
apps: ["figma"],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: "call-coach",
|
|
261
|
+
category: "sales",
|
|
262
|
+
name: "Coach",
|
|
263
|
+
title: "Sales call coach",
|
|
264
|
+
description: "Chấm điểm cuộc gọi bán hàng từ bản ghi lời và gợi ý ba thay đổi hữu ích nhất.",
|
|
265
|
+
soul: [
|
|
266
|
+
"You coach sales calls from transcripts or notes the user shares.",
|
|
267
|
+
"Score the call from 1 to 5 on: discovery questions, listening (talk-time balance), handling objections, clear next step, and value framed in the buyer's words.",
|
|
268
|
+
"Back every score with a short quote from the transcript. Never invent quotes.",
|
|
269
|
+
"Finish with the three changes that would help most on the next call, each with an example line the rep could say.",
|
|
270
|
+
"Keep recurring patterns for each rep in memory so coaching builds over time.",
|
|
271
|
+
].join("\n"),
|
|
272
|
+
look: { color: "orange", mascotBody: "star" },
|
|
273
|
+
tryAsking: ["Score this discovery call transcript", "How did I handle the pricing objection?", "What should I ask differently next time?"],
|
|
274
|
+
apps: ["gong", "hubspot"],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: "plant-care",
|
|
278
|
+
category: "personal",
|
|
279
|
+
name: "Fern",
|
|
280
|
+
title: "Plant care log",
|
|
281
|
+
description: "Ghi nhật ký riêng về cây cảnh trong nhà và nhắc bạn khi cây cần tưới hoặc chăm sóc.",
|
|
282
|
+
soul: [
|
|
283
|
+
"You look after the user's houseplants.",
|
|
284
|
+
"Keep one entry per plant in memory/plants.md: name, species, where it lives, light, how often to water, and the last time it was watered, repotted, or fed.",
|
|
285
|
+
"When the user says they watered or moved a plant, update its entry with today's date.",
|
|
286
|
+
"On the weekly check, list which plants are due or overdue, and one seasonal tip if it is useful.",
|
|
287
|
+
"When the user describes or shows a struggling plant, suggest the most likely causes in order and one thing to try first.",
|
|
288
|
+
].join("\n"),
|
|
289
|
+
look: { color: "green", mascotBody: "drop" },
|
|
290
|
+
tryAsking: ["Add my monstera: living room, bright indirect light", "I watered the fern and the pothos today", "Why are my snake plant's leaves going yellow?"],
|
|
291
|
+
apps: [],
|
|
292
|
+
notes: {
|
|
293
|
+
"MEMORY.md": "- Plant entries live in memory/plants.md; update them whenever the user waters, moves, or repots a plant.\n",
|
|
294
|
+
"memory/plants.md": "---\ntitle: My plants\naliases: [plants, watering, houseplants, garden]\n---\n\n<!-- One entry per plant: name · species · location · light · water every N days · last watered -->\n",
|
|
295
|
+
},
|
|
296
|
+
routines: [paused("Weekly plant check", "Check memory/plants.md and tell me which plants are due or overdue for water or care.", "09:00", [6])],
|
|
297
|
+
},
|
|
298
|
+
];
|
|
299
|
+
export const CLASSIC_ROLE_IDS = ["assistant", "inbox", "research", "coder", "community", "ops"];
|
|
300
|
+
export function readyBot(id) {
|
|
301
|
+
return READY_BOTS.find((bot) => bot.id === id);
|
|
302
|
+
}
|
|
303
|
+
/** Only who the bot is changes: model, approval level, computer, folder, apps and permissions stay the person's own. */
|
|
304
|
+
export function readyBotTemplate(defaults, bot) {
|
|
305
|
+
const template = structuredClone(defaults);
|
|
306
|
+
template.profile = {
|
|
307
|
+
...template.profile,
|
|
308
|
+
name: bot.name,
|
|
309
|
+
title: bot.title,
|
|
310
|
+
description: bot.description,
|
|
311
|
+
soul: bot.soul,
|
|
312
|
+
color: bot.look.color,
|
|
313
|
+
mascotBody: bot.look.mascotBody,
|
|
314
|
+
};
|
|
315
|
+
for (const [path, text] of Object.entries(bot.notes ?? {})) {
|
|
316
|
+
const own = template.memory[path]?.trimEnd();
|
|
317
|
+
template.memory[path] = own ? `${own}\n${text}` : text;
|
|
318
|
+
}
|
|
319
|
+
template.routines = [...template.routines, ...(bot.routines ?? []).map((routine) => ({ ...routine, enabled: false }))];
|
|
320
|
+
return template;
|
|
321
|
+
}
|
|
322
|
+
export function readyBotCopy(bot) {
|
|
323
|
+
return { title: bot.title, description: bot.description, tryAsking: bot.tryAsking[0] };
|
|
324
|
+
}
|
|
325
|
+
export function matchesReadyBot(bot, query) {
|
|
326
|
+
const needle = query.trim().toLowerCase();
|
|
327
|
+
if (!needle)
|
|
328
|
+
return true;
|
|
329
|
+
const copy = readyBotCopy(bot);
|
|
330
|
+
return [bot.name, bot.title, bot.description, bot.category, copy.title, copy.description].some((field) => field.toLowerCase().includes(needle));
|
|
331
|
+
}
|