berget 2.2.7 → 2.2.9

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 (130) hide show
  1. package/.github/workflows/publish.yml +6 -6
  2. package/.github/workflows/test.yml +1 -1
  3. package/.prettierrc +5 -3
  4. package/dist/index.js +24 -25
  5. package/dist/package.json +7 -3
  6. package/dist/src/agents/app.js +8 -8
  7. package/dist/src/agents/backend.js +3 -3
  8. package/dist/src/agents/devops.js +8 -8
  9. package/dist/src/agents/frontend.js +3 -3
  10. package/dist/src/agents/fullstack.js +3 -3
  11. package/dist/src/agents/index.js +18 -18
  12. package/dist/src/agents/quality.js +8 -8
  13. package/dist/src/agents/security.js +8 -8
  14. package/dist/src/client.js +115 -127
  15. package/dist/src/commands/api-keys.js +181 -202
  16. package/dist/src/commands/auth.js +16 -25
  17. package/dist/src/commands/autocomplete.js +8 -8
  18. package/dist/src/commands/billing.js +10 -19
  19. package/dist/src/commands/chat.js +139 -170
  20. package/dist/src/commands/clusters.js +21 -30
  21. package/dist/src/commands/code/__tests__/auth-sync.test.js +189 -186
  22. package/dist/src/commands/code/__tests__/fake-api-key-service.js +3 -13
  23. package/dist/src/commands/code/__tests__/fake-auth-service.js +21 -29
  24. package/dist/src/commands/code/__tests__/fake-command-runner.js +22 -33
  25. package/dist/src/commands/code/__tests__/fake-file-store.js +19 -41
  26. package/dist/src/commands/code/__tests__/fake-prompter.js +81 -97
  27. package/dist/src/commands/code/__tests__/setup-flow.test.js +295 -295
  28. package/dist/src/commands/code/adapters/clack-prompter.js +15 -32
  29. package/dist/src/commands/code/adapters/fs-file-store.js +25 -44
  30. package/dist/src/commands/code/adapters/spawn-command-runner.js +27 -41
  31. package/dist/src/commands/code/auth-sync.js +215 -228
  32. package/dist/src/commands/code/errors.js +15 -12
  33. package/dist/src/commands/code/setup.js +390 -425
  34. package/dist/src/commands/code.js +279 -294
  35. package/dist/src/commands/index.js +5 -5
  36. package/dist/src/commands/models.js +16 -25
  37. package/dist/src/commands/users.js +9 -18
  38. package/dist/src/constants/command-structure.js +138 -138
  39. package/dist/src/services/api-key-service.js +132 -152
  40. package/dist/src/services/auth-service.js +81 -95
  41. package/dist/src/services/browser-auth.js +121 -131
  42. package/dist/src/services/chat-service.js +369 -386
  43. package/dist/src/services/cluster-service.js +47 -62
  44. package/dist/src/services/collaborator-service.js +9 -21
  45. package/dist/src/services/flux-service.js +13 -25
  46. package/dist/src/services/helm-service.js +9 -21
  47. package/dist/src/services/kubectl-service.js +15 -29
  48. package/dist/src/utils/config-checker.js +8 -8
  49. package/dist/src/utils/config-loader.js +109 -109
  50. package/dist/src/utils/default-api-key.js +129 -139
  51. package/dist/src/utils/env-manager.js +55 -66
  52. package/dist/src/utils/error-handler.js +62 -62
  53. package/dist/src/utils/logger.js +74 -67
  54. package/dist/src/utils/markdown-renderer.js +28 -28
  55. package/dist/src/utils/opencode-validator.js +67 -69
  56. package/dist/src/utils/token-manager.js +67 -65
  57. package/dist/tests/commands/chat.test.js +30 -39
  58. package/dist/tests/commands/code.test.js +186 -195
  59. package/dist/tests/utils/config-loader.test.js +107 -107
  60. package/dist/tests/utils/env-manager.test.js +81 -90
  61. package/dist/tests/utils/opencode-validator.test.js +42 -41
  62. package/dist/vitest.config.js +1 -1
  63. package/eslint.config.mjs +65 -30
  64. package/index.ts +30 -31
  65. package/package.json +7 -3
  66. package/src/agents/app.ts +9 -9
  67. package/src/agents/backend.ts +4 -4
  68. package/src/agents/devops.ts +9 -9
  69. package/src/agents/frontend.ts +4 -4
  70. package/src/agents/fullstack.ts +4 -4
  71. package/src/agents/index.ts +27 -25
  72. package/src/agents/quality.ts +9 -9
  73. package/src/agents/security.ts +9 -9
  74. package/src/agents/types.ts +10 -10
  75. package/src/client.ts +85 -77
  76. package/src/commands/api-keys.ts +180 -185
  77. package/src/commands/auth.ts +15 -14
  78. package/src/commands/autocomplete.ts +10 -10
  79. package/src/commands/billing.ts +13 -12
  80. package/src/commands/chat.ts +145 -142
  81. package/src/commands/clusters.ts +20 -19
  82. package/src/commands/code/__tests__/auth-sync.test.ts +176 -175
  83. package/src/commands/code/__tests__/fake-api-key-service.ts +2 -2
  84. package/src/commands/code/__tests__/fake-auth-service.ts +18 -18
  85. package/src/commands/code/__tests__/fake-command-runner.ts +28 -22
  86. package/src/commands/code/__tests__/fake-file-store.ts +15 -15
  87. package/src/commands/code/__tests__/fake-prompter.ts +86 -85
  88. package/src/commands/code/__tests__/setup-flow.test.ts +253 -251
  89. package/src/commands/code/adapters/clack-prompter.ts +32 -30
  90. package/src/commands/code/adapters/fs-file-store.ts +18 -17
  91. package/src/commands/code/adapters/spawn-command-runner.ts +20 -15
  92. package/src/commands/code/auth-sync.ts +210 -210
  93. package/src/commands/code/errors.ts +11 -11
  94. package/src/commands/code/ports/auth-services.ts +7 -7
  95. package/src/commands/code/ports/command-runner.ts +2 -2
  96. package/src/commands/code/ports/file-store.ts +3 -3
  97. package/src/commands/code/ports/prompter.ts +13 -13
  98. package/src/commands/code/setup.ts +408 -406
  99. package/src/commands/code.ts +288 -287
  100. package/src/commands/index.ts +11 -10
  101. package/src/commands/models.ts +19 -18
  102. package/src/commands/users.ts +11 -10
  103. package/src/constants/command-structure.ts +159 -159
  104. package/src/services/api-key-service.ts +85 -85
  105. package/src/services/auth-service.ts +55 -54
  106. package/src/services/browser-auth.ts +62 -62
  107. package/src/services/chat-service.ts +170 -171
  108. package/src/services/cluster-service.ts +28 -28
  109. package/src/services/collaborator-service.ts +6 -6
  110. package/src/services/flux-service.ts +17 -17
  111. package/src/services/helm-service.ts +11 -11
  112. package/src/services/kubectl-service.ts +12 -12
  113. package/src/types/api.d.ts +1933 -1933
  114. package/src/types/json.d.ts +1 -1
  115. package/src/utils/config-checker.ts +7 -7
  116. package/src/utils/config-loader.ts +130 -129
  117. package/src/utils/default-api-key.ts +81 -80
  118. package/src/utils/env-manager.ts +37 -37
  119. package/src/utils/error-handler.ts +64 -64
  120. package/src/utils/logger.ts +72 -66
  121. package/src/utils/markdown-renderer.ts +28 -28
  122. package/src/utils/opencode-validator.ts +72 -71
  123. package/src/utils/token-manager.ts +69 -68
  124. package/tests/commands/chat.test.ts +32 -31
  125. package/tests/commands/code.test.ts +182 -181
  126. package/tests/utils/config-loader.test.ts +111 -110
  127. package/tests/utils/env-manager.test.ts +83 -79
  128. package/tests/utils/opencode-validator.test.ts +43 -42
  129. package/tsconfig.json +2 -1
  130. package/vitest.config.ts +2 -2
