@sentry/junior 0.53.0 → 0.55.0

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 (239) hide show
  1. package/README.md +4 -3
  2. package/dist/api-reference.d.ts +7 -0
  3. package/dist/app.d.ts +14 -12
  4. package/dist/app.js +12977 -10333
  5. package/dist/build/copy-build-content.d.ts +4 -0
  6. package/dist/build/glob-to-regex.d.ts +2 -0
  7. package/dist/build/rolldown-workarounds.d.ts +14 -0
  8. package/dist/build/virtual-config.d.ts +4 -0
  9. package/dist/chat/agent-dispatch/context.d.ts +6 -0
  10. package/dist/chat/agent-dispatch/heartbeat.d.ts +14 -0
  11. package/dist/chat/agent-dispatch/runner.d.ts +9 -0
  12. package/dist/chat/agent-dispatch/signing.d.ts +5 -0
  13. package/dist/chat/agent-dispatch/store.d.ts +29 -0
  14. package/dist/chat/agent-dispatch/types.d.ts +57 -0
  15. package/dist/chat/agent-dispatch/validation.d.ts +3 -0
  16. package/dist/chat/app/factory.d.ts +10 -0
  17. package/dist/chat/app/production.d.ts +6 -0
  18. package/dist/chat/app/services.d.ts +17 -0
  19. package/dist/chat/capabilities/catalog.d.ts +16 -0
  20. package/dist/chat/capabilities/factory.d.ts +10 -0
  21. package/dist/chat/capabilities/jr-rpc-command.d.ts +26 -0
  22. package/dist/chat/capabilities/router.d.ts +19 -0
  23. package/dist/chat/coerce.d.ts +6 -0
  24. package/dist/chat/config.d.ts +47 -0
  25. package/dist/chat/configuration/defaults.d.ts +4 -0
  26. package/dist/chat/configuration/service.d.ts +2 -0
  27. package/dist/chat/configuration/types.d.ts +37 -0
  28. package/dist/chat/configuration/validation.d.ts +2 -0
  29. package/dist/chat/credentials/broker.d.ts +22 -0
  30. package/dist/chat/credentials/header-transforms.d.ts +3 -0
  31. package/dist/chat/credentials/oauth-scope.d.ts +4 -0
  32. package/dist/chat/credentials/state-adapter-token-store.d.ts +9 -0
  33. package/dist/chat/credentials/unlink-provider.d.ts +2 -0
  34. package/dist/chat/credentials/user-token-store.d.ts +11 -0
  35. package/dist/chat/discovery.d.ts +47 -0
  36. package/dist/chat/ingress/junior-chat.d.ts +26 -0
  37. package/dist/chat/ingress/message-changed.d.ts +50 -0
  38. package/dist/chat/ingress/message-router.d.ts +9 -0
  39. package/dist/chat/ingress/slash-command.d.ts +3 -0
  40. package/dist/chat/ingress/workspace-membership.d.ts +9 -0
  41. package/dist/chat/interruption-marker.d.ts +2 -0
  42. package/dist/chat/logging.d.ts +90 -0
  43. package/dist/chat/mcp/auth-store.d.ts +41 -0
  44. package/dist/chat/mcp/client.d.ts +34 -0
  45. package/dist/chat/mcp/errors.d.ts +8 -0
  46. package/dist/chat/mcp/oauth-provider.d.ts +27 -0
  47. package/dist/chat/mcp/oauth.d.ts +17 -0
  48. package/dist/chat/mcp/tool-manager.d.ts +60 -0
  49. package/dist/chat/oauth-flow.d.ts +45 -0
  50. package/dist/chat/optional-string.d.ts +5 -0
  51. package/dist/chat/pi/client.d.ts +49 -0
  52. package/dist/chat/pi/messages.d.ts +3 -0
  53. package/dist/chat/pi/traced-stream.d.ts +9 -0
  54. package/dist/chat/plugins/agent-hooks.d.ts +32 -0
  55. package/dist/chat/plugins/auth/api-headers-broker.d.ts +6 -0
  56. package/dist/chat/plugins/auth/auth-token-placeholder.d.ts +3 -0
  57. package/dist/chat/plugins/auth/github-app-broker.d.ts +4 -0
  58. package/dist/chat/plugins/auth/oauth-bearer-broker.d.ts +6 -0
  59. package/dist/chat/plugins/auth/oauth-request.d.ts +18 -0
  60. package/dist/chat/plugins/command-env.d.ts +3 -0
  61. package/dist/chat/plugins/logging.d.ts +3 -0
  62. package/dist/chat/plugins/manifest.d.ts +3 -0
  63. package/dist/chat/plugins/package-discovery.d.ts +14 -0
  64. package/dist/chat/plugins/registry.d.ts +23 -0
  65. package/dist/chat/plugins/state.d.ts +3 -0
  66. package/dist/chat/plugins/types.d.ts +146 -0
  67. package/dist/chat/prompt.d.ts +39 -0
  68. package/dist/chat/queue/thread-message-dispatcher.d.ts +33 -0
  69. package/dist/chat/respond-helpers.d.ts +77 -0
  70. package/dist/chat/respond.d.ts +75 -0
  71. package/dist/chat/runtime/auth-pause-state.d.ts +11 -0
  72. package/dist/chat/runtime/delivered-turn-state.d.ts +15 -0
  73. package/dist/chat/runtime/dev-agent-trace.d.ts +1 -0
  74. package/dist/chat/runtime/processing-reaction.d.ts +25 -0
  75. package/dist/chat/runtime/reply-executor.d.ts +56 -0
  76. package/dist/chat/runtime/report-progress.d.ts +3 -0
  77. package/dist/chat/runtime/slack-resume.d.ts +50 -0
  78. package/dist/chat/runtime/slack-runtime.d.ts +100 -0
  79. package/dist/chat/runtime/thread-context.d.ts +24 -0
  80. package/dist/chat/runtime/thread-state.d.ts +28 -0
  81. package/dist/chat/runtime/turn-preparation.d.ts +43 -0
  82. package/dist/chat/runtime/turn-user-message.d.ts +12 -0
  83. package/dist/chat/runtime/turn.d.ts +69 -0
  84. package/dist/chat/sandbox/credentials.d.ts +11 -0
  85. package/dist/chat/sandbox/egress-oidc.d.ts +3 -0
  86. package/dist/chat/sandbox/egress-policy.d.ts +11 -0
  87. package/dist/chat/sandbox/egress-proxy.d.ts +17 -0
  88. package/dist/chat/sandbox/egress-session.d.ts +27 -0
  89. package/dist/chat/sandbox/errors.d.ts +12 -0
  90. package/dist/chat/sandbox/http-error-details.d.ts +18 -0
  91. package/dist/chat/sandbox/noninteractive-command.d.ts +17 -0
  92. package/dist/chat/sandbox/paths.d.ts +5 -0
  93. package/dist/chat/sandbox/runtime-dependency-snapshots.d.ts +20 -0
  94. package/dist/chat/sandbox/sandbox.d.ts +54 -0
  95. package/dist/chat/sandbox/session.d.ts +54 -0
  96. package/dist/chat/sandbox/skill-sandbox.d.ts +42 -0
  97. package/dist/chat/sandbox/skill-sync.d.ts +16 -0
  98. package/dist/chat/sandbox/workspace.d.ts +55 -0
  99. package/dist/chat/scheduler/cadence.d.ts +24 -0
  100. package/dist/chat/scheduler/plugin.d.ts +2 -0
  101. package/dist/chat/scheduler/prompt.d.ts +7 -0
  102. package/dist/chat/scheduler/store.d.ts +49 -0
  103. package/dist/chat/scheduler/types.d.ts +86 -0
  104. package/dist/chat/sentry.d.ts +2 -0
  105. package/dist/chat/services/attachment-claims.d.ts +2 -0
  106. package/dist/chat/services/auth-pause-response.d.ts +2 -0
  107. package/dist/chat/services/auth-pause.d.ts +19 -0
  108. package/dist/chat/services/channel-intent.d.ts +2 -0
  109. package/dist/chat/services/conversation-memory.d.ts +33 -0
  110. package/dist/chat/services/mcp-auth-orchestration.d.ts +30 -0
  111. package/dist/chat/services/pending-auth.d.ts +27 -0
  112. package/dist/chat/services/plugin-auth-orchestration.d.ts +37 -0
  113. package/dist/chat/services/provider-default-config.d.ts +9 -0
  114. package/dist/chat/services/provider-retry.d.ts +6 -0
  115. package/dist/chat/services/reply-delivery-plan.d.ts +17 -0
  116. package/dist/chat/services/subscribed-decision.d.ts +63 -0
  117. package/dist/chat/services/subscribed-reply-policy.d.ts +23 -0
  118. package/dist/chat/services/timeout-resume.d.ts +17 -0
  119. package/dist/chat/services/turn-checkpoint.d.ts +74 -0
  120. package/dist/chat/services/turn-continuation-response.d.ts +2 -0
  121. package/dist/chat/services/turn-failure-response.d.ts +15 -0
  122. package/dist/chat/services/turn-result.d.ts +55 -0
  123. package/dist/chat/services/turn-thinking-level.d.ts +49 -0
  124. package/dist/chat/services/vision-context.d.ts +61 -0
  125. package/dist/chat/skills.d.ts +48 -0
  126. package/dist/chat/slack/adapter.d.ts +9 -0
  127. package/dist/chat/slack/app-home.d.ts +11 -0
  128. package/dist/chat/slack/assistant-thread/lifecycle.d.ts +13 -0
  129. package/dist/chat/slack/assistant-thread/status-render.d.ts +28 -0
  130. package/dist/chat/slack/assistant-thread/status-scheduler.d.ts +23 -0
  131. package/dist/chat/slack/assistant-thread/status-send.d.ts +31 -0
  132. package/dist/chat/slack/assistant-thread/status.d.ts +36 -0
  133. package/dist/chat/slack/assistant-thread/title.d.ts +28 -0
  134. package/dist/chat/slack/canvas-references.d.ts +2 -0
  135. package/dist/chat/slack/channel.d.ts +48 -0
  136. package/dist/chat/slack/client.d.ts +52 -0
  137. package/dist/chat/slack/context.d.ts +9 -0
  138. package/dist/chat/slack/emoji.d.ts +1 -0
  139. package/dist/chat/slack/errors.d.ts +6 -0
  140. package/dist/chat/slack/footer.d.ts +42 -0
  141. package/dist/chat/slack/ids.d.ts +4 -0
  142. package/dist/chat/slack/legacy-attachments.d.ts +4 -0
  143. package/dist/chat/slack/message.d.ts +6 -0
  144. package/dist/chat/slack/mrkdwn.d.ts +12 -0
  145. package/dist/chat/slack/outbound.d.ts +57 -0
  146. package/dist/chat/slack/output.d.ts +54 -0
  147. package/dist/chat/slack/reply.d.ts +33 -0
  148. package/dist/chat/slack/status-format.d.ts +2 -0
  149. package/dist/chat/slack/turn-continuation-notice.d.ts +8 -0
  150. package/dist/chat/slack/user.d.ts +8 -0
  151. package/dist/chat/slack/users.d.ts +39 -0
  152. package/dist/chat/slack/workspace-context.d.ts +4 -0
  153. package/dist/chat/state/adapter.d.ts +9 -0
  154. package/dist/chat/state/artifacts.d.ts +29 -0
  155. package/dist/chat/state/conversation.d.ts +81 -0
  156. package/dist/chat/state/pi-session-message-store.d.ts +15 -0
  157. package/dist/chat/state/turn-id.d.ts +2 -0
  158. package/dist/chat/state/turn-session-store.d.ts +49 -0
  159. package/dist/chat/tools/advisor/session-store.d.ts +9 -0
  160. package/dist/chat/tools/advisor/tool.d.ts +33 -0
  161. package/dist/chat/tools/agent-tools.d.ts +10 -0
  162. package/dist/chat/tools/channel-capabilities.d.ts +11 -0
  163. package/dist/chat/tools/definition.d.ts +17 -0
  164. package/dist/chat/tools/execution/build-sandbox-input.d.ts +2 -0
  165. package/dist/chat/tools/execution/normalize-result.d.ts +6 -0
  166. package/dist/chat/tools/execution/tool-error-handler.d.ts +3 -0
  167. package/dist/chat/tools/execution/tool-input-error.d.ts +6 -0
  168. package/dist/chat/tools/idempotency.d.ts +1 -0
  169. package/dist/chat/tools/index.d.ts +5 -0
  170. package/dist/chat/tools/runtime/report-progress.d.ts +4 -0
  171. package/dist/chat/tools/sandbox/attach-file.d.ts +7 -0
  172. package/dist/chat/tools/sandbox/bash.d.ts +5 -0
  173. package/dist/chat/tools/sandbox/edit-file.d.ts +37 -0
  174. package/dist/chat/tools/sandbox/file-utils.d.ts +52 -0
  175. package/dist/chat/tools/sandbox/find-files.d.ts +24 -0
  176. package/dist/chat/tools/sandbox/grep.d.ts +33 -0
  177. package/dist/chat/tools/sandbox/list-dir.d.ts +22 -0
  178. package/dist/chat/tools/sandbox/read-file.d.ts +32 -0
  179. package/dist/chat/tools/sandbox/text-edits.d.ts +28 -0
  180. package/dist/chat/tools/sandbox/write-file.d.ts +5 -0
  181. package/dist/chat/tools/skill/call-mcp-tool.d.ts +7 -0
  182. package/dist/chat/tools/skill/load-skill.d.ts +22 -0
  183. package/dist/chat/tools/skill/mcp-tool-summary.d.ts +31 -0
  184. package/dist/chat/tools/skill/search-mcp-tools.d.ts +8 -0
  185. package/dist/chat/tools/slack/canvas-tools.d.ts +29 -0
  186. package/dist/chat/tools/slack/canvases.d.ts +45 -0
  187. package/dist/chat/tools/slack/channel-list-messages.d.ts +9 -0
  188. package/dist/chat/tools/slack/channel-post-message.d.ts +4 -0
  189. package/dist/chat/tools/slack/list-tools.d.ts +21 -0
  190. package/dist/chat/tools/slack/lists.d.ts +42 -0
  191. package/dist/chat/tools/slack/message-add-reaction.d.ts +4 -0
  192. package/dist/chat/tools/slack/schedule-tools.d.ts +29 -0
  193. package/dist/chat/tools/slack/slack-message-url.d.ts +18 -0
  194. package/dist/chat/tools/slack/thread-read.d.ts +9 -0
  195. package/dist/chat/tools/slack/user-lookup.d.ts +8 -0
  196. package/dist/chat/tools/system-time.d.ts +1 -0
  197. package/dist/chat/tools/types.d.ts +61 -0
  198. package/dist/chat/tools/web/constants.d.ts +6 -0
  199. package/dist/chat/tools/web/fetch-content.d.ts +23 -0
  200. package/dist/chat/tools/web/fetch-tool.d.ts +5 -0
  201. package/dist/chat/tools/web/image-generate.d.ts +4 -0
  202. package/dist/chat/tools/web/network.d.ts +6 -0
  203. package/dist/chat/tools/web/search.d.ts +5 -0
  204. package/dist/chat/turn-context-tag.d.ts +6 -0
  205. package/dist/chat/usage.d.ts +24 -0
  206. package/dist/chat/xml.d.ts +1 -0
  207. package/dist/{chunk-XPXD3FCE.js → chunk-5LUISFEY.js} +189 -35
  208. package/dist/{chunk-ZNFNY53B.js → chunk-D3G3YOU4.js} +2 -2
  209. package/dist/chunk-SCQPBJAU.js +21 -0
  210. package/dist/{chunk-Q3FDONU7.js → chunk-TTUY467K.js} +47 -37
  211. package/dist/{chunk-KCOKQLBF.js → chunk-XI3CFWTA.js} +168 -15
  212. package/dist/cli/check.js +3 -3
  213. package/dist/cli/init.js +6 -1
  214. package/dist/cli/snapshot-warmup.js +3 -3
  215. package/dist/handlers/agent-dispatch.d.ts +3 -0
  216. package/dist/handlers/diagnostics-dashboard.d.ts +2 -0
  217. package/dist/handlers/diagnostics.d.ts +2 -0
  218. package/dist/handlers/health.d.ts +4 -0
  219. package/dist/handlers/heartbeat.d.ts +3 -0
  220. package/dist/handlers/mcp-oauth-callback.d.ts +2 -0
  221. package/dist/handlers/oauth-callback.d.ts +2 -0
  222. package/dist/handlers/oauth-html.d.ts +2 -0
  223. package/dist/handlers/sandbox-egress-proxy.d.ts +9 -0
  224. package/dist/handlers/turn-resume.d.ts +3 -0
  225. package/dist/handlers/types.d.ts +2 -0
  226. package/dist/handlers/webhooks.d.ts +15 -0
  227. package/dist/instrumentation.d.ts +1 -3
  228. package/dist/nitro.d.ts +4 -7
  229. package/dist/nitro.js +112 -54
  230. package/dist/package-resolution.d.ts +13 -0
  231. package/dist/vercel.d.ts +2 -4
  232. package/dist/vercel.js +3 -12
  233. package/package.json +32 -26
  234. package/dist/cli/check.d.ts +0 -8
  235. package/dist/cli/env.d.ts +0 -7
  236. package/dist/cli/init.d.ts +0 -3
  237. package/dist/cli/run.d.ts +0 -12
  238. package/dist/cli/snapshot-warmup.d.ts +0 -3
  239. package/dist/types-X_iCClPb.d.ts +0 -75
package/dist/vercel.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- interface JuniorVercelConfigOptions {
1
+ export interface JuniorVercelConfigOptions {
2
2
  buildCommand?: string | null;
3
3
  }
4
4
  /** Return a minimal Vercel config for scaffolded Junior apps. */
5
- declare function juniorVercelConfig(options?: JuniorVercelConfigOptions): Record<string, unknown>;
6
-
7
- export { type JuniorVercelConfigOptions, juniorVercelConfig };
5
+ export declare function juniorVercelConfig(options?: JuniorVercelConfigOptions): Record<string, unknown>;
package/dist/vercel.js CHANGED
@@ -1,16 +1,7 @@
1
+ import {
2
+ juniorVercelConfig
3
+ } from "./chunk-SCQPBJAU.js";
1
4
  import "./chunk-2KG3PWR4.js";
2
-
3
- // src/vercel.ts
4
- function juniorVercelConfig(options = {}) {
5
- const buildCommand = options.buildCommand === void 0 ? "pnpm build" : options.buildCommand;
6
- const config = {
7
- framework: "nitro"
8
- };
9
- if (buildCommand !== null) {
10
- config.buildCommand = buildCommand;
11
- }
12
- return config;
13
- }
14
5
  export {
15
6
  juniorVercelConfig
16
7
  };
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "type": "module",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/getsentry/junior.git",
12
+ "directory": "packages/junior"
13
+ },
9
14
  "bin": {
10
15
  "junior": "bin/junior.mjs"
11
16
  },
@@ -20,45 +25,46 @@
20
25
  "bin"
21
26
  ],
22
27
  "dependencies": {
23
- "@ai-sdk/gateway": "^3.0.110",
24
- "@chat-adapter/slack": "4.28.1",
25
- "@chat-adapter/state-memory": "4.28.1",
26
- "@chat-adapter/state-redis": "4.28.1",
27
- "@logtape/logtape": "^2.0.7",
28
- "@mariozechner/pi-agent-core": "0.73.0",
29
- "@mariozechner/pi-ai": "0.73.0",
28
+ "@ai-sdk/gateway": "^3.0.119",
29
+ "@chat-adapter/slack": "4.29.0",
30
+ "@chat-adapter/state-memory": "4.29.0",
31
+ "@chat-adapter/state-redis": "4.29.0",
32
+ "@logtape/logtape": "^2.1.1",
33
+ "@earendil-works/pi-agent-core": "0.74.2",
34
+ "@earendil-works/pi-ai": "0.74.2",
30
35
  "@modelcontextprotocol/sdk": "1.29.0",
31
36
  "@sinclair/typebox": "^0.34.49",
32
- "@slack/web-api": "^7.15.2",
33
- "@vercel/functions": "^3.5.0",
34
- "@vercel/sandbox": "2.0.0-beta.19",
35
- "ai": "^6.0.175",
37
+ "@slack/web-api": "^7.16.0",
38
+ "@vercel/functions": "^3.6.0",
39
+ "@vercel/sandbox": "2.0.0",
40
+ "ai": "^6.0.190",
36
41
  "bash-tool": "^1.3.16",
37
- "chat": "4.28.1",
38
- "hono": "^4.12.6",
39
- "just-bash": "2.14.2",
40
- "jose": "^6.2.2",
42
+ "chat": "4.29.0",
43
+ "hono": "^4.12.22",
44
+ "jose": "^6.2.3",
45
+ "just-bash": "3.0.1",
41
46
  "node-html-markdown": "^2.0.0",
42
- "yaml": "^2.8.4",
43
- "zod": "^4.4.3"
47
+ "yaml": "^2.9.0",
48
+ "zod": "^4.4.3",
49
+ "@sentry/junior-plugin-api": "0.55.0"
44
50
  },
45
51
  "peerDependencies": {
46
52
  "@sentry/node": ">=10.0.0"
47
53
  },
48
54
  "devDependencies": {
49
55
  "@sentry/node": "10.53.1",
50
- "@types/node": "^25.6.0",
56
+ "@types/node": "^25.9.1",
51
57
  "dependency-cruiser": "^17.4.0",
52
- "msw": "^2.14.3",
53
- "nitro": "3.0.260429-beta",
54
- "oxlint": "^1.63.0",
58
+ "msw": "^2.14.6",
59
+ "nitro": "3.0.260522-beta",
60
+ "oxlint": "^1.66.0",
55
61
  "tsup": "^8.5.1",
56
- "typescript": "^5.9.3",
57
- "vercel": "^51.4.0",
58
- "vitest": "^4.1.5"
62
+ "typescript": "^6.0.3",
63
+ "vercel": "^54.4.0",
64
+ "vitest": "^4.1.7"
59
65
  },
60
66
  "scripts": {
61
- "build": "tsup",
67
+ "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
62
68
  "lint": "oxlint --config .oxlintrc.json --deny-warnings src tests scripts bin tsup.config.ts",
63
69
  "lint:fix": "oxlint --config .oxlintrc.json --deny-warnings --fix src tests scripts bin tsup.config.ts",
64
70
  "test": "pnpm run test:slack-boundary && pnpm run test:arch-boundary && vitest run",
@@ -1,8 +0,0 @@
1
- interface ValidationIo {
2
- info: (line: string) => void;
3
- warn: (line: string) => void;
4
- error: (line: string) => void;
5
- }
6
- declare function runCheck(rootDir?: string, io?: ValidationIo): Promise<void>;
7
-
8
- export { type ValidationIo, runCheck };
package/dist/cli/env.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Load CLI env files from the nearest package root and workspace root so
3
- * `pnpm exec junior ...` sees the same credentials as local repo scripts.
4
- */
5
- declare function loadCliEnvFiles(cwd?: string): void;
6
-
7
- export { loadCliEnvFiles };
@@ -1,3 +0,0 @@
1
- declare function runInit(dir: string, log?: (line: string) => void): Promise<void>;
2
-
3
- export { runInit };
package/dist/cli/run.d.ts DELETED
@@ -1,12 +0,0 @@
1
- declare const CLI_USAGE = "usage: junior init <dir>\n junior snapshot create\n junior check [dir]";
2
- interface CliHandlers {
3
- runInit: (dir: string) => Promise<void>;
4
- runSnapshotCreate: () => Promise<void>;
5
- runCheck: (dir?: string) => Promise<void>;
6
- }
7
- interface CliIo {
8
- error: (line: string) => void;
9
- }
10
- declare function runCli(argv: string[], handlers: CliHandlers, io?: CliIo): Promise<number>;
11
-
12
- export { CLI_USAGE, runCli };
@@ -1,3 +0,0 @@
1
- declare function runSnapshotCreate(log?: (line: string) => void): Promise<void>;
2
-
3
- export { runSnapshotCreate };
@@ -1,75 +0,0 @@
1
- interface PluginOAuthConfig {
2
- clientIdEnv: string;
3
- clientSecretEnv: string;
4
- authorizeEndpoint: string;
5
- tokenEndpoint: string;
6
- scope?: string;
7
- authorizeParams?: Record<string, string>;
8
- tokenAuthMethod?: "body" | "basic";
9
- tokenExtraHeaders?: Record<string, string>;
10
- }
11
- interface PluginRuntimePostinstallCommand {
12
- cmd: string;
13
- args?: string[];
14
- sudo?: boolean;
15
- }
16
- interface PluginEnvVarDeclaration {
17
- default?: string;
18
- }
19
- type PluginRuntimeDependencyConfig = {
20
- type: "npm";
21
- package: string;
22
- version?: string;
23
- } | {
24
- type: "system";
25
- package: string;
26
- } | {
27
- type: "system";
28
- url: string;
29
- sha256: string;
30
- };
31
- interface PluginOAuthConfigPatch extends Omit<Partial<PluginOAuthConfig>, "authorizeParams" | "tokenExtraHeaders"> {
32
- authorizeParams?: Record<string, string | null> | null;
33
- tokenExtraHeaders?: Record<string, string | null> | null;
34
- }
35
- /** Install-level changes applied to one plugin manifest before validation. */
36
- interface PluginManifestConfig {
37
- description?: string;
38
- capabilities?: string[];
39
- configKeys?: string[];
40
- domains?: string[] | null;
41
- apiHeaders?: Record<string, string | null> | null;
42
- commandEnv?: Record<string, string | null> | null;
43
- envVars?: Record<string, PluginEnvVarDeclaration | null> | null;
44
- credentials?: {
45
- type?: "oauth-bearer" | "github-app";
46
- domains?: string[];
47
- apiHeaders?: Record<string, string | null> | null;
48
- authTokenEnv?: string;
49
- authTokenPlaceholder?: string | null;
50
- appIdEnv?: string;
51
- privateKeyEnv?: string;
52
- installationIdEnv?: string;
53
- } | null;
54
- runtimeDependencies?: PluginRuntimeDependencyConfig[] | null;
55
- runtimePostinstall?: PluginRuntimePostinstallCommand[] | null;
56
- mcp?: {
57
- transport?: "http";
58
- url?: string;
59
- headers?: Record<string, string | null> | null;
60
- allowedTools?: string[] | null;
61
- } | null;
62
- oauth?: PluginOAuthConfigPatch | null;
63
- target?: {
64
- type?: string;
65
- configKey?: string;
66
- commandFlags?: string[] | null;
67
- } | null;
68
- }
69
- /** Install-level plugin package list and manifest configuration. */
70
- interface PluginConfig {
71
- packages?: string[];
72
- manifests?: Record<string, PluginManifestConfig>;
73
- }
74
-
75
- export type { PluginConfig as P };