ma-agents 2.2.0 → 2.3.1
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/bin/cli.js
CHANGED
|
@@ -189,21 +189,37 @@ async function installWizard(preselectedSkill, preselectedAgents, customPath, fo
|
|
|
189
189
|
|
|
190
190
|
// Step 1: Select skills
|
|
191
191
|
if (selectedSkillIds.length === 0 || isUpdate) {
|
|
192
|
-
const {
|
|
193
|
-
type: '
|
|
194
|
-
name: '
|
|
195
|
-
message: '
|
|
196
|
-
choices:
|
|
197
|
-
title:
|
|
198
|
-
value:
|
|
199
|
-
|
|
200
|
-
})),
|
|
201
|
-
instructions: chalk.gray(' Use space to select, enter to confirm'),
|
|
202
|
-
min: 1
|
|
192
|
+
const { selectionType } = await prompts({
|
|
193
|
+
type: 'select',
|
|
194
|
+
name: 'selectionType',
|
|
195
|
+
message: 'Would you like to install all available skills or choose specific ones?',
|
|
196
|
+
choices: [
|
|
197
|
+
{ title: 'Install all available skills', value: 'all' },
|
|
198
|
+
{ title: 'Choose which skills to install', value: 'custom' }
|
|
199
|
+
]
|
|
203
200
|
});
|
|
204
201
|
|
|
205
|
-
if (!
|
|
206
|
-
|
|
202
|
+
if (!selectionType) process.exit(0);
|
|
203
|
+
|
|
204
|
+
if (selectionType === 'all') {
|
|
205
|
+
selectedSkillIds = skills.map(s => s.id);
|
|
206
|
+
} else {
|
|
207
|
+
const { skills: chosen } = await prompts({
|
|
208
|
+
type: 'multiselect',
|
|
209
|
+
name: 'skills',
|
|
210
|
+
message: 'Select the skills you want to have installed:',
|
|
211
|
+
choices: skills.map(s => ({
|
|
212
|
+
title: chalk.white(s.name) + chalk.gray(` v${s.version} - ${s.description}`),
|
|
213
|
+
value: s.id,
|
|
214
|
+
selected: selectedSkillIds.includes(s.id)
|
|
215
|
+
})),
|
|
216
|
+
instructions: chalk.gray(' Use space to select, enter to confirm'),
|
|
217
|
+
min: 1
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
if (!chosen) process.exit(0);
|
|
221
|
+
selectedSkillIds = chosen;
|
|
222
|
+
}
|
|
207
223
|
}
|
|
208
224
|
|
|
209
225
|
// Step 2: Select agents
|
package/package.json
CHANGED
package/skills/README.md
CHANGED
|
@@ -339,6 +339,19 @@ Standardizes Python dependency handling using `uv` and `pip` (requirements.txt).
|
|
|
339
339
|
|
|
340
340
|
---
|
|
341
341
|
|
|
342
|
+
### 17. JS/TS Dependency Management
|
|
343
|
+
**Directory:** `js-ts-dependency-mgmt/`
|
|
344
|
+
|
|
345
|
+
Standardizes package management and security across NPM, Yarn, and PNPM.
|
|
346
|
+
|
|
347
|
+
**Key Features:**
|
|
348
|
+
- ✅ **Build Stability**: Protocols for version pinning and lockfile discipline.
|
|
349
|
+
- ✅ **Security Audit**: Mandatory `npm audit` / `yarn audit` integration.
|
|
350
|
+
- ✅ **Categorization**: Correct usage of `dependencies` vs `devDependencies`.
|
|
351
|
+
- ✅ **Hygiene**: Standardized `.npmrc` and registry security settings.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
342
355
|
## Requirements
|
|
343
356
|
|
|
344
357
|
### All Skills
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# JS/TS Dependency Management (NPM, Yarn, PNPM)
|
|
2
|
+
|
|
3
|
+
This skill enforces best practices for managing dependencies in the JS/TS ecosystem, focusing on build stability, supply chain security, and environment hygiene.
|
|
4
|
+
|
|
5
|
+
## Policies
|
|
6
|
+
|
|
7
|
+
### 1. Build Stability & Reproducibility
|
|
8
|
+
* **Rule**: Always use a lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and pin versions.
|
|
9
|
+
* **Action**:
|
|
10
|
+
- Use specific versions in `package.json` (prefer `1.2.3` over `^1.2.3` for critical production apps).
|
|
11
|
+
- NEVER use `*` or `latest`.
|
|
12
|
+
- Always commit the lockfile to version control.
|
|
13
|
+
|
|
14
|
+
### 2. Supply Chain Security (OWASP A03:2025)
|
|
15
|
+
* **Rule**: Mandatory scanning for known vulnerabilities in dependencies.
|
|
16
|
+
* **Action**:
|
|
17
|
+
- Consistently run `npm audit` or `yarn audit`.
|
|
18
|
+
- Ban insecure registry URLs (use HTTPS only).
|
|
19
|
+
- Avoid Git-based dependencies (`"pkg": "git+https://..."`) unless from an internal/verified source.
|
|
20
|
+
- Be cautious of "Typosquatting"—double-check package names before installation.
|
|
21
|
+
|
|
22
|
+
### 3. Dependency Categorization
|
|
23
|
+
* **Rule**: Correctly distinguish between runtime and development dependencies.
|
|
24
|
+
* **Action**:
|
|
25
|
+
- **dependencies**: Packages needed for the app to run (e.g., `express`, `react`).
|
|
26
|
+
- **devDependencies**: Packages needed only for building/testing (e.g., `typescript`, `jest`, `eslint`).
|
|
27
|
+
- **peerDependencies**: Libraries intended to be used with other specific versions of a host package.
|
|
28
|
+
|
|
29
|
+
### 4. Registry Hygiene
|
|
30
|
+
* **Rule**: Standardize configuration via `.npmrc`.
|
|
31
|
+
* **Action**:
|
|
32
|
+
- Define `save-exact=true` if pinning is the default project policy.
|
|
33
|
+
- Set up scoped registries for private packages correctly.
|
|
34
|
+
|
|
35
|
+
### 5. Automated Updates
|
|
36
|
+
* **Rule**: Keep dependencies current while maintaining safety.
|
|
37
|
+
* **Action**: Use tools like `npm-check-updates` (ncu) to audit updates, but verify them in separate PRs/branches.
|
|
38
|
+
|
|
39
|
+
## Process Reference
|
|
40
|
+
|
|
41
|
+
| Tool | Lockfile | Installation | Audit |
|
|
42
|
+
| :--- | :--- | :--- | :--- |
|
|
43
|
+
| **NPM** | `package-lock.json` | `npm install` | `npm audit` |
|
|
44
|
+
| **Yarn** | `yarn.lock` | `yarn install` | `yarn audit` |
|
|
45
|
+
| **PNPM** | `pnpm-lock.yaml` | `pnpm install` | `pnpm audit` |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# JS/TS Dependency Management Examples
|
|
2
|
+
|
|
3
|
+
### 1. Secure `package.json` Structure
|
|
4
|
+
**Good Pattern:**
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"name": "secure-app",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"axios": "1.6.2", // Pinned version
|
|
11
|
+
"express": "4.18.2" // Pinned version
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"typescript": "5.3.2",
|
|
15
|
+
"jest": "29.7.0",
|
|
16
|
+
"eslint": "8.54.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Standardized `.npmrc`
|
|
22
|
+
```text
|
|
23
|
+
# Enforce exact version saving by default
|
|
24
|
+
save-exact=true
|
|
25
|
+
|
|
26
|
+
# Ensure every developer uses the same registry
|
|
27
|
+
registry=https://registry.npmjs.org/
|
|
28
|
+
|
|
29
|
+
# Forbid scrips for security during install if possible
|
|
30
|
+
# ignore-scripts=true
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. Managing Scoped/Private Packages
|
|
34
|
+
If you use a private registry (like Artifactory or GitHub Packages):
|
|
35
|
+
```text
|
|
36
|
+
@my-org:registry=https://npm.pkg.github.com
|
|
37
|
+
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 4. Dependency Auditing Workflow
|
|
41
|
+
**Routine Check:**
|
|
42
|
+
```bash
|
|
43
|
+
# Check for vulnerabilities
|
|
44
|
+
npm audit
|
|
45
|
+
|
|
46
|
+
# Fix minor issues automatically
|
|
47
|
+
npm audit fix
|
|
48
|
+
|
|
49
|
+
# Check for outdated packages without installing
|
|
50
|
+
npx npm-check-updates
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 5. Cleaning up Node Modules
|
|
54
|
+
```bash
|
|
55
|
+
# Remove unused dependencies
|
|
56
|
+
npm prune
|
|
57
|
+
|
|
58
|
+
# Clean install (deletes node_modules and installs from lockfile)
|
|
59
|
+
npm ci
|
|
60
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "JS/TS Dependency Management",
|
|
3
|
+
"description": "Standardize package management and security across NPM, Yarn, and PNPM.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": "Antigravity",
|
|
6
|
+
"tags": [
|
|
7
|
+
"javascript",
|
|
8
|
+
"typescript",
|
|
9
|
+
"npm",
|
|
10
|
+
"yarn",
|
|
11
|
+
"pnpm",
|
|
12
|
+
"dependencies",
|
|
13
|
+
"security",
|
|
14
|
+
"best-practices"
|
|
15
|
+
],
|
|
16
|
+
"applies_when": [
|
|
17
|
+
"managing JavaScript or TypeScript project dependencies",
|
|
18
|
+
"configuring package.json, npmrc, or lockfiles",
|
|
19
|
+
"updating NPM/Yarn/PNPM packages",
|
|
20
|
+
"auditing JS/TS supply chain security"
|
|
21
|
+
],
|
|
22
|
+
"always_load": true
|
|
23
|
+
}
|