@@ -4,7 +4,7 @@ on:
4
4
  workflow_dispatch:
5
5
  inputs:
6
6
  bump:
7
- description: "Version bump type"
7
+ description: 'Version bump type'
8
8
  required: true
9
9
  type: choice
10
10
  options:
@@ -22,8 +22,8 @@ jobs:
22
22
  - name: Setup Node.js
23
23
  uses: actions/setup-node@v4
24
24
  with:
25
- node-version: "22"
26
- cache: "npm"
25
+ node-version: '22'
26
+ cache: 'npm'
27
27
 
28
28
  - name: Install dependencies
29
29
  run: npm ci
@@ -47,9 +47,9 @@ jobs:
47
47
  - name: Setup Node.js
48
48
  uses: actions/setup-node@v4
49
49
  with:
50
- node-version: "22"
51
- registry-url: "https://registry.npmjs.org"
52
- cache: "npm"
50
+ node-version: '22'
51
+ registry-url: 'https://registry.npmjs.org'
52
+ cache: 'npm'
53
53
 
54
54
  - name: Install dependencies
55
55
  run: npm ci
@@ -23,7 +23,7 @@ jobs:
23
23
  uses: actions/setup-node@v4
24
24
  with:
25
25
  node-version: ${{ matrix.node-version }}
