@cuylabs/agent-code 4.9.0 → 5.0.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/index.d.ts +5 -4
- package/dist/index.js +5 -3
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { AgentConfig, ToolSpec, ApprovalMiddlewareConfig, PromptCacheConfig, SkillConfig, SkillRegistry, SessionManager,
|
|
1
|
+
import { AgentConfig, ToolSpec, ApprovalMiddlewareConfig, PromptCacheConfig, SkillConfig, SkillRegistry, SessionManager, Agent } from '@cuylabs/agent-core';
|
|
2
2
|
export * from '@cuylabs/agent-core';
|
|
3
3
|
export { Agent, ApprovalAction, ApprovalMiddlewareConfig, ApprovalRequest, LLMError, ModelEntry, PluginCommand, PluginRegistry, SkillMetadata, SkillRegistry, StaticSettings, configureResolver, createSkillRegistry, defaultRegistry, discoverPlugins, getDefaultResolver, isDefinedPlugin, loadPluginModule } from '@cuylabs/agent-core';
|
|
4
4
|
import { SubAgentConfig, SubAgentRole } from '@cuylabs/agent-core/subagents';
|
|
5
5
|
export { SubAgentRole, discoverSubAgentRoles } from '@cuylabs/agent-core/subagents';
|
|
6
6
|
export { z } from 'zod';
|
|
7
|
+
import { FileSessionStoreOptions } from '@cuylabs/agent-session-store-file';
|
|
7
8
|
export { B as BashParams, E as EditParams, G as GlobParams, a as GrepParams, R as ReadParams, T as ToolsetBuilder, W as WriteParams, b as bashParameters, c as bashTool, d as defaultCodingTools, e as editParameters, f as editTool, g as executeBash, h as executeGrep, i as globParameters, j as globTool, k as grepParameters, l as grepTool, r as readParameters, m as readTool, n as resolveTools, s as setupToolRegistry, t as toolset, w as writeParameters, o as writeTool } from './toolset-DdlrWOqv.js';
|
|
8
9
|
|
|
9
|
-
interface
|
|
10
|
+
interface CodingSessionStoreOptions extends Partial<Omit<FileSessionStoreOptions, "directory">> {
|
|
10
11
|
/**
|
|
11
12
|
* Explicit directory for project sessions.
|
|
12
13
|
*
|
|
@@ -88,7 +89,7 @@ interface CodingAgentOptions extends Omit<AgentConfig, "approval"> {
|
|
|
88
89
|
* Defaults to `true`, which stores sessions under the project storage dir.
|
|
89
90
|
* Pass `false` to keep the agent on the default in-memory session manager.
|
|
90
91
|
*/
|
|
91
|
-
sessionStorage?: boolean |
|
|
92
|
+
sessionStorage?: boolean | CodingSessionStoreOptions;
|
|
92
93
|
}
|
|
93
94
|
interface CodingAgentSetupResult {
|
|
94
95
|
agent: Agent;
|
|
@@ -118,4 +119,4 @@ declare function createCodingAgent(options: CodingAgentOptions): Promise<Agent>;
|
|
|
118
119
|
*/
|
|
119
120
|
declare const defaultCodingRoles: SubAgentRole[];
|
|
120
121
|
|
|
121
|
-
export { type CodingAgentOptions, type CodingAgentSetupResult, type
|
|
122
|
+
export { type CodingAgentOptions, type CodingAgentSetupResult, type CodingSessionStoreOptions, type CodingSubAgentOptions, createCodingAgent, defaultCodingRoles, setupCodingAgent };
|
package/dist/index.js
CHANGED
|
@@ -43,16 +43,18 @@ import { z } from "zod";
|
|
|
43
43
|
import process from "process";
|
|
44
44
|
import {
|
|
45
45
|
PRIORITY_SKILLS,
|
|
46
|
-
FileStorage,
|
|
47
46
|
SessionManager,
|
|
48
47
|
SkillRegistry,
|
|
49
48
|
approvalMiddleware,
|
|
50
49
|
createAgent,
|
|
51
50
|
createSkillRegistry,
|
|
52
51
|
createSkillTools,
|
|
53
|
-
getProjectSessionsDir,
|
|
54
52
|
promptCacheMiddleware
|
|
55
53
|
} from "@cuylabs/agent-core";
|
|
54
|
+
import {
|
|
55
|
+
FileSessionStore,
|
|
56
|
+
getProjectSessionsDir
|
|
57
|
+
} from "@cuylabs/agent-session-store-file";
|
|
56
58
|
import {
|
|
57
59
|
configureSubAgents,
|
|
58
60
|
discoverSubAgentRoles,
|
|
@@ -99,7 +101,7 @@ function resolveSessionManager(cwd, sessionManager, sessionStorage) {
|
|
|
99
101
|
const storageOptions = sessionStorage && sessionStorage !== true ? sessionStorage : void 0;
|
|
100
102
|
const directory = storageOptions?.directory ?? getProjectSessionsDir(cwd, storageOptions?.appName);
|
|
101
103
|
return new SessionManager(
|
|
102
|
-
new
|
|
104
|
+
new FileSessionStore({
|
|
103
105
|
directory,
|
|
104
106
|
extension: storageOptions?.extension,
|
|
105
107
|
cache: storageOptions?.cache
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuylabs/agent-code",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Embeddable AI coding agent built on @cuylabs/agent-core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"ai": "^6.0.94",
|
|
26
26
|
"zod": "^3.24.0",
|
|
27
|
-
"@cuylabs/agent-core": "^
|
|
27
|
+
"@cuylabs/agent-core": "^5.0.0",
|
|
28
|
+
"@cuylabs/agent-session-store-file": "^5.0.0"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"@ai-sdk/anthropic": "^3.0.0",
|