groundmail-cli 0.39.0 → 0.41.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/dist/cli.js +19 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2106,11 +2106,27 @@ function trimUrl(value) {
|
|
|
2106
2106
|
}
|
|
2107
2107
|
|
|
2108
2108
|
// package.json
|
|
2109
|
-
var version = "0.
|
|
2109
|
+
var version = "0.41.0";
|
|
2110
2110
|
|
|
2111
2111
|
// src/user-agent.ts
|
|
2112
|
-
|
|
2113
|
-
|
|
2112
|
+
var AGENT_ENV = [
|
|
2113
|
+
["claude-code", ["CLAUDECODE", "CLAUDE_CODE"]],
|
|
2114
|
+
["cursor", ["CURSOR_AGENT"]],
|
|
2115
|
+
["codex", ["CODEX_SANDBOX", "CODEX_CI", "CODEX_THREAD_ID"]],
|
|
2116
|
+
["gemini-cli", ["GEMINI_CLI"]],
|
|
2117
|
+
["opencode", ["OPENCODE", "OPENCODE_CLIENT"]],
|
|
2118
|
+
["augment", ["AUGMENT_AGENT"]],
|
|
2119
|
+
["antigravity", ["ANTIGRAVITY_AGENT"]],
|
|
2120
|
+
["github-copilot", ["COPILOT_MODEL", "COPILOT_ALLOW_ALL"]]
|
|
2121
|
+
];
|
|
2122
|
+
function detectAgent(env) {
|
|
2123
|
+
const declared = env.AI_AGENT?.trim().replace(/[^\w.-]/g, "").slice(0, 40);
|
|
2124
|
+
if (declared) return declared;
|
|
2125
|
+
return AGENT_ENV.find(([, variables]) => variables.some((variable) => env[variable]))?.[0] ?? null;
|
|
2126
|
+
}
|
|
2127
|
+
function buildUserAgent(own, env = process.env) {
|
|
2128
|
+
const agent = detectAgent(env);
|
|
2129
|
+
return `${own.name}/${own.version}${agent ? ` (agent ${agent})` : ""} node/${process.versions.node}`;
|
|
2114
2130
|
}
|
|
2115
2131
|
function withUserAgent(init, userAgent) {
|
|
2116
2132
|
const headers = init?.headers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"description": "Groundmail CLI — send transactional email from the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepublishOnly": "npm run build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"groundmail": "0.
|
|
41
|
+
"groundmail": "0.44.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.5.0",
|