Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions apps/github-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"clean": "rimraf ./lib tsconfig.tsbuildinfo",
"clean": "rm -rf ./lib tsconfig.tsbuildinfo",
"build": "${npm_package_vertesia_pm} run clean && tsc --build && node ./bin/bundle-workflows.mjs lib/workflows/index.js lib/workflows-bundle.js",
"start": "node lib/main.js",
"connect": "vertesia agent connect",
Expand All @@ -24,19 +24,19 @@
"devDependencies": {
"@octokit/types": "13.8.0",
"@types/node": "22.13.1",
"rimraf": "^6.0.1",
"typescript": "5.7.3",
"vite": "^5.4.14",
"vitest": "^2.1.9"
},
"dependencies": {
"@dglabs/worker": "0.11.0",
"@dglabs/cloud": "0.11.0",
"@temporalio/activity": "1.11.7",
"@temporalio/worker": "1.11.7",
"@temporalio/workflow": "1.11.7",
"@vertesia/client": "0.50.1",
"@vertesia/common": "0.50.1",
"@dglabs/cloud": "0.13.0",
"@dglabs/server-common": "0.13.0",
"@dglabs/worker": "0.13.0",
"@temporalio/activity": "1.13.1",
"@temporalio/worker": "1.13.1",
"@temporalio/workflow": "1.13.1",
"@vertesia/client": "^0.80.0-dev",
"@vertesia/common": "^0.80.0-dev",
"octokit": "4.1.2"
}
}
4 changes: 2 additions & 2 deletions apps/github-agent/src/activities.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { log } from "@temporalio/activity";
import { UploadContentObjectPayload } from "@vertesia/client";
import { CreateContentObjectPayload } from "@vertesia/common";
import { ContentObjectStatus } from '@vertesia/common';
import { VertesiaGithubApp } from "./activities/github.js";
import { HunkSet } from './activities/patch.js';
Expand Down Expand Up @@ -634,7 +634,7 @@ export async function createChangeEntry(request: VertesiaCreateChangeEntryReques
},
};

const payload: UploadContentObjectPayload = {
const payload: CreateContentObjectPayload = {
type: ContentTypes.ChangeEntry,
name: request.title,
text: request.description,
Expand Down
3 changes: 2 additions & 1 deletion apps/github-agent/src/activities/github.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createSecretProvider, SecretProviderKind } from '@dglabs/cloud';
import { createSecretProvider } from '@dglabs/cloud';
import { SecretProviderKind } from '@dglabs/server-common';
import { Endpoints } from '@octokit/types';
import { App as OctoApp, Octokit } from 'octokit';

Expand Down
12 changes: 8 additions & 4 deletions apps/github-agent/src/activities/vertesia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* where for the 2nd pattern:
* - "Type" is the actual content type in the content store.
*/
import { createSecretProvider, SecretProviderKind } from '@dglabs/cloud';
import { createSecretProvider } from '@dglabs/cloud';
import { SecretProviderKind } from '@dglabs/server-common';
import { log } from '@temporalio/activity';
import { VertesiaClient as VertesiaBaseClient } from "@vertesia/client";

Expand Down Expand Up @@ -170,6 +171,7 @@ export class VertesiaClient {
*
* @param request the file patch to review
* @returns a list of review comments for the file patch
*
* @version 1 Initial version
* @version 2 Update environment
*/
Expand All @@ -183,14 +185,15 @@ export class VertesiaClient {
{ data: request },
);
this.logResult(endpoint, request, response);
return response.result;
return response.result.object() as unknown as VertesiaReviewFilePatchResponse;
}

/**
* Sumarize a code diff to a human-readable format.
*
* @param request the code diff to summarize
* @returns the summary of the code changes
*
* @version 1 Initial version
* @version 2 Update environment
*/
Expand All @@ -204,14 +207,15 @@ export class VertesiaClient {
{ data: request },
);
this.logResult(endpoint, request, response);
return response.result;
return response.result.object() as unknown as VertesiaSummarizeCodeDiffResponse;
}

/**
* Determine the purpose of a pull request.
*
* @param request the pull request to analyze
* @returns the purpose of the pull request
*
* @version 1 Initial version
* @version 2 Update environment
*/
Expand All @@ -225,7 +229,7 @@ export class VertesiaClient {
{ data: request },
);
this.logResult(endpoint, request, response);
return response.result;
return response.result.object() as unknown as VertesiaDeterminePullRequestPurposeResponse;
}

private logResult(executionEndpoint: string, request: any, response: any) {
Expand Down
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@
"packageManager": "pnpm@9.15.0",
"pnpm": {
"overrides": {
"@vertesia/api-fetch-client": "^0.80.0-dev",
"@vertesia/common": "^0.80.0-dev",
"@llumiverse/common": "^0.23.0-dev",
"brace-expansion@>=1.0.0 <1.1.12": "^1.1.12",
"brace-expansion@>=2.0.0 <2.0.2": "^2.0.2",
"esbuild@<0.25.0": "^0.25.0",
"form-data@<2.5.4": "^2.5.4",
"form-data@>=4.0.0 <4.0.4": "^4.0.4",
"koa@>=2.0.0 <2.16.2": "^2.16.2",
"glob@>=10.2.0 <10.5.0": "^10.5.0",
"js-yaml@>= 4.0.0 <4.1.1": "^4.1.1",
"koa@>=2.0.0 <2.16.3": "^2.16.3",
"node-forge@<1.3.2": "^1.3.2",
"path-to-regexp@>=4.0.0 <6.3.0": "^6.3.0",
"undici@>=4.5.0 <5.29.0": "^5.29.0",
"undici@>=6.0.0 <6.21.1": "^6.21.1",
"vite@>=5.0.0 <5.4.18": "^5.4.19"
"vite@>=5.0.0 <5.4.20": "^5.4.21"
}
}
}
Loading