@onmars/lunar-agent-claude 0.12.2 → 0.14.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/package.json +2 -2
- package/src/adapter.ts +27 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onmars/lunar-agent-claude",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"LICENSE"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@onmars/lunar-core": "^0.
|
|
15
|
+
"@onmars/lunar-core": "^0.14.0"
|
|
16
16
|
},
|
|
17
17
|
"description": "Claude CLI agent adapter for Lunar",
|
|
18
18
|
"author": "onMars Tech",
|
package/src/adapter.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
Agent,
|
|
3
|
+
AgentCapabilities,
|
|
4
|
+
AgentEvent,
|
|
5
|
+
AgentInput,
|
|
6
|
+
AgentUsage,
|
|
7
|
+
BridgeTool,
|
|
8
|
+
} from '@onmars/lunar-core'
|
|
2
9
|
import { log } from '@onmars/lunar-core'
|
|
3
10
|
import type { SecurityConfig } from '@onmars/lunar-core/lib/config-loader'
|
|
4
11
|
import { buildSafeEnv } from '@onmars/lunar-core/lib/security'
|
|
@@ -45,6 +52,14 @@ export interface ClaudeAgentOptions {
|
|
|
45
52
|
* Per-query `input.thinking` overrides this.
|
|
46
53
|
*/
|
|
47
54
|
thinking?: string
|
|
55
|
+
/**
|
|
56
|
+
* Lunar-managed bridge tools discovered from top-level `mcp.servers`.
|
|
57
|
+
*
|
|
58
|
+
* Plumbing only for now: the adapter does not expose them yet, but
|
|
59
|
+
* receiving them here keeps the constructor contract stable for the
|
|
60
|
+
* upcoming MCP bridge work.
|
|
61
|
+
*/
|
|
62
|
+
bridgeTools?: BridgeTool[]
|
|
48
63
|
}
|
|
49
64
|
|
|
50
65
|
/** Thinking levels accepted by Claude Code CLI's --effort flag. */
|
|
@@ -109,6 +124,11 @@ interface ClaudeJsonMessage {
|
|
|
109
124
|
export class ClaudeAgent implements Agent {
|
|
110
125
|
readonly id: string
|
|
111
126
|
readonly name: string
|
|
127
|
+
readonly capabilities: AgentCapabilities = {
|
|
128
|
+
hasNativeMCP: true,
|
|
129
|
+
acceptsBridgeTools: false,
|
|
130
|
+
hasStructuredToolResults: true,
|
|
131
|
+
}
|
|
112
132
|
|
|
113
133
|
private activeProcess: ReturnType<typeof Bun.spawn> | null = null
|
|
114
134
|
|
|
@@ -189,7 +209,12 @@ export class ClaudeAgent implements Agent {
|
|
|
189
209
|
}
|
|
190
210
|
|
|
191
211
|
log.info(
|
|
192
|
-
{
|
|
212
|
+
{
|
|
213
|
+
cwd: this.options.cwd,
|
|
214
|
+
binary,
|
|
215
|
+
auth: this.options.authMode ?? 'stored',
|
|
216
|
+
bridgeTools: this.options.bridgeTools?.length ?? 0,
|
|
217
|
+
},
|
|
193
218
|
'Claude CLI agent initialized (auth verified)',
|
|
194
219
|
)
|
|
195
220
|
}
|