26
- cache: "npm"
26
+ cache: 'npm'
27
27
 
28
28
  - name: Install dependencies
29
29
  run: npm ci
package/.prettierrc CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "semi": true,
3
- "singleQuote": false,
3
+ "singleQuote": true,
4
4
  "tabWidth": 2,
5
- "trailingComma": "es5",
5
+ "trailingComma": "all",
6
6
  "printWidth": 100,
7
- "arrowParens": "avoid"
7
+ "arrowParens": "always",
8
+ "bracketSpacing": true,
9
+ "endOfLine": "lf"
8
10
  }
package/dist/index.js CHANGED
@@ -1,19 +1,18 @@
1
- #!/usr/bin/env node
2
1
  "use strict";
3
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
4
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
4
  };
6
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const chalk_1 = __importDefault(require("chalk"));
7
7
  const commander_1 = require("commander");
8
+ const package_json_1 = require("./package.json");
8
9
  const commands_1 = require("./src/commands");
9
10
  const config_checker_1 = require("./src/utils/config-checker");
10
- const chalk_1 = __importDefault(require("chalk"));
11
- const package_json_1 = require("./package.json");
12
- process.env.DOTENV_CONFIG_OVERRIDE = "true";
11
+ process.env.DOTENV_CONFIG_OVERRIDE = 'true';
13
12
  require("dotenv/config");
14
13
  // Set version and description
15
14
  commander_1.program
16
- .name("berget")
15
+ .name('berget')
17
16
  .description(`______ _ ___ _____
18
17
  | ___ \\ | | / _ \\|_ _|
19
18
  | |_/ / ___ _ __ __ _ ___| |_ / /_\\ \\ | |
@@ -23,10 +22,10 @@ commander_1.program
23
22
  __/ |
24
23
  |___/ AI on European terms
25
24
  Version: ${package_json_1.version}`)
26
- .version(package_json_1.version, "-v, --version")
27
- .addOption(new commander_1.Option("--local").default(false).hideHelp())
28
- .addOption(new commander_1.Option("--stage").default(false).hideHelp())
29
- .option("--debug", "Enable debug output", false);
25
+ .version(package_json_1.version, '-v, --version')
26
+ .addOption(new commander_1.Option('--local').default(false).hideHelp())
27
+ .addOption(new commander_1.Option('--stage').default(false).hideHelp())
28
+ .option('--debug', 'Enable debug output', false);
30
29
  // Register all commands
31
30
  (0, commands_1.registerCommands)(commander_1.program);
32
31
  // Check for .bergetconfig if not running a command
@@ -38,18 +37,18 @@ if (process.argv.length <= 2) {
38
37
  }
39
38
  // Add helpful suggestions for common command mistakes
