@inkeep/agents-work-apps 0.0.0-dev-20260210145305 → 0.0.0-dev-20260210145845

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.
@@ -4,10 +4,10 @@ import "./routes/setup.js";
4
4
  import "./routes/tokenExchange.js";
5
5
  import { WebhookVerificationResult, verifyWebhookSignature } from "./routes/webhooks.js";
6
6
  import { Hono } from "hono";
7
- import * as hono_types0 from "hono/types";
7
+ import * as hono_types3 from "hono/types";
8
8
 
9
9
  //#region src/github/index.d.ts
10
- declare function createGithubRoutes(): Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
11
- declare const githubRoutes: Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
10
+ declare function createGithubRoutes(): Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
11
+ declare const githubRoutes: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
12
12
  //#endregion
13
13
  export { GenerateInstallationAccessTokenResult, GenerateTokenError, GenerateTokenResult, GitHubAppConfig, InstallationAccessToken, InstallationInfo, LookupInstallationError, LookupInstallationForRepoResult, LookupInstallationResult, WebhookVerificationResult, clearConfigCache, createAppJwt, createGithubRoutes, determineStatus, fetchInstallationDetails, fetchInstallationRepositories, generateInstallationAccessToken, getGitHubAppConfig, getGitHubAppName, getStateSigningSecret, getWebhookSecret, githubRoutes, isGitHubAppConfigured, isGitHubAppNameConfigured, isStateSigningConfigured, isWebhookConfigured, lookupInstallationForRepo, validateGitHubAppConfigOnStartup, validateGitHubInstallFlowConfigOnStartup, validateGitHubWebhookConfigOnStartup, verifyWebhookSignature };
@@ -108,8 +108,9 @@ const getServer = async (toolId) => {
108
108
  owner: z.string().describe("Repository owner name"),
109
109
  repo: z.string().describe("Repository name"),
110
110
  file_path: z.string().describe("Path to the file. the path is relative to the root of the repository"),
111
- branch_name: z.string().optional().describe("The name of the branch to get the file content for (defaults to master/main branch). If you are analyzing a pr you created, you should use the branch name from the pr.")
112
- }, async ({ owner, repo, file_path, branch_name }) => {
111
+ branch_name: z.string().optional().describe("The name of the branch to get the file content for (defaults to master/main branch). If you are analyzing a pr you created, you should use the branch name from the pr."),
112
+ include_line_numbers: z.boolean().optional().describe("Whether to include line numbers in the response (defaults to false)")
113
+ }, async ({ owner, repo, file_path, branch_name, include_line_numbers = false }) => {
113
114
  try {
114
115
  let githubClient;
115
116
  try {
@@ -130,14 +131,20 @@ const getServer = async (toolId) => {
130
131
  ref: branch_name
131
132
  });
132
133
  if ("content" in response.data && !Array.isArray(response.data)) {
133
- const fileData = response.data;
134
- const output_mapping = Buffer.from(fileData.content, "base64").toString("utf-8").split("\n").map((line, index) => ({
135
- line: index + 1,
136
- content: line
137
- }));
134
+ if (include_line_numbers) {
135
+ const fileData = response.data;
136
+ const output_mapping = Buffer.from(fileData.content, "base64").toString("utf-8").split("\n").map((line, index) => ({
137
+ line: index + 1,
138
+ content: line
139
+ }));
140
+ return { content: [{
141
+ type: "text",
142
+ text: JSON.stringify(output_mapping)
143
+ }] };
144
+ }
138
145
  return { content: [{
139
146
  type: "text",
140
- text: JSON.stringify(output_mapping)
147
+ text: Buffer.from(response.data.content, "base64").toString("utf-8")
141
148
  }] };
142
149
  }
143
150
  return {
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types3 from "hono/types";
2
+ import * as hono_types7 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/setup.d.ts
5
- declare const app: Hono<hono_types3.BlankEnv, hono_types3.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,7 +1,7 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types5 from "hono/types";
2
+ import * as hono_types0 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/tokenExchange.d.ts
5
- declare const app: Hono<hono_types5.BlankEnv, hono_types5.BlankSchema, "/">;
5
+ declare const app: Hono<hono_types0.BlankEnv, hono_types0.BlankSchema, "/">;
6
6
  //#endregion
7
7
  export { app as default };
@@ -1,5 +1,5 @@
1
1
  import { Hono } from "hono";
2
- import * as hono_types7 from "hono/types";
2
+ import * as hono_types1 from "hono/types";
3
3
 
4
4
  //#region src/github/routes/webhooks.d.ts
5
5
  interface WebhookVerificationResult {
@@ -7,6 +7,6 @@ interface WebhookVerificationResult {
7
7
  error?: string;
8
8
  }
9
9
  declare function verifyWebhookSignature(payload: string, signature: string | undefined, secret: string): WebhookVerificationResult;
10
- declare const app: Hono<hono_types7.BlankEnv, hono_types7.BlankSchema, "/">;
10
+ declare const app: Hono<hono_types1.BlankEnv, hono_types1.BlankSchema, "/">;
11
11
  //#endregion
12
12
  export { WebhookVerificationResult, app as default, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-work-apps",
3
- "version": "0.0.0-dev-20260210145305",
3
+ "version": "0.0.0-dev-20260210145845",
4
4
  "description": "First party integrations for Inkeep Agents",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -24,7 +24,7 @@
24
24
  "hono": "^4.11.7",
25
25
  "jose": "^6.1.0",
26
26
  "minimatch": "^10.1.1",
27
- "@inkeep/agents-core": "0.0.0-dev-20260210145305"
27
+ "@inkeep/agents-core": "0.0.0-dev-20260210145845"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@hono/zod-openapi": "^1.1.5",