@framers/agentos-ext-cloud-vercel 0.1.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/LICENSE +98 -0
- package/dist/VercelService.d.ts +131 -0
- package/dist/VercelService.d.ts.map +1 -0
- package/dist/VercelService.js +281 -0
- package/dist/VercelService.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/configureDomain.d.ts +52 -0
- package/dist/tools/configureDomain.d.ts.map +1 -0
- package/dist/tools/configureDomain.js +73 -0
- package/dist/tools/configureDomain.js.map +1 -0
- package/dist/tools/deploy.d.ts +65 -0
- package/dist/tools/deploy.d.ts.map +1 -0
- package/dist/tools/deploy.js +47 -0
- package/dist/tools/deploy.js.map +1 -0
- package/dist/tools/getDeployment.d.ts +33 -0
- package/dist/tools/getDeployment.d.ts.map +1 -0
- package/dist/tools/getDeployment.js +34 -0
- package/dist/tools/getDeployment.js.map +1 -0
- package/dist/tools/listProjects.d.ts +33 -0
- package/dist/tools/listProjects.d.ts.map +1 -0
- package/dist/tools/listProjects.js +34 -0
- package/dist/tools/listProjects.js.map +1 -0
- package/dist/tools/setEnvVars.d.ts +56 -0
- package/dist/tools/setEnvVars.d.ts.map +1 -0
- package/dist/tools/setEnvVars.js +50 -0
- package/dist/tools/setEnvVars.js.map +1 -0
- package/manifest.json +33 -0
- package/package.json +64 -0
- package/src/VercelService.ts +408 -0
- package/src/index.ts +117 -0
- package/src/tools/configureDomain.ts +91 -0
- package/src/tools/deploy.ts +59 -0
- package/src/tools/getDeployment.ts +35 -0
- package/src/tools/listProjects.ts +35 -0
- package/src/tools/setEnvVars.ts +65 -0
- package/test/VercelService.test.ts +464 -0
- package/test/index.test.ts +63 -0
- package/test/tools.test.ts +332 -0
- package/tsconfig.json +22 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Vercel Cloud Extension for AgentOS.
|
|
4
|
+
*
|
|
5
|
+
* Provides 5 tools for deploying projects, managing domains, and configuring
|
|
6
|
+
* environment variables via the Vercel REST API.
|
|
7
|
+
*
|
|
8
|
+
* @module @framers/agentos-ext-cloud-vercel
|
|
9
|
+
*/
|
|
10
|
+
import { VercelService } from './VercelService.js';
|
|
11
|
+
import { VercelDeployTool } from './tools/deploy.js';
|
|
12
|
+
import { VercelListProjectsTool } from './tools/listProjects.js';
|
|
13
|
+
import { VercelGetDeploymentTool } from './tools/getDeployment.js';
|
|
14
|
+
import { VercelConfigureDomainTool } from './tools/configureDomain.js';
|
|
15
|
+
import { VercelSetEnvVarsTool } from './tools/setEnvVars.js';
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Secret Resolution
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
function resolveConfig(opts, secrets) {
|
|
20
|
+
return {
|
|
21
|
+
token: opts.token ?? secrets['vercel.token']
|
|
22
|
+
?? process.env.VERCEL_TOKEN ?? '',
|
|
23
|
+
teamId: opts.teamId ?? secrets['vercel.teamId']
|
|
24
|
+
?? process.env.VERCEL_TEAM_ID,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
// Factory
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
export function createExtensionPack(context) {
|
|
31
|
+
const opts = (context.options ?? {});
|
|
32
|
+
const secrets = opts.secrets ?? context.secrets ?? {};
|
|
33
|
+
const config = resolveConfig(opts, secrets);
|
|
34
|
+
const service = new VercelService(config);
|
|
35
|
+
const deployTool = new VercelDeployTool(service);
|
|
36
|
+
const listProjectsTool = new VercelListProjectsTool(service);
|
|
37
|
+
const getDeploymentTool = new VercelGetDeploymentTool(service);
|
|
38
|
+
const configureDomainTool = new VercelConfigureDomainTool(service);
|
|
39
|
+
const setEnvVarsTool = new VercelSetEnvVarsTool(service);
|
|
40
|
+
return {
|
|
41
|
+
name: '@framers/agentos-ext-cloud-vercel',
|
|
42
|
+
version: '0.1.0',
|
|
43
|
+
descriptors: [
|
|
44
|
+
{ id: 'vercelDeploy', kind: 'tool', priority: 40, payload: deployTool },
|
|
45
|
+
{ id: 'vercelListProjects', kind: 'tool', priority: 40, payload: listProjectsTool },
|
|
46
|
+
{ id: 'vercelGetDeployment', kind: 'tool', priority: 40, payload: getDeploymentTool },
|
|
47
|
+
{ id: 'vercelConfigureDomain', kind: 'tool', priority: 40, payload: configureDomainTool },
|
|
48
|
+
{ id: 'vercelSetEnvVars', kind: 'tool', priority: 40, payload: setEnvVarsTool },
|
|
49
|
+
],
|
|
50
|
+
onActivate: async () => {
|
|
51
|
+
if (!config.token) {
|
|
52
|
+
throw new Error('Vercel: no API token provided. Set VERCEL_TOKEN environment variable, '
|
|
53
|
+
+ 'or provide it via secrets["vercel.token"].');
|
|
54
|
+
}
|
|
55
|
+
await service.initialize();
|
|
56
|
+
},
|
|
57
|
+
onDeactivate: async () => {
|
|
58
|
+
await service.shutdown();
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
// Public exports
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
export { VercelService } from './VercelService.js';
|
|
66
|
+
export { VercelDeployTool } from './tools/deploy.js';
|
|
67
|
+
export { VercelListProjectsTool } from './tools/listProjects.js';
|
|
68
|
+
export { VercelGetDeploymentTool } from './tools/getDeployment.js';
|
|
69
|
+
export { VercelConfigureDomainTool } from './tools/configureDomain.js';
|
|
70
|
+
export { VercelSetEnvVarsTool } from './tools/setEnvVars.js';
|
|
71
|
+
export default createExtensionPack;
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,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O,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview VercelConfigureDomainTool — add or manage custom domains on a Vercel project.
|
|
3
|
+
*/
|
|
4
|
+
import type { VercelService, VercelDomain } from '../VercelService.js';
|
|
5
|
+
export interface ConfigureDomainInput {
|
|
6
|
+
projectId: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
action?: 'add' | 'remove' | 'list' | 'check';
|
|
9
|
+
gitBranch?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class VercelConfigureDomainTool {
|
|
12
|
+
private service;
|
|
13
|
+
readonly id = "vercelConfigureDomain";
|
|
14
|
+
readonly name = "vercelConfigureDomain";
|
|
15
|
+
readonly displayName = "Configure Domain";
|
|
16
|
+
readonly description = "Add, remove, or list custom domains on a Vercel project. Also checks DNS configuration status and returns required CNAME/A records for setup.";
|
|
17
|
+
readonly category = "cloud";
|
|
18
|
+
readonly version = "0.1.0";
|
|
19
|
+
readonly hasSideEffects = true;
|
|
20
|
+
readonly inputSchema: {
|
|
21
|
+
type: "object";
|
|
22
|
+
properties: {
|
|
23
|
+
projectId: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
domain: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
action: {
|
|
32
|
+
type: string;
|
|
33
|
+
enum: string[];
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
gitBranch: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
required: string[];
|
|
42
|
+
};
|
|
43
|
+
constructor(service: VercelService);
|
|
44
|
+
execute(args: ConfigureDomainInput): Promise<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
data?: VercelDomain | VercelDomain[] | {
|
|
47
|
+
dnsInstructions: string;
|
|
48
|
+
};
|
|
49
|
+
error?: string;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=configureDomain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureDomain.d.ts","sourceRoot":"","sources":["../../src/tools/configureDomain.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,yBAAyB;IAoBxB,OAAO,CAAC,OAAO;IAnB3B,QAAQ,CAAC,EAAE,2BAA2B;IACtC,QAAQ,CAAC,IAAI,2BAA2B;IACxC,QAAQ,CAAC,WAAW,sBAAsB;IAC1C,QAAQ,CAAC,WAAW,mJAAmJ;IACvK,QAAQ,CAAC,QAAQ,WAAW;IAC5B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;MASlB;gBAEkB,OAAO,EAAE,aAAa;IAEpC,OAAO,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC;QACjD,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG;YAAE,eAAe,EAAE,MAAM,CAAA;SAAE,CAAC;QACnE,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CAkDH"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview VercelConfigureDomainTool — add or manage custom domains on a Vercel project.
|
|
4
|
+
*/
|
|
5
|
+
export class VercelConfigureDomainTool {
|
|
6
|
+
service;
|
|
7
|
+
id = 'vercelConfigureDomain';
|
|
8
|
+
name = 'vercelConfigureDomain';
|
|
9
|
+
displayName = 'Configure Domain';
|
|
10
|
+
description = 'Add, remove, or list custom domains on a Vercel project. Also checks DNS configuration status and returns required CNAME/A records for setup.';
|
|
11
|
+
category = 'cloud';
|
|
12
|
+
version = '0.1.0';
|
|
13
|
+
hasSideEffects = true;
|
|
14
|
+
inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
projectId: { type: 'string', description: 'Vercel project ID or name' },
|
|
18
|
+
domain: { type: 'string', description: 'The custom domain (e.g. "example.com" or "www.example.com")' },
|
|
19
|
+
action: { type: 'string', enum: ['add', 'remove', 'list', 'check'], description: 'Action to perform (default: add)' },
|
|
20
|
+
gitBranch: { type: 'string', description: 'Git branch to link the domain to (optional)' },
|
|
21
|
+
},
|
|
22
|
+
required: ['projectId', 'domain'],
|
|
23
|
+
};
|
|
24
|
+
constructor(service) {
|
|
25
|
+
this.service = service;
|
|
26
|
+
}
|
|
27
|
+
async execute(args) {
|
|
28
|
+
try {
|
|
29
|
+
const action = args.action ?? 'add';
|
|
30
|
+
switch (action) {
|
|
31
|
+
case 'add': {
|
|
32
|
+
const domain = await this.service.addDomain(args.projectId, args.domain, {
|
|
33
|
+
gitBranch: args.gitBranch,
|
|
34
|
+
});
|
|
35
|
+
// Also get DNS config instructions
|
|
36
|
+
let dnsNote = '';
|
|
37
|
+
try {
|
|
38
|
+
const config = await this.service.getDomainConfig(args.domain);
|
|
39
|
+
if (config.misconfigured) {
|
|
40
|
+
dnsNote = ` DNS setup required: set CNAME record for "${args.domain}" pointing to "cname.vercel-dns.com".`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch { /* ignore — domain might not be resolvable yet */ }
|
|
44
|
+
return {
|
|
45
|
+
success: true,
|
|
46
|
+
data: { ...domain, ...(dnsNote ? { dnsInstructions: dnsNote } : {}) },
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
case 'remove': {
|
|
50
|
+
await this.service.removeDomain(args.projectId, args.domain);
|
|
51
|
+
return { success: true, data: { dnsInstructions: `Domain "${args.domain}" removed from project.` } };
|
|
52
|
+
}
|
|
53
|
+
case 'list': {
|
|
54
|
+
const domains = await this.service.listDomains(args.projectId);
|
|
55
|
+
return { success: true, data: domains };
|
|
56
|
+
}
|
|
57
|
+
case 'check': {
|
|
58
|
+
const config = await this.service.getDomainConfig(args.domain);
|
|
59
|
+
const instructions = config.misconfigured
|
|
60
|
+
? `DNS misconfigured. Set a CNAME record for "${args.domain}" pointing to "cname.vercel-dns.com". Or set an A record to 76.76.21.21.`
|
|
61
|
+
: `Domain "${args.domain}" is properly configured.`;
|
|
62
|
+
return { success: true, data: { dnsInstructions: instructions } };
|
|
63
|
+
}
|
|
64
|
+
default:
|
|
65
|
+
return { success: false, error: `Unknown action: ${action}` };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
return { success: false, error: err.message };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=configureDomain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureDomain.js","sourceRoot":"","sources":["../../src/tools/configureDomain.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAWH,MAAM,OAAO,yBAAyB;IAoBhB;IAnBX,EAAE,GAAG,uBAAuB,CAAC;IAC7B,IAAI,GAAG,uBAAuB,CAAC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IAAI,EAAE,IAAI,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,EAAE,CAAC;gBACpE,CAAC;gBAED;oBACE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,mBAAmB,MAAM,EAAE,EAAE,CAAC;YAClE,CAAC;QACH,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview VercelDeployTool — deploy a project to Vercel from a Git repository.
|
|
3
|
+
*/
|
|
4
|
+
import type { VercelService, DeployResult } from '../VercelService.js';
|
|
5
|
+
export interface VercelDeployInput {
|
|
6
|
+
gitUrl: string;
|
|
7
|
+
projectName?: string;
|
|
8
|
+
framework?: string;
|
|
9
|
+
buildCommand?: string;
|
|
10
|
+
outputDirectory?: string;
|
|
11
|
+
envVars?: Record<string, string>;
|
|
12
|
+
target?: 'production' | 'preview';
|
|
13
|
+
}
|
|
14
|
+
export declare class VercelDeployTool {
|
|
15
|
+
private service;
|
|
16
|
+
readonly id = "vercelDeploy";
|
|
17
|
+
readonly name = "vercelDeploy";
|
|
18
|
+
readonly displayName = "Deploy to Vercel";
|
|
19
|
+
readonly description = "Deploy a project to Vercel from a Git repository URL. Creates the project if it does not exist. Supports Next.js, React, Vue, Svelte, static sites, and serverless functions with automatic framework detection.";
|
|
20
|
+
readonly category = "cloud";
|
|
21
|
+
readonly version = "0.1.0";
|
|
22
|
+
readonly hasSideEffects = true;
|
|
23
|
+
readonly inputSchema: {
|
|
24
|
+
type: "object";
|
|
25
|
+
properties: {
|
|
26
|
+
gitUrl: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
projectName: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
framework: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
buildCommand: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
outputDirectory: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
envVars: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
target: {
|
|
51
|
+
type: string;
|
|
52
|
+
enum: string[];
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
required: string[];
|
|
57
|
+
};
|
|
58
|
+
constructor(service: VercelService);
|
|
59
|
+
execute(args: VercelDeployInput): Promise<{
|
|
60
|
+
success: boolean;
|
|
61
|
+
data?: DeployResult;
|
|
62
|
+
error?: string;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tools/deploy.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED,qBAAa,gBAAgB;IAuBf,OAAO,CAAC,OAAO;IAtB3B,QAAQ,CAAC,EAAE,kBAAkB;IAC7B,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,sBAAsB;IAC1C,QAAQ,CAAC,WAAW,sNAAsN;IAC1O,QAAQ,CAAC,QAAQ,WAAW;IAC5B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYlB;gBAEkB,OAAO,EAAE,aAAa;IAEpC,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,YAAY,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAgB3G"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview VercelDeployTool — deploy a project to Vercel from a Git repository.
|
|
4
|
+
*/
|
|
5
|
+
export class VercelDeployTool {
|
|
6
|
+
service;
|
|
7
|
+
id = 'vercelDeploy';
|
|
8
|
+
name = 'vercelDeploy';
|
|
9
|
+
displayName = 'Deploy to Vercel';
|
|
10
|
+
description = 'Deploy a project to Vercel from a Git repository URL. Creates the project if it does not exist. Supports Next.js, React, Vue, Svelte, static sites, and serverless functions with automatic framework detection.';
|
|
11
|
+
category = 'cloud';
|
|
12
|
+
version = '0.1.0';
|
|
13
|
+
hasSideEffects = true;
|
|
14
|
+
inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
gitUrl: { type: 'string', description: 'Git repository URL (e.g. "https://github.com/user/repo")' },
|
|
18
|
+
projectName: { type: 'string', description: 'Project name on Vercel (auto-generated from repo name if omitted)' },
|
|
19
|
+
framework: { type: 'string', description: 'Framework preset (e.g. "nextjs", "vite", "gatsby"). Auto-detected if omitted.' },
|
|
20
|
+
buildCommand: { type: 'string', description: 'Build command override (e.g. "npm run build")' },
|
|
21
|
+
outputDirectory: { type: 'string', description: 'Output directory override (e.g. "dist", ".next", "build")' },
|
|
22
|
+
envVars: { type: 'object', description: 'Environment variables to set on the project (key-value pairs)' },
|
|
23
|
+
target: { type: 'string', enum: ['production', 'preview'], description: 'Deployment target (default: production)' },
|
|
24
|
+
},
|
|
25
|
+
required: ['gitUrl'],
|
|
26
|
+
};
|
|
27
|
+
constructor(service) {
|
|
28
|
+
this.service = service;
|
|
29
|
+
}
|
|
30
|
+
async execute(args) {
|
|
31
|
+
try {
|
|
32
|
+
const result = await this.service.deployFromGit({
|
|
33
|
+
gitUrl: args.gitUrl,
|
|
34
|
+
projectName: args.projectName,
|
|
35
|
+
framework: args.framework,
|
|
36
|
+
buildCommand: args.buildCommand,
|
|
37
|
+
outputDirectory: args.outputDirectory,
|
|
38
|
+
envVars: args.envVars,
|
|
39
|
+
});
|
|
40
|
+
return { success: true, data: result };
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return { success: false, error: err.message };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/tools/deploy.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAcH,MAAM,OAAO,gBAAgB;IAuBP;IAtBX,EAAE,GAAG,cAAc,CAAC;IACpB,IAAI,GAAG,cAAc,CAAC;IACtB,WAAW,GAAG,kBAAkB,CAAC;IACjC,WAAW,GAAG,kNAAkN,CAAC;IACjO,QAAQ,GAAG,OAAO,CAAC;IACnB,OAAO,GAAG,OAAO,CAAC;IAClB,cAAc,GAAG,IAAI,CAAC;IAEtB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0DAA0D,EAAE;YACnG,WAAW,EAAE,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
|
1
|
+
/**
|
|
2
|
+
* @fileoverview VercelGetDeploymentTool — check the status of a Vercel deployment.
|
|
3
|
+
*/
|
|
4
|
+
import type { VercelService, VercelDeployment } from '../VercelService.js';
|
|
5
|
+
export declare class VercelGetDeploymentTool {
|
|
6
|
+
private service;
|
|
7
|
+
readonly id = "vercelGetDeployment";
|
|
8
|
+
readonly name = "vercelGetDeployment";
|
|
9
|
+
readonly displayName = "Get Deployment Status";
|
|
10
|
+
readonly description = "Check the current status of a Vercel deployment by its ID. Returns state (BUILDING, READY, ERROR), URL, and inspector link.";
|
|
11
|
+
readonly category = "cloud";
|
|
12
|
+
readonly version = "0.1.0";
|
|
13
|
+
readonly hasSideEffects = false;
|
|
14
|
+
readonly inputSchema: {
|
|
15
|
+
type: "object";
|
|
16
|
+
properties: {
|
|
17
|
+
deploymentId: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
required: string[];
|
|
23
|
+
};
|
|
24
|
+
constructor(service: VercelService);
|
|
25
|
+
execute(args: {
|
|
26
|
+
deploymentId: string;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
success: boolean;
|
|
29
|
+
data?: VercelDeployment;
|
|
30
|
+
error?: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=getDeployment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeployment.d.ts","sourceRoot":"","sources":["../../src/tools/getDeployment.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,qBAAa,uBAAuB;IAiBtB,OAAO,CAAC,OAAO;IAhB3B,QAAQ,CAAC,EAAE,yBAAyB;IACpC,QAAQ,CAAC,IAAI,yBAAyB;IACtC,QAAQ,CAAC,WAAW,2BAA2B;IAC/C,QAAQ,CAAC,WAAW,iIAAiI;IACrJ,QAAQ,CAAC,QAAQ,WAAW;IAC5B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;;MAMlB;gBAEkB,OAAO,EAAE,aAAa;IAEpC,OAAO,CAAC,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQtH"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview VercelGetDeploymentTool — check the status of a Vercel deployment.
|
|
4
|
+
*/
|
|
5
|
+
export class VercelGetDeploymentTool {
|
|
6
|
+
service;
|
|
7
|
+
id = 'vercelGetDeployment';
|
|
8
|
+
name = 'vercelGetDeployment';
|
|
9
|
+
displayName = 'Get Deployment Status';
|
|
10
|
+
description = 'Check the current status of a Vercel deployment by its ID. Returns state (BUILDING, READY, ERROR), URL, and inspector link.';
|
|
11
|
+
category = 'cloud';
|
|
12
|
+
version = '0.1.0';
|
|
13
|
+
hasSideEffects = false;
|
|
14
|
+
inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
deploymentId: { type: 'string', description: 'The deployment ID or URL to check' },
|
|
18
|
+
},
|
|
19
|
+
required: ['deploymentId'],
|
|
20
|
+
};
|
|
21
|
+
constructor(service) {
|
|
22
|
+
this.service = service;
|
|
23
|
+
}
|
|
24
|
+
async execute(args) {
|
|
25
|
+
try {
|
|
26
|
+
const deployment = await this.service.getDeployment(args.deploymentId);
|
|
27
|
+
return { success: true, data: deployment };
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return { success: false, error: err.message };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=getDeployment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeployment.js","sourceRoot":"","sources":["../../src/tools/getDeployment.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAIH,MAAM,OAAO,uBAAuB;IAiBd;IAhBX,EAAE,GAAG,qBAAqB,CAAC;IAC3B,IAAI,GAAG,qBAAqB,CAAC;IAC7B,WAAW,GAAG,uBAAuB,CAAC;IACtC,WAAW,GAAG,6HAA6H,CAAC;IAC5I,QAAQ,GAAG,OAAO,CAAC;IACnB,OAAO,GAAG,OAAO,CAAC;IAClB,cAAc,GAAG,KAAK,CAAC;IAEvB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mCAAmC,EAAE;SACnF;QACD,QAAQ,EAAE,CAAC,cAAc,CAAC;KAC3B,CAAC;IAEF,YAAoB,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAAG,CAAC;IAE9C,KAAK,CAAC,OAAO,CAAC,IAA8B;QAC1C,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACvE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview VercelListProjectsTool — list all projects on a Vercel account.
|
|
3
|
+
*/
|
|
4
|
+
import type { VercelService, VercelProject } from '../VercelService.js';
|
|
5
|
+
export declare class VercelListProjectsTool {
|
|
6
|
+
private service;
|
|
7
|
+
readonly id = "vercelListProjects";
|
|
8
|
+
readonly name = "vercelListProjects";
|
|
9
|
+
readonly displayName = "List Vercel Projects";
|
|
10
|
+
readonly description = "List all projects in the connected Vercel account. Shows project name, framework, linked Git repo, and latest deployment status.";
|
|
11
|
+
readonly category = "cloud";
|
|
12
|
+
readonly version = "0.1.0";
|
|
13
|
+
readonly hasSideEffects = false;
|
|
14
|
+
readonly inputSchema: {
|
|
15
|
+
type: "object";
|
|
16
|
+
properties: {
|
|
17
|
+
limit: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
required: string[];
|
|
23
|
+
};
|
|
24
|
+
constructor(service: VercelService);
|
|
25
|
+
execute(args: {
|
|
26
|
+
limit?: number;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
success: boolean;
|
|
29
|
+
data?: VercelProject[];
|
|
30
|
+
error?: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=listProjects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listProjects.d.ts","sourceRoot":"","sources":["../../src/tools/listProjects.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAExE,qBAAa,sBAAsB;IAiBrB,OAAO,CAAC,OAAO;IAhB3B,QAAQ,CAAC,EAAE,wBAAwB;IACnC,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,WAAW,0BAA0B;IAC9C,QAAQ,CAAC,WAAW,sIAAsI;IAC1J,QAAQ,CAAC,QAAQ,WAAW;IAC5B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,SAAS;IAEhC,QAAQ,CAAC,WAAW;;;;;;;;kBAKF,MAAM,EAAE;MACxB;gBAEkB,OAAO,EAAE,aAAa;IAEpC,OAAO,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAQ/G"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview VercelListProjectsTool — list all projects on a Vercel account.
|
|
4
|
+
*/
|
|
5
|
+
export class VercelListProjectsTool {
|
|
6
|
+
service;
|
|
7
|
+
id = 'vercelListProjects';
|
|
8
|
+
name = 'vercelListProjects';
|
|
9
|
+
displayName = 'List Vercel Projects';
|
|
10
|
+
description = 'List all projects in the connected Vercel account. Shows project name, framework, linked Git repo, and latest deployment status.';
|
|
11
|
+
category = 'cloud';
|
|
12
|
+
version = '0.1.0';
|
|
13
|
+
hasSideEffects = false;
|
|
14
|
+
inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
limit: { type: 'number', description: 'Maximum number of projects to return (default: 20, max: 100)' },
|
|
18
|
+
},
|
|
19
|
+
required: [],
|
|
20
|
+
};
|
|
21
|
+
constructor(service) {
|
|
22
|
+
this.service = service;
|
|
23
|
+
}
|
|
24
|
+
async execute(args) {
|
|
25
|
+
try {
|
|
26
|
+
const projects = await this.service.listProjects(args.limit ?? 20);
|
|
27
|
+
return { success: true, data: projects };
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
return { success: false, error: err.message };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=listProjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listProjects.js","sourceRoot":"","sources":["../../src/tools/listProjects.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAIH,MAAM,OAAO,sBAAsB;IAiBb;IAhBX,EAAE,GAAG,oBAAoB,CAAC;IAC1B,IAAI,GAAG,oBAAoB,CAAC;IAC5B,WAAW,GAAG,sBAAsB,CAAC;IACrC,WAAW,GAAG,kIAAkI,CAAC;IACjJ,QAAQ,GAAG,OAAO,CAAC;IACnB,OAAO,GAAG,OAAO,CAAC;IAClB,cAAc,GAAG,KAAK,CAAC;IAEvB,WAAW,GAAG;QACrB,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;SACvG;QACD,QAAQ,EAAE,EAAc;KACzB,CAAC;IAEF,YAAoB,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;IAAG,CAAC;IAE9C,KAAK,CAAC,OAAO,CAAC,IAAwB;QACpC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YACnE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC3C,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview VercelSetEnvVarsTool — set environment variables on a Vercel project.
|
|
3
|
+
*/
|
|
4
|
+
import type { VercelService, VercelEnvVar } from '../VercelService.js';
|
|
5
|
+
export interface SetEnvVarsInput {
|
|
6
|
+
projectId: string;
|
|
7
|
+
vars?: Record<string, string>;
|
|
8
|
+
action?: 'set' | 'list';
|
|
9
|
+
target?: ('production' | 'preview' | 'development')[];
|
|
10
|
+
}
|
|
11
|
+
export declare class VercelSetEnvVarsTool {
|
|
12
|
+
private service;
|
|
13
|
+
readonly id = "vercelSetEnvVars";
|
|
14
|
+
readonly name = "vercelSetEnvVars";
|
|
15
|
+
readonly displayName = "Set Environment Variables";
|
|
16
|
+
readonly description = "Set or list environment variables on a Vercel project. Variables are encrypted at rest. Targets production, preview, and development environments by default.";
|
|
17
|
+
readonly category = "cloud";
|
|
18
|
+
readonly version = "0.1.0";
|
|
19
|
+
readonly hasSideEffects = true;
|
|
20
|
+
readonly inputSchema: {
|
|
21
|
+
type: "object";
|
|
22
|
+
properties: {
|
|
23
|
+
projectId: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
vars: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
action: {
|
|
32
|
+
type: string;
|
|
33
|
+
enum: string[];
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
target: {
|
|
37
|
+
type: string;
|
|
38
|
+
items: {
|
|
39
|
+
type: string;
|
|
40
|
+
enum: string[];
|
|
41
|
+
};
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
required: string[];
|
|
46
|
+
};
|
|
47
|
+
constructor(service: VercelService);
|
|
48
|
+
execute(args: SetEnvVarsInput): Promise<{
|
|
49
|
+
success: boolean;
|
|
50
|
+
data?: {
|
|
51
|
+
set: number;
|
|
52
|
+
} | VercelEnvVar[];
|
|
53
|
+
error?: string;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=setEnvVars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setEnvVars.d.ts","sourceRoot":"","sources":["../../src/tools/setEnvVars.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC,EAAE,CAAC;CACvD;AAED,qBAAa,oBAAoB;IAwBnB,OAAO,CAAC,OAAO;IAvB3B,QAAQ,CAAC,EAAE,sBAAsB;IACjC,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,+BAA+B;IACnD,QAAQ,CAAC,WAAW,mKAAmK;IACvL,QAAQ,CAAC,QAAQ,WAAW;IAC5B,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,cAAc,QAAQ;IAE/B,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;MAalB;gBAEkB,OAAO,EAAE,aAAa;IAEpC,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC;QAC5C,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,GAAG,YAAY,EAAE,CAAC;QACxC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CAoBH"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview VercelSetEnvVarsTool — set environment variables on a Vercel project.
|
|
4
|
+
*/
|
|
5
|
+
export class VercelSetEnvVarsTool {
|
|
6
|
+
service;
|
|
7
|
+
id = 'vercelSetEnvVars';
|
|
8
|
+
name = 'vercelSetEnvVars';
|
|
9
|
+
displayName = 'Set Environment Variables';
|
|
10
|
+
description = 'Set or list environment variables on a Vercel project. Variables are encrypted at rest. Targets production, preview, and development environments by default.';
|
|
11
|
+
category = 'cloud';
|
|
12
|
+
version = '0.1.0';
|
|
13
|
+
hasSideEffects = true;
|
|
14
|
+
inputSchema = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
projectId: { type: 'string', description: 'Vercel project ID or name' },
|
|
18
|
+
vars: { type: 'object', description: 'Key-value pairs of environment variables to set' },
|
|
19
|
+
action: { type: 'string', enum: ['set', 'list'], description: 'Action to perform (default: set)' },
|
|
20
|
+
target: {
|
|
21
|
+
type: 'array',
|
|
22
|
+
items: { type: 'string', enum: ['production', 'preview', 'development'] },
|
|
23
|
+
description: 'Deployment targets for the variables (default: all three)',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
required: ['projectId'],
|
|
27
|
+
};
|
|
28
|
+
constructor(service) {
|
|
29
|
+
this.service = service;
|
|
30
|
+
}
|
|
31
|
+
async execute(args) {
|
|
32
|
+
try {
|
|
33
|
+
const action = args.action ?? 'set';
|
|
34
|
+
if (action === 'list') {
|
|
35
|
+
const envVars = await this.service.listEnvVars(args.projectId);
|
|
36
|
+
return { success: true, data: envVars };
|
|
37
|
+
}
|
|
38
|
+
if (!args.vars || Object.keys(args.vars).length === 0) {
|
|
39
|
+
return { success: false, error: 'No environment variables provided. Pass vars as a key-value object.' };
|
|
40
|
+
}
|
|
41
|
+
const target = args.target ?? ['production', 'preview', 'development'];
|
|
42
|
+
await this.service.setEnvVars(args.projectId, args.vars, target);
|
|
43
|
+
return { success: true, data: { set: Object.keys(args.vars).length } };
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
return { success: false, error: err.message };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=setEnvVars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setEnvVars.js","sourceRoot":"","sources":["../../src/tools/setEnvVars.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;GAEG;AAWH,MAAM,OAAO,oBAAoB;IAwBX;IAvBX,EAAE,GAAG,kBAAkB,CAAC;IACxB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AAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACtD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,qEAAqE,EAAE,CAAC;YAC1G,CAAC;YAED,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;YACvE,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACjE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACzE,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;CACF"}
|
package/manifest.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
|
+
"id": "com.framers.cloud.vercel",
|
|
4
|
+
"name": "Vercel Cloud Deployment",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"description": "Deploy projects to Vercel, manage deployments, configure custom domains, and set environment variables. Supports Next.js, React, static sites, and serverless functions.",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Frame.dev",
|
|
9
|
+
"email": "support@frame.dev",
|
|
10
|
+
"url": "https://github.com/framersai"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": ["cloud", "vercel", "deploy", "hosting", "nextjs", "serverless"],
|
|
14
|
+
"agentosVersion": "^2.0.0",
|
|
15
|
+
"categories": ["tool", "cloud"],
|
|
16
|
+
"platforms": [],
|
|
17
|
+
"sdk": "none",
|
|
18
|
+
"extensions": [
|
|
19
|
+
{ "kind": "tool", "id": "vercelDeploy", "displayName": "Deploy to Vercel", "entry": "./dist/tools/deploy.js" },
|
|
20
|
+
{ "kind": "tool", "id": "vercelListProjects", "displayName": "List Vercel Projects", "entry": "./dist/tools/listProjects.js" },
|
|
21
|
+
{ "kind": "tool", "id": "vercelGetDeployment", "displayName": "Get Deployment Status", "entry": "./dist/tools/getDeployment.js" },
|
|
22
|
+
{ "kind": "tool", "id": "vercelConfigureDomain", "displayName": "Configure Domain", "entry": "./dist/tools/configureDomain.js" },
|
|
23
|
+
{ "kind": "tool", "id": "vercelSetEnvVars", "displayName": "Set Environment Variables", "entry": "./dist/tools/setEnvVars.js" }
|
|
24
|
+
],
|
|
25
|
+
"requiredSecrets": ["vercel.token"],
|
|
26
|
+
"features": [
|
|
27
|
+
"Deploy from Git repositories or local directories",
|
|
28
|
+
"Automatic framework detection (Next.js, React, Vue, static)",
|
|
29
|
+
"Custom domain configuration with SSL",
|
|
30
|
+
"Environment variable management",
|
|
31
|
+
"Deployment status tracking"
|
|
32
|
+
]
|
|
33
|
+
}
|