40
39
  const commonMistakes = {
41
- login: "auth login",
42
- logout: "auth logout",
43
- whoami: "auth whoami",
44
- "list-models": "models list",
45
- "list-keys": "api-keys list",
46
- "create-key": "api-keys create",
47
- "list-clusters": "clusters list",
48
- usage: "billing usage",
49
- init: "code init",
40
+ 'create-key': 'api-keys create',
41
+ init: 'code init',
42
+ 'list-clusters': 'clusters list',
43
+ 'list-keys': 'api-keys list',
44
+ 'list-models': 'models list',
45
+ login: 'auth login',
46
+ logout: 'auth logout',
47
+ usage: 'billing usage',
48
+ whoami: 'auth whoami',
50
49
  };
51
50
  // Add error handler for unknown commands
52
- commander_1.program.on("command:*", operands => {
51
+ commander_1.program.on('command:*', (operands) => {
53
52
  const unknownCommand = operands[0];
54
53
  console.error(chalk_1.default.red(`Error: unknown command '${unknownCommand}'`));
55
54
  // Check if this is a known mistake and suggest the correct command
@@ -58,15 +57,15 @@ commander_1.program.on("command:*", operands => {
58
57
  }
59
58
  else {
60
59
  // Try to find similar commands
61
- const availableCommands = commander_1.program.commands.map(cmd => cmd.name());
62
- const similarCommands = availableCommands.filter(cmd => cmd.includes(unknownCommand) || unknownCommand.includes(cmd));
60
+ const availableCommands = commander_1.program.commands.map((cmd) => cmd.name());
61
+ const similarCommands = availableCommands.filter((cmd) => cmd.includes(unknownCommand) || unknownCommand.includes(cmd));
63
62
  if (similarCommands.length > 0) {
64
- console.log(chalk_1.default.yellow("Similar commands:"));
65
- similarCommands.forEach(cmd => {
63
+ console.log(chalk_1.default.yellow('Similar commands:'));
64
+ for (const cmd of similarCommands) {
66
65
  console.log(chalk_1.default.yellow(` ${chalk_1.default.bold(`berget ${cmd}`)}`));
67
- });
66
+ }
68
67
  }
69
- console.log(chalk_1.default.blue("\nRun `berget --help` for a list of available commands."));
68
+ console.log(chalk_1.default.blue('\nRun `berget --help` for a list of available commands.'));
70
69
  }
71
70
  process.exit(1);
72
71
  });
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "berget",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "berget": "dist/index.js"
@@ -37,16 +37,19 @@
37
37
  "@types/marked": "^5.0.2",
38
38
  "@types/marked-terminal": "^6.1.1",
39
39
  "@types/node": "^20.11.20",
40
- "@typescript-eslint/eslint-plugin": "^8.59.3",
41
- "@typescript-eslint/parser": "^8.59.3",
40
+ "@vitest/eslint-plugin": "^1.6.17",
42
41
  "eslint": "^10.3.0",
43
42
  "eslint-config-prettier": "^10.1.8",
43
+ "eslint-plugin-perfectionist": "^5.9.0",
44
44
  "eslint-plugin-prettier": "^5.5.5",
45
+ "eslint-plugin-promise": "^7.3.0",
46
+ "eslint-plugin-sonarjs": "^3.0.2",
45
47
  "husky": "^9.1.7",
46
48
  "lint-staged": "^17.0.4",
47
49
  "prettier": "^3.8.3",
48
50
  "tsx": "^4.19.3",
49
51
  "typescript": "^5.3.3",
52
+ "typescript-eslint": "^8.59.3",
50
53
  "vitest": "^1.0.0"
51
54
  },
52
55
  "dependencies": {
@@ -57,6 +60,7 @@
57
60
  "commander": "^12.0.0",
58
61
  "dotenv": "^17.2.3",
59
62
  "fs-extra": "^11.3.0",
63
+ "globals": "^17.6.0",
60
64
  "jsonc-parser": "^3.3.1",
61
65
  "marked": "^9.1.6",
62
66
  "marked-terminal": "^6.2.0",
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "app",
7
- description: "Expo + React Native apps; props-first, offline-aware, shared tokens.",
8
- mode: "primary",
9
- temperature: 0.4,
10
- top_p: 0.9,
6
+ description: 'Expo + React Native apps; props-first, offline-aware, shared tokens.',
7
+ mode: 'primary',
8
+ name: 'app',
11
9
  permission: {
12
- edit: "allow",
13
- bash: "deny",
14
- webfetch: "allow",
10
+ bash: 'deny',
11
+ edit: 'allow',
12
+ webfetch: 'allow',
15
13
  },
14
+ temperature: 0.4,
15
+ top_p: 0.9,
16
16
  },
17
17
  systemPrompt: `You are Berget Code App agent. Voice: Scandinavian calm—precise, concise, confident. Expo + React Native + TypeScript. Structure by components/hooks/services/navigation. Components are pure; data via props; refactor shared logic into hooks/stores. Share tokens with frontend. Mock data in /data via typed hooks; later replace with live APIs. Offline via SQLite/MMKV; notifications via Expo. Request permissions only when needed. Subtle, meaningful motion; light/dark parity.
18
18
 
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "backend",
7
- description: "Functional, modular Koa + TypeScript services",
8
- mode: "primary",
6
+ description: 'Functional, modular Koa + TypeScript services',
7
+ mode: 'primary',
8
+ name: 'backend',
9
9
  },
10
10
  systemPrompt: `# Backend Agent
11
11
 
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "devops",
7
- description: "Declarative GitOps infra with FluxCD, Kustomize, Helm, operators.",
8
- mode: "primary",
9
- temperature: 0.3,
10
- top_p: 0.8,
6
+ description: 'Declarative GitOps infra with FluxCD, Kustomize, Helm, operators.',
7
+ mode: 'primary',
8
+ name: 'devops',
11
9
  permission: {
12
- edit: "allow",
13
- bash: "allow",
14
- webfetch: "allow",
10
+ bash: 'allow',
11
+ edit: 'allow',
12
+ webfetch: 'allow',
15
13
  },
14
+ temperature: 0.3,
15
+ top_p: 0.8,
16
16
  },
17
17
  systemPrompt: `You are Berget Code DevOps agent. Voice: Scandinavian calm—precise, concise, confident. Start simple: k8s/{deployment,service,ingress}. Add FluxCD sync to repo and image automation. Use Kustomize bases/overlays (staging, production). Add dependencies via Helm from upstream sources; prefer native operators when available (CloudNativePG, cert-manager, external-dns). SemVer with -rc tags keeps CI environments current. Observability with Prometheus/Grafana. No manual kubectl in production—Git is the source of truth.
18
18
 
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "frontend",
7
- description: "Scandinavian, type-safe UIs with React, Tailwind, and Shadcn",
8
- mode: "primary",
6
+ description: 'Scandinavian, type-safe UIs with React, Tailwind, and Shadcn',
7
+ mode: 'primary',
8
+ name: 'frontend',
9
9
  },
10
10
  systemPrompt: `# Frontend Agent
11
11
 
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "fullstack",
7
- description: "Router/coordinator agent for full-stack development",
8
- mode: "primary",
6
+ description: 'Router/coordinator agent for full-stack development',
7
+ mode: 'primary',
8
+ name: 'fullstack',
9
9
  },
10
10
  systemPrompt: `# Fullstack Agent
11
11
 
@@ -1,31 +1,39 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toAgentTemplate = exports.toPiPrompt = exports.toMarkdown = exports.getAgent = exports.getAllAgents = exports.agents = void 0;
4
- const fullstack_js_1 = require("./fullstack.js");
5
- const frontend_js_1 = require("./frontend.js");
3
+ exports.toPiPrompt = exports.toMarkdown = exports.toAgentTemplate = exports.getAllAgents = exports.getAgent = exports.agents = void 0;
4
+ const app_js_1 = require("./app.js");
6
5
  const backend_js_1 = require("./backend.js");
7
6
  const devops_js_1 = require("./devops.js");
8
- const app_js_1 = require("./app.js");
7
+ const frontend_js_1 = require("./frontend.js");
8
+ const fullstack_js_1 = require("./fullstack.js");
9
9
  const quality_js_1 = require("./quality.js");
10
10
  const security_js_1 = require("./security.js");
11
11
  const agents = {
12
- fullstack: fullstack_js_1.agent,
13
- frontend: frontend_js_1.agent,
12
+ app: app_js_1.agent,
14
13
  backend: backend_js_1.agent,
15
14
  devops: devops_js_1.agent,
16
- app: app_js_1.agent,
15
+ frontend: frontend_js_1.agent,
16
+ fullstack: fullstack_js_1.agent,
17
17
  quality: quality_js_1.agent,
18
18
  security: security_js_1.agent,
19
19
  };
20
20
  exports.agents = agents;
21
+ function getAgent(name) {
22
+ return agents[name];
23
+ }
24
+ exports.getAgent = getAgent;
21
25
  function getAllAgents() {
22
26
  return Object.values(agents);
23
27
  }
24
28
  exports.getAllAgents = getAllAgents;
25
- function getAgent(name) {
26
- return agents[name];
29
+ function toAgentTemplate(agent) {
30
+ return {
31
+ content: agent.systemPrompt,
32
+ description: agent.config.description,
33
+ name: agent.config.name,
34
+ };
27
35
  }
28
- exports.getAgent = getAgent;
36
+ exports.toAgentTemplate = toAgentTemplate;
29
37
  function toMarkdown(agent) {
30
38
  const { config, systemPrompt } = agent;
31
39
  let frontmatter = `---\nname: ${config.name}\ndescription: ${config.description}\n`;
@@ -51,11 +59,3 @@ function toPiPrompt(agent) {
51
59
  return agent.systemPrompt;
52
60
  }
53
61
  exports.toPiPrompt = toPiPrompt;
54
- function toAgentTemplate(agent) {
55
- return {
56
- name: agent.config.name,
57
- description: agent.config.description,
58
- content: agent.systemPrompt,
59
- };
60
- }
61
- exports.toAgentTemplate = toAgentTemplate;
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "quality",
7
- description: "Quality assurance specialist for testing, building, and complete PR management.",
8
- mode: "subagent",
9
- temperature: 0.1,
10
- top_p: 0.9,
6
+ description: 'Quality assurance specialist for testing, building, and complete PR management.',
7
+ mode: 'subagent',
8
+ name: 'quality',
11
9
  permission: {
12
- edit: "allow",
13
- bash: "allow",
14
- webfetch: "allow",
10
+ bash: 'allow',
11
+ edit: 'allow',
12
+ webfetch: 'allow',
15
13
  },
14
+ temperature: 0.1,
15
+ top_p: 0.9,
16
16
  },
17
17
  systemPrompt: `Voice: Scandinavian calm—precise, concise, confident. You are Berget Code Quality agent. Specialist in code quality assurance, testing, building, and pull request lifecycle management.
18
18
 
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agent = void 0;
4
4
  exports.agent = {
5
5
  config: {
6
- name: "security",
7
- description: "Security specialist for pentesting, OWASP compliance, and vulnerability assessments.",
8
- mode: "subagent",
9
- temperature: 0.2,
10
- top_p: 0.8,
6
+ description: 'Security specialist for pentesting, OWASP compliance, and vulnerability assessments.',
7
+ mode: 'subagent',
8
+ name: 'security',
11
9
  permission: {
12
- edit: "deny",
13
- bash: "allow",
14
- webfetch: "allow",
10
+ bash: 'allow',
11
+ edit: 'deny',
12
+ webfetch: 'allow',
15
13
  },
14
+ temperature: 0.2,
15
+ top_p: 0.8,
16
16
  },
17
17
  systemPrompt: `Voice: Scandinavian calm—precise, concise, confident. You are Berget Code Security agent. Expert in application security, penetration testing, and OWASP standards. Core responsibilities: Conduct security assessments and penetration tests, Validate OWASP Top 10 compliance, Review code for security vulnerabilities, Implement security headers and Content Security Policy (CSP), Audit API security, Check for sensitive data exposure, Validate input sanitization and output encoding, Assess dependency security and supply chain risks. Tools and techniques: OWASP ZAP, Burp Suite, security linters, dependency scanners, manual code review. Always provide specific, actionable security recommendations with priority levels.
18
18