@adecore/agents 0.31.0 → 0.31.1

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.
@@ -1,4 +1,4 @@
1
- import type { AgentKind, ProviderCapabilities } from '@adecore/agent-contracts';
1
+ import type { AgentKind, ProviderCapabilities, ProviderInstall } from '@adecore/agent-contracts';
2
2
  import { type AcpAgentSpec } from '../chat/acp-backend.ts';
3
3
  import type { ModelCatalog } from './catalog.ts';
4
4
  import { type CliDetection } from './detect.ts';
@@ -12,6 +12,7 @@ export interface AcpProviderSpec extends AcpAgentSpec {
12
12
  capabilities?: Partial<ProviderCapabilities>;
13
13
  resumeCommand?: string;
14
14
  home?: ProviderHome;
15
+ install?: ProviderInstall;
15
16
  ignoresProjectConfig?: boolean;
16
17
  oneShotArgs?(prompt: string): string[];
17
18
  oneShotStdinArgs?: readonly string[];
@@ -32,6 +32,7 @@ export function createAcpProvider(spec) {
32
32
  resumeCommand: spec.resumeCommand ?? '',
33
33
  ...(spec.ignoresProjectConfig === undefined ? {} : { ignoresProjectConfig: spec.ignoresProjectConfig }),
34
34
  ...(spec.home ? { home: spec.home } : {}),
35
+ ...(spec.install ? { install: spec.install } : {}),
35
36
  ...(spec.oneShotArgs ? { oneShotArgs: spec.oneShotArgs } : {}),
36
37
  ...(spec.oneShotStdinArgs ? { oneShotStdinArgs: spec.oneShotStdinArgs } : {}),
37
38
  ...(spec.enabled ? { enabled: spec.enabled } : {}),
@@ -18,6 +18,19 @@ export function createClaudeProvider(options = {}) {
18
18
  loginEnv: ['ANTHROPIC_API_KEY', 'ANTHROPIC_AUTH_TOKEN', 'CLAUDE_CODE_OAUTH_TOKEN'],
19
19
  loginCommand: 'claude auth login'
20
20
  },
21
+ install: {
22
+ description: "Anthropic's coding agent, in a terminal and in a chat.",
23
+ commands: {
24
+ darwin: 'curl -fsSL https://claude.ai/install.sh | bash',
25
+ linux: 'curl -fsSL https://claude.ai/install.sh | bash',
26
+ win32: 'irm https://claude.ai/install.ps1 | iex'
27
+ },
28
+ guideUrl: 'https://docs.anthropic.com/en/docs/claude-code/setup',
29
+ signIn: [
30
+ { kind: 'command', command: 'claude auth login' },
31
+ { kind: 'env', variable: 'ANTHROPIC_API_KEY' }
32
+ ]
33
+ },
21
34
  detect: detectCli,
22
35
  oneShotArgs: (prompt) => ['-p', prompt, '--output-format', 'text'],
23
36
  // `-p` without a prompt argument reads the prompt from stdin.
@@ -16,6 +16,15 @@ export function createCodexProvider(options = {}) {
16
16
  ignoresProjectConfig: false,
17
17
  // The auth variables Codex 0.157 names in its own "no Codex credentials were found" advice.
18
18
  home: { env: 'CODEX_HOME', fallback: '.codex', loginEnv: ['OPENAI_API_KEY', 'CODEX_API_KEY', 'CODEX_ACCESS_TOKEN'], loginCommand: 'codex login' },
19
+ install: {
20
+ description: "OpenAI's coding agent, in a terminal and in a chat.",
21
+ commands: { darwin: 'npm install -g @openai/codex', linux: 'npm install -g @openai/codex', win32: 'npm install -g @openai/codex' },
22
+ guideUrl: 'https://github.com/openai/codex',
23
+ signIn: [
24
+ { kind: 'command', command: 'codex login' },
25
+ { kind: 'env', variable: 'OPENAI_API_KEY' }
26
+ ]
27
+ },
19
28
  detect: detectCli,
20
29
  // Read-only and without an approval to wait for: the run only has to read what it is handed. A chat's
21
30
  // title is asked in a folder that need not be a repository, and ephemeral keeps the run out of Codex's thread list.
@@ -1,4 +1,4 @@
1
- import type { AgentKind, ProviderCapabilities } from '@adecore/agent-contracts';
1
+ import type { AgentKind, ProviderCapabilities, ProviderInstall } from '@adecore/agent-contracts';
2
2
  import type { BackendHost, BackendLaunch, ChatBackend } from '../chat/backend.ts';
3
3
  import type { ModelCatalog } from './catalog.ts';
4
4
  import type { CliDetection } from './detect.ts';
@@ -17,6 +17,7 @@ export interface ChatProvider {
17
17
  readonly resumeCommand: string;
18
18
  readonly ignoresProjectConfig?: boolean;
19
19
  readonly home?: ProviderHome;
20
+ readonly install?: ProviderInstall;
20
21
  oneShotArgs?(prompt: string): string[];
21
22
  readonly oneShotStdinArgs?: readonly string[];
22
23
  firstPromptArgs(prompt: string): string[];
@@ -65,7 +65,8 @@ export class ProviderRegistry {
65
65
  models: provider.catalog.list(),
66
66
  defaultModel: provider.catalog.defaultModel || null,
67
67
  capabilities: provider.capabilities,
68
- resumeCommand: provider.resumeCommand
68
+ resumeCommand: provider.resumeCommand,
69
+ ...(provider.install ? { install: provider.install } : {})
69
70
  })));
70
71
  }
71
72
  /* The kinds this host offers, in the order every menu lists them. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agents",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "Node-compatible agent chat hosts, providers, accounts, usage and durable task coordination.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -81,8 +81,8 @@
81
81
  "test": "bun --conditions=source test"
82
82
  },
83
83
  "dependencies": {
84
- "@adecore/agent-contracts": "0.31.0",
85
- "@adecore/intelligent-ui": "0.31.0",
84
+ "@adecore/agent-contracts": "0.31.1",
85
+ "@adecore/intelligent-ui": "0.31.1",
86
86
  "zod": "^4.6.5"
87
87
  },
88
88
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import type { AgentKind, ProviderCapabilities } from '@adecore/agent-contracts';
1
+ import type { AgentKind, ProviderCapabilities, ProviderInstall } from '@adecore/agent-contracts';
2
2
  import { createAcpBackend, type AcpAgentSpec } from '../chat/acp-backend.ts';
3
3
  import type { ModelCatalog } from './catalog.ts';
4
4
  import { detectCli, type CliDetection } from './detect.ts';
@@ -38,6 +38,7 @@ export interface AcpProviderSpec extends AcpAgentSpec {
38
38
  // What a terminal runs to continue one of its sessions; empty where it has none.
39
39
  resumeCommand?: string;
40
40
  home?: ProviderHome;
41
+ install?: ProviderInstall;
41
42
  ignoresProjectConfig?: boolean;
42
43
  oneShotArgs?(prompt: string): string[];
43
44
  oneShotStdinArgs?: readonly string[];
@@ -59,6 +60,7 @@ export function createAcpProvider(spec: AcpProviderSpec): ChatProvider {
59
60
  resumeCommand: spec.resumeCommand ?? '',
60
61
  ...(spec.ignoresProjectConfig === undefined ? {} : { ignoresProjectConfig: spec.ignoresProjectConfig }),
61
62
  ...(spec.home ? { home: spec.home } : {}),
63
+ ...(spec.install ? { install: spec.install } : {}),
62
64
  ...(spec.oneShotArgs ? { oneShotArgs: spec.oneShotArgs } : {}),
63
65
  ...(spec.oneShotStdinArgs ? { oneShotStdinArgs: spec.oneShotStdinArgs } : {}),
64
66
  ...(spec.enabled ? { enabled: spec.enabled } : {}),
@@ -20,6 +20,19 @@ export function createClaudeProvider(options: ClaudeBackendOptions = {}): ChatPr
20
20
  loginEnv: ['ANTHROPIC_API_KEY', 'ANTHROPIC_AUTH_TOKEN', 'CLAUDE_CODE_OAUTH_TOKEN'],
21
21
  loginCommand: 'claude auth login'
22
22
  },
23
+ install: {
24
+ description: "Anthropic's coding agent, in a terminal and in a chat.",
25
+ commands: {
26
+ darwin: 'curl -fsSL https://claude.ai/install.sh | bash',
27
+ linux: 'curl -fsSL https://claude.ai/install.sh | bash',
28
+ win32: 'irm https://claude.ai/install.ps1 | iex'
29
+ },
30
+ guideUrl: 'https://docs.anthropic.com/en/docs/claude-code/setup',
31
+ signIn: [
32
+ { kind: 'command', command: 'claude auth login' },
33
+ { kind: 'env', variable: 'ANTHROPIC_API_KEY' }
34
+ ]
35
+ },
23
36
  detect: detectCli,
24
37
  oneShotArgs: (prompt) => ['-p', prompt, '--output-format', 'text'],
25
38
  // `-p` without a prompt argument reads the prompt from stdin.
@@ -18,6 +18,15 @@ export function createCodexProvider(options: CodexBackendOptions = {}): ChatProv
18
18
  ignoresProjectConfig: false,
19
19
  // The auth variables Codex 0.157 names in its own "no Codex credentials were found" advice.
20
20
  home: { env: 'CODEX_HOME', fallback: '.codex', loginEnv: ['OPENAI_API_KEY', 'CODEX_API_KEY', 'CODEX_ACCESS_TOKEN'], loginCommand: 'codex login' },
21
+ install: {
22
+ description: "OpenAI's coding agent, in a terminal and in a chat.",
23
+ commands: { darwin: 'npm install -g @openai/codex', linux: 'npm install -g @openai/codex', win32: 'npm install -g @openai/codex' },
24
+ guideUrl: 'https://github.com/openai/codex',
25
+ signIn: [
26
+ { kind: 'command', command: 'codex login' },
27
+ { kind: 'env', variable: 'OPENAI_API_KEY' }
28
+ ]
29
+ },
21
30
  detect: detectCli,
22
31
  // Read-only and without an approval to wait for: the run only has to read what it is handed. A chat's
23
32
  // title is asked in a folder that need not be a repository, and ephemeral keeps the run out of Codex's thread list.
@@ -1,4 +1,4 @@
1
- import type { AgentKind, ProviderCapabilities } from '@adecore/agent-contracts';
1
+ import type { AgentKind, ProviderCapabilities, ProviderInstall } from '@adecore/agent-contracts';
2
2
  import type { BackendHost, BackendLaunch, ChatBackend } from '../chat/backend.ts';
3
3
  import type { ModelCatalog } from './catalog.ts';
4
4
  import type { CliDetection } from './detect.ts';
@@ -34,6 +34,8 @@ export interface ChatProvider {
34
34
  /* Where this CLI keeps its login, settings and transcripts, which is what an account is. Absent on a
35
35
  CLI with no variable to move that folder, which then only has its default account. */
36
36
  readonly home?: ProviderHome;
37
+ /* How a person installs this CLI and signs it in, for a page that shows it while the CLI is missing. */
38
+ readonly install?: ProviderInstall;
37
39
  /* The arguments for one prompt in and one answer out, no session and no chat, which is how a
38
40
  host asks for a commit message or a title. Absent on a CLI that only runs interactively. */
39
41
  oneShotArgs?(prompt: string): string[];
@@ -89,7 +89,8 @@ export class ProviderRegistry {
89
89
  models: provider.catalog.list(),
90
90
  defaultModel: provider.catalog.defaultModel || null,
91
91
  capabilities: provider.capabilities,
92
- resumeCommand: provider.resumeCommand
92
+ resumeCommand: provider.resumeCommand,
93
+ ...(provider.install ? { install: provider.install } : {})
93
94
  }))
94
95
  );
95
96
  }