paseo-acp-agy 1.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 +21 -0
- package/PROTOCOL.md +149 -0
- package/README.md +137 -0
- package/dist/acp-server.d.ts +28 -0
- package/dist/acp-server.js +575 -0
- package/dist/antigravity-process.d.ts +52 -0
- package/dist/antigravity-process.js +535 -0
- package/dist/attachments.d.ts +1 -0
- package/dist/attachments.js +102 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +51 -0
- package/dist/logger.d.ts +19 -0
- package/dist/logger.js +124 -0
- package/dist/permissions.d.ts +11 -0
- package/dist/permissions.js +29 -0
- package/dist/protocol.d.ts +201 -0
- package/dist/protocol.js +471 -0
- package/dist/session-store.d.ts +27 -0
- package/dist/session-store.js +74 -0
- package/dist/session.d.ts +66 -0
- package/dist/session.js +227 -0
- package/dist/slash-commands.d.ts +33 -0
- package/dist/slash-commands.js +434 -0
- package/dist/version.d.ts +17 -0
- package/dist/version.js +95 -0
- package/package.json +55 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const SEMVER_VERSION = "1.1.0";
|
|
2
|
+
export interface BuildMetadata {
|
|
3
|
+
version: string;
|
|
4
|
+
gitCommit: string;
|
|
5
|
+
gitCommitShort: string;
|
|
6
|
+
gitBranch: string;
|
|
7
|
+
gitCommitDate: string;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
nodeVersion: string;
|
|
10
|
+
platform: string;
|
|
11
|
+
arch: string;
|
|
12
|
+
agyVersion: string;
|
|
13
|
+
agyBinaryPath: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveBuildMetadata(): BuildMetadata;
|
|
16
|
+
export declare function getShortVersion(): string;
|
|
17
|
+
export declare function formatDiagnosticVersion(): string;
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
export const SEMVER_VERSION = "1.1.0";
|
|
7
|
+
let cachedBuildMetadata = null;
|
|
8
|
+
function safeGit(cmd, cwd) {
|
|
9
|
+
try {
|
|
10
|
+
return execSync(cmd, { cwd, stdio: ["ignore", "pipe", "ignore"], encoding: "utf8" }).trim();
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return "";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function resolveAgyInfo() {
|
|
17
|
+
let binaryPath = process.env.AGY_BIN_PATH;
|
|
18
|
+
if (!binaryPath) {
|
|
19
|
+
try {
|
|
20
|
+
binaryPath = execSync("which agy 2>/dev/null || command -v agy 2>/dev/null", { encoding: "utf8" }).trim();
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// ignore
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (!binaryPath && process.env.HOME) {
|
|
27
|
+
const defaultLocalPath = path.join(process.env.HOME, ".local", "bin", "agy");
|
|
28
|
+
if (fs.existsSync(defaultLocalPath)) {
|
|
29
|
+
binaryPath = defaultLocalPath;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (!binaryPath)
|
|
33
|
+
binaryPath = "agy";
|
|
34
|
+
try {
|
|
35
|
+
const version = execSync(`"${binaryPath}" --version`, {
|
|
36
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
37
|
+
encoding: "utf8",
|
|
38
|
+
timeout: 3000,
|
|
39
|
+
}).trim();
|
|
40
|
+
return { version, binaryPath };
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return { version: "unknown", binaryPath };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export function resolveBuildMetadata() {
|
|
47
|
+
if (cachedBuildMetadata)
|
|
48
|
+
return cachedBuildMetadata;
|
|
49
|
+
const repoRoot = path.resolve(__dirname, "..");
|
|
50
|
+
const gitCommitShort = safeGit("git rev-parse --short HEAD", repoRoot) || "unknown";
|
|
51
|
+
const gitCommit = safeGit("git rev-parse HEAD", repoRoot) || "unknown";
|
|
52
|
+
const gitBranch = safeGit("git rev-parse --abbrev-ref HEAD", repoRoot) || "unknown";
|
|
53
|
+
const gitCommitDate = safeGit("git log -1 --format=%cI", repoRoot) || new Date().toISOString();
|
|
54
|
+
// Check if uncommitted changes exist in repo
|
|
55
|
+
const dirtyCheck = safeGit("git status --porcelain", repoRoot);
|
|
56
|
+
const isDirty = dirtyCheck.length > 0;
|
|
57
|
+
const agyInfo = resolveAgyInfo();
|
|
58
|
+
const metadata = {
|
|
59
|
+
version: SEMVER_VERSION,
|
|
60
|
+
gitCommit,
|
|
61
|
+
gitCommitShort,
|
|
62
|
+
gitBranch,
|
|
63
|
+
gitCommitDate,
|
|
64
|
+
isDirty,
|
|
65
|
+
nodeVersion: process.version,
|
|
66
|
+
platform: process.platform,
|
|
67
|
+
arch: process.arch,
|
|
68
|
+
agyVersion: agyInfo.version,
|
|
69
|
+
agyBinaryPath: agyInfo.binaryPath,
|
|
70
|
+
};
|
|
71
|
+
cachedBuildMetadata = metadata;
|
|
72
|
+
return metadata;
|
|
73
|
+
}
|
|
74
|
+
export function getShortVersion() {
|
|
75
|
+
const meta = resolveBuildMetadata();
|
|
76
|
+
const dirtySuffix = meta.isDirty ? "-dirty" : "";
|
|
77
|
+
const commitSuffix = meta.gitCommitShort !== "unknown" ? `-${meta.gitCommitShort}` : "";
|
|
78
|
+
return `${meta.version}${commitSuffix}${dirtySuffix}`;
|
|
79
|
+
}
|
|
80
|
+
export function formatDiagnosticVersion() {
|
|
81
|
+
const meta = resolveBuildMetadata();
|
|
82
|
+
const dirtyFlag = meta.isDirty ? " (dirty)" : "";
|
|
83
|
+
const commitShort = meta.gitCommitShort !== "unknown" ? meta.gitCommitShort : "dist";
|
|
84
|
+
const formattedDate = meta.gitCommitDate ? meta.gitCommitDate.replace("T", " ").slice(0, 16) + " UTC" : "";
|
|
85
|
+
const lines = [
|
|
86
|
+
`${meta.version} (rev: ${commitShort}${dirtyFlag} • branch: ${meta.gitBranch} • ${formattedDate})`,
|
|
87
|
+
` • Commit SHA: ${meta.gitCommit}`,
|
|
88
|
+
` • CLI Backend: ${meta.agyBinaryPath} (v${meta.agyVersion})`,
|
|
89
|
+
` • Runtime: Node.js ${meta.nodeVersion} (${meta.platform} ${meta.arch})`,
|
|
90
|
+
` • Features: Token Tracking, Context Meter, Quota Windows, Model Pricing, Slash Commands (/help, /resume, /usage)`,
|
|
91
|
+
` • Supported Models: 7 (gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.1-pro, claude-sonnet-4-6, claude-opus-4-6-thinking, gpt-oss-120b)`,
|
|
92
|
+
` • Session Isolation: persistent agy subprocess per Paseo session`,
|
|
93
|
+
];
|
|
94
|
+
return lines.join("\n ");
|
|
95
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "paseo-acp-agy",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "ACP (Agent Client Protocol) provider for Google Antigravity in Paseo and Zed",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"paseo-acp-agy": "dist/index.js",
|
|
10
|
+
"agy-acp": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"PROTOCOL.md"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"start": "node dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"acp",
|
|
29
|
+
"agent-client-protocol",
|
|
30
|
+
"antigravity",
|
|
31
|
+
"google-antigravity",
|
|
32
|
+
"paseo",
|
|
33
|
+
"zed",
|
|
34
|
+
"coding-agent",
|
|
35
|
+
"json-rpc"
|
|
36
|
+
],
|
|
37
|
+
"author": "Arthur Melo <https://github.com/tucomel>",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/tucomel/paseo-acp-agy.git"
|
|
42
|
+
},
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/tucomel/paseo-acp-agy/issues"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://github.com/tucomel/paseo-acp-agy#readme",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@agentclientprotocol/sdk": "^0.17.1"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^22.0.0",
|
|
52
|
+
"typescript": "^5.4.0",
|
|
53
|
+
"vitest": "^1.6.0"
|
|
54
|
+
}
|
|
55
|
+
}
|