@ainative/cody-cli 0.7.42 → 0.7.44
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/.ainative/skills/ainative-provisioning/SKILL.md +84 -0
- package/.cody/skills/ainative-provisioning/SKILL.md +87 -0
- package/bin/postinstall.cjs +116 -25
- package/dist/cli.js +204 -100
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ainative-provisioning
|
|
3
|
+
description: Use when onboarding a new Cody CLI user, setting up AINative trial accounts, provisioning ZeroDB projects, or implementing zero-auth account creation flows. Covers the instant-db endpoint, credential file format, claim flow, and how the postinstall hook works.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AINative Auto-Provisioning
|
|
7
|
+
|
|
8
|
+
## How It Works
|
|
9
|
+
|
|
10
|
+
On `npm install -g @ainative/cody-cli`, the postinstall hook (`bin/postinstall.cjs`) automatically:
|
|
11
|
+
|
|
12
|
+
1. Calls `POST https://api.ainative.studio/api/v1/public/instant-db`
|
|
13
|
+
2. Receives a `tmp_` API key + ZeroDB project ID
|
|
14
|
+
3. Writes to `~/.cody/credentials.json`
|
|
15
|
+
4. Prints a claim URL to the terminal
|
|
16
|
+
|
|
17
|
+
**No signup. No auth. No credit card. User is ready to run `cody` immediately.**
|
|
18
|
+
|
|
19
|
+
## Instant-DB Endpoint
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
POST https://api.ainative.studio/api/v1/public/instant-db
|
|
23
|
+
Content-Type: application/json
|
|
24
|
+
|
|
25
|
+
{ "agree_terms": true, "on_behalf_of": "cody-cli" }
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Response:
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"api_key": "tmp_...",
|
|
32
|
+
"project_id": "uuid",
|
|
33
|
+
"base_url": "https://api.ainative.studio",
|
|
34
|
+
"expires_at": "2026-...",
|
|
35
|
+
"claim_url": "https://www.ainative.studio/claim?token=...",
|
|
36
|
+
"limits": { "chat_credits": 50, "vectors": 10000, ... }
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The `tmp_` key works for **both**:
|
|
41
|
+
- LLM inference: `POST /v1/messages` with `x-api-key: tmp_...`
|
|
42
|
+
- ZeroDB operations: vectors, memory, embeddings, postgres
|
|
43
|
+
|
|
44
|
+
## Credential File
|
|
45
|
+
|
|
46
|
+
Location: `~/.cody/credentials.json`
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"api_key": "tmp_...",
|
|
51
|
+
"project_id": "uuid",
|
|
52
|
+
"base_url": "https://api.ainative.studio",
|
|
53
|
+
"expires_at": "2026-...",
|
|
54
|
+
"claim_url": "https://...",
|
|
55
|
+
"claimed": false,
|
|
56
|
+
"provisioned_by": "cody-cli-postinstall",
|
|
57
|
+
"provisioned_at": "2026-..."
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
After `cody login`, `api_key` becomes a permanent `sk_` key and `claimed: true`.
|
|
62
|
+
|
|
63
|
+
## Claim Flow
|
|
64
|
+
|
|
65
|
+
User visits `claim_url` → signs up or logs into AINative → project transferred to their account → `tmp_` key replaced with permanent `sk_` key.
|
|
66
|
+
|
|
67
|
+
## Skip Conditions
|
|
68
|
+
|
|
69
|
+
Provisioning is skipped if:
|
|
70
|
+
- `ANTHROPIC_API_KEY` or `CODY_API_KEY` env var is already set
|
|
71
|
+
- `~/.cody/credentials.json` exists and is not expired
|
|
72
|
+
- Network is unavailable (silent fail, never blocks install)
|
|
73
|
+
|
|
74
|
+
## For Agents Onboarding New Users
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
const res = await fetch('https://api.ainative.studio/api/v1/public/instant-db', {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: { 'Content-Type': 'application/json' },
|
|
80
|
+
body: JSON.stringify({ agree_terms: true, on_behalf_of: 'cody-cli' }),
|
|
81
|
+
})
|
|
82
|
+
const { api_key, project_id, claim_url, expires_at } = await res.json()
|
|
83
|
+
// api_key works immediately for both LLM (/v1/messages) and ZeroDB
|
|
84
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ainative-provisioning
|
|
3
|
+
description: Use when onboarding a new Cody CLI user, setting up AINative trial accounts, provisioning ZeroDB projects, or implementing zero-auth account creation flows. Covers the instant-db endpoint, credential file format, claim flow, and how the postinstall hook works.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AINative Auto-Provisioning
|
|
7
|
+
|
|
8
|
+
## How It Works
|
|
9
|
+
|
|
10
|
+
On `npm install -g @ainative/cody-cli`, the postinstall hook (`bin/postinstall.cjs`) automatically:
|
|
11
|
+
|
|
12
|
+
1. Calls `POST https://api.ainative.studio/api/v1/public/instant-db`
|
|
13
|
+
2. Receives a `tmp_` API key + ZeroDB project ID
|
|
14
|
+
3. Writes to `~/.cody/credentials.json`
|
|
15
|
+
4. Prints a claim URL to the terminal
|
|
16
|
+
|
|
17
|
+
**No signup. No auth. No credit card. User is ready to run `cody` immediately.**
|
|
18
|
+
|
|
19
|
+
## Instant-DB Endpoint
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
POST https://api.ainative.studio/api/v1/public/instant-db
|
|
23
|
+
Content-Type: application/json
|
|
24
|
+
|
|
25
|
+
{ "agree_terms": true, "on_behalf_of": "cody-cli" }
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Response:
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"api_key": "tmp_...",
|
|
32
|
+
"project_id": "uuid",
|
|
33
|
+
"base_url": "https://api.ainative.studio",
|
|
34
|
+
"expires_at": "2026-...",
|
|
35
|
+
"claim_url": "https://www.ainative.studio/claim?token=...",
|
|
36
|
+
"limits": { "chat_credits": 50, "vectors": 10000, ... }
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The `tmp_` key works for **both**:
|
|
41
|
+
- LLM inference: `POST /v1/messages` with `x-api-key: tmp_...`
|
|
42
|
+
- ZeroDB operations: vectors, memory, embeddings, postgres
|
|
43
|
+
|
|
44
|
+
## Credential File
|
|
45
|
+
|
|
46
|
+
Location: `~/.cody/credentials.json`
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"api_key": "tmp_...",
|
|
51
|
+
"project_id": "uuid",
|
|
52
|
+
"base_url": "https://api.ainative.studio",
|
|
53
|
+
"expires_at": "2026-...",
|
|
54
|
+
"claim_url": "https://...",
|
|
55
|
+
"claimed": false,
|
|
56
|
+
"provisioned_by": "cody-cli-postinstall",
|
|
57
|
+
"provisioned_at": "2026-..."
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
After `cody login`, `api_key` becomes a permanent `sk_` key and `claimed: true`.
|
|
62
|
+
|
|
63
|
+
## Claim Flow
|
|
64
|
+
|
|
65
|
+
User visits `claim_url` → signs up or logs into AINative → project transferred to their account → `tmp_` key replaced with permanent `sk_` key.
|
|
66
|
+
|
|
67
|
+
To trigger via email: set `CODY_EMAIL=user@example.com` before install or first run.
|
|
68
|
+
|
|
69
|
+
## Skip Conditions
|
|
70
|
+
|
|
71
|
+
Provisioning is skipped if:
|
|
72
|
+
- `ANTHROPIC_API_KEY` or `CODY_API_KEY` env var is already set
|
|
73
|
+
- `~/.cody/credentials.json` exists and is not expired
|
|
74
|
+
- Network is unavailable (silent fail, never blocks install)
|
|
75
|
+
|
|
76
|
+
## For Agents Onboarding New Users
|
|
77
|
+
|
|
78
|
+
```javascript
|
|
79
|
+
// Provision a trial account for a new user
|
|
80
|
+
const res = await fetch('https://api.ainative.studio/api/v1/public/instant-db', {
|
|
81
|
+
method: 'POST',
|
|
82
|
+
headers: { 'Content-Type': 'application/json' },
|
|
83
|
+
body: JSON.stringify({ agree_terms: true, on_behalf_of: 'cody-cli' }),
|
|
84
|
+
})
|
|
85
|
+
const { api_key, project_id, claim_url, expires_at } = await res.json()
|
|
86
|
+
// api_key is ready to use immediately for both LLM and ZeroDB
|
|
87
|
+
```
|
package/bin/postinstall.cjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Cody CLI postinstall
|
|
4
|
+
* Cody CLI postinstall
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* 1. Cleans stale cached data from older builds
|
|
7
|
+
* 2. Auto-provisions an AINative trial account if none exists
|
|
8
|
+
* - Calls POST /api/v1/public/instant-db (no auth, no signup)
|
|
9
|
+
* - Writes credentials to ~/.cody/credentials.json
|
|
10
|
+
* - tmp_ key works for both LLM inference (/v1/messages) and ZeroDB
|
|
11
|
+
* - 72-hour trial, claimable at the printed URL
|
|
10
12
|
*/
|
|
11
13
|
|
|
12
14
|
const fs = require('fs')
|
|
@@ -14,13 +16,17 @@ const path = require('path')
|
|
|
14
16
|
const os = require('os')
|
|
15
17
|
|
|
16
18
|
const HOME = os.homedir()
|
|
19
|
+
const CODY_DIR = path.join(HOME, '.cody')
|
|
20
|
+
const CREDENTIALS_PATH = path.join(CODY_DIR, 'credentials.json')
|
|
21
|
+
const AINATIVE_API = 'https://api.ainative.studio'
|
|
17
22
|
const STALE_MARKERS = ['anthropic.com/api', 'claude.ai/api', 'console.anthropic.com']
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
// ── Cleanup ────────────────────────────────────────────────────────────────────
|
|
25
|
+
|
|
26
|
+
function cleanDir(dirPath) {
|
|
20
27
|
if (!fs.existsSync(dirPath)) return
|
|
21
28
|
|
|
22
29
|
try {
|
|
23
|
-
// Check for stale OAuth tokens with wrong URLs
|
|
24
30
|
const credFiles = ['credentials.json', 'oauth.json', 'tokens.json', '.credentials']
|
|
25
31
|
for (const f of credFiles) {
|
|
26
32
|
const fp = path.join(dirPath, f)
|
|
@@ -35,7 +41,6 @@ function cleanDir(dirPath, description) {
|
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
43
|
|
|
38
|
-
// Clean stale settings that reference old branding
|
|
39
44
|
const settingsFile = path.join(dirPath, 'settings.json')
|
|
40
45
|
if (fs.existsSync(settingsFile)) {
|
|
41
46
|
try {
|
|
@@ -47,7 +52,6 @@ function cleanDir(dirPath, description) {
|
|
|
47
52
|
} catch {}
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
// Clean old cached responses
|
|
51
55
|
const cacheDir = path.join(dirPath, 'cache')
|
|
52
56
|
if (fs.existsSync(cacheDir)) {
|
|
53
57
|
try {
|
|
@@ -58,24 +62,111 @@ function cleanDir(dirPath, description) {
|
|
|
58
62
|
} catch {}
|
|
59
63
|
}
|
|
60
64
|
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
cleaned = true
|
|
65
|
+
// ── Provisioning ───────────────────────────────────────────────────────────────
|
|
66
|
+
|
|
67
|
+
function hasValidCredentials() {
|
|
68
|
+
if (!fs.existsSync(CREDENTIALS_PATH)) return false
|
|
69
|
+
try {
|
|
70
|
+
const creds = JSON.parse(fs.readFileSync(CREDENTIALS_PATH, 'utf8'))
|
|
71
|
+
// Valid if it has an api_key AND not expired (or no expiry = permanent)
|
|
72
|
+
if (!creds.api_key) return false
|
|
73
|
+
if (creds.expires_at) {
|
|
74
|
+
const expiresAt = new Date(creds.expires_at)
|
|
75
|
+
if (expiresAt < new Date()) return false // expired
|
|
73
76
|
}
|
|
77
|
+
// Skip re-provisioning if already using a permanent sk_ key (logged-in user)
|
|
78
|
+
return true
|
|
79
|
+
} catch {
|
|
80
|
+
return false
|
|
74
81
|
}
|
|
82
|
+
}
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
function writeCredentials(data) {
|
|
85
|
+
try {
|
|
86
|
+
fs.mkdirSync(CODY_DIR, { recursive: true })
|
|
87
|
+
const tmp = CREDENTIALS_PATH + '.tmp'
|
|
88
|
+
fs.writeFileSync(tmp, JSON.stringify(data, null, 2), 'utf8')
|
|
89
|
+
fs.renameSync(tmp, CREDENTIALS_PATH)
|
|
90
|
+
} catch (e) {
|
|
91
|
+
// Non-fatal — user can still log in manually
|
|
78
92
|
}
|
|
79
|
-
} catch {
|
|
80
|
-
// Never fail install due to cleanup
|
|
81
93
|
}
|
|
94
|
+
|
|
95
|
+
async function provisionTrialAccount() {
|
|
96
|
+
// Check if ANTHROPIC_API_KEY or CODY_API_KEY already set — skip if so
|
|
97
|
+
if (process.env.ANTHROPIC_API_KEY || process.env.CODY_API_KEY) return
|
|
98
|
+
// Skip if valid credentials already on disk
|
|
99
|
+
if (hasValidCredentials()) return
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
// Use built-in fetch (Node 18+) or skip silently on older Node
|
|
103
|
+
if (typeof fetch === 'undefined') return
|
|
104
|
+
|
|
105
|
+
const res = await fetch(`${AINATIVE_API}/api/v1/public/instant-db`, {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
headers: { 'Content-Type': 'application/json' },
|
|
108
|
+
body: JSON.stringify({ agree_terms: true, on_behalf_of: 'cody-cli' }),
|
|
109
|
+
signal: AbortSignal.timeout(12000),
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
if (!res.ok) return // Silent fail — user can run `cody login` manually
|
|
113
|
+
|
|
114
|
+
const data = await res.json()
|
|
115
|
+
if (!data.api_key || !data.project_id) return
|
|
116
|
+
|
|
117
|
+
writeCredentials({
|
|
118
|
+
api_key: data.api_key,
|
|
119
|
+
project_id: data.project_id,
|
|
120
|
+
base_url: AINATIVE_API,
|
|
121
|
+
expires_at: data.expires_at,
|
|
122
|
+
claim_url: data.claim_url,
|
|
123
|
+
claimed: false,
|
|
124
|
+
provisioned_by: 'cody-cli-postinstall',
|
|
125
|
+
provisioned_at: new Date().toISOString(),
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
console.log('')
|
|
129
|
+
console.log('┌─────────────────────────────────────────────────────────────┐')
|
|
130
|
+
console.log('│ Cody CLI — AINative trial account provisioned │')
|
|
131
|
+
console.log('│ │')
|
|
132
|
+
console.log('│ You\'re ready to code. No signup required. │')
|
|
133
|
+
console.log('│ │')
|
|
134
|
+
console.log(`│ Trial expires: ${new Date(data.expires_at).toLocaleDateString().padEnd(43)}│`)
|
|
135
|
+
console.log('│ │')
|
|
136
|
+
console.log('│ Claim your free account to keep access permanently: │')
|
|
137
|
+
console.log(`│ → ${(data.claim_url || '').slice(0, 56).padEnd(57)}│`)
|
|
138
|
+
console.log('│ │')
|
|
139
|
+
console.log('│ Run `cody` to start coding. │')
|
|
140
|
+
console.log('└─────────────────────────────────────────────────────────────┘')
|
|
141
|
+
console.log('')
|
|
142
|
+
} catch {
|
|
143
|
+
// Never fail the install
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// ── Main ───────────────────────────────────────────────────────────────────────
|
|
148
|
+
|
|
149
|
+
async function main() {
|
|
150
|
+
// Step 1: cleanup stale data
|
|
151
|
+
try {
|
|
152
|
+
const configDirs = [
|
|
153
|
+
CODY_DIR,
|
|
154
|
+
path.join(HOME, '.config', 'cody-cli'),
|
|
155
|
+
]
|
|
156
|
+
let cleaned = false
|
|
157
|
+
for (const dir of configDirs) {
|
|
158
|
+
if (fs.existsSync(dir)) {
|
|
159
|
+
cleanDir(dir)
|
|
160
|
+
cleaned = true
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (cleaned) {
|
|
164
|
+
console.log('Cody CLI: cleaned stale data from previous versions.')
|
|
165
|
+
}
|
|
166
|
+
} catch {}
|
|
167
|
+
|
|
168
|
+
// Step 2: provision trial account
|
|
169
|
+
await provisionTrialAccount()
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
main().catch(() => {}) // Never fail the install
|
package/dist/cli.js
CHANGED
|
@@ -185594,7 +185594,7 @@ var init_auth2 = __esm(() => {
|
|
|
185594
185594
|
|
|
185595
185595
|
// src/utils/userAgent.ts
|
|
185596
185596
|
function getCodyUserAgent() {
|
|
185597
|
-
return `cody-cli/${"0.7.
|
|
185597
|
+
return `cody-cli/${"0.7.44"}`;
|
|
185598
185598
|
}
|
|
185599
185599
|
|
|
185600
185600
|
// src/utils/workloadContext.ts
|
|
@@ -185616,7 +185616,7 @@ function getUserAgent() {
|
|
|
185616
185616
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
185617
185617
|
const workload = getWorkload();
|
|
185618
185618
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
185619
|
-
return `claude-cli/${"0.7.
|
|
185619
|
+
return `claude-cli/${"0.7.44"} (${"external"}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
185620
185620
|
}
|
|
185621
185621
|
function getMCPUserAgent() {
|
|
185622
185622
|
const parts = [];
|
|
@@ -185630,7 +185630,7 @@ function getMCPUserAgent() {
|
|
|
185630
185630
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
185631
185631
|
}
|
|
185632
185632
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
185633
|
-
return `cody-cli/${"0.7.
|
|
185633
|
+
return `cody-cli/${"0.7.44"}${suffix}`;
|
|
185634
185634
|
}
|
|
185635
185635
|
function getWebFetchUserAgent() {
|
|
185636
185636
|
return `Cody-User (${getCodyUserAgent()}; +https://ainative.studio)`;
|
|
@@ -185768,7 +185768,7 @@ var init_user = __esm(() => {
|
|
|
185768
185768
|
deviceId,
|
|
185769
185769
|
sessionId: getSessionId(),
|
|
185770
185770
|
email: getEmail(),
|
|
185771
|
-
appVersion: "0.7.
|
|
185771
|
+
appVersion: "0.7.44",
|
|
185772
185772
|
platform: getHostPlatformForAnalytics(),
|
|
185773
185773
|
organizationUuid,
|
|
185774
185774
|
accountUuid,
|
|
@@ -193460,7 +193460,7 @@ var init_metadata = __esm(() => {
|
|
|
193460
193460
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
193461
193461
|
WHITESPACE_REGEX = /\s+/;
|
|
193462
193462
|
getVersionBase = memoize_default(() => {
|
|
193463
|
-
const match = "0.7.
|
|
193463
|
+
const match = "0.7.44".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
193464
193464
|
return match ? match[0] : undefined;
|
|
193465
193465
|
});
|
|
193466
193466
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -193500,9 +193500,9 @@ var init_metadata = __esm(() => {
|
|
|
193500
193500
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
193501
193501
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
193502
193502
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
193503
|
-
version: "0.7.
|
|
193503
|
+
version: "0.7.44",
|
|
193504
193504
|
versionBase: getVersionBase(),
|
|
193505
|
-
buildTime: "
|
|
193505
|
+
buildTime: "1779076722",
|
|
193506
193506
|
deploymentEnvironment: env4.detectDeploymentEnvironment(),
|
|
193507
193507
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
193508
193508
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -194120,7 +194120,7 @@ function initialize1PEventLogging() {
|
|
|
194120
194120
|
const platform3 = getPlatform();
|
|
194121
194121
|
const attributes = {
|
|
194122
194122
|
[import_semantic_conventions.ATTR_SERVICE_NAME]: "cody-cli",
|
|
194123
|
-
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.
|
|
194123
|
+
[import_semantic_conventions.ATTR_SERVICE_VERSION]: "0.7.44"
|
|
194124
194124
|
};
|
|
194125
194125
|
if (platform3 === "wsl") {
|
|
194126
194126
|
const wslVersion = getWslVersion();
|
|
@@ -194147,7 +194147,7 @@ function initialize1PEventLogging() {
|
|
|
194147
194147
|
})
|
|
194148
194148
|
]
|
|
194149
194149
|
});
|
|
194150
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.
|
|
194150
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.ainative.cody_cli.events", "0.7.44");
|
|
194151
194151
|
}
|
|
194152
194152
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
194153
194153
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -195840,7 +195840,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
195840
195840
|
if (!isAttributionHeaderEnabled()) {
|
|
195841
195841
|
return "";
|
|
195842
195842
|
}
|
|
195843
|
-
const version7 = `${"0.7.
|
|
195843
|
+
const version7 = `${"0.7.44"}.${fingerprint}`;
|
|
195844
195844
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
195845
195845
|
const cch = "";
|
|
195846
195846
|
const workload = getWorkload();
|
|
@@ -259985,7 +259985,7 @@ function getTelemetryAttributes() {
|
|
|
259985
259985
|
attributes["session.id"] = sessionId;
|
|
259986
259986
|
}
|
|
259987
259987
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
259988
|
-
attributes["app.version"] = "0.7.
|
|
259988
|
+
attributes["app.version"] = "0.7.44";
|
|
259989
259989
|
}
|
|
259990
259990
|
const oauthAccount = getOauthAccountInfo();
|
|
259991
259991
|
if (oauthAccount) {
|
|
@@ -291175,7 +291175,7 @@ function getInstallationEnv() {
|
|
|
291175
291175
|
return;
|
|
291176
291176
|
}
|
|
291177
291177
|
function getClaudeCodeVersion() {
|
|
291178
|
-
return "0.7.
|
|
291178
|
+
return "0.7.44";
|
|
291179
291179
|
}
|
|
291180
291180
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
291181
291181
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -296711,7 +296711,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
296711
296711
|
const client4 = new Client({
|
|
296712
296712
|
name: "claude-code",
|
|
296713
296713
|
title: "Cody CLI",
|
|
296714
|
-
version: "0.7.
|
|
296714
|
+
version: "0.7.44",
|
|
296715
296715
|
description: "Anthropic's agentic coding tool",
|
|
296716
296716
|
websiteUrl: PRODUCT_URL
|
|
296717
296717
|
}, {
|
|
@@ -297065,7 +297065,7 @@ var init_client8 = __esm(() => {
|
|
|
297065
297065
|
const client4 = new Client({
|
|
297066
297066
|
name: "claude-code",
|
|
297067
297067
|
title: "Cody CLI",
|
|
297068
|
-
version: "0.7.
|
|
297068
|
+
version: "0.7.44",
|
|
297069
297069
|
description: "Anthropic's agentic coding tool",
|
|
297070
297070
|
websiteUrl: PRODUCT_URL
|
|
297071
297071
|
}, {
|
|
@@ -345197,7 +345197,7 @@ async function initializeBetaTracing(resource) {
|
|
|
345197
345197
|
});
|
|
345198
345198
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
345199
345199
|
setLoggerProvider(loggerProvider);
|
|
345200
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.
|
|
345200
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.44");
|
|
345201
345201
|
setEventLogger(eventLogger);
|
|
345202
345202
|
process.on("beforeExit", async () => {
|
|
345203
345203
|
await loggerProvider?.forceFlush();
|
|
@@ -345237,7 +345237,7 @@ async function initializeTelemetry() {
|
|
|
345237
345237
|
const platform5 = getPlatform();
|
|
345238
345238
|
const baseAttributes = {
|
|
345239
345239
|
[import_semantic_conventions2.ATTR_SERVICE_NAME]: "claude-code",
|
|
345240
|
-
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.
|
|
345240
|
+
[import_semantic_conventions2.ATTR_SERVICE_VERSION]: "0.7.44"
|
|
345241
345241
|
};
|
|
345242
345242
|
if (platform5 === "wsl") {
|
|
345243
345243
|
const wslVersion = getWslVersion();
|
|
@@ -345282,7 +345282,7 @@ async function initializeTelemetry() {
|
|
|
345282
345282
|
} catch {}
|
|
345283
345283
|
};
|
|
345284
345284
|
registerCleanup(shutdownTelemetry2);
|
|
345285
|
-
return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.
|
|
345285
|
+
return meterProvider2.getMeter("com.anthropic.claude_code", "0.7.44");
|
|
345286
345286
|
}
|
|
345287
345287
|
const meterProvider = new import_sdk_metrics2.MeterProvider({
|
|
345288
345288
|
resource,
|
|
@@ -345302,7 +345302,7 @@ async function initializeTelemetry() {
|
|
|
345302
345302
|
});
|
|
345303
345303
|
import_api_logs.logs.setGlobalLoggerProvider(loggerProvider);
|
|
345304
345304
|
setLoggerProvider(loggerProvider);
|
|
345305
|
-
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.
|
|
345305
|
+
const eventLogger = import_api_logs.logs.getLogger("com.anthropic.claude_code.events", "0.7.44");
|
|
345306
345306
|
setEventLogger(eventLogger);
|
|
345307
345307
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
345308
345308
|
process.on("beforeExit", async () => {
|
|
@@ -345364,7 +345364,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
345364
345364
|
}
|
|
345365
345365
|
};
|
|
345366
345366
|
registerCleanup(shutdownTelemetry);
|
|
345367
|
-
return meterProvider.getMeter("com.anthropic.claude_code", "0.7.
|
|
345367
|
+
return meterProvider.getMeter("com.anthropic.claude_code", "0.7.44");
|
|
345368
345368
|
}
|
|
345369
345369
|
async function flushTelemetry() {
|
|
345370
345370
|
const meterProvider = getMeterProvider();
|
|
@@ -346053,9 +346053,9 @@ async function assertMinVersion() {
|
|
|
346053
346053
|
}
|
|
346054
346054
|
try {
|
|
346055
346055
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
346056
|
-
if (versionConfig.minVersion && lt("0.7.
|
|
346056
|
+
if (versionConfig.minVersion && lt("0.7.44", versionConfig.minVersion)) {
|
|
346057
346057
|
console.error(`
|
|
346058
|
-
It looks like your version of Cody CLI (${"0.7.
|
|
346058
|
+
It looks like your version of Cody CLI (${"0.7.44"}) needs an update.
|
|
346059
346059
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
346060
346060
|
|
|
346061
346061
|
To update, please run:
|
|
@@ -346292,7 +346292,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
346292
346292
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
346293
346293
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
346294
346294
|
pid: process.pid,
|
|
346295
|
-
currentVersion: "0.7.
|
|
346295
|
+
currentVersion: "0.7.44"
|
|
346296
346296
|
});
|
|
346297
346297
|
return "in_progress";
|
|
346298
346298
|
}
|
|
@@ -346301,7 +346301,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
346301
346301
|
if (!env4.isRunningWithBun() && env4.isNpmFromWindowsPath()) {
|
|
346302
346302
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
346303
346303
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
346304
|
-
currentVersion: "0.7.
|
|
346304
|
+
currentVersion: "0.7.44"
|
|
346305
346305
|
});
|
|
346306
346306
|
console.error(`
|
|
346307
346307
|
Error: Windows NPM detected in WSL
|
|
@@ -346836,7 +346836,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
346836
346836
|
}
|
|
346837
346837
|
async function getDoctorDiagnostic() {
|
|
346838
346838
|
const installationType = await getCurrentInstallationType();
|
|
346839
|
-
const version7 = typeof MACRO !== "undefined" ? "0.7.
|
|
346839
|
+
const version7 = typeof MACRO !== "undefined" ? "0.7.44" : "unknown";
|
|
346840
346840
|
const installationPath = await getInstallationPath();
|
|
346841
346841
|
const invokedBinary = getInvokedBinary();
|
|
346842
346842
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -347671,8 +347671,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
347671
347671
|
const maxVersion = await getMaxVersion();
|
|
347672
347672
|
if (maxVersion && gt(version7, maxVersion)) {
|
|
347673
347673
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version7} to ${maxVersion}`);
|
|
347674
|
-
if (gte("0.7.
|
|
347675
|
-
logForDebugging(`Native installer: current version ${"0.7.
|
|
347674
|
+
if (gte("0.7.44", maxVersion)) {
|
|
347675
|
+
logForDebugging(`Native installer: current version ${"0.7.44"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
347676
347676
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
347677
347677
|
latency_ms: Date.now() - startTime,
|
|
347678
347678
|
max_version: maxVersion,
|
|
@@ -347683,7 +347683,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
347683
347683
|
version7 = maxVersion;
|
|
347684
347684
|
}
|
|
347685
347685
|
}
|
|
347686
|
-
if (!forceReinstall && version7 === "0.7.
|
|
347686
|
+
if (!forceReinstall && version7 === "0.7.44" && await versionIsAvailable(version7) && await isPossibleClaudeBinary(executablePath)) {
|
|
347687
347687
|
logForDebugging(`Found ${version7} at ${executablePath}, skipping install`);
|
|
347688
347688
|
logEvent("tengu_native_update_complete", {
|
|
347689
347689
|
latency_ms: Date.now() - startTime,
|
|
@@ -431532,7 +431532,7 @@ function getAnthropicEnvMetadata() {
|
|
|
431532
431532
|
function getBuildAgeMinutes() {
|
|
431533
431533
|
if (false)
|
|
431534
431534
|
;
|
|
431535
|
-
const buildTime = new Date("
|
|
431535
|
+
const buildTime = new Date("1779076722").getTime();
|
|
431536
431536
|
if (isNaN(buildTime))
|
|
431537
431537
|
return;
|
|
431538
431538
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -455047,7 +455047,7 @@ function Feedback({
|
|
|
455047
455047
|
platform: env4.platform,
|
|
455048
455048
|
gitRepo: envInfo.isGit,
|
|
455049
455049
|
terminal: env4.terminal,
|
|
455050
|
-
version: "0.7.
|
|
455050
|
+
version: "0.7.44",
|
|
455051
455051
|
transcript: normalizeMessagesForAPI(messages),
|
|
455052
455052
|
errors: sanitizedErrors,
|
|
455053
455053
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -455239,7 +455239,7 @@ function Feedback({
|
|
|
455239
455239
|
", ",
|
|
455240
455240
|
env4.terminal,
|
|
455241
455241
|
", v",
|
|
455242
|
-
"0.7.
|
|
455242
|
+
"0.7.44"
|
|
455243
455243
|
]
|
|
455244
455244
|
}, undefined, true, undefined, this)
|
|
455245
455245
|
]
|
|
@@ -455345,7 +455345,7 @@ ${sanitizedDescription}
|
|
|
455345
455345
|
` + `**Environment Info**
|
|
455346
455346
|
` + `- Platform: ${env4.platform}
|
|
455347
455347
|
` + `- Terminal: ${env4.terminal}
|
|
455348
|
-
` + `- Version: ${"0.7.
|
|
455348
|
+
` + `- Version: ${"0.7.44"}
|
|
455349
455349
|
` + `- Feedback ID: ${feedbackId}
|
|
455350
455350
|
` + `
|
|
455351
455351
|
**Errors**
|
|
@@ -458445,7 +458445,7 @@ function buildPrimarySection() {
|
|
|
458445
458445
|
}, undefined, false, undefined, this);
|
|
458446
458446
|
return [{
|
|
458447
458447
|
label: "Version",
|
|
458448
|
-
value: "0.7.
|
|
458448
|
+
value: "0.7.44"
|
|
458449
458449
|
}, {
|
|
458450
458450
|
label: "Session name",
|
|
458451
458451
|
value: nameValue
|
|
@@ -462196,7 +462196,7 @@ function Config({
|
|
|
462196
462196
|
}
|
|
462197
462197
|
}, undefined, false, undefined, this)
|
|
462198
462198
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime178.jsxDEV(ChannelDowngradeDialog, {
|
|
462199
|
-
currentVersion: "0.7.
|
|
462199
|
+
currentVersion: "0.7.44",
|
|
462200
462200
|
onChoice: (choice) => {
|
|
462201
462201
|
setShowSubmenu(null);
|
|
462202
462202
|
setTabsHidden(false);
|
|
@@ -462208,7 +462208,7 @@ function Config({
|
|
|
462208
462208
|
autoUpdatesChannel: "stable"
|
|
462209
462209
|
};
|
|
462210
462210
|
if (choice === "stay") {
|
|
462211
|
-
newSettings.minimumVersion = "0.7.
|
|
462211
|
+
newSettings.minimumVersion = "0.7.44";
|
|
462212
462212
|
}
|
|
462213
462213
|
updateSettingsForSource("userSettings", newSettings);
|
|
462214
462214
|
setSettingsData((prev_27) => ({
|
|
@@ -470250,7 +470250,7 @@ function HelpV2(t0) {
|
|
|
470250
470250
|
let t6;
|
|
470251
470251
|
if ($3[31] !== tabs) {
|
|
470252
470252
|
t6 = /* @__PURE__ */ jsx_dev_runtime205.jsxDEV(Tabs, {
|
|
470253
|
-
title: `Cody CLI v${"0.7.
|
|
470253
|
+
title: `Cody CLI v${"0.7.44"}`,
|
|
470254
470254
|
color: "professionalBlue",
|
|
470255
470255
|
defaultTab: "general",
|
|
470256
470256
|
children: tabs
|
|
@@ -494440,7 +494440,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
494440
494440
|
return [];
|
|
494441
494441
|
}
|
|
494442
494442
|
}
|
|
494443
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.
|
|
494443
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.44") {
|
|
494444
494444
|
if (false) {}
|
|
494445
494445
|
const cachedChangelog = await getStoredChangelog();
|
|
494446
494446
|
if (lastSeenVersion !== currentVersion || !cachedChangelog) {
|
|
@@ -494453,7 +494453,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "0.7.42")
|
|
|
494453
494453
|
releaseNotes
|
|
494454
494454
|
};
|
|
494455
494455
|
}
|
|
494456
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.
|
|
494456
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "0.7.44") {
|
|
494457
494457
|
if (false) {}
|
|
494458
494458
|
const releaseNotes = getRecentReleaseNotes(currentVersion, lastSeenVersion);
|
|
494459
494459
|
return {
|
|
@@ -495609,7 +495609,7 @@ function getRecentActivitySync() {
|
|
|
495609
495609
|
return cachedActivity;
|
|
495610
495610
|
}
|
|
495611
495611
|
function getLogoDisplayData() {
|
|
495612
|
-
const version7 = process.env.DEMO_VERSION ?? "0.7.
|
|
495612
|
+
const version7 = process.env.DEMO_VERSION ?? "0.7.44";
|
|
495613
495613
|
const serverUrl = getDirectConnectServerUrl();
|
|
495614
495614
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
495615
495615
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -497029,7 +497029,7 @@ function LogoV2() {
|
|
|
497029
497029
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
497030
497030
|
t2 = () => {
|
|
497031
497031
|
const currentConfig = getGlobalConfig();
|
|
497032
|
-
if (currentConfig.lastReleaseNotesSeen === "0.7.
|
|
497032
|
+
if (currentConfig.lastReleaseNotesSeen === "0.7.44") {
|
|
497033
497033
|
return;
|
|
497034
497034
|
}
|
|
497035
497035
|
saveGlobalConfig(_temp329);
|
|
@@ -497705,12 +497705,12 @@ function LogoV2() {
|
|
|
497705
497705
|
return t41;
|
|
497706
497706
|
}
|
|
497707
497707
|
function _temp329(current) {
|
|
497708
|
-
if (current.lastReleaseNotesSeen === "0.7.
|
|
497708
|
+
if (current.lastReleaseNotesSeen === "0.7.44") {
|
|
497709
497709
|
return current;
|
|
497710
497710
|
}
|
|
497711
497711
|
return {
|
|
497712
497712
|
...current,
|
|
497713
|
-
lastReleaseNotesSeen: "0.7.
|
|
497713
|
+
lastReleaseNotesSeen: "0.7.44"
|
|
497714
497714
|
};
|
|
497715
497715
|
}
|
|
497716
497716
|
function _temp245(s_0) {
|
|
@@ -524065,7 +524065,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
524065
524065
|
smapsRollup,
|
|
524066
524066
|
platform: process.platform,
|
|
524067
524067
|
nodeVersion: process.version,
|
|
524068
|
-
ccVersion: "0.7.
|
|
524068
|
+
ccVersion: "0.7.44"
|
|
524069
524069
|
};
|
|
524070
524070
|
}
|
|
524071
524071
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -524593,7 +524593,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
524593
524593
|
var call56 = async () => {
|
|
524594
524594
|
return {
|
|
524595
524595
|
type: "text",
|
|
524596
|
-
value: `${"0.7.
|
|
524596
|
+
value: `${"0.7.44"} (built ${"1779076722"})`
|
|
524597
524597
|
};
|
|
524598
524598
|
}, version7, version_default;
|
|
524599
524599
|
var init_version = __esm(() => {
|
|
@@ -533541,7 +533541,7 @@ function generateHtmlReport(data, insights) {
|
|
|
533541
533541
|
</html>`;
|
|
533542
533542
|
}
|
|
533543
533543
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
533544
|
-
const version8 = typeof MACRO !== "undefined" ? "0.7.
|
|
533544
|
+
const version8 = typeof MACRO !== "undefined" ? "0.7.44" : "unknown";
|
|
533545
533545
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
533546
533546
|
const facets_summary = {
|
|
533547
533547
|
total: facets.size,
|
|
@@ -537488,7 +537488,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
537488
537488
|
init_settings2();
|
|
537489
537489
|
init_slowOperations();
|
|
537490
537490
|
init_uuid();
|
|
537491
|
-
VERSION5 = typeof MACRO !== "undefined" ? "0.7.
|
|
537491
|
+
VERSION5 = typeof MACRO !== "undefined" ? "0.7.44" : "unknown";
|
|
537492
537492
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
537493
537493
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
537494
537494
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -538693,7 +538693,7 @@ var init_filesystem = __esm(() => {
|
|
|
538693
538693
|
});
|
|
538694
538694
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
538695
538695
|
const nonce = randomBytes19(16).toString("hex");
|
|
538696
|
-
return join132(getClaudeTempDir(), "bundled-skills", "0.7.
|
|
538696
|
+
return join132(getClaudeTempDir(), "bundled-skills", "0.7.44", nonce);
|
|
538697
538697
|
});
|
|
538698
538698
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
538699
538699
|
});
|
|
@@ -544665,7 +544665,7 @@ function computeFingerprint(messageText, version8) {
|
|
|
544665
544665
|
}
|
|
544666
544666
|
function computeFingerprintFromMessages(messages) {
|
|
544667
544667
|
const firstMessageText = extractFirstMessageText(messages);
|
|
544668
|
-
return computeFingerprint(firstMessageText, "0.7.
|
|
544668
|
+
return computeFingerprint(firstMessageText, "0.7.44");
|
|
544669
544669
|
}
|
|
544670
544670
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
544671
544671
|
var init_fingerprint = () => {};
|
|
@@ -545257,7 +545257,7 @@ async function* ainativeBypass(messages, systemPrompt, model, toolSchemas, signa
|
|
|
545257
545257
|
] : m2.content
|
|
545258
545258
|
})),
|
|
545259
545259
|
system: chatMessages.find((m2) => m2.role === "system")?.content || undefined,
|
|
545260
|
-
stream:
|
|
545260
|
+
stream: true
|
|
545261
545261
|
};
|
|
545262
545262
|
if (simplifiedTools && simplifiedTools.length > 0) {
|
|
545263
545263
|
anthropicBody.tools = simplifiedTools;
|
|
@@ -545280,14 +545280,101 @@ async function* ainativeBypass(messages, systemPrompt, model, toolSchemas, signa
|
|
|
545280
545280
|
}
|
|
545281
545281
|
throw new Error(`AINative API error: ${resp.status} ${errText}`);
|
|
545282
545282
|
}
|
|
545283
|
-
|
|
545283
|
+
if (!resp.body) {
|
|
545284
|
+
throw new Error("AINative API error: response body is null (streaming not supported?)");
|
|
545285
|
+
}
|
|
545286
|
+
const msgId = `msg_${randomUUID32().slice(0, 24)}`;
|
|
545287
|
+
const startTime = Date.now();
|
|
545288
|
+
let accMsgId = msgId;
|
|
545289
|
+
let accModel = model;
|
|
545290
|
+
let accStopReason = null;
|
|
545291
|
+
let accStopSequence = null;
|
|
545292
|
+
let accInputTokens = 0;
|
|
545293
|
+
let accOutputTokens = 0;
|
|
545294
|
+
const accContentBlocks = [];
|
|
545295
|
+
const pendingToolUse = new Map;
|
|
545296
|
+
let ttftEmitted = false;
|
|
545297
|
+
const decoder = new TextDecoder;
|
|
545298
|
+
const reader = resp.body.getReader();
|
|
545299
|
+
let buf = "";
|
|
545284
545300
|
try {
|
|
545285
|
-
|
|
545286
|
-
|
|
545287
|
-
|
|
545288
|
-
|
|
545301
|
+
while (true) {
|
|
545302
|
+
const { done, value } = await reader.read();
|
|
545303
|
+
if (done)
|
|
545304
|
+
break;
|
|
545305
|
+
buf += decoder.decode(value, { stream: true });
|
|
545306
|
+
let newlineIdx;
|
|
545307
|
+
while ((newlineIdx = buf.indexOf(`
|
|
545308
|
+
`)) !== -1) {
|
|
545309
|
+
const line = buf.slice(0, newlineIdx).trimEnd();
|
|
545310
|
+
buf = buf.slice(newlineIdx + 1);
|
|
545311
|
+
if (!line.startsWith("data: "))
|
|
545312
|
+
continue;
|
|
545313
|
+
const payload = line.slice(6).trim();
|
|
545314
|
+
if (payload === "[DONE]")
|
|
545315
|
+
continue;
|
|
545316
|
+
let event;
|
|
545317
|
+
try {
|
|
545318
|
+
event = JSON.parse(payload);
|
|
545319
|
+
} catch {
|
|
545320
|
+
continue;
|
|
545321
|
+
}
|
|
545322
|
+
if (event.type === "message_start" && event.message) {
|
|
545323
|
+
const m2 = event.message;
|
|
545324
|
+
accMsgId = m2.id || accMsgId;
|
|
545325
|
+
accModel = m2.model || accModel;
|
|
545326
|
+
accInputTokens = m2.usage?.input_tokens ?? 0;
|
|
545327
|
+
accOutputTokens = m2.usage?.output_tokens ?? 0;
|
|
545328
|
+
} else if (event.type === "content_block_start" && event.content_block) {
|
|
545329
|
+
const idx = event.index ?? accContentBlocks.length;
|
|
545330
|
+
const cb = event.content_block;
|
|
545331
|
+
if (cb.type === "tool_use") {
|
|
545332
|
+
pendingToolUse.set(idx, { id: cb.id ?? "", name: cb.name ?? "", input_json: "" });
|
|
545333
|
+
} else {
|
|
545334
|
+
accContentBlocks[idx] = { ...cb };
|
|
545335
|
+
}
|
|
545336
|
+
} else if (event.type === "content_block_delta" && event.delta) {
|
|
545337
|
+
const idx = event.index ?? 0;
|
|
545338
|
+
const d = event.delta;
|
|
545339
|
+
if (d.type === "text_delta") {
|
|
545340
|
+
if (!accContentBlocks[idx])
|
|
545341
|
+
accContentBlocks[idx] = { type: "text", text: "" };
|
|
545342
|
+
accContentBlocks[idx].text = (accContentBlocks[idx].text ?? "") + (d.text ?? "");
|
|
545343
|
+
} else if (d.type === "input_json_delta") {
|
|
545344
|
+
const tu = pendingToolUse.get(idx);
|
|
545345
|
+
if (tu)
|
|
545346
|
+
tu.input_json += d.partial_json ?? "";
|
|
545347
|
+
}
|
|
545348
|
+
} else if (event.type === "content_block_stop") {
|
|
545349
|
+
const idx = event.index ?? 0;
|
|
545350
|
+
const tu = pendingToolUse.get(idx);
|
|
545351
|
+
if (tu) {
|
|
545352
|
+
let input = {};
|
|
545353
|
+
try {
|
|
545354
|
+
input = JSON.parse(tu.input_json);
|
|
545355
|
+
} catch {
|
|
545356
|
+
input = {};
|
|
545357
|
+
}
|
|
545358
|
+
accContentBlocks[idx] = { type: "tool_use", id: tu.id, name: tu.name, input };
|
|
545359
|
+
pendingToolUse.delete(idx);
|
|
545360
|
+
}
|
|
545361
|
+
} else if (event.type === "message_delta" && event.delta) {
|
|
545362
|
+
accStopReason = event.delta.stop_reason ?? accStopReason;
|
|
545363
|
+
accStopSequence = event.delta.stop_sequence ?? accStopSequence;
|
|
545364
|
+
accOutputTokens = event.usage?.output_tokens ?? accOutputTokens;
|
|
545365
|
+
}
|
|
545366
|
+
const ttftMs = !ttftEmitted ? (ttftEmitted = true, Date.now() - startTime) : undefined;
|
|
545367
|
+
const streamEvent = { type: "stream_event", event };
|
|
545368
|
+
if (ttftMs !== undefined)
|
|
545369
|
+
streamEvent.ttftMs = ttftMs;
|
|
545370
|
+
yield streamEvent;
|
|
545371
|
+
}
|
|
545372
|
+
}
|
|
545373
|
+
} finally {
|
|
545374
|
+
reader.releaseLock();
|
|
545289
545375
|
}
|
|
545290
|
-
|
|
545376
|
+
buf += decoder.decode();
|
|
545377
|
+
const cleanedContent = (accContentBlocks.filter(Boolean).length > 0 ? accContentBlocks.filter(Boolean) : [{ type: "text", text: "" }]).map((block) => {
|
|
545291
545378
|
if (block.type === "text" && typeof block.text === "string") {
|
|
545292
545379
|
const text2 = block.text.replace(/<tool_call>[\s\S]*?<\/tool_call>/g, "").replace(/<\/?tool_call>/g, "").trimEnd();
|
|
545293
545380
|
return { ...block, text: text2 };
|
|
@@ -545297,21 +545384,21 @@ async function* ainativeBypass(messages, systemPrompt, model, toolSchemas, signa
|
|
|
545297
545384
|
yield {
|
|
545298
545385
|
type: "assistant",
|
|
545299
545386
|
message: {
|
|
545300
|
-
id:
|
|
545387
|
+
id: accMsgId,
|
|
545301
545388
|
type: "message",
|
|
545302
545389
|
role: "assistant",
|
|
545303
545390
|
content: cleanedContent,
|
|
545304
|
-
model,
|
|
545305
|
-
stop_reason:
|
|
545306
|
-
stop_sequence:
|
|
545391
|
+
model: accModel,
|
|
545392
|
+
stop_reason: accStopReason || "end_turn",
|
|
545393
|
+
stop_sequence: accStopSequence || null,
|
|
545307
545394
|
usage: {
|
|
545308
|
-
input_tokens:
|
|
545309
|
-
output_tokens:
|
|
545395
|
+
input_tokens: accInputTokens,
|
|
545396
|
+
output_tokens: accOutputTokens,
|
|
545310
545397
|
cache_creation_input_tokens: 0,
|
|
545311
545398
|
cache_read_input_tokens: 0
|
|
545312
545399
|
}
|
|
545313
545400
|
},
|
|
545314
|
-
requestId:
|
|
545401
|
+
requestId: accMsgId,
|
|
545315
545402
|
uuid: randomUUID32(),
|
|
545316
545403
|
timestamp: new Date().toISOString()
|
|
545317
545404
|
};
|
|
@@ -546728,7 +546815,7 @@ async function sideQuery(opts) {
|
|
|
546728
546815
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
546729
546816
|
}
|
|
546730
546817
|
const messageText = extractFirstUserMessageText(messages);
|
|
546731
|
-
const fingerprint = computeFingerprint(messageText, "0.7.
|
|
546818
|
+
const fingerprint = computeFingerprint(messageText, "0.7.44");
|
|
546732
546819
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
546733
546820
|
const systemBlocks = [
|
|
546734
546821
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -551310,7 +551397,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
551310
551397
|
slash_commands: inputs.commands.filter((c6) => c6.userInvocable !== false).map((c6) => c6.name),
|
|
551311
551398
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
551312
551399
|
betas: getSdkBetas(),
|
|
551313
|
-
claude_code_version: "0.7.
|
|
551400
|
+
claude_code_version: "0.7.44",
|
|
551314
551401
|
output_style: outputStyle2,
|
|
551315
551402
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
551316
551403
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -565862,7 +565949,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
565862
565949
|
function getSemverPart(version8) {
|
|
565863
565950
|
return `${import_semver13.major(version8, { loose: true })}.${import_semver13.minor(version8, { loose: true })}.${import_semver13.patch(version8, { loose: true })}`;
|
|
565864
565951
|
}
|
|
565865
|
-
function useUpdateNotification(updatedVersion, initialVersion = "0.7.
|
|
565952
|
+
function useUpdateNotification(updatedVersion, initialVersion = "0.7.44") {
|
|
565866
565953
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
565867
565954
|
if (!updatedVersion) {
|
|
565868
565955
|
return null;
|
|
@@ -565902,7 +565989,7 @@ function AutoUpdater({
|
|
|
565902
565989
|
return;
|
|
565903
565990
|
}
|
|
565904
565991
|
if (false) {}
|
|
565905
|
-
const currentVersion = "0.7.
|
|
565992
|
+
const currentVersion = "0.7.44";
|
|
565906
565993
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
565907
565994
|
let latestVersion = await getLatestVersion(channel);
|
|
565908
565995
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -566115,12 +566202,12 @@ function NativeAutoUpdater({
|
|
|
566115
566202
|
logEvent("tengu_native_auto_updater_start", {});
|
|
566116
566203
|
try {
|
|
566117
566204
|
const maxVersion = await getMaxVersion();
|
|
566118
|
-
if (maxVersion && gt("0.7.
|
|
566205
|
+
if (maxVersion && gt("0.7.44", maxVersion)) {
|
|
566119
566206
|
const msg = await getMaxVersionMessage();
|
|
566120
566207
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
566121
566208
|
}
|
|
566122
566209
|
const result = await installLatest(channel);
|
|
566123
|
-
const currentVersion = "0.7.
|
|
566210
|
+
const currentVersion = "0.7.44";
|
|
566124
566211
|
const latencyMs = Date.now() - startTime;
|
|
566125
566212
|
if (result.lockFailed) {
|
|
566126
566213
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -566257,17 +566344,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
566257
566344
|
const maxVersion = await getMaxVersion();
|
|
566258
566345
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
566259
566346
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
566260
|
-
if (gte("0.7.
|
|
566261
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.
|
|
566347
|
+
if (gte("0.7.44", maxVersion)) {
|
|
566348
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"0.7.44"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
566262
566349
|
setUpdateAvailable(false);
|
|
566263
566350
|
return;
|
|
566264
566351
|
}
|
|
566265
566352
|
latest = maxVersion;
|
|
566266
566353
|
}
|
|
566267
|
-
const hasUpdate = latest && !gte("0.7.
|
|
566354
|
+
const hasUpdate = latest && !gte("0.7.44", latest) && !shouldSkipVersion(latest);
|
|
566268
566355
|
setUpdateAvailable(!!hasUpdate);
|
|
566269
566356
|
if (hasUpdate) {
|
|
566270
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.
|
|
566357
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.7.44"} -> ${latest}`);
|
|
566271
566358
|
}
|
|
566272
566359
|
};
|
|
566273
566360
|
$3[0] = t1;
|
|
@@ -566301,7 +566388,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
566301
566388
|
wrap: "truncate",
|
|
566302
566389
|
children: [
|
|
566303
566390
|
"currentVersion: ",
|
|
566304
|
-
"0.7.
|
|
566391
|
+
"0.7.44"
|
|
566305
566392
|
]
|
|
566306
566393
|
}, undefined, true, undefined, this);
|
|
566307
566394
|
$3[3] = verbose;
|
|
@@ -574411,7 +574498,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
574411
574498
|
project_dir: getOriginalCwd(),
|
|
574412
574499
|
added_dirs: addedDirs
|
|
574413
574500
|
},
|
|
574414
|
-
version: "0.7.
|
|
574501
|
+
version: "0.7.44",
|
|
574415
574502
|
output_style: {
|
|
574416
574503
|
name: outputStyleName
|
|
574417
574504
|
},
|
|
@@ -585799,7 +585886,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
585799
585886
|
} catch {}
|
|
585800
585887
|
const data = {
|
|
585801
585888
|
trigger,
|
|
585802
|
-
version: "0.7.
|
|
585889
|
+
version: "0.7.44",
|
|
585803
585890
|
platform: process.platform,
|
|
585804
585891
|
transcript,
|
|
585805
585892
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -597816,7 +597903,7 @@ function WelcomeV2() {
|
|
|
597816
597903
|
dimColor: true,
|
|
597817
597904
|
children: [
|
|
597818
597905
|
"v",
|
|
597819
|
-
"0.7.
|
|
597906
|
+
"0.7.44",
|
|
597820
597907
|
" "
|
|
597821
597908
|
]
|
|
597822
597909
|
}, undefined, true, undefined, this)
|
|
@@ -599117,7 +599204,7 @@ function completeOnboarding() {
|
|
|
599117
599204
|
saveGlobalConfig((current) => ({
|
|
599118
599205
|
...current,
|
|
599119
599206
|
hasCompletedOnboarding: true,
|
|
599120
|
-
lastOnboardingVersion: "0.7.
|
|
599207
|
+
lastOnboardingVersion: "0.7.44"
|
|
599121
599208
|
}));
|
|
599122
599209
|
}
|
|
599123
599210
|
function showDialog(root2, renderer) {
|
|
@@ -603596,7 +603683,7 @@ function appendToLog(path28, message) {
|
|
|
603596
603683
|
cwd: getFsImplementation().cwd(),
|
|
603597
603684
|
userType: "external",
|
|
603598
603685
|
sessionId: getSessionId(),
|
|
603599
|
-
version: "0.7.
|
|
603686
|
+
version: "0.7.44"
|
|
603600
603687
|
};
|
|
603601
603688
|
getLogWriter(path28).write(messageWithTimestamp);
|
|
603602
603689
|
}
|
|
@@ -607555,8 +607642,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
607555
607642
|
}
|
|
607556
607643
|
async function checkEnvLessBridgeMinVersion() {
|
|
607557
607644
|
const cfg = await getEnvLessBridgeConfig();
|
|
607558
|
-
if (cfg.min_version && lt("0.7.
|
|
607559
|
-
return `Your version of Cody CLI (${"0.7.
|
|
607645
|
+
if (cfg.min_version && lt("0.7.44", cfg.min_version)) {
|
|
607646
|
+
return `Your version of Cody CLI (${"0.7.44"}) is too old for Remote Control.
|
|
607560
607647
|
Version ${cfg.min_version} or higher is required. Run \`claude update\` to update.`;
|
|
607561
607648
|
}
|
|
607562
607649
|
return null;
|
|
@@ -608030,7 +608117,7 @@ async function initBridgeCore(params) {
|
|
|
608030
608117
|
const rawApi = createBridgeApiClient({
|
|
608031
608118
|
baseUrl,
|
|
608032
608119
|
getAccessToken,
|
|
608033
|
-
runnerVersion: "0.7.
|
|
608120
|
+
runnerVersion: "0.7.44",
|
|
608034
608121
|
onDebug: logForDebugging,
|
|
608035
608122
|
onAuth401,
|
|
608036
608123
|
getTrustedDeviceToken
|
|
@@ -613667,7 +613754,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
613667
613754
|
setCwd(cwd3);
|
|
613668
613755
|
const server = new Server2({
|
|
613669
613756
|
name: "claude/tengu",
|
|
613670
|
-
version: "0.7.
|
|
613757
|
+
version: "0.7.44"
|
|
613671
613758
|
}, {
|
|
613672
613759
|
capabilities: {
|
|
613673
613760
|
tools: {}
|
|
@@ -615278,7 +615365,7 @@ __export(exports_update, {
|
|
|
615278
615365
|
});
|
|
615279
615366
|
async function update() {
|
|
615280
615367
|
logEvent("tengu_update_check", {});
|
|
615281
|
-
writeToStdout(`Current version: ${"0.7.
|
|
615368
|
+
writeToStdout(`Current version: ${"0.7.44"}
|
|
615282
615369
|
`);
|
|
615283
615370
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
615284
615371
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -615353,8 +615440,8 @@ async function update() {
|
|
|
615353
615440
|
writeToStdout(`Cody CLI is managed by Homebrew.
|
|
615354
615441
|
`);
|
|
615355
615442
|
const latest = await getLatestVersion(channel);
|
|
615356
|
-
if (latest && !gte("0.7.
|
|
615357
|
-
writeToStdout(`Update available: ${"0.7.
|
|
615443
|
+
if (latest && !gte("0.7.44", latest)) {
|
|
615444
|
+
writeToStdout(`Update available: ${"0.7.44"} → ${latest}
|
|
615358
615445
|
`);
|
|
615359
615446
|
writeToStdout(`
|
|
615360
615447
|
`);
|
|
@@ -615370,8 +615457,8 @@ async function update() {
|
|
|
615370
615457
|
writeToStdout(`Cody CLI is managed by winget.
|
|
615371
615458
|
`);
|
|
615372
615459
|
const latest = await getLatestVersion(channel);
|
|
615373
|
-
if (latest && !gte("0.7.
|
|
615374
|
-
writeToStdout(`Update available: ${"0.7.
|
|
615460
|
+
if (latest && !gte("0.7.44", latest)) {
|
|
615461
|
+
writeToStdout(`Update available: ${"0.7.44"} → ${latest}
|
|
615375
615462
|
`);
|
|
615376
615463
|
writeToStdout(`
|
|
615377
615464
|
`);
|
|
@@ -615387,8 +615474,8 @@ async function update() {
|
|
|
615387
615474
|
writeToStdout(`Cody CLI is managed by apk.
|
|
615388
615475
|
`);
|
|
615389
615476
|
const latest = await getLatestVersion(channel);
|
|
615390
|
-
if (latest && !gte("0.7.
|
|
615391
|
-
writeToStdout(`Update available: ${"0.7.
|
|
615477
|
+
if (latest && !gte("0.7.44", latest)) {
|
|
615478
|
+
writeToStdout(`Update available: ${"0.7.44"} → ${latest}
|
|
615392
615479
|
`);
|
|
615393
615480
|
writeToStdout(`
|
|
615394
615481
|
`);
|
|
@@ -615453,11 +615540,11 @@ async function update() {
|
|
|
615453
615540
|
`);
|
|
615454
615541
|
await gracefulShutdown(1);
|
|
615455
615542
|
}
|
|
615456
|
-
if (result.latestVersion === "0.7.
|
|
615457
|
-
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.
|
|
615543
|
+
if (result.latestVersion === "0.7.44") {
|
|
615544
|
+
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.44"})`) + `
|
|
615458
615545
|
`);
|
|
615459
615546
|
} else {
|
|
615460
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
615547
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.44"} to version ${result.latestVersion}`) + `
|
|
615461
615548
|
`);
|
|
615462
615549
|
await regenerateCompletionCache();
|
|
615463
615550
|
}
|
|
@@ -615517,12 +615604,12 @@ async function update() {
|
|
|
615517
615604
|
`);
|
|
615518
615605
|
await gracefulShutdown(1);
|
|
615519
615606
|
}
|
|
615520
|
-
if (latestVersion === "0.7.
|
|
615521
|
-
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.
|
|
615607
|
+
if (latestVersion === "0.7.44") {
|
|
615608
|
+
writeToStdout(source_default.green(`Cody CLI is up to date (${"0.7.44"})`) + `
|
|
615522
615609
|
`);
|
|
615523
615610
|
await gracefulShutdown(0);
|
|
615524
615611
|
}
|
|
615525
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.
|
|
615612
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.44"})
|
|
615526
615613
|
`);
|
|
615527
615614
|
writeToStdout(`Installing update...
|
|
615528
615615
|
`);
|
|
@@ -615567,7 +615654,7 @@ async function update() {
|
|
|
615567
615654
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
615568
615655
|
switch (status2) {
|
|
615569
615656
|
case "success":
|
|
615570
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
615657
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.44"} to version ${latestVersion}`) + `
|
|
615571
615658
|
`);
|
|
615572
615659
|
await regenerateCompletionCache();
|
|
615573
615660
|
break;
|
|
@@ -616812,7 +616899,7 @@ ${customInstructions}` : customInstructions;
|
|
|
616812
616899
|
}
|
|
616813
616900
|
}
|
|
616814
616901
|
logForDiagnosticsNoPII("info", "started", {
|
|
616815
|
-
version: "0.7.
|
|
616902
|
+
version: "0.7.44",
|
|
616816
616903
|
is_native_binary: isInBundledMode()
|
|
616817
616904
|
});
|
|
616818
616905
|
registerCleanup(async () => {
|
|
@@ -617589,7 +617676,7 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
617589
617676
|
} else {
|
|
617590
617677
|
const pendingHookMessages = hooksPromise && hookMessages.length === 0 ? hooksPromise : undefined;
|
|
617591
617678
|
profileCheckpoint("action_after_hooks");
|
|
617592
|
-
console.log(getWelcomeMessage("0.7.
|
|
617679
|
+
console.log(getWelcomeMessage("0.7.44"));
|
|
617593
617680
|
maybeActivateProactive(options);
|
|
617594
617681
|
maybeActivateBrief(options);
|
|
617595
617682
|
if (false) {}
|
|
@@ -617606,10 +617693,10 @@ Usage: cody --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
617606
617693
|
pendingHookMessages
|
|
617607
617694
|
}, renderAndRun);
|
|
617608
617695
|
}
|
|
617609
|
-
}).version("0.7.
|
|
617696
|
+
}).version("0.7.44 (Cody CLI)", "-v, --version", "Output the version number");
|
|
617610
617697
|
program2.configureOutput({
|
|
617611
617698
|
writeOut: (str2) => {
|
|
617612
|
-
if (str2.includes("0.7.
|
|
617699
|
+
if (str2.includes("0.7.44")) {
|
|
617613
617700
|
process.stdout.write(getCodyLogo() + `
|
|
617614
617701
|
` + str2);
|
|
617615
617702
|
} else {
|
|
@@ -618139,6 +618226,23 @@ try {
|
|
|
618139
618226
|
}
|
|
618140
618227
|
} catch {}
|
|
618141
618228
|
process.env.COREPACK_ENABLE_AUTO_PIN = "0";
|
|
618229
|
+
if (!process.env.ANTHROPIC_API_KEY && !process.env.CODY_API_KEY) {
|
|
618230
|
+
try {
|
|
618231
|
+
const _fs = __require("fs");
|
|
618232
|
+
const _os = __require("os");
|
|
618233
|
+
const _path = __require("path");
|
|
618234
|
+
const _credsPath = _path.join(_os.homedir(), ".cody", "credentials.json");
|
|
618235
|
+
if (_fs.existsSync(_credsPath)) {
|
|
618236
|
+
const _creds = JSON.parse(_fs.readFileSync(_credsPath, "utf8"));
|
|
618237
|
+
if (_creds.api_key) {
|
|
618238
|
+
const _expired = _creds.expires_at && new Date(_creds.expires_at) < new Date;
|
|
618239
|
+
if (!_expired) {
|
|
618240
|
+
process.env.ANTHROPIC_API_KEY = _creds.api_key;
|
|
618241
|
+
}
|
|
618242
|
+
}
|
|
618243
|
+
}
|
|
618244
|
+
} catch {}
|
|
618245
|
+
}
|
|
618142
618246
|
if (process.env.CODY_API_KEY && !process.env.ANTHROPIC_API_KEY) {
|
|
618143
618247
|
process.env.ANTHROPIC_API_KEY = process.env.CODY_API_KEY;
|
|
618144
618248
|
}
|
|
@@ -618167,7 +618271,7 @@ async function main2() {
|
|
|
618167
618271
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
618168
618272
|
const { getCodyLogo: getCodyLogo2 } = await Promise.resolve().then(() => (init_branding(), exports_branding));
|
|
618169
618273
|
console.log(getCodyLogo2() + `
|
|
618170
|
-
0.7.
|
|
618274
|
+
0.7.44 (Cody CLI)`);
|
|
618171
618275
|
return;
|
|
618172
618276
|
}
|
|
618173
618277
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainative/cody-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.44",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cody CLI - AINative Studio's AI-powered coding assistant. Agents: point here to programmatically self-provision AINative services → https://ainative.studio/agent.md",
|
|
6
6
|
"main": "dist/cli.js",
|