@github-tools/eve-extension 0.9.0 → 0.11.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.
package/README.md CHANGED
@@ -19,7 +19,7 @@ This is **the recommended way** to add GitHub tools to an eve agent. The legacy
19
19
  pnpm add @github-tools/eve-extension
20
20
  ```
21
21
 
22
- `eve` is a required peer dependency, declared as `*`: the consuming agent provides the runtime copy and eve checks the extension's generated capability metadata rather than an npm range. This release is built against eve 0.81 and mounts on eve 0.81 or later. `@vercel/connect` is optional (install it only when using `connector`):
22
+ `eve` is a required peer dependency, declared as `*`: the consuming agent provides the runtime copy and eve checks the extension's generated capability metadata rather than an npm range. This release is built against eve 1.0.0-rc.6 and mounts on eve 1.0.0-rc.6 or later. `@vercel/connect` is optional (install it only when using `connector`):
23
23
 
24
24
  ```sh
25
25
  pnpm add eve
@@ -43,7 +43,9 @@ export default githubExtension({
43
43
 
44
44
  > `code-review` pairs cleanly with a Connect `connector`. `maintainer` and `repo-explorer` include gist tools, and GitHub only grants gist access to user access tokens, never the installation tokens Connect mints, so gist calls 403 over Connect. Write tools already require approval via `always()` by default, so a plain `{ someTool: true }` is a no-op, use a predicate (as above) when you actually want to narrow or loosen the default.
45
45
 
46
- Tools are registered with **inline** `execute`, `toModelOutput`, `approval.request`, and `approval.prompt` as direct `defineTool` properties so they survive multi-turn durable eve Workflow replay (see [#51](https://github.com/vercel-labs/github-tools/issues/51), [#99](https://github.com/vercel-labs/github-tools/issues/99)). Input schemas and optional output-schema overrides use `defineDurableSchema`; every durable closure contains only the tool name and reconstructs the live schema from extension configuration. A spread or call-expression callback has no durable descriptor, and eve rejects a dynamic tool whose callback is missing one. `toModelOutput` strips `rateLimit` from the model-facing payload; the execute result still carries it for hooks and channels. Do not use the deprecated `@github-tools/sdk/connect/eve` one-liner for durable Slack/multi-turn agents.
46
+ `extension/instructions.ts` adds a system instruction on how to use the GitHub tools: the preset's tool rules without its "You are …" opener (`resolveToolGuidance` from `@github-tools/sdk/eve-runtime`), the shared rules, and the working `context`. It depends only on the config, so the prompt cache holds. Write tools also set `label.complete`, so channels show "Created issue on owner/repo#123" once a write succeeds.
47
+
48
+ The tool file is a `defineDynamic` function that eve runs before every model call, so tools, approval policies, and schema overrides are rebuilt from the extension config in every process, including after Workflow replay and redeploys. With `preset: 'auto'`, the routing is kept for the session with `ctx.memo`, or for the turn with `evaluation.scope: 'turn'`. `toModelOutput` strips `rateLimit` from the model-facing payload; the execute result still carries it for hooks and channels. Do not use the deprecated `@github-tools/sdk/connect/eve` one-liner for durable Slack/multi-turn agents.
47
49
 
48
50
  `connector` also accepts a `() => string | Promise<string>` resolver, so the same config can pick a connector dynamically (e.g. by environment):
49
51
 
@@ -94,14 +96,16 @@ extension/
94
96
  |---|---|---|
95
97
  | `token` | `string \| (() => Promise<string>)` (optional) | PAT string, or an async provider for rotating tokens (e.g. a GitHub App installation token) — the same `GithubTokenInput` the SDK accepts; falls back to `GITHUB_TOKEN` when omitted and `connector` is not set |
96
98
  | `connector` | `string \| (() => string \| Promise<string>)` (optional) | Vercel Connect connector name, or a resolver to pick one dynamically (e.g. per environment/tenant); takes priority over `token` |
97
- | `connect` | `record \| ((ctx, call) => record)` (optional) | Passed through to `getToken` when `connector` is set. `connect.subject` defaults to `{ type: 'app' }` (the project's GitHub App installation); pass `{ type: 'user', id }` or a per-caller resolver `(ctx) => subject` to mint each caller's own connection token in multi-user apps. App tokens target the installation owning each call's repository unless `installationId`, `authorizationDetails` or `repositories` pins one; pass a `(ctx, call) => record` resolver for other per-call rules |
98
- | `preset` | preset name, array, or `'auto'` | `code-review`, `issue-triage`, `ci-ops`, `repo-explorer`, `security-audit`, `release-manager`, `discussion-moderator`, `notification-inbox`, `pr-author`, `maintainer`; `'auto'` picks at most two presets per user message |
99
+ | `actAs` | `'app' \| 'user' \| 'caller' \| { read, write }` (optional) | Whose GitHub access the tools use when `connector` is set. `'app'` (default) uses the GitHub App installation. `'user'` runs each call with the signed-in eve user's own GitHub token, so the agent can do what that user can do on GitHub and nothing more; sessions without a signed-in user fail. `'caller'` uses the user when one drives the turn and the App otherwise (schedules, bots). Users who have not authorized the App get a sign-in prompt and never fall back to the App. `{ read, write }` picks per tool kind, `overrides.<tool>.actAs` per tool. The default may change to `'caller'` in a future major version |
100
+ | `approvers` | `'requester' \| 'anyone'` (optional) | Who may answer an approval. `'requester'` (default) is only the person who asked, so a colleague cannot approve your request. `'anyone'` is an opt-in that lets any signed-in user approve and anyone deny; for `'user'` and `'caller'` tools the approved call runs with the approver's GitHub token, after they sign in |
101
+ | `connect` | `record \| ((ctx, call) => record)` (optional) | Passed through to `getToken` when `connector` is set. `connect.subject` defaults to `{ type: 'app' }` (the project's GitHub App installation); for per-user tokens, use `actAs`. App tokens target the installation owning each call's repository unless `installationId`, `authorizationDetails` or `repositories` pins one; pass a `(ctx, call) => record` resolver for other per-call rules |
102
+ | `preset` | preset name, array, or `'auto'` | `code-review`, `issue-triage`, `ci-ops`, `repo-explorer`, `security-audit`, `release-manager`, `discussion-moderator`, `notification-inbox`, `pr-author`, `maintainer`; `'auto'` lists the tools the session's first request needs and defers the rest |
99
103
  | `include` | `string[]?` | Tool names to add on top of `preset` (union), or the full set standalone |
100
104
  | `exclude` | `string[]?` | Tool names to remove from the resolved `preset` + `include` set |
101
105
  | `context` | `{ owner?, repo?, pullNumber?, issueNumber?, ref? }?` | Default working context for tool inputs and schemas |
102
106
  | `requireApproval` | `boolean \| 'auto' \| record` | Global or per-tool; per-tool values may be `'auto'` or predicate functions. `'auto'` runs low-risk writes the user asked for without a prompt |
103
- | `evaluation` | `record?` | Tunes the `'auto'` modes: `model`, `maxRisk`, `minIntent`, `minPresetProbability`, `maxPresets` |
104
- | `overrides` | `record` | Per-tool `description` / `approval` / `toModelOutput` / `outputSchema` |
107
+ | `evaluation` | `record?` | Tunes the `'auto'` modes: `model`, `maxRisk`, `minIntent`, `selection`, `scope`, `minToolProbability`, `maxTools`, `minPresetProbability`, `maxPresets`, `providerOptions` |
108
+ | `overrides` | `record` | Per-tool `description` / `approval` / `actAs` / `toModelOutput` / `outputSchema` |
105
109
  | `author` / `committer` / `coAuthors` | commit identity | Attribution for commit-creating tools |
106
110
 
107
111
  ## Build (contributors)
@@ -1,11 +1,6 @@
1
1
  {
2
2
  "kind": "eve-extension",
3
- "formatVersion": 2,
4
- "builtWithEve": "0.81.1",
5
- "requires": {
6
- "extension": 1,
7
- "tool": 93,
8
- "dynamicTool": 87,
9
- "config": 1
10
- }
3
+ "formatVersion": 3,
4
+ "builtWithEve": "1.0.0-rc.6",
5
+ "contractMajor": 0
11
6
  }
@@ -51,6 +51,25 @@ export type GithubExtensionApprovalValue = EveApprovalValue | 'auto';
51
51
  * low-risk write tools (`AUTO_APPROVAL_TOOLS`) and keeps approval on the rest.
52
52
  */
53
53
  export type GithubExtensionApprovalConfig = boolean | 'auto' | Partial<Record<GithubWriteToolName, GithubExtensionApprovalValue>>;
54
+ /**
55
+ * Whose GitHub access a tool call uses: the GitHub App installation
56
+ * (`'app'`), the signed-in user (`'user'`), or the user when one drives the
57
+ * turn and the App otherwise (`'caller'`).
58
+ */
59
+ export type GithubActAs = 'app' | 'user' | 'caller';
60
+ /** One identity for every tool, or one for read tools and one for write tools. */
61
+ export type GithubExtensionActAs = GithubActAs | {
62
+ read?: GithubActAs;
63
+ write?: GithubActAs;
64
+ };
65
+ /** Who may answer an approval: only the requester, or any signed-in user. */
66
+ export type GithubExtensionApprovers = 'requester' | 'anyone';
67
+ /** Per-tool overrides, including the tool's own `actAs`. */
68
+ export type GithubExtensionToolOverrides = {
69
+ [K in GithubToolName]?: NonNullable<EveToolOverrides[K]> & {
70
+ actAs?: GithubActAs;
71
+ };
72
+ };
54
73
  /**
55
74
  * Config passed to `githubExtension({ ... })` at the agent mount site.
56
75
  * Declared as an interface (not only a Zod schema) so IDE hovers show JSDoc.
@@ -69,11 +88,51 @@ export interface GithubExtensionConfig {
69
88
  * (e.g. per environment or tenant). Takes priority over `token`.
70
89
  */
71
90
  connector?: GithubConnectorInput;
91
+ /**
92
+ * Whose GitHub access the tools use when `connector` is set.
93
+ *
94
+ * - `'app'` (default): the connector's GitHub App installation. Every
95
+ * caller shares the App's permissions.
96
+ * - `'user'`: the signed-in user of the eve session. Each user authorizes
97
+ * the GitHub App once, through eve's sign-in prompt, and every call then
98
+ * runs with their own GitHub token. Sessions without a signed-in user
99
+ * (schedules, `localDev()`) fail instead of falling back to the App.
100
+ * - `'caller'`: `'user'` when a signed-in user drives the turn, the App when
101
+ * nobody does (schedules, automations, bots). A user who has not
102
+ * authorized the App is asked to sign in; the call never falls back to
103
+ * the App for them.
104
+ *
105
+ * GitHub allows a user-token call only when both the user and the App have
106
+ * access, so a maintainer can do what a maintainer can, and a reader can
107
+ * only read. An approved call runs with the approver's token: see
108
+ * `approvers`.
109
+ *
110
+ * Pass `{ read, write }` to pick per tool kind (each defaults to `'app'`),
111
+ * and `overrides.<tool>.actAs` for a single tool. The default may change to
112
+ * `'caller'` in a future major version.
113
+ */
114
+ actAs?: GithubExtensionActAs;
115
+ /**
116
+ * Who may answer an approval.
117
+ *
118
+ * - `'requester'` (default): only the person who asked for the call. A
119
+ * colleague in a shared thread cannot approve it for them.
120
+ * - `'anyone'`: opt-in for simple shared agents. Any signed-in user can
121
+ * approve, and anyone can deny. For
122
+ * tools that act as `'user'` or `'caller'`, the approved call runs with
123
+ * the approver's GitHub token, so GitHub records the approver and checks
124
+ * their permissions, and an approver who has not authorized the App signs
125
+ * in before the approval counts. For `'app'` tools the approval is a gate
126
+ * only: the call still runs as the App.
127
+ */
128
+ approvers?: GithubExtensionApprovers;
72
129
  /**
73
130
  * Vercel Connect token params passed through to `getToken` when `connector`
74
131
  * is set. `subject` defaults to `{ type: 'app' }` (the project's GitHub App
75
- * installation, shared by every caller); pass a value or a per-caller
76
- * resolver to mint per-user tokens instead.
132
+ * installation, shared by every caller). For per-user tokens, prefer
133
+ * `actAs: 'user'` or `'caller'`, which also let eve prompt users who have
134
+ * not connected GitHub yet. With `'caller'`, these params apply to the
135
+ * calls that run as the App.
77
136
  *
78
137
  * App tokens target the GitHub App installation owning each call's
79
138
  * repository, so an App installed on several accounts needs nothing here;
@@ -84,7 +143,9 @@ export interface GithubExtensionConfig {
84
143
  connect?: GithubExtensionConnectParams | GithubExtensionConnectResolver;
85
144
  /**
86
145
  * Restrict tools to a preset (or array of presets). Prefer a focused preset; omit or use `maintainer` for the full catalog.
87
- * `'auto'` picks up to two presets per user message with an evaluation model, and never exposes the full catalog.
146
+ * `'auto'` lists the tools an evaluation model picks for the session's first request, plus the core read tools,
147
+ * and defers every other tool: the model can still find it with `eve__search`. Set `evaluation.selection: 'presets'`
148
+ * to list up to two routed presets instead.
88
149
  */
89
150
  preset?: GithubToolPreset | GithubToolPreset[] | 'auto';
90
151
  /**
@@ -106,8 +167,8 @@ export interface GithubExtensionConfig {
106
167
  requireApproval?: GithubExtensionApprovalConfig;
107
168
  /** Tuning for `preset: 'auto'` and `'auto'` approval. The evaluation model defaults to TypeSafe Jev. */
108
169
  evaluation?: GithubEvaluationOptions;
109
- /** Per-tool overrides (`description`, `approval`, `toModelOutput`, `outputSchema`). */
110
- overrides?: EveToolOverrides;
170
+ /** Per-tool overrides (`description`, `approval`, `actAs`, `toModelOutput`, `outputSchema`). */
171
+ overrides?: GithubExtensionToolOverrides;
111
172
  /** Default author for commit-creating tools. */
112
173
  author?: CommitIdentity;
113
174
  /** Default committer for commit-creating tools. */
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../../extension/extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAGL,KAAK,cAAc,EACnB,K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";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS } from "@github-tools/sdk/eve-runtime";
7
+ import { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, PRESET_TOOLS } from "@github-tools/sdk/eve-runtime";
8
8
  import { defineExtension } from "eve/extension";
9
9
  import { z } from "zod";
10
- const presetNameSchema = z.enum([
11
- "code-review",
12
- "issue-triage",
13
- "ci-ops",
14
- "repo-explorer",
15
- "security-audit",
16
- "release-manager",
17
- "discussion-moderator",
18
- "notification-inbox",
19
- "pr-author",
20
- "maintainer"
21
- ]);
10
+ const presetNameSchema = z.enum(Object.keys(PRESET_TOOLS));
22
11
  const toolNameSchema = z.enum(Object.values(GITHUB_TOOL_NAMES));
23
12
  const writeToolNameSchema = z.enum(Object.values(GITHUB_WRITE_TOOLS));
13
+ const actAsSchema = z.enum([
14
+ "app",
15
+ "user",
16
+ "caller"
17
+ ]);
24
18
  const commitIdentitySchema = z.object({
25
19
  name: z.string(),
26
20
  email: z.string()
@@ -28,6 +22,11 @@ const commitIdentitySchema = z.object({
28
22
  const configSchema = z.object({
29
23
  token: z.custom((value) => typeof value === "string" || typeof value === "function").optional(),
30
24
  connector: z.custom((value) => typeof value === "string" || typeof value === "function").optional(),
25
+ actAs: z.union([actAsSchema, z.object({
26
+ read: actAsSchema.optional(),
27
+ write: actAsSchema.optional()
28
+ })]).optional(),
29
+ approvers: z.enum(["requester", "anyone"]).optional(),
31
30
  connect: z.union([z.record(z.string(), z.unknown()), z.custom((value) => typeof value === "function")]).optional(),
32
31
  preset: z.union([
33
32
  presetNameSchema,
@@ -53,12 +52,30 @@ const configSchema = z.object({
53
52
  maxRisk: z.number().optional(),
54
53
  minIntent: z.number().optional(),
55
54
  minPresetProbability: z.number().optional(),
56
- maxPresets: z.number().optional()
55
+ maxPresets: z.number().optional(),
56
+ selection: z.enum(["presets", "tools"]).optional(),
57
+ scope: z.enum(["turn", "session"]).optional(),
58
+ minToolProbability: z.number().optional(),
59
+ maxTools: z.number().optional(),
60
+ providerOptions: z.record(z.string(), z.record(z.string(), z.unknown())).optional()
57
61
  }).optional(),
58
- overrides: z.partialRecord(toolNameSchema, z.unknown()).optional(),
62
+ overrides: z.partialRecord(toolNameSchema, z.looseObject({ actAs: actAsSchema.optional() })).optional(),
59
63
  author: commitIdentitySchema.optional(),
60
64
  committer: commitIdentitySchema.optional(),
61
65
  coAuthors: z.array(commitIdentitySchema).optional()
66
+ }).superRefine((config, ctx) => {
67
+ const { actAs } = config;
68
+ const identities = [...typeof actAs === "object" ? [actAs.read, actAs.write] : [actAs], ...Object.values(config.overrides ?? {}).map((override) => override?.actAs)];
69
+ if (config.connector === void 0 && identities.some((identity) => identity !== void 0 && identity !== "app")) ctx.addIssue({
70
+ code: "custom",
71
+ path: ["actAs"],
72
+ message: "`actAs: 'user'` and `'caller'` need a Vercel Connect `connector`."
73
+ });
74
+ if (actAs === "user" && config.connect !== void 0) ctx.addIssue({
75
+ code: "custom",
76
+ path: ["connect"],
77
+ message: "`connect` configures App tokens and cannot be combined with `actAs: 'user'`."
78
+ });
62
79
  });
63
80
  var extension_default = defineExtension({ config: configSchema });
64
81
  export { extension_default as default };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("eve/tools").DynamicSentinel<import("eve/instructions").DynamicInstructionsResult, import("eve/tools").DynamicContext>;
2
+ export default _default;
3
+ //# sourceMappingURL=instructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../../extension/instructions.ts"],"names":[],"mappings":";AAMA,wBAQE"}
@@ -0,0 +1,18 @@
1
+ import { fileURLToPath as __eveFileURLToPath } from "node:url";
2
+ import { dirname as __eveDirname } from "node:path";
3
+ import { createRequire as __eveCreateRequire } from "node:module";
4
+ const __filename = __eveFileURLToPath(import.meta.url);
5
+ __eveDirname(__filename);
6
+ __eveCreateRequire(import.meta.url);
7
+ import extension_default from "./extension.mjs";
8
+ import { resolveToolGuidance } from "@github-tools/sdk/eve-runtime";
9
+ import { defineDynamic, defineInstructions } from "eve/instructions";
10
+ var instructions_default = defineDynamic(() => {
11
+ const { preset, context } = extension_default.config;
12
+ const guidance = resolveToolGuidance({
13
+ preset: preset === "auto" ? void 0 : preset,
14
+ context
15
+ });
16
+ return defineInstructions({ content: `GitHub tools: the tool names below leave out this extension's prefix, such as \`github__\`.${preset === "auto" ? " A GitHub tool that is not in your tool list can be found with `eve__search`." : ""}\n\n${guidance}` });
17
+ });
18
+ export { instructions_default as default };
@@ -1,4 +1,3 @@
1
- import { type ToolDefinition } from 'eve/tools';
2
- declare const _default: import("eve").DynamicSentinel<Record<string, ToolDefinition<unknown, unknown>>>;
1
+ declare const _default: import("eve/tools").DynamicSentinel<import("eve/tools").DynamicToolResult, import("eve/tools").DynamicContext>;
3
2
  export default _default;
4
3
  //# sourceMappingURL=github.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../../extension/tools/github.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAoE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;;AAwLjH,wBA+CE"}
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../../extension/tools/github.ts"],"names":[],"mappings":";AAmVA,wBAqDE"}
@@ -5,9 +5,11 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import extension_default from "../extension.mjs";
8
- import { AUTO_APPROVAL_TOOLS, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, executeGithubEveTool, formatGithubEveToolOutput, githubToolsErrors, isEveApprovalDisabled, latestUserText, listEveToolDescriptors, mapEveApprovalValue, needsAutoApproval, selectPresets } from "@github-tools/sdk/eve-runtime";
9
- import { connectGithubToken } from "@github-tools/sdk/connect";
10
- import { defineDurableSchema, defineDynamic, defineTool } from "eve/tools";
8
+ import { AUTO_APPROVAL_TOOLS, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, autoApprovalDecision, evaluatePresets, evaluateTools, executeGithubEveTool, fallbackPresets, fallbackTools, formatGithubEveToolOutput, githubToolsErrors, isEveApprovalDisabled, latestUserText, listEveToolDescriptors, mapEveApprovalValue } from "@github-tools/sdk/eve-runtime";
9
+ import { z } from "zod";
10
+ import { connectGithubScopesForTools, connectGithubToken, resolveGithubConnector } from "@github-tools/sdk/connect";
11
+ import { connect } from "@vercel/connect/eve";
12
+ import { defineDynamic, defineTool, toolOutput } from "eve/tools";
11
13
  function buildSessionOptions(ctx) {
12
14
  const { token, connector, connect, preset, include, exclude, overrides, context, author, committer, coAuthors } = extension_default.config;
13
15
  const includeNames = include;
@@ -21,6 +23,7 @@ function buildSessionOptions(ctx) {
21
23
  const { subject, ...params } = typeof connect === "function" ? await connect(requireToolContext(ctx), requireToolCall(call)) : connect ?? {};
22
24
  const resolvedSubject = typeof subject === "function" ? await subject(requireToolContext(ctx)) : subject;
23
25
  return {
26
+ ...preset === "auto" && call && { scopes: connectGithubScopesForTools([call.toolName]) },
24
27
  ...params,
25
28
  ...resolvedSubject && { subject: resolvedSubject }
26
29
  };
@@ -43,22 +46,6 @@ function approvalValue(writeTool, requireApproval, override) {
43
46
  if (typeof requireApproval === "object") return requireApproval[writeTool] ?? true;
44
47
  return requireApproval ?? true;
45
48
  }
46
- const PENDING_APPROVALS_LABEL = "[Pending approvals]";
47
- function withoutPendingApprovals(messages) {
48
- return messages.filter((m) => m.role !== "user" || !latestUserText([m]).startsWith(PENDING_APPROVALS_LABEL));
49
- }
50
- const routedPresets = new Map();
51
- function routePresets(sessionId, messages, evaluation) {
52
- const key = `${sessionId}:${messages.filter((m) => m.role === "user").length}`;
53
- let presets = routedPresets.get(key);
54
- if (!presets) {
55
- presets = selectPresets(messages, evaluation);
56
- presets.catch(() => routedPresets.delete(key));
57
- routedPresets.set(key, presets);
58
- if (routedPresets.size > 1e3) routedPresets.delete(routedPresets.keys().next().value);
59
- }
60
- return presets;
61
- }
62
49
  function calledGithubTools(messages) {
63
50
  return messages.flatMap((message) => message.role === "assistant" && Array.isArray(message.content) ? message.content.flatMap((part) => {
64
51
  if (part.type !== "tool-call") return [];
@@ -78,86 +65,218 @@ function requireToolCall(call) {
78
65
  if (!call) throw githubToolsErrors.SUBJECT_CONTEXT_REQUIRED();
79
66
  return call;
80
67
  }
68
+ function actAsFor(name) {
69
+ const { actAs, overrides } = extension_default.config;
70
+ const override = overrides?.[name]?.actAs;
71
+ if (override) return override;
72
+ if (typeof actAs === "object") return (writeToolName(name) ? actAs.write : actAs.read) ?? "app";
73
+ return actAs ?? "app";
74
+ }
75
+ function isUser(principal) {
76
+ return principal?.principalType === "user";
77
+ }
78
+ function samePrincipal(a, b) {
79
+ return b != null && a.authenticator === b.authenticator && a.issuer === b.issuer && a.principalType === b.principalType && a.principalId === b.principalId;
80
+ }
81
+ async function githubUserAuth() {
82
+ return connect(await resolveGithubConnector(extension_default.config.connector));
83
+ }
81
84
  async function runGithubEveTool(name, input, ctx) {
82
- return executeGithubEveTool(name, input, buildSessionOptions(ctx));
85
+ const args = input;
86
+ const actAs = actAsFor(name);
87
+ if (actAs === "app") return executeGithubEveTool(name, args, buildSessionOptions(ctx));
88
+ const requester = ctx.session.auth.current;
89
+ const approver = ctx.approval?.responder;
90
+ const auth = await githubUserAuth();
91
+ if (isUser(approver) && !samePrincipal(approver, requester)) {
92
+ const { token } = await approver.getToken(auth);
93
+ return executeGithubEveTool(name, args, {
94
+ ...buildSessionOptions(ctx),
95
+ token
96
+ });
97
+ }
98
+ if (actAs === "caller" && !isUser(requester)) return executeGithubEveTool(name, args, buildSessionOptions(ctx));
99
+ const { token } = await ctx.getToken(auth);
100
+ const result = await executeGithubEveTool(name, args, {
101
+ ...buildSessionOptions(ctx),
102
+ token
103
+ });
104
+ if (isUnauthorized(result)) ctx.requireAuth(auth);
105
+ return result;
106
+ }
107
+ async function runGithubEveApprovalResponse(name, { request, response, auth }) {
108
+ if (response.decision === "deny") return { status: "allowed" };
109
+ if (!isUser(response.principal)) return samePrincipal(response.principal, request.principal) ? { status: "allowed" } : {
110
+ status: "rejected",
111
+ reason: "Sign in to approve this GitHub action."
112
+ };
113
+ if (actAsFor(name) === "app") return { status: "allowed" };
114
+ await auth.getToken(await githubUserAuth());
115
+ return { status: "allowed" };
116
+ }
117
+ async function runConfiguredApprovalResponse(name, policy, ctx) {
118
+ const decision = await policy(ctx);
119
+ if (decision.status !== "allowed") return decision;
120
+ return runGithubEveApprovalResponse(name, ctx);
121
+ }
122
+ function configuredApprovalResponse(name) {
123
+ const value = configuredApprovalValue(name);
124
+ return typeof value === "object" ? value.response : void 0;
125
+ }
126
+ function isUnauthorized(result) {
127
+ if (!isErrorResult(result)) return false;
128
+ const { error } = result;
129
+ return typeof error === "object" && error !== null && "code" in error && error.code === githubToolsErrors.UNAUTHORIZED.code;
83
130
  }
84
131
  function runGithubEveToModelOutput(name, output) {
85
132
  const custom = buildSessionOptions().overrides?.[name]?.toModelOutput;
86
- return custom ? custom(output) : formatGithubEveToolOutput(name, output);
133
+ if (custom) return custom(output);
134
+ if (isErrorResult(output)) return toolOutput.errorText(JSON.stringify({ error: output.error }));
135
+ return formatGithubEveToolOutput(name, output);
136
+ }
137
+ function isErrorResult(output) {
138
+ return output != null && typeof output === "object" && !Array.isArray(output) && "error" in output && output.error != null;
139
+ }
140
+ function isPersonRequest(ctx) {
141
+ return ctx.session.parent === void 0 && ctx.session.auth.current?.principalType !== "service";
142
+ }
143
+ const autoDecisions = new Map();
144
+ const MAX_CACHED_DECISIONS = 100;
145
+ function decisionKey(sessionId, callId) {
146
+ return `${sessionId}:${callId}`;
147
+ }
148
+ function cachedAutoApproval(writeTool, request, ctx) {
149
+ const key = decisionKey(ctx.session.id, ctx.callId);
150
+ const cached = autoDecisions.get(key);
151
+ if (cached) return cached.pending;
152
+ const messages = [{
153
+ role: "user",
154
+ content: request
155
+ }];
156
+ const entry = { pending: autoApprovalDecision(writeTool, ctx.toolInput, messages, extension_default.config.evaluation, ctx.abortSignal).then((decision) => {
157
+ entry.settled = decision;
158
+ return decision;
159
+ }) };
160
+ autoDecisions.set(key, entry);
161
+ entry.pending.catch(() => autoDecisions.delete(key));
162
+ if (autoDecisions.size > MAX_CACHED_DECISIONS) autoDecisions.delete(autoDecisions.keys().next().value);
163
+ return entry.pending;
164
+ }
165
+ function approvalPrompt(label, sessionId, callId) {
166
+ const decision = autoDecisions.get(decisionKey(sessionId, callId))?.settled;
167
+ return decision?.ask ? `${label}? ${decision.reason}` : `${label}?`;
168
+ }
169
+ function configuredApprovalValue(name) {
170
+ const writeTool = writeToolName(name);
171
+ if (!writeTool) return void 0;
172
+ const { requireApproval, overrides } = extension_default.config;
173
+ return approvalValue(writeTool, requireApproval, overrides?.[name]?.approval);
87
174
  }
88
175
  async function runGithubEveApproval(name, request, ctx) {
89
176
  const writeTool = writeToolName(name);
90
177
  if (!writeTool) return "not-applicable";
91
- const { requireApproval, overrides, evaluation } = extension_default.config;
92
- const value = approvalValue(writeTool, requireApproval, overrides?.[name]?.approval);
178
+ const value = configuredApprovalValue(name);
93
179
  if (value === "auto") {
94
- const messages = [{
95
- role: "user",
96
- content: request
97
- }];
98
- return await needsAutoApproval(writeTool, ctx.toolInput, messages, evaluation) ? "user-approval" : "not-applicable";
180
+ if (!isPersonRequest(ctx)) return "user-approval";
181
+ const { ask, reason } = await cachedAutoApproval(writeTool, request, ctx);
182
+ return ask ? "user-approval" : {
183
+ type: "approved",
184
+ reason
185
+ };
99
186
  }
100
187
  if (isEveApprovalDisabled(value)) return "not-applicable";
101
188
  return mapEveApprovalValue(value)(ctx);
102
189
  }
103
- function runGithubEveApprovalPrompt(name, input) {
190
+ function describeGithubCall(name, inputSchema, input) {
191
+ const fields = inputSchema instanceof z.ZodObject ? inputSchema.shape : {};
104
192
  const { owner, repo, pullNumber, issueNumber, discussionNumber } = {
105
- ...extension_default.config.context,
193
+ ...Object.fromEntries(Object.entries(extension_default.config.context ?? {}).filter(([key]) => key in fields)),
106
194
  ...input
107
195
  };
108
196
  const action = name.replace(/[A-Z]/g, (letter) => ` ${letter.toLowerCase()}`);
109
197
  const number = pullNumber ?? issueNumber ?? discussionNumber;
110
198
  const target = owner && repo ? ` on ${owner}/${repo}${number ? `#${number}` : ""}` : "";
111
- return `${action[0].toUpperCase()}${action.slice(1)}${target}?`;
199
+ return `${action[0].toUpperCase()}${action.slice(1)}${target}`;
112
200
  }
113
- function buildGithubEveInputSchema({ name }) {
114
- const descriptor = listEveToolDescriptors({
115
- ...buildSessionOptions(),
116
- preset: void 0,
117
- include: [name],
118
- exclude: void 0
119
- })[0];
120
- if (!descriptor) throw new Error(`GitHub tool descriptor "${name}" is not available`);
121
- return descriptor.inputSchema;
122
- }
123
- function buildGithubEveOutputSchema({ name }) {
124
- const outputSchema = buildSessionOptions().overrides?.[name]?.outputSchema;
125
- if (!outputSchema) throw new Error(`GitHub tool output schema override "${name}" is not available`);
126
- return outputSchema;
127
- }
128
- var github_default = defineDynamic({ events: { "step.started": async (_event, ctx) => {
201
+ const PAST_TENSE = {
202
+ add: "Added",
203
+ cancel: "Cancelled",
204
+ close: "Closed",
205
+ create: "Created",
206
+ delete: "Deleted",
207
+ disable: "Disabled",
208
+ edit: "Edited",
209
+ enable: "Enabled",
210
+ fork: "Forked",
211
+ mark: "Marked",
212
+ merge: "Merged",
213
+ remove: "Removed",
214
+ reply: "Replied",
215
+ request: "Requested",
216
+ rerun: "Reran",
217
+ resolve: "Resolved",
218
+ trigger: "Triggered",
219
+ update: "Updated"
220
+ };
221
+ function describeGithubResult(name, inputSchema, input, output) {
222
+ if (output !== null && typeof output === "object" && "error" in output) {
223
+ const label = describeGithubCall(name, inputSchema, input);
224
+ return `Couldn't ${label[0].toLowerCase()}${label.slice(1)}`;
225
+ }
226
+ if (!writeToolName(name)) return "";
227
+ const created = output !== null && typeof output === "object" && "number" in output && typeof output.number === "number" ? output.number : void 0;
228
+ const [verb, ...rest] = describeGithubCall(name, inputSchema, created !== void 0 && input.pullNumber === void 0 && input.issueNumber === void 0 && input.discussionNumber === void 0 ? {
229
+ ...input,
230
+ issueNumber: created
231
+ } : input).split(" ");
232
+ const past = PAST_TENSE[verb.toLowerCase()];
233
+ return past ? [past, ...rest].join(" ") : "";
234
+ }
235
+ var github_default = defineDynamic(async (ctx) => {
129
236
  const sessionOptions = buildSessionOptions();
130
237
  const { preset, evaluation } = extension_default.config;
131
- const messages = withoutPendingApprovals(ctx.messages);
238
+ const messages = await ctx.messages();
132
239
  const request = latestUserText(messages);
133
- const descriptors = listEveToolDescriptors(preset === "auto" ? {
240
+ const routingKey = evaluation?.scope === "turn" ? ctx.turn?.id ?? null : null;
241
+ const routed = preset !== "auto" ? void 0 : evaluation?.selection !== "presets" ? { include: await ctx.memo(["tools", routingKey], ({ abortSignal }) => evaluateTools(messages, evaluation, abortSignal)).catch((error) => fallbackTools(error, evaluation)) } : { preset: await ctx.memo(["presets", routingKey], ({ abortSignal }) => evaluatePresets(messages, evaluation, abortSignal)).catch((error) => fallbackPresets(error, evaluation)) };
242
+ const listed = routed && new Set(listEveToolDescriptors({
134
243
  ...sessionOptions,
135
- preset: await routePresets(ctx.session.id, messages, evaluation),
136
- include: [...sessionOptions.include ?? [], ...calledGithubTools(ctx.messages)]
244
+ preset: routed.preset,
245
+ include: [
246
+ ...routed.include ?? [],
247
+ ...sessionOptions.include ?? [],
248
+ ...calledGithubTools(messages)
249
+ ]
250
+ }).map((entry) => entry.name));
251
+ const descriptors = listEveToolDescriptors(listed ? {
252
+ ...sessionOptions,
253
+ preset: void 0,
254
+ include: void 0
137
255
  } : sessionOptions);
138
256
  const tools = {};
139
257
  const toolOverrides = sessionOptions.overrides;
140
258
  for (const entry of descriptors) {
141
259
  const name = entry.name;
142
260
  const override = toolOverrides?.[name];
261
+ const configuredResponse = configuredApprovalResponse(name);
143
262
  tools[name] = defineTool({
263
+ ...listed && !listed.has(name) && { deferred: true },
144
264
  description: override?.description ?? entry.description,
145
- inputSchema: defineDurableSchema({
146
- closure: { name },
147
- schema: buildGithubEveInputSchema
148
- }),
265
+ inputSchema: entry.inputSchema,
149
266
  approval: {
150
267
  request: (approvalCtx) => runGithubEveApproval(name, request, approvalCtx),
151
- prompt: ({ input }) => runGithubEveApprovalPrompt(name, input)
268
+ prompt: ({ callId, input }) => approvalPrompt(describeGithubCall(name, entry.inputSchema, input), ctx.session.id, callId),
269
+ ...configuredResponse ? { response: (responseCtx) => runConfiguredApprovalResponse(name, configuredResponse, responseCtx) } : extension_default.config.approvers === "anyone" && { response: (responseCtx) => runGithubEveApprovalResponse(name, responseCtx) }
270
+ },
271
+ label: {
272
+ start: (input) => describeGithubCall(name, entry.inputSchema, input),
273
+ complete: (input, output) => describeGithubResult(name, entry.inputSchema, input, output)
152
274
  },
153
275
  toModelOutput: (output) => runGithubEveToModelOutput(name, output),
154
- ...override?.outputSchema !== void 0 && { outputSchema: defineDurableSchema({
155
- closure: { name },
156
- schema: buildGithubEveOutputSchema
157
- }) },
158
- execute: async (input, ctx) => runGithubEveTool(name, input, ctx)
276
+ ...override?.outputSchema !== void 0 && { outputSchema: override.outputSchema },
277
+ execute: async (input, toolCtx) => runGithubEveTool(name, input, toolCtx)
159
278
  });
160
279
  }
161
280
  return tools;
162
- } } });
281
+ });
163
282
  export { github_default as default };
package/dist/index.mjs CHANGED
@@ -4,5 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import extension_default from "./extension/extension.mjs";
8
- export { extension_default as default, extension_default as eve_extension };
7
+ export { default, default as eve_extension } from "./extension/extension.mjs";
@@ -4,5 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import github_default from "../extension/tools/github.mjs";
8
- export { github_default as github };
7
+ export { default as github } from "../extension/tools/github.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@github-tools/eve-extension",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "GitHub tools for eve, distributed as a mountable eve extension (https://eve.dev/docs/extensions)",
5
5
  "author": "HugoRCD <hugo.richard@vercel.com>",
6
6
  "repository": {
@@ -46,10 +46,10 @@
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
48
  "zod": "^4.5.4",
49
- "@github-tools/sdk": "1.18.0"
49
+ "@github-tools/sdk": "1.20.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@vercel/connect": ">=0.3.2",
52
+ "@vercel/connect": ">=2.7.0",
53
53
  "eve": "*"
54
54
  },
55
55
  "peerDependenciesMeta": {
@@ -59,9 +59,9 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^26.5.0",
62
- "@vercel/connect": "^2.0.4",
62
+ "@vercel/connect": "^2.7.0",
63
63
  "eslint": "^10.10.0",
64
- "eve": "0.81.1",
64
+ "eve": "1.0.0-rc.6",
65
65
  "typescript": "^6.0.3",
66
66
  "typescript-eslint": "^8.70.0"
67
67
  },
@@ -72,7 +72,6 @@
72
72
  "build": "eve extension build",
73
73
  "lint": "eslint .",
74
74
  "lint:fix": "eslint . --fix",
75
- "typecheck": "tsc --noEmit",
76
- "test": "node --test --experimental-strip-types ./test/durable-define-tool.test.ts"
75
+ "typecheck": "tsc --noEmit"
77
76
  }
78
77
  }