@rubytech/create-maxy-code 0.1.445 → 0.1.446

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.
Files changed (24) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/admin/mcp/dist/index.js +13 -3
  3. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  4. package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.d.ts +8 -0
  5. package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.d.ts.map +1 -1
  6. package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.js +20 -3
  7. package/payload/platform/plugins/admin/mcp/dist/tools/account-lifecycle.js.map +1 -1
  8. package/payload/platform/plugins/outlook/PLUGIN.md +1 -1
  9. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mailbox-list.test.js +23 -0
  10. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mailbox-list.test.js.map +1 -1
  11. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mailbox-registry.test.js +34 -1
  12. package/payload/platform/plugins/outlook/mcp/dist/__tests__/mailbox-registry.test.js.map +1 -1
  13. package/payload/platform/plugins/outlook/mcp/dist/auth/mailbox-registry.d.ts +26 -0
  14. package/payload/platform/plugins/outlook/mcp/dist/auth/mailbox-registry.d.ts.map +1 -1
  15. package/payload/platform/plugins/outlook/mcp/dist/auth/mailbox-registry.js +20 -3
  16. package/payload/platform/plugins/outlook/mcp/dist/auth/mailbox-registry.js.map +1 -1
  17. package/payload/platform/plugins/outlook/mcp/dist/index.js +2 -2
  18. package/payload/platform/plugins/outlook/mcp/dist/index.js.map +1 -1
  19. package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-list.d.ts +7 -0
  20. package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-list.d.ts.map +1 -1
  21. package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-list.js +4 -1
  22. package/payload/platform/plugins/outlook/mcp/dist/tools/mailbox-list.js.map +1 -1
  23. package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +9 -3
  24. package/payload/server/server.js +16 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy-code",
3
- "version": "0.1.445",
3
+ "version": "0.1.446",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy-code": "./dist/index.js"
@@ -28,7 +28,7 @@ import { publishSite } from "./tools/publish-site.js";
28
28
  import { resolveCapabilitiesHere } from "./tools/capabilities-here.js";
29
29
  import { runCatalogueCensus } from "./lib/catalogue-census.js";
30
30
  import { lifelineTool } from "../../../../lib/mcp-lifeline/dist/index.js";
31
- import { listAccountsFromDir, isHouseAccount, archiveAccountDir, provisionClientAccount, findHouseAccount, getChannelRoutingAccountId, setChannelRoutingAccountId, seedAccountGraphRoot, isPlaceholderOwnerName, refuseClientAdminAdd, readHouseAdminUserIds, setManagingAdmin, findClientAccountsManagedBy, reassignManagingAdmin, ACCOUNT_NODE_COUNT_CYPHER, ACCOUNT_PURGE_CYPHER, classifyManagingAdmin, ownerNameStatus, readManagingAdminUserId, setOwnerName, } from "./tools/account-lifecycle.js";
31
+ import { listAccountsFromDir, isHouseAccount, archiveAccountDir, provisionClientAccount, findHouseAccount, getChannelRoutingAccountId, setChannelRoutingAccountId, seedAccountGraphRoot, isPlaceholderOwnerName, isBlankBusinessName, refuseClientAdminAdd, readHouseAdminUserIds, setManagingAdmin, findClientAccountsManagedBy, reassignManagingAdmin, ACCOUNT_NODE_COUNT_CYPHER, ACCOUNT_PURGE_CYPHER, classifyManagingAdmin, ownerNameStatus, readManagingAdminUserId, setOwnerName, } from "./tools/account-lifecycle.js";
32
32
  function refusalGuidance(kind) {
33
33
  switch (kind) {
34
34
  case "unsafe-slug":
@@ -3416,10 +3416,11 @@ eagerTool(server, "account_roster", "Canonical per-account identity roster for t
3416
3416
  process.stderr.write(`${TAG} op=roster accounts=${accounts.length} nameless-owners=${namelessOwners} absent-mgr=${absentMgr} dangling-mgr=${danglingMgr}\n`);
3417
3417
  return { content: [{ type: "text", text: accounts.length ? `Account roster:\n\n${lines.join("\n")}` : "No accounts found." }] };
3418
3418
  });
3419
- eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this install (managed service). REQUIRES `ownerName`, the real name of the client business's owner (ask the operator for it — never invent it or reuse the house operator's name). OPTIONALLY takes `adminUserId`, the userId of the house team member who will manage this client (get the choices from admin-list; ask the operator, but omit it if the client is run by its owner rather than a house admin). Mints a UUID, scaffolds the account directory (agents, specialists, settings, account.json with role:\"client\", and managingAdminUserId when an admin is named), seeds default plugins, and seeds the account's graph root (a :LocalBusiness plus its owner :AdminUser and owner :Person carrying ownerName) so you can populate it immediately. Refuses if ownerName is missing/blank/the placeholder \"Owner\", or if a supplied adminUserId is not a current house admin. When no managing admin is set, that account's passive-intake tasks route to the install's primary admin. Returns the new accountId. Operator-only; never creates the house sub-account (that is the install itself).", {
3419
+ eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this install (managed service). REQUIRES `businessName`, the real name of the client business itself, and `ownerName`, the real name of the client business's owner (ask the operator for both — never invent them or reuse the house operator's name). OPTIONALLY takes `adminUserId`, the userId of the house team member who will manage this client (get the choices from admin-list; ask the operator, but omit it if the client is run by its owner rather than a house admin). Mints a UUID, scaffolds the account directory (agents, specialists, settings, account.json with role:\"client\", and managingAdminUserId when an admin is named), seeds default plugins, and seeds the account's graph root (a :LocalBusiness carrying businessName plus its owner :AdminUser and owner :Person carrying ownerName) so you can populate it immediately and the sub-account picker shows the business name at once. Refuses if businessName is missing/blank, if ownerName is missing/blank/the placeholder \"Owner\", or if a supplied adminUserId is not a current house admin. When no managing admin is set, that account's passive-intake tasks route to the install's primary admin. Returns the new accountId. Operator-only; never creates the house sub-account (that is the install itself).", {
3420
3420
  adminUserId: z.string().optional().describe("The userId of the house admin who will manage this client sub-account. Optional — omit it for a client run by its owner rather than a house admin (its passive-intake tasks then route to the install's primary admin). When supplied, it must be a current house admin (see admin-list) or creation is refused."),
3421
+ businessName: z.string().describe("The real name of the client business itself. Written onto the new sub-account's :LocalBusiness so the sub-account picker/header shows it immediately. Required — creation is refused when missing or blank. Ask the operator for the client's real business name; never invent it."),
3421
3422
  ownerName: z.string().describe("The real name of the client business's owner. Applied to both the owner AdminUser and owner Person for the new sub-account. Required — creation is refused when missing, blank, or the placeholder \"Owner\". Ask the operator; never reuse the house operator's name."),
3422
- }, async ({ adminUserId, ownerName }) => {
3423
+ }, async ({ adminUserId, businessName, ownerName }) => {
3423
3424
  if (!ACCOUNT_ID)
3424
3425
  return refuseNoAccount("account_create");
3425
3426
  // Task 1630 — a managing admin is optional. `adminUserId` omitted/blank ⇒ the
@@ -3436,6 +3437,14 @@ eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this
3436
3437
  process.stderr.write(`[account-create] op=refused reason=no-owner-name\n`);
3437
3438
  return { content: [{ type: "text", text: `account_create refused: give the client business owner's real name (ownerName). It cannot be blank or the placeholder "Owner". Ask the operator whose business this is.` }], isError: true };
3438
3439
  }
3440
+ // Task 1647 — the client business's own name is an equal hard precondition,
3441
+ // refused before any scaffold so a nameless create leaves no partial account
3442
+ // directory or rootless graph behind. The same predicate guards the seed
3443
+ // (seedAccountGraphRoot) as defence in depth.
3444
+ if (isBlankBusinessName(businessName)) {
3445
+ process.stderr.write(`[account-create] op=refused reason=no-business-name\n`);
3446
+ return { content: [{ type: "text", text: `account_create refused: give the client business's real name (businessName). It cannot be blank. Ask the operator what the client business is called.` }], isError: true };
3447
+ }
3439
3448
  if (managingAdminUserId && !readHouseAdminUserIds(ACCOUNTS_ROOT).includes(managingAdminUserId)) {
3440
3449
  process.stderr.write(`[account-lifecycle] op=create-refused reason=unknown-admin adminUserId=${managingAdminUserId.slice(0, 8)}\n`);
3441
3450
  return { content: [{ type: "text", text: `account_create refused: ${managingAdminUserId} is not a current house admin. Call admin-list for the valid managing-admin choices, or omit adminUserId to leave the client unmanaged.` }], isError: true };
@@ -3474,6 +3483,7 @@ eagerTool(server, "account_create", "Provision a new CLIENT sub-account on this
3474
3483
  accountId: newId,
3475
3484
  ownerUserId,
3476
3485
  ownerName,
3486
+ businessName,
3477
3487
  createdAt: new Date().toISOString(),
3478
3488
  });
3479
3489
  rootSeeded = businessSeeded && adminSeeded;