Skip to content

Commit 054432d

Browse files
authored
feat: introduces the new home for the social controllers (#8321)
## Explanation This PR adds a new package @metamask/social-controllers to serve as the home for social related controllers (e.g. leaderboard and follow-trading). Subsequent PRs will add the actual controllers implementations. Added team-social-ai as the owner in teams.json Updated .github/CODEOWNERS <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [ ] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: adds a new package scaffold and updates repo metadata/build references, with no production logic changes beyond a placeholder export and test. > > **Overview** > Introduces a new `@metamask/social-controllers` package as the new home for social-related controllers, including initial TS build/test/docs configuration and a placeholder `greeter` export with a Jest test. > > Wires the package into the monorepo by updating root `tsconfig` references, `yarn.lock`, the root `README` package list/dependency graph, and adds ownership metadata in `.github/CODEOWNERS` and `teams.json` (owned by `@MetaMask/social-ai`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 6b0e623. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 33cb54f commit 054432d

File tree

16 files changed

+230
-3
lines changed

16 files changed

+230
-3
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
## Social AI Team
4343
/packages/ai-controllers @MetaMask/social-ai
44+
/packages/social-controllers @MetaMask/social-ai
4445

4546
## Ramp Team
4647
/packages/ramps-controller @MetaMask/ramp
@@ -219,3 +220,5 @@
219220
/packages/ai-controllers/CHANGELOG.md @MetaMask/social-ai @MetaMask/core-platform
220221
/packages/client-controller/package.json @MetaMask/core-platform @MetaMask/extension-platform @MetaMask/mobile-platform
221222
/packages/client-controller/CHANGELOG.md @MetaMask/core-platform @MetaMask/extension-platform @MetaMask/mobile-platform
223+
/packages/social-controllers/package.json @MetaMask/social-ai @MetaMask/core-platform
224+
/packages/social-controllers/CHANGELOG.md @MetaMask/social-ai @MetaMask/core-platform

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Each package in this repository has its own README where you can find installati
8989
- [`@metamask/selected-network-controller`](packages/selected-network-controller)
9090
- [`@metamask/shield-controller`](packages/shield-controller)
9191
- [`@metamask/signature-controller`](packages/signature-controller)
92+
- [`@metamask/social-controllers`](packages/social-controllers)
9293
- [`@metamask/storage-service`](packages/storage-service)
9394
- [`@metamask/subscription-controller`](packages/subscription-controller)
9495
- [`@metamask/transaction-controller`](packages/transaction-controller)
@@ -172,6 +173,7 @@ linkStyle default opacity:0.5
172173
selected_network_controller(["@metamask/selected-network-controller"]);
173174
shield_controller(["@metamask/shield-controller"]);
174175
signature_controller(["@metamask/signature-controller"]);
176+
social_controllers(["@metamask/social-controllers"]);
175177
storage_service(["@metamask/storage-service"]);
176178
subscription_controller(["@metamask/subscription-controller"]);
177179
transaction_controller(["@metamask/transaction-controller"]);
@@ -238,7 +240,10 @@ linkStyle default opacity:0.5
238240
assets_controllers --> transaction_controller;
239241
base_controller --> messenger;
240242
base_controller --> json_rpc_engine;
243+
base_data_service --> controller_utils;
244+
base_data_service --> messenger;
241245
bridge_controller --> accounts_controller;
246+
bridge_controller --> assets_controller;
242247
bridge_controller --> assets_controllers;
243248
bridge_controller --> base_controller;
244249
bridge_controller --> controller_utils;
@@ -256,6 +261,7 @@ linkStyle default opacity:0.5
256261
bridge_status_controller --> bridge_controller;
257262
bridge_status_controller --> controller_utils;
258263
bridge_status_controller --> gas_fee_controller;
264+
bridge_status_controller --> keyring_controller;
259265
bridge_status_controller --> network_controller;
260266
bridge_status_controller --> polling_controller;
261267
bridge_status_controller --> profile_sync_controller;
@@ -264,8 +270,8 @@ linkStyle default opacity:0.5
264270
chain_agnostic_permission --> permission_controller;
265271
claims_controller --> base_controller;
266272
claims_controller --> controller_utils;
267-
claims_controller --> messenger;
268273
claims_controller --> keyring_controller;
274+
claims_controller --> messenger;
269275
claims_controller --> profile_sync_controller;
270276
client_controller --> base_controller;
271277
client_controller --> messenger;
@@ -327,6 +333,7 @@ linkStyle default opacity:0.5
327333
gator_permissions_controller --> messenger;
328334
gator_permissions_controller --> transaction_controller;
329335
geolocation_controller --> base_controller;
336+
geolocation_controller --> controller_utils;
330337
geolocation_controller --> messenger;
331338
json_rpc_middleware_stream --> json_rpc_engine;
332339
keyring_controller --> base_controller;
@@ -341,6 +348,7 @@ linkStyle default opacity:0.5
341348
multichain_account_service --> base_controller;
342349
multichain_account_service --> keyring_controller;
343350
multichain_account_service --> messenger;
351+
multichain_account_service --> controller_utils;
344352
multichain_api_middleware --> chain_agnostic_permission;
345353
multichain_api_middleware --> controller_utils;
346354
multichain_api_middleware --> json_rpc_engine;
@@ -391,6 +399,13 @@ linkStyle default opacity:0.5
391399
perps_controller --> base_controller;
392400
perps_controller --> controller_utils;
393401
perps_controller --> messenger;
402+
perps_controller --> account_tree_controller;
403+
perps_controller --> geolocation_controller;
404+
perps_controller --> keyring_controller;
405+
perps_controller --> network_controller;
406+
perps_controller --> profile_sync_controller;
407+
perps_controller --> remote_feature_flag_controller;
408+
perps_controller --> transaction_controller;
394409
phishing_controller --> base_controller;
395410
phishing_controller --> controller_utils;
396411
phishing_controller --> messenger;
@@ -399,8 +414,6 @@ linkStyle default opacity:0.5
399414
polling_controller --> controller_utils;
400415
polling_controller --> network_controller;
401416
preferences_controller --> base_controller;
402-
preferences_controller --> controller_utils;
403-
preferences_controller --> keyring_controller;
404417
preferences_controller --> messenger;
405418
profile_metrics_controller --> accounts_controller;
406419
profile_metrics_controller --> base_controller;
@@ -419,6 +432,7 @@ linkStyle default opacity:0.5
419432
ramps_controller --> messenger;
420433
rate_limit_controller --> base_controller;
421434
rate_limit_controller --> messenger;
435+
react_data_query --> base_data_service;
422436
remote_feature_flag_controller --> base_controller;
423437
remote_feature_flag_controller --> controller_utils;
424438
remote_feature_flag_controller --> messenger;
@@ -466,6 +480,7 @@ linkStyle default opacity:0.5
466480
transaction_controller --> remote_feature_flag_controller;
467481
transaction_controller --> eth_block_tracker;
468482
transaction_controller --> eth_json_rpc_provider;
483+
transaction_pay_controller --> assets_controller;
469484
transaction_pay_controller --> assets_controllers;
470485
transaction_pay_controller --> base_controller;
471486
transaction_pay_controller --> bridge_controller;
@@ -474,6 +489,7 @@ linkStyle default opacity:0.5
474489
transaction_pay_controller --> gas_fee_controller;
475490
transaction_pay_controller --> messenger;
476491
transaction_pay_controller --> network_controller;
492+
transaction_pay_controller --> ramps_controller;
477493
transaction_pay_controller --> remote_feature_flag_controller;
478494
transaction_pay_controller --> transaction_controller;
479495
user_operation_controller --> approval_controller;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Initial release ([#8321](https://github.com/MetaMask/core/pull/8321))
13+
14+
[Unreleased]: https://github.com/MetaMask/core/
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
MIT License
2+
3+
Copyright (c) 2026 MetaMask
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `@metamask/social-controllers`
2+
3+
A collection of social related controllers
4+
5+
## Installation
6+
7+
`yarn add @metamask/social-controllers`
8+
9+
or
10+
11+
`npm install @metamask/social-controllers`
12+
13+
## Contributing
14+
15+
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* For a detailed explanation regarding each configuration property and type check, visit:
3+
* https://jestjs.io/docs/configuration
4+
*/
5+
6+
const merge = require('deepmerge');
7+
const path = require('path');
8+
9+
const baseConfig = require('../../jest.config.packages');
10+
11+
const displayName = path.basename(__dirname);
12+
13+
module.exports = merge(baseConfig, {
14+
// The display name when running multiple projects
15+
displayName,
16+
17+
// An object that configures minimum threshold enforcement for coverage results
18+
coverageThreshold: {
19+
global: {
20+
branches: 100,
21+
functions: 100,
22+
lines: 100,
23+
statements: 100,
24+
},
25+
},
26+
});
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "@metamask/social-controllers",
3+
"version": "0.0.0",
4+
"description": "A collection of social related controllers",
5+
"keywords": [
6+
"MetaMask",
7+
"Ethereum"
8+
],
9+
"homepage": "https://github.com/MetaMask/core/tree/main/packages/social-controllers#readme",
10+
"bugs": {
11+
"url": "https://github.com/MetaMask/core/issues"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/MetaMask/core.git"
16+
},
17+
"license": "MIT",
18+
"sideEffects": false,
19+
"exports": {
20+
".": {
21+
"import": {
22+
"types": "./dist/index.d.mts",
23+
"default": "./dist/index.mjs"
24+
},
25+
"require": {
26+
"types": "./dist/index.d.cts",
27+
"default": "./dist/index.cjs"
28+
}
29+
},
30+
"./package.json": "./package.json"
31+
},
32+
"main": "./dist/index.cjs",
33+
"types": "./dist/index.d.cts",
34+
"files": [
35+
"dist/"
36+
],
37+
"scripts": {
38+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
39+
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
40+
"build:docs": "typedoc",
41+
"changelog:update": "../../scripts/update-changelog.sh @metamask/social-controllers",
42+
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/social-controllers",
43+
"since-latest-release": "../../scripts/since-latest-release.sh",
44+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
45+
"test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
46+
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
47+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
48+
},
49+
"devDependencies": {
50+
"@metamask/auto-changelog": "^3.4.4",
51+
"@ts-bridge/cli": "^0.6.4",
52+
"@types/jest": "^29.5.14",
53+
"deepmerge": "^4.2.2",
54+
"jest": "^29.7.0",
55+
"ts-jest": "^29.2.5",
56+
"typedoc": "^0.25.13",
57+
"typedoc-plugin-missing-exports": "^2.0.0",
58+
"typescript": "~5.3.3"
59+
},
60+
"engines": {
61+
"node": "^18.18 || >=20"
62+
},
63+
"publishConfig": {
64+
"access": "public",
65+
"registry": "https://registry.npmjs.org/"
66+
}
67+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import greeter from '.';
2+
3+
describe('Test', () => {
4+
it('greets', () => {
5+
const name = 'Huey';
6+
const result = greeter(name);
7+
expect(result).toBe('Hello, Huey!');
8+
});
9+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* Example function that returns a greeting for the given name.
3+
*
4+
* @param name - The name to greet.
5+
* @returns The greeting.
6+
*/
7+
export default function greeter(name: string): string {
8+
return `Hello, ${name}!`;
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../tsconfig.packages.build.json",
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist",
6+
"rootDir": "./src"
7+
},
8+
"references": [],
9+
"include": ["../../types", "./src"]
10+
}

0 commit comments

Comments
 (0)