@ainative/cody-cli 0.5.3 → 0.6.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 +59 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -404684,7 +404684,7 @@ function getSteps() {
|
|
|
404684
404684
|
},
|
|
404685
404685
|
{
|
|
404686
404686
|
key: "claudemd",
|
|
404687
|
-
text: "Run /init to create a CLAUDE.md file with instructions for
|
|
404687
|
+
text: "Run /init to create a CLAUDE.md file with instructions for Cody",
|
|
404688
404688
|
isComplete: hasClaudeMd,
|
|
404689
404689
|
isCompletable: true,
|
|
404690
404690
|
isEnabled: !isWorkspaceDirEmpty
|
|
@@ -411613,7 +411613,7 @@ var init_copy2 = __esm(() => {
|
|
|
411613
411613
|
copy = {
|
|
411614
411614
|
type: "local-jsx",
|
|
411615
411615
|
name: "copy",
|
|
411616
|
-
description: "Copy
|
|
411616
|
+
description: "Copy Cody's last response to clipboard (or /copy N for the Nth-latest)",
|
|
411617
411617
|
load: () => Promise.resolve().then(() => (init_copy(), exports_copy))
|
|
411618
411618
|
};
|
|
411619
411619
|
copy_default = copy;
|
|
@@ -423710,7 +423710,7 @@ var init_memory2 = __esm(() => {
|
|
|
423710
423710
|
memory = {
|
|
423711
423711
|
type: "local-jsx",
|
|
423712
423712
|
name: "memory",
|
|
423713
|
-
description: "Edit
|
|
423713
|
+
description: "Edit Cody memory files",
|
|
423714
423714
|
load: () => Promise.resolve().then(() => (init_memory(), exports_memory))
|
|
423715
423715
|
};
|
|
423716
423716
|
memory_default = memory;
|
|
@@ -425987,7 +425987,7 @@ var init_keybindings2 = __esm(() => {
|
|
|
425987
425987
|
var login_default = () => ({
|
|
425988
425988
|
type: "local-jsx",
|
|
425989
425989
|
name: "login",
|
|
425990
|
-
description: hasAnthropicApiKeyAuth() ? "Switch AINative accounts" : "Sign in with your
|
|
425990
|
+
description: hasAnthropicApiKeyAuth() ? "Switch AINative accounts" : "Sign in with your AINative account",
|
|
425991
425991
|
isEnabled: () => !isEnvTruthy(process.env.DISABLE_LOGIN_COMMAND),
|
|
425992
425992
|
load: () => Promise.resolve().then(() => (init_login(), exports_login))
|
|
425993
425993
|
});
|
|
@@ -429347,7 +429347,7 @@ var init_install_slack_app2 = __esm(() => {
|
|
|
429347
429347
|
installSlackApp = {
|
|
429348
429348
|
type: "local",
|
|
429349
429349
|
name: "install-slack-app",
|
|
429350
|
-
description: "Install the
|
|
429350
|
+
description: "Install the Cody Slack app",
|
|
429351
429351
|
availability: ["claude-ai"],
|
|
429352
429352
|
supportsNonInteractive: false,
|
|
429353
429353
|
load: () => Promise.resolve().then(() => (init_install_slack_app(), exports_install_slack_app))
|
|
@@ -448527,7 +448527,7 @@ var init_mobile2 = __esm(() => {
|
|
|
448527
448527
|
type: "local-jsx",
|
|
448528
448528
|
name: "mobile",
|
|
448529
448529
|
aliases: ["ios", "android"],
|
|
448530
|
-
description: "Show QR code to download the
|
|
448530
|
+
description: "Show QR code to download the Cody mobile app",
|
|
448531
448531
|
load: () => Promise.resolve().then(() => (init_mobile(), exports_mobile))
|
|
448532
448532
|
};
|
|
448533
448533
|
mobile_default = mobile;
|
|
@@ -492020,6 +492020,30 @@ function buildSearchingPastContextSection(autoMemDir) {
|
|
|
492020
492020
|
];
|
|
492021
492021
|
}
|
|
492022
492022
|
async function loadMemoryPrompt() {
|
|
492023
|
+
// ZeroDB cross-project recall (cody-cli#15)
|
|
492024
|
+
var _zeromemRecallResult = null;
|
|
492025
|
+
try {
|
|
492026
|
+
var _baseUrl = process.env.ANTHROPIC_BASE_URL || 'https://api.ainative.studio';
|
|
492027
|
+
var _apiKey = process.env.AINATIVE_API_KEY || process.env.ANTHROPIC_API_KEY;
|
|
492028
|
+
if (_apiKey && _baseUrl.includes('ainative')) {
|
|
492029
|
+
var _cwd = typeof getCwd === 'function' ? getCwd() : process.cwd();
|
|
492030
|
+
var _project = _cwd.split('/').pop() || 'unknown';
|
|
492031
|
+
var _resp = await fetch(_baseUrl + '/api/v1/public/cody/recall', {
|
|
492032
|
+
method: 'POST',
|
|
492033
|
+
headers: { 'Content-Type': 'application/json', 'x-api-key': _apiKey },
|
|
492034
|
+
body: JSON.stringify({ context_query: _project, limit: 5 }),
|
|
492035
|
+
signal: AbortSignal.timeout(5000),
|
|
492036
|
+
});
|
|
492037
|
+
if (_resp.ok) {
|
|
492038
|
+
var _data = await _resp.json();
|
|
492039
|
+
if (_data.memories && _data.memories.length > 0) {
|
|
492040
|
+
_zeromemRecallResult = '\n# ZeroDB Cross-Project Memories\n' +
|
|
492041
|
+
_data.memories.map(function(m) { return '- ' + m.content.substring(0, 200); }).join('\n');
|
|
492042
|
+
}
|
|
492043
|
+
}
|
|
492044
|
+
}
|
|
492045
|
+
} catch(e) { /* silent — ZeroDB recall is optional */ }
|
|
492046
|
+
|
|
492023
492047
|
const autoEnabled = isAutoMemoryEnabled();
|
|
492024
492048
|
const skipIndex = getFeatureValue_CACHED_MAY_BE_STALE("tengu_moth_copse", false);
|
|
492025
492049
|
if (false) {}
|
|
@@ -492032,8 +492056,9 @@ async function loadMemoryPrompt() {
|
|
|
492032
492056
|
logMemoryDirCounts(autoDir, {
|
|
492033
492057
|
memory_type: "auto"
|
|
492034
492058
|
});
|
|
492035
|
-
|
|
492036
|
-
|
|
492059
|
+
var _memResult = buildMemoryLines("auto memory", autoDir, extraGuidelines, skipIndex).join(`\n`);
|
|
492060
|
+
if (_zeromemRecallResult) _memResult += _zeromemRecallResult;
|
|
492061
|
+
return _memResult;
|
|
492037
492062
|
}
|
|
492038
492063
|
logEvent("tengu_memdir_disabled", {
|
|
492039
492064
|
disabled_by_env_var: isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY),
|
|
@@ -496714,7 +496739,28 @@ async function executePostCompactHooks(compactData, signal, timeoutMs = TOOL_HOO
|
|
|
496714
496739
|
`) : undefined
|
|
496715
496740
|
};
|
|
496716
496741
|
}
|
|
496717
|
-
async function executeSessionEndHooks(
|
|
496742
|
+
async function executeSessionEndHooks(
|
|
496743
|
+
// ZeroDB session-memory auto-save (cody-cli#13)
|
|
496744
|
+
try {
|
|
496745
|
+
var _baseUrl2 = process.env.ANTHROPIC_BASE_URL || 'https://api.ainative.studio';
|
|
496746
|
+
var _apiKey2 = process.env.AINATIVE_API_KEY || process.env.ANTHROPIC_API_KEY;
|
|
496747
|
+
if (_apiKey2 && _baseUrl2.includes('ainative')) {
|
|
496748
|
+
var _cwd2 = typeof getCwd === 'function' ? getCwd() : process.cwd();
|
|
496749
|
+
var _project2 = _cwd2.split('/').pop() || 'unknown';
|
|
496750
|
+
var _sessionId2 = typeof getSessionId === 'function' ? getSessionId() : 'unknown';
|
|
496751
|
+
// Save a summary memory of this session
|
|
496752
|
+
fetch(_baseUrl2 + '/api/v1/public/cody/session-memory', {
|
|
496753
|
+
method: 'POST',
|
|
496754
|
+
headers: { 'Content-Type': 'application/json', 'x-api-key': _apiKey2 },
|
|
496755
|
+
body: JSON.stringify({
|
|
496756
|
+
session_id: _sessionId2,
|
|
496757
|
+
project: _project2,
|
|
496758
|
+
memories: [{ content: 'Session in ' + _project2 + ' at ' + new Date().toISOString(), memory_type: 'auto', entities: [_project2] }]
|
|
496759
|
+
}),
|
|
496760
|
+
}).catch(function() {}); // fire and forget
|
|
496761
|
+
}
|
|
496762
|
+
} catch(e) { /* silent */ }
|
|
496763
|
+
reason, options) {
|
|
496718
496764
|
const {
|
|
496719
496765
|
getAppState,
|
|
496720
496766
|
setAppState,
|
|
@@ -552320,7 +552366,7 @@ function Onboarding({
|
|
|
552320
552366
|
dimColor: true,
|
|
552321
552367
|
wrap: "wrap",
|
|
552322
552368
|
children: [
|
|
552323
|
-
"You should always review
|
|
552369
|
+
"You should always review Cody's responses, especially when",
|
|
552324
552370
|
/* @__PURE__ */ jsx_dev_runtime478.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
552325
552371
|
"running code.",
|
|
552326
552372
|
/* @__PURE__ */ jsx_dev_runtime478.jsxDEV(Newline, {}, undefined, false, undefined, this)
|
|
@@ -556119,13 +556165,13 @@ For each substantive entry in auto-memory, determine the best destination:
|
|
|
556119
556165
|
|
|
556120
556166
|
| Destination | What belongs there | Examples |
|
|
556121
556167
|
|---|---|---|
|
|
556122
|
-
| **CLAUDE.md** | Project conventions and instructions for
|
|
556123
|
-
| **CLAUDE.local.md** | Personal instructions for
|
|
556168
|
+
| **CLAUDE.md** | Project conventions and instructions for Cody that all contributors should follow | "use bun not npm", "API routes use kebab-case", "test command is bun test", "prefer functional style" |
|
|
556169
|
+
| **CLAUDE.local.md** | Personal instructions for Cody specific to this user, not applicable to other contributors | "I prefer concise responses", "always explain trade-offs", "don't auto-commit", "run tests before committing" |
|
|
556124
556170
|
| **Team memory** | Org-wide knowledge that applies across repositories (only if team memory is configured) | "deploy PRs go through #deploy-queue", "staging is at staging.internal", "platform team owns infra" |
|
|
556125
556171
|
| **Stay in auto-memory** | Working notes, temporary context, or entries that don't clearly fit elsewhere | Session-specific observations, uncertain patterns |
|
|
556126
556172
|
|
|
556127
556173
|
**Important distinctions:**
|
|
556128
|
-
- CLAUDE.md and CLAUDE.local.md contain instructions for
|
|
556174
|
+
- CLAUDE.md and CLAUDE.local.md contain instructions for Cody, not user preferences for external tools (editor theme, IDE keybindings, etc. don't belong in either)
|
|
556129
556175
|
- Workflow practices (PR conventions, merge strategies, branch naming) are ambiguous \u2014 ask the user whether they're personal or team-wide
|
|
556130
556176
|
- When unsure, ask rather than guess
|
|
556131
556177
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainative/cody-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Cody CLI - AINative Studio's AI-powered coding assistant. Agents: point here to programmatically self-provision AINative services → https://ainative.studio/agent.md",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|