MCPcopy Create free account
hub / github.com/astercloud/aster / NewJSONStore

Function NewJSONStore

pkg/store/json.go:40–49  ·  view source on GitHub ↗

NewJSONStore 创建JSON存储

(baseDir string)

Source from the content-addressed store, hash-verified

38
39// NewJSONStore 创建JSON存储
40func NewJSONStore(baseDir string) (*JSONStore, error) {
41 // 确保目录存在
42 if err := os.MkdirAll(baseDir, 0755); err != nil {
43 return nil, fmt.Errorf("create base directory: %w", err)
44 }
45
46 return &JSONStore{
47 baseDir: baseDir,
48 }, nil
49}
50
51// agentDir 获取Agent的存储目录
52func (js *JSONStore) agentDir(agentID string) string {

Callers 15

createTestDepsFunction · 0.92
createTestDependenciesFunction · 0.92
setupTestDepsFunction · 0.92
setupPromptTestDepsFunction · 0.92
mainFunction · 0.92
runSessionFunction · 0.92
runServeFunction · 0.92
setupTestServerFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
createDependenciesFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by 6

createTestDepsFunction · 0.74
createTestDependenciesFunction · 0.74
setupTestDepsFunction · 0.74
setupPromptTestDepsFunction · 0.74
setupTestServerFunction · 0.74
createTestAgentFunction · 0.74