@shipfox/api-integration-github 8.0.0 → 9.0.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +53 -0
- package/dist/api/client.js +1 -1
- package/dist/api/client.js.map +1 -1
- package/dist/api/installation-token-envelope.d.ts +1 -1
- package/dist/api/installation-token-envelope.d.ts.map +1 -1
- package/dist/api/installation-token-envelope.js +1 -1
- package/dist/api/installation-token-envelope.js.map +1 -1
- package/dist/api/installation-token-provider.d.ts +1 -1
- package/dist/api/installation-token-provider.d.ts.map +1 -1
- package/dist/api/installation-token-provider.js.map +1 -1
- package/dist/core/actions-logs.d.ts +1 -1
- package/dist/core/actions-logs.d.ts.map +1 -1
- package/dist/core/actions-logs.js +2 -2
- package/dist/core/actions-logs.js.map +1 -1
- package/dist/core/agent-tool-selection.d.ts +1 -1
- package/dist/core/agent-tool-selection.d.ts.map +1 -1
- package/dist/core/agent-tool-selection.js +1 -1
- package/dist/core/agent-tool-selection.js.map +1 -1
- package/dist/core/agent-tools.d.ts +4 -4
- package/dist/core/agent-tools.d.ts.map +1 -1
- package/dist/core/agent-tools.js +2 -2
- package/dist/core/agent-tools.js.map +1 -1
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +1 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/github-agent-tool-catalog.d.ts +49 -0
- package/dist/core/github-agent-tool-catalog.d.ts.map +1 -0
- package/dist/core/github-agent-tool-catalog.js +867 -0
- package/dist/core/github-agent-tool-catalog.js.map +1 -0
- package/dist/core/install.d.ts +1 -1
- package/dist/core/install.d.ts.map +1 -1
- package/dist/core/install.js.map +1 -1
- package/dist/core/source-control.d.ts +1 -1
- package/dist/core/source-control.d.ts.map +1 -1
- package/dist/core/source-control.js +1 -1
- package/dist/core/source-control.js.map +1 -1
- package/dist/core/webhook-processor.d.ts +1 -1
- package/dist/core/webhook-processor.d.ts.map +1 -1
- package/dist/core/webhook-processor.js +1 -1
- package/dist/core/webhook-processor.js.map +1 -1
- package/dist/core/webhook.d.ts +1 -1
- package/dist/core/webhook.d.ts.map +1 -1
- package/dist/core/webhook.js +1 -1
- package/dist/core/webhook.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/metrics/instance.d.ts +1 -1
- package/dist/metrics/instance.d.ts.map +1 -1
- package/dist/metrics/instance.js.map +1 -1
- package/dist/presentation/dto/integrations.d.ts +8 -7
- package/dist/presentation/dto/integrations.d.ts.map +1 -1
- package/dist/presentation/dto/integrations.js +18 -7
- package/dist/presentation/dto/integrations.js.map +1 -1
- package/dist/presentation/e2eRoutes/create-connection.d.ts +1 -1
- package/dist/presentation/e2eRoutes/create-connection.d.ts.map +1 -1
- package/dist/presentation/e2eRoutes/create-connection.js +1 -1
- package/dist/presentation/e2eRoutes/create-connection.js.map +1 -1
- package/dist/presentation/routes/errors.js +1 -1
- package/dist/presentation/routes/errors.js.map +1 -1
- package/dist/presentation/routes/install.d.ts +1 -1
- package/dist/presentation/routes/install.d.ts.map +1 -1
- package/dist/presentation/routes/install.js.map +1 -1
- package/dist/presentation/routes/webhooks.d.ts +1 -1
- package/dist/presentation/routes/webhooks.d.ts.map +1 -1
- package/dist/presentation/routes/webhooks.js +1 -1
- package/dist/presentation/routes/webhooks.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +25 -14
- package/src/api/client.ts +1 -1
- package/src/api/installation-token-envelope.ts +1 -1
- package/src/api/installation-token-provider.test.ts +1 -1
- package/src/api/installation-token-provider.ts +1 -1
- package/src/core/actions-logs.ts +2 -2
- package/src/core/agent-tool-selection.ts +1 -1
- package/src/core/agent-tools.ts +10 -10
- package/src/core/errors.ts +1 -1
- package/src/core/github-agent-tool-catalog.ts +963 -0
- package/src/core/install.test.ts +1 -1
- package/src/core/install.ts +1 -1
- package/src/core/source-control.ts +1 -1
- package/src/core/webhook-processor.test.ts +1 -1
- package/src/core/webhook-processor.ts +1 -1
- package/src/core/webhook.test.ts +1 -1
- package/src/core/webhook.ts +7 -7
- package/src/index.ts +2 -1
- package/src/metrics/instance.ts +1 -1
- package/src/presentation/dto/integrations.ts +24 -6
- package/src/presentation/e2eRoutes/create-connection.ts +2 -2
- package/src/presentation/e2eRoutes/index.test.ts +1 -1
- package/src/presentation/routes/errors.ts +1 -1
- package/src/presentation/routes/install.test.ts +1 -1
- package/src/presentation/routes/install.ts +1 -1
- package/src/presentation/routes/webhooks.test.ts +1 -1
- package/src/presentation/routes/webhooks.ts +2 -5
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/api-integration-github",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "9.0.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"type": "module",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"types": "dist/index.d.ts",
|
|
14
|
-
"imports": {
|
|
15
|
-
"#test/*": "./test/*",
|
|
16
|
-
"#*": "./dist/*"
|
|
17
|
-
},
|
|
18
14
|
"exports": {
|
|
19
15
|
".": {
|
|
20
16
|
"types": "./dist/index.d.ts",
|
|
21
17
|
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./agent-tools": {
|
|
20
|
+
"types": "./dist/core/github-agent-tool-catalog.d.ts",
|
|
21
|
+
"default": "./dist/core/github-agent-tool-catalog.js"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
@@ -27,15 +27,26 @@
|
|
|
27
27
|
"ky": "^2.0.0",
|
|
28
28
|
"octokit": "^5.0.3",
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@shipfox/api-auth-context": "
|
|
31
|
-
"@shipfox/api-integration-
|
|
32
|
-
"@shipfox/api-integration-
|
|
33
|
-
"@shipfox/
|
|
34
|
-
"@shipfox/node-
|
|
35
|
-
"@shipfox/node-
|
|
36
|
-
"@shipfox/node-opentelemetry": "0.6.
|
|
37
|
-
"@shipfox/node-
|
|
38
|
-
"@shipfox/
|
|
30
|
+
"@shipfox/api-auth-context": "9.0.2",
|
|
31
|
+
"@shipfox/api-integration-spi": "0.2.2",
|
|
32
|
+
"@shipfox/api-integration-github-dto": "9.0.2",
|
|
33
|
+
"@shipfox/config": "1.2.4",
|
|
34
|
+
"@shipfox/node-drizzle": "0.3.4",
|
|
35
|
+
"@shipfox/node-fastify": "0.3.2",
|
|
36
|
+
"@shipfox/node-opentelemetry": "0.6.2",
|
|
37
|
+
"@shipfox/node-postgres": "0.4.4",
|
|
38
|
+
"@shipfox/node-error-monitoring": "0.2.2"
|
|
39
|
+
},
|
|
40
|
+
"imports": {
|
|
41
|
+
"#*": "./dist/*"
|
|
42
|
+
},
|
|
43
|
+
"shipfox": {
|
|
44
|
+
"architecture": {
|
|
45
|
+
"schema": 1,
|
|
46
|
+
"realm": "source-available",
|
|
47
|
+
"kind": "implementation",
|
|
48
|
+
"context": "integrations"
|
|
49
|
+
}
|
|
39
50
|
},
|
|
40
51
|
"scripts": {
|
|
41
52
|
"build": "shipfox-swc",
|
package/src/api/client.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Buffer} from 'node:buffer';
|
|
2
|
-
import {MAX_REPOSITORY_FILE_BYTES} from '@shipfox/api-integration-
|
|
2
|
+
import {MAX_REPOSITORY_FILE_BYTES} from '@shipfox/api-integration-spi';
|
|
3
3
|
import ky, {HTTPError, TimeoutError} from 'ky';
|
|
4
4
|
import {App, Octokit, RequestError} from 'octokit';
|
|
5
5
|
import {config, normalizedGithubApiBaseUrl, normalizedGithubPrivateKey} from '#config.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {GetIntegrationConnectionByIdFn} from '@shipfox/api-integration-
|
|
1
|
+
import type {GetIntegrationConnectionByIdFn} from '@shipfox/api-integration-spi';
|
|
2
2
|
import {GithubIntegrationProviderError} from '#core/errors.js';
|
|
3
3
|
import {githubInstallationFactory} from '#test/index.js';
|
|
4
4
|
import {encodeInstallationTokenEnvelope} from './installation-token-envelope.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {GetIntegrationConnectionByIdFn} from '@shipfox/api-integration-
|
|
1
|
+
import type {GetIntegrationConnectionByIdFn} from '@shipfox/api-integration-spi';
|
|
2
2
|
import {App, Octokit} from 'octokit';
|
|
3
3
|
import {config, normalizedGithubApiBaseUrl, normalizedGithubPrivateKey} from '#config.js';
|
|
4
4
|
import {GithubIntegrationProviderError} from '#core/errors.js';
|
package/src/core/actions-logs.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {Buffer} from 'node:buffer';
|
|
2
|
-
import {DEFAULT_JOB_LOG_TAIL_LINES} from '
|
|
2
|
+
import {DEFAULT_JOB_LOG_TAIL_LINES} from './github-agent-tool-catalog.js';
|
|
3
3
|
|
|
4
|
-
export {DEFAULT_JOB_LOG_TAIL_LINES} from '
|
|
4
|
+
export {DEFAULT_JOB_LOG_TAIL_LINES} from './github-agent-tool-catalog.js';
|
|
5
5
|
export const DEFAULT_JOB_LOG_CONTENT_WINDOW_LINES = 5000;
|
|
6
6
|
export const MAX_JOB_LOG_RING_BUFFER_LINES = 100000;
|
|
7
7
|
export const MAX_JOB_LOG_LINE_BYTES = 10 * 1024 * 1024;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {buildGithubAgentToolSelectionCatalog} from '
|
|
1
|
+
export {buildGithubAgentToolSelectionCatalog} from './github-agent-tool-catalog.js';
|
package/src/core/agent-tools.ts
CHANGED
|
@@ -6,14 +6,7 @@ import type {
|
|
|
6
6
|
AgentToolsProvider,
|
|
7
7
|
IntegrationConnection,
|
|
8
8
|
OpenAgentToolsSessionInput,
|
|
9
|
-
} from '@shipfox/api-integration-
|
|
10
|
-
import {
|
|
11
|
-
type GithubAgentToolCatalogEntry,
|
|
12
|
-
type GithubAgentToolId,
|
|
13
|
-
type GithubAgentToolRequiredScope,
|
|
14
|
-
githubAgentToolCatalog,
|
|
15
|
-
githubAgentToolSelectionCatalog,
|
|
16
|
-
} from '@shipfox/api-integration-github-dto';
|
|
9
|
+
} from '@shipfox/api-integration-spi';
|
|
17
10
|
import {Octokit} from 'octokit';
|
|
18
11
|
import {
|
|
19
12
|
createGithubInstallationTokenProvider,
|
|
@@ -22,6 +15,13 @@ import {
|
|
|
22
15
|
import {normalizedGithubApiBaseUrl} from '#config.js';
|
|
23
16
|
import type {GithubInstallation} from '#db/installations.js';
|
|
24
17
|
import {GithubIntegrationProviderError} from './errors.js';
|
|
18
|
+
import {
|
|
19
|
+
type GithubAgentToolCatalogEntry,
|
|
20
|
+
type GithubAgentToolId,
|
|
21
|
+
type GithubAgentToolRequiredScope,
|
|
22
|
+
githubAgentToolCatalog,
|
|
23
|
+
githubAgentToolSelectionCatalog,
|
|
24
|
+
} from './github-agent-tool-catalog.js';
|
|
25
25
|
|
|
26
26
|
export type {
|
|
27
27
|
GithubAgentToolCatalogEntry,
|
|
@@ -32,13 +32,13 @@ export type {
|
|
|
32
32
|
GithubAgentToolRequiredPermission,
|
|
33
33
|
GithubAgentToolRequiredScope,
|
|
34
34
|
GithubAgentToolSensitivity,
|
|
35
|
-
} from '
|
|
35
|
+
} from './github-agent-tool-catalog.js';
|
|
36
36
|
export {
|
|
37
37
|
buildGithubAgentToolSelectionCatalog,
|
|
38
38
|
DEFAULT_JOB_LOG_TAIL_LINES,
|
|
39
39
|
githubAgentToolCatalog,
|
|
40
40
|
githubAgentToolSelectionCatalog,
|
|
41
|
-
} from '
|
|
41
|
+
} from './github-agent-tool-catalog.js';
|
|
42
42
|
|
|
43
43
|
type GithubIntegrationConnection = IntegrationConnection<'github'>;
|
|
44
44
|
|
package/src/core/errors.ts
CHANGED