@a3s-lab/code 1.8.5 → 1.8.6
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/index.d.ts +32 -0
- package/index.js +2 -1
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -189,6 +189,21 @@ export interface ToolResult {
|
|
|
189
189
|
/** Convenience JSON view of `metadata.document_runtime` when present. */
|
|
190
190
|
documentRuntimeJson?: string
|
|
191
191
|
}
|
|
192
|
+
/** Parameters for the web_search tool. */
|
|
193
|
+
export interface JsWebSearchParams {
|
|
194
|
+
/** The search query. */
|
|
195
|
+
query: string
|
|
196
|
+
/** List of search engines to use. */
|
|
197
|
+
engines?: Array<string>
|
|
198
|
+
/** Maximum number of results to return (default: 10, max: 50). */
|
|
199
|
+
limit?: number
|
|
200
|
+
/** Search timeout in seconds (default: 10, max: 60). */
|
|
201
|
+
timeout?: number
|
|
202
|
+
/** Proxy URL (e.g., http://127.0.0.1:8080 or socks5://127.0.0.1:1080). */
|
|
203
|
+
proxy?: string
|
|
204
|
+
/** Output format: "text" or "json". */
|
|
205
|
+
format?: string
|
|
206
|
+
}
|
|
192
207
|
/** Result of a single `EventStream.next()` call. */
|
|
193
208
|
export interface NextResult {
|
|
194
209
|
value?: AgentEvent
|
|
@@ -670,6 +685,20 @@ export interface SearchEngineConfig {
|
|
|
670
685
|
weight: number
|
|
671
686
|
timeout?: number
|
|
672
687
|
}
|
|
688
|
+
/** Browser backend for headless search. */
|
|
689
|
+
export const enum BrowserBackend {
|
|
690
|
+
/** Chrome/Chromium headless. */
|
|
691
|
+
Chrome = 0,
|
|
692
|
+
/** Lightpanda headless browser (Linux/macOS only). */
|
|
693
|
+
Lightpanda = 1
|
|
694
|
+
}
|
|
695
|
+
/** Headless browser configuration. */
|
|
696
|
+
export interface HeadlessConfig {
|
|
697
|
+
backend: BrowserBackend
|
|
698
|
+
browserPath?: string
|
|
699
|
+
maxTabs?: number
|
|
700
|
+
launchArgs?: Array<string>
|
|
701
|
+
}
|
|
673
702
|
/** Health monitor configuration for search engines. */
|
|
674
703
|
export interface SearchHealthConfig {
|
|
675
704
|
maxFailures: number
|
|
@@ -680,6 +709,7 @@ export interface SearchConfig {
|
|
|
680
709
|
timeout: number
|
|
681
710
|
health?: SearchHealthConfig
|
|
682
711
|
engines: Record<string, SearchEngineConfig>
|
|
712
|
+
headless?: HeadlessConfig
|
|
683
713
|
}
|
|
684
714
|
/** SubAgent configuration for orchestrator. */
|
|
685
715
|
export interface SubAgentConfig {
|
|
@@ -1082,6 +1112,8 @@ export declare class Session {
|
|
|
1082
1112
|
glob(pattern: string): Promise<Array<string>>
|
|
1083
1113
|
/** Search file contents with a regex pattern. */
|
|
1084
1114
|
grep(pattern: string): Promise<string>
|
|
1115
|
+
/** Search the web using multiple search engines. */
|
|
1116
|
+
webSearch(params: JsWebSearchParams): Promise<ToolResult>
|
|
1085
1117
|
/** Execute a git command (status, log, branch, checkout, diff, stash, remote, worktree). */
|
|
1086
1118
|
git(command: string, subcommand?: string | undefined | null, name?: string | undefined | null, path?: string | undefined | null, newBranch?: boolean | undefined | null, base?: string | undefined | null, force?: boolean | undefined | null, maxCount?: number | undefined | null, message?: string | undefined | null, includeUntracked?: boolean | undefined | null, target?: string | undefined | null, reference?: string | undefined | null): Promise<ToolResult>
|
|
1087
1119
|
/** Check if this session has a lane queue configured. */
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { EventStream, FileMemoryStore, FileSessionStore, MemorySessionStore, DefaultSecurityProvider, SkillPlugin, StdioTransport, HttpTransport, WebSocketTransport, UnixSocketTransport, Agent, Session, builtinSkills, TeamRole, TeamTaskStatus, TeamTaskBoard, Team, TeamRunner, SubAgentHandle, SubAgentEventStream, Orchestrator } = nativeBinding
|
|
313
|
+
const { EventStream, FileMemoryStore, FileSessionStore, MemorySessionStore, DefaultSecurityProvider, SkillPlugin, StdioTransport, HttpTransport, WebSocketTransport, UnixSocketTransport, Agent, Session, builtinSkills, TeamRole, TeamTaskStatus, TeamTaskBoard, Team, TeamRunner, BrowserBackend, SubAgentHandle, SubAgentEventStream, Orchestrator } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.EventStream = EventStream
|
|
316
316
|
module.exports.FileMemoryStore = FileMemoryStore
|
|
@@ -330,6 +330,7 @@ module.exports.TeamTaskStatus = TeamTaskStatus
|
|
|
330
330
|
module.exports.TeamTaskBoard = TeamTaskBoard
|
|
331
331
|
module.exports.Team = Team
|
|
332
332
|
module.exports.TeamRunner = TeamRunner
|
|
333
|
+
module.exports.BrowserBackend = BrowserBackend
|
|
333
334
|
module.exports.SubAgentHandle = SubAgentHandle
|
|
334
335
|
module.exports.SubAgentEventStream = SubAgentEventStream
|
|
335
336
|
module.exports.Orchestrator = Orchestrator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a3s-lab/code",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.6",
|
|
4
4
|
"description": "A3S Code - Native AI coding agent library for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"test:loop": "tsx --tsconfig examples/tsconfig.json examples/test_loop_commands.ts"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"@a3s-lab/code-darwin-arm64": "1.8.
|
|
48
|
-
"@a3s-lab/code-linux-x64-gnu": "1.8.
|
|
49
|
-
"@a3s-lab/code-linux-x64-musl": "1.8.
|
|
50
|
-
"@a3s-lab/code-linux-arm64-gnu": "1.8.
|
|
51
|
-
"@a3s-lab/code-linux-arm64-musl": "1.8.
|
|
52
|
-
"@a3s-lab/code-win32-x64-msvc": "1.8.
|
|
47
|
+
"@a3s-lab/code-darwin-arm64": "1.8.6",
|
|
48
|
+
"@a3s-lab/code-linux-x64-gnu": "1.8.6",
|
|
49
|
+
"@a3s-lab/code-linux-x64-musl": "1.8.6",
|
|
50
|
+
"@a3s-lab/code-linux-arm64-gnu": "1.8.6",
|
|
51
|
+
"@a3s-lab/code-linux-arm64-musl": "1.8.6",
|
|
52
|
+
"@a3s-lab/code-win32-x64-msvc": "1.8.6"
|
|
53
53
|
}
|
|
54
54
|
}
|