@jclaw/core 0.1.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.
Files changed (189) hide show
  1. package/dist/auto-skill/generator.d.ts +30 -0
  2. package/dist/auto-skill/generator.d.ts.map +1 -0
  3. package/dist/auto-skill/generator.js +262 -0
  4. package/dist/auto-skill/generator.js.map +1 -0
  5. package/dist/auto-skill/index.d.ts +11 -0
  6. package/dist/auto-skill/index.d.ts.map +1 -0
  7. package/dist/auto-skill/index.js +10 -0
  8. package/dist/auto-skill/index.js.map +1 -0
  9. package/dist/auto-skill/installer.d.ts +44 -0
  10. package/dist/auto-skill/installer.d.ts.map +1 -0
  11. package/dist/auto-skill/installer.js +201 -0
  12. package/dist/auto-skill/installer.js.map +1 -0
  13. package/dist/auto-skill/types.d.ts +179 -0
  14. package/dist/auto-skill/types.d.ts.map +1 -0
  15. package/dist/auto-skill/types.js +9 -0
  16. package/dist/auto-skill/types.js.map +1 -0
  17. package/dist/cli/commands/config.d.ts +16 -0
  18. package/dist/cli/commands/config.d.ts.map +1 -0
  19. package/dist/cli/commands/config.js +119 -0
  20. package/dist/cli/commands/config.js.map +1 -0
  21. package/dist/cli/commands/exec.d.ts +12 -0
  22. package/dist/cli/commands/exec.d.ts.map +1 -0
  23. package/dist/cli/commands/exec.js +41 -0
  24. package/dist/cli/commands/exec.js.map +1 -0
  25. package/dist/cli/index.d.ts +10 -0
  26. package/dist/cli/index.d.ts.map +1 -0
  27. package/dist/cli/index.js +91 -0
  28. package/dist/cli/index.js.map +1 -0
  29. package/dist/cli/run.d.ts +9 -0
  30. package/dist/cli/run.d.ts.map +1 -0
  31. package/dist/cli/run.js +13 -0
  32. package/dist/cli/run.js.map +1 -0
  33. package/dist/context/index.d.ts +6 -0
  34. package/dist/context/index.d.ts.map +1 -0
  35. package/dist/context/index.js +12 -0
  36. package/dist/context/index.js.map +1 -0
  37. package/dist/context/memsearch-client.d.ts +34 -0
  38. package/dist/context/memsearch-client.d.ts.map +1 -0
  39. package/dist/context/memsearch-client.js +182 -0
  40. package/dist/context/memsearch-client.js.map +1 -0
  41. package/dist/context/mock-client.d.ts +116 -0
  42. package/dist/context/mock-client.d.ts.map +1 -0
  43. package/dist/context/mock-client.js +150 -0
  44. package/dist/context/mock-client.js.map +1 -0
  45. package/dist/context/openviking-client.d.ts +87 -0
  46. package/dist/context/openviking-client.d.ts.map +1 -0
  47. package/dist/context/openviking-client.js +166 -0
  48. package/dist/context/openviking-client.js.map +1 -0
  49. package/dist/context/openviking-mcp-client.d.ts +29 -0
  50. package/dist/context/openviking-mcp-client.d.ts.map +1 -0
  51. package/dist/context/openviking-mcp-client.js +81 -0
  52. package/dist/context/openviking-mcp-client.js.map +1 -0
  53. package/dist/context/simple-memory-client.d.ts +43 -0
  54. package/dist/context/simple-memory-client.d.ts.map +1 -0
  55. package/dist/context/simple-memory-client.enhanced.d.ts +39 -0
  56. package/dist/context/simple-memory-client.enhanced.d.ts.map +1 -0
  57. package/dist/context/simple-memory-client.enhanced.js +207 -0
  58. package/dist/context/simple-memory-client.enhanced.js.map +1 -0
  59. package/dist/context/simple-memory-client.js +270 -0
  60. package/dist/context/simple-memory-client.js.map +1 -0
  61. package/dist/evolution/continuous.d.ts +127 -0
  62. package/dist/evolution/continuous.d.ts.map +1 -0
  63. package/dist/evolution/continuous.js +238 -0
  64. package/dist/evolution/continuous.js.map +1 -0
  65. package/dist/evolution/engine.d.ts +97 -0
  66. package/dist/evolution/engine.d.ts.map +1 -0
  67. package/dist/evolution/engine.js +187 -0
  68. package/dist/evolution/engine.js.map +1 -0
  69. package/dist/evolution/evolver-adapter.d.ts +104 -0
  70. package/dist/evolution/evolver-adapter.d.ts.map +1 -0
  71. package/dist/evolution/evolver-adapter.js +227 -0
  72. package/dist/evolution/evolver-adapter.js.map +1 -0
  73. package/dist/evolution/index.d.ts +9 -0
  74. package/dist/evolution/index.d.ts.map +1 -0
  75. package/dist/evolution/index.js +8 -0
  76. package/dist/evolution/index.js.map +1 -0
  77. package/dist/evolution/memory.d.ts +106 -0
  78. package/dist/evolution/memory.d.ts.map +1 -0
  79. package/dist/evolution/memory.js +232 -0
  80. package/dist/evolution/memory.js.map +1 -0
  81. package/dist/evolution/mutation.d.ts +66 -0
  82. package/dist/evolution/mutation.d.ts.map +1 -0
  83. package/dist/evolution/mutation.js +139 -0
  84. package/dist/evolution/mutation.js.map +1 -0
  85. package/dist/evolution/sandbox.d.ts +96 -0
  86. package/dist/evolution/sandbox.d.ts.map +1 -0
  87. package/dist/evolution/sandbox.js +194 -0
  88. package/dist/evolution/sandbox.js.map +1 -0
  89. package/dist/evolution/types.d.ts +93 -0
  90. package/dist/evolution/types.d.ts.map +1 -0
  91. package/dist/evolution/types.js +9 -0
  92. package/dist/evolution/types.js.map +1 -0
  93. package/dist/executor/index.d.ts +10 -0
  94. package/dist/executor/index.d.ts.map +1 -0
  95. package/dist/executor/index.js +10 -0
  96. package/dist/executor/index.js.map +1 -0
  97. package/dist/executor/interface.d.ts +9 -0
  98. package/dist/executor/interface.d.ts.map +1 -0
  99. package/dist/executor/interface.js +9 -0
  100. package/dist/executor/interface.js.map +1 -0
  101. package/dist/executor/local.d.ts +36 -0
  102. package/dist/executor/local.d.ts.map +1 -0
  103. package/dist/executor/local.js +95 -0
  104. package/dist/executor/local.js.map +1 -0
  105. package/dist/extension-system/capability-router.d.ts +106 -0
  106. package/dist/extension-system/capability-router.d.ts.map +1 -0
  107. package/dist/extension-system/capability-router.js +167 -0
  108. package/dist/extension-system/capability-router.js.map +1 -0
  109. package/dist/extension-system/index.d.ts +11 -0
  110. package/dist/extension-system/index.d.ts.map +1 -0
  111. package/dist/extension-system/index.js +11 -0
  112. package/dist/extension-system/index.js.map +1 -0
  113. package/dist/extension-system/loader.d.ts +93 -0
  114. package/dist/extension-system/loader.d.ts.map +1 -0
  115. package/dist/extension-system/loader.js +245 -0
  116. package/dist/extension-system/loader.js.map +1 -0
  117. package/dist/extension-system/registry.d.ts +112 -0
  118. package/dist/extension-system/registry.d.ts.map +1 -0
  119. package/dist/extension-system/registry.js +161 -0
  120. package/dist/extension-system/registry.js.map +1 -0
  121. package/dist/index.d.ts +14 -0
  122. package/dist/index.d.ts.map +1 -0
  123. package/dist/index.js +20 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/network/client.d.ts +130 -0
  126. package/dist/network/client.d.ts.map +1 -0
  127. package/dist/network/client.js +230 -0
  128. package/dist/network/client.js.map +1 -0
  129. package/dist/network/index.d.ts +10 -0
  130. package/dist/network/index.d.ts.map +1 -0
  131. package/dist/network/index.js +10 -0
  132. package/dist/network/index.js.map +1 -0
  133. package/dist/network/protocol.d.ts +159 -0
  134. package/dist/network/protocol.d.ts.map +1 -0
  135. package/dist/network/protocol.js +118 -0
  136. package/dist/network/protocol.js.map +1 -0
  137. package/dist/runtime/agent.d.ts +124 -0
  138. package/dist/runtime/agent.d.ts.map +1 -0
  139. package/dist/runtime/agent.js +286 -0
  140. package/dist/runtime/agent.js.map +1 -0
  141. package/dist/runtime/agent_fixed.d.ts +39 -0
  142. package/dist/runtime/agent_fixed.d.ts.map +1 -0
  143. package/dist/runtime/agent_fixed.js +193 -0
  144. package/dist/runtime/agent_fixed.js.map +1 -0
  145. package/dist/runtime/index.d.ts +11 -0
  146. package/dist/runtime/index.d.ts.map +1 -0
  147. package/dist/runtime/index.js +11 -0
  148. package/dist/runtime/index.js.map +1 -0
  149. package/dist/runtime/llm-client.d.ts +108 -0
  150. package/dist/runtime/llm-client.d.ts.map +1 -0
  151. package/dist/runtime/llm-client.js +125 -0
  152. package/dist/runtime/llm-client.js.map +1 -0
  153. package/dist/runtime/task-executor.d.ts +92 -0
  154. package/dist/runtime/task-executor.d.ts.map +1 -0
  155. package/dist/runtime/task-executor.js +203 -0
  156. package/dist/runtime/task-executor.js.map +1 -0
  157. package/dist/skill-sh/adapter.d.ts +40 -0
  158. package/dist/skill-sh/adapter.d.ts.map +1 -0
  159. package/dist/skill-sh/adapter.js +258 -0
  160. package/dist/skill-sh/adapter.js.map +1 -0
  161. package/dist/skill-sh/converter.d.ts +37 -0
  162. package/dist/skill-sh/converter.d.ts.map +1 -0
  163. package/dist/skill-sh/converter.js +175 -0
  164. package/dist/skill-sh/converter.js.map +1 -0
  165. package/dist/skill-sh/discovery.d.ts +29 -0
  166. package/dist/skill-sh/discovery.d.ts.map +1 -0
  167. package/dist/skill-sh/discovery.js +189 -0
  168. package/dist/skill-sh/discovery.js.map +1 -0
  169. package/dist/skill-sh/index.d.ts +19 -0
  170. package/dist/skill-sh/index.d.ts.map +1 -0
  171. package/dist/skill-sh/index.js +20 -0
  172. package/dist/skill-sh/index.js.map +1 -0
  173. package/dist/skill-sh/quality.d.ts +51 -0
  174. package/dist/skill-sh/quality.d.ts.map +1 -0
  175. package/dist/skill-sh/quality.js +146 -0
  176. package/dist/skill-sh/quality.js.map +1 -0
  177. package/dist/skill-sh/registry.d.ts +58 -0
  178. package/dist/skill-sh/registry.d.ts.map +1 -0
  179. package/dist/skill-sh/registry.js +118 -0
  180. package/dist/skill-sh/registry.js.map +1 -0
  181. package/dist/skill-sh/types.d.ts +228 -0
  182. package/dist/skill-sh/types.d.ts.map +1 -0
  183. package/dist/skill-sh/types.js +9 -0
  184. package/dist/skill-sh/types.js.map +1 -0
  185. package/dist/types.d.ts +199 -0
  186. package/dist/types.d.ts.map +1 -0
  187. package/dist/types.js +10 -0
  188. package/dist/types.js.map +1 -0
  189. package/package.json +41 -0
@@ -0,0 +1,228 @@
1
+ /**
2
+ * Skill.sh Integration Types
3
+ *
4
+ * Type definitions for skill.sh ecosystem integration
5
+ *
6
+ * @module @jclaw/core/skill-sh/types
7
+ */
8
+ import type { Extension } from '../types.js';
9
+ /**
10
+ * Skill.sh search result
11
+ */
12
+ export interface SkillShResult {
13
+ /** Skill ID (owner/repo format) */
14
+ id: string;
15
+ /** Skill name */
16
+ name: string;
17
+ /** Short description */
18
+ description: string;
19
+ /** GitHub owner */
20
+ owner: string;
21
+ /** GitHub repo */
22
+ repo: string;
23
+ /** GitHub stars */
24
+ stars: number;
25
+ /** Download count */
26
+ downloads: number;
27
+ /** Last updated */
28
+ updatedAt: string;
29
+ /** Skill version */
30
+ version: string;
31
+ /** Categories */
32
+ categories: string[];
33
+ /** Tags */
34
+ tags: string[];
35
+ /** Compatible agents */
36
+ agents: string[];
37
+ /** Quality score (0-100) */
38
+ quality: number;
39
+ /** Community rating */
40
+ rating: number;
41
+ }
42
+ /**
43
+ * Skill detail information
44
+ */
45
+ export interface SkillShDetail extends SkillShResult {
46
+ /** Full README content */
47
+ readme: string;
48
+ /** SKILL.md content */
49
+ skillMd: string;
50
+ /** Example usage */
51
+ examples: string[];
52
+ /** Required permissions */
53
+ permissions: string[];
54
+ /** Dependencies */
55
+ dependencies: string[];
56
+ /** Installation command */
57
+ installCommand: string;
58
+ /** File size */
59
+ size: number;
60
+ /** License */
61
+ license: string;
62
+ }
63
+ /**
64
+ * SKILL.md frontmatter structure
65
+ */
66
+ export interface SkillFrontmatter {
67
+ /** Skill name */
68
+ name: string;
69
+ /** Short description */
70
+ description: string;
71
+ /** Version */
72
+ version?: string;
73
+ /** Author */
74
+ author?: string;
75
+ /** Categories */
76
+ categories?: string[];
77
+ /** Tags */
78
+ tags?: string[];
79
+ /** Compatible agents */
80
+ agents?: string[];
81
+ /** Required permissions */
82
+ permissions?: string[];
83
+ /** Minimum JClaw version */
84
+ minJClawVersion?: string;
85
+ }
86
+ /**
87
+ * Converted JClaw Extension from Skill
88
+ */
89
+ export interface ConvertedSkill {
90
+ /** Original skill info */
91
+ original: SkillShResult;
92
+ /** Converted extension */
93
+ extension: Extension;
94
+ /** Conversion quality score */
95
+ quality: number;
96
+ /** Warnings during conversion */
97
+ warnings: string[];
98
+ }
99
+ /**
100
+ * Skill search options
101
+ */
102
+ export interface SkillSearchOptions {
103
+ /** Search query */
104
+ query: string;
105
+ /** Filter by category */
106
+ category?: string;
107
+ /** Minimum quality score */
108
+ minQuality?: number;
109
+ /** Sort by */
110
+ sortBy?: 'relevance' | 'stars' | 'downloads' | 'quality' | 'updated';
111
+ /** Limit results */
112
+ limit?: number;
113
+ /** Filter by compatible agents */
114
+ agents?: string[];
115
+ }
116
+ /**
117
+ * Skill discovery result
118
+ */
119
+ export interface SkillDiscoveryResult {
120
+ /** Search query */
121
+ query: string;
122
+ /** Found skills from skill.sh */
123
+ skillShResults: SkillShResult[];
124
+ /** Found skills from community repo */
125
+ communityResults: SkillShResult[];
126
+ /** Auto-generated alternative */
127
+ autoGenerated?: ConvertedSkill;
128
+ /** Recommended skill (best match) */
129
+ recommended?: SkillShResult;
130
+ /** Confidence score (0-1) */
131
+ confidence: number;
132
+ /** Source of recommendation */
133
+ source: 'skill.sh' | 'community' | 'autogenerated' | 'none';
134
+ }
135
+ /**
136
+ * Skill installation result
137
+ */
138
+ export interface SkillInstallationResult {
139
+ /** Success status */
140
+ success: boolean;
141
+ /** Installed skill */
142
+ skill?: SkillShResult;
143
+ /** Installed extension */
144
+ extension?: Extension;
145
+ /** Installation path */
146
+ installPath?: string;
147
+ /** Error message if failed */
148
+ error?: string;
149
+ /** Installation duration */
150
+ duration: number;
151
+ }
152
+ /**
153
+ * Skill registry entry
154
+ */
155
+ export interface SkillRegistryEntry {
156
+ /** Skill ID */
157
+ id: string;
158
+ /** Installation status */
159
+ status: 'installed' | 'active' | 'error' | 'deprecated';
160
+ /** Installation path */
161
+ path: string;
162
+ /** Installed version */
163
+ version: string;
164
+ /** Installation date */
165
+ installedAt: Date;
166
+ /** Last used */
167
+ lastUsedAt?: Date;
168
+ /** Usage count */
169
+ usageCount: number;
170
+ /** User rating */
171
+ userRating?: number;
172
+ /** Local quality assessment */
173
+ localQuality: number;
174
+ }
175
+ /**
176
+ * Skill quality assessment
177
+ */
178
+ export interface SkillQualityAssessment {
179
+ /** Overall score (0-100) */
180
+ score: number;
181
+ /** Code quality (0-100) */
182
+ codeQuality: number;
183
+ /** Documentation quality (0-100) */
184
+ documentation: number;
185
+ /** Test coverage (0-100) */
186
+ testCoverage: number;
187
+ /** Community adoption (0-100) */
188
+ community: number;
189
+ /** Security assessment (0-100) */
190
+ security: number;
191
+ /** Detailed breakdown */
192
+ details: {
193
+ /** Lines of code */
194
+ linesOfCode: number;
195
+ /** Has tests */
196
+ hasTests: boolean;
197
+ /** Has examples */
198
+ hasExamples: boolean;
199
+ /** Has documentation */
200
+ hasDocumentation: boolean;
201
+ /** Last update within 30 days */
202
+ recentlyUpdated: boolean;
203
+ /** Has open issues */
204
+ openIssues: number;
205
+ };
206
+ }
207
+ /**
208
+ * Skill.sh adapter configuration
209
+ */
210
+ export interface SkillShAdapterConfig {
211
+ /** API base URL */
212
+ apiBase?: string;
213
+ /** Cache directory */
214
+ cacheDir?: string;
215
+ /** Enable caching */
216
+ enableCache?: boolean;
217
+ /** Cache TTL (ms) */
218
+ cacheTtl?: number;
219
+ /** Request timeout (ms) */
220
+ timeout?: number;
221
+ /** User agent */
222
+ userAgent?: string;
223
+ /** GitHub token for higher rate limits */
224
+ githubToken?: string;
225
+ /** Community repo URL */
226
+ communityRepo?: string;
227
+ }
228
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/skill-sh/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,SAAS,EAAE,MA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AE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Skill.sh Integration Types
3
+ *
4
+ * Type definitions for skill.sh ecosystem integration
5
+ *
6
+ * @module @jclaw/core/skill-sh/types
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/skill-sh/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,199 @@
1
+ /**
2
+ * JClaw Core Type Interfaces
3
+ *
4
+ * This file contains all core interface definitions for the JClaw agent framework.
5
+ * These interfaces define the contracts between components without implementation.
6
+ *
7
+ * @module @jclaw/core/types
8
+ */
9
+ /**
10
+ * Agent 任务
11
+ *
12
+ * Represents a task to be executed by the agent runtime.
13
+ */
14
+ export interface Task {
15
+ /** Unique identifier for the task */
16
+ id: string;
17
+ /** The prompt or instruction to execute */
18
+ prompt: string;
19
+ /** Optional context data for task execution */
20
+ context?: Record<string, unknown>;
21
+ /** Optional execution mode override */
22
+ executionMode?: 'local' | 'docker';
23
+ }
24
+ /**
25
+ * 任务执行结果
26
+ *
27
+ * Represents the result of a task execution.
28
+ */
29
+ export interface TaskResult {
30
+ /** ID of the executed task */
31
+ taskId: string;
32
+ /** Whether the task completed successfully */
33
+ success: boolean;
34
+ /** Output from task execution (if successful) */
35
+ output?: string;
36
+ /** Error message (if failed) */
37
+ error?: string;
38
+ /** Execution duration in milliseconds */
39
+ duration: number;
40
+ }
41
+ /**
42
+ * 执行器选项
43
+ *
44
+ * Configuration options for command execution.
45
+ */
46
+ export interface ExecuteOptions {
47
+ /** Execution mode override */
48
+ mode?: 'local' | 'docker';
49
+ /** Timeout in milliseconds */
50
+ timeout?: number;
51
+ /** Working directory for execution */
52
+ cwd?: string;
53
+ /** Environment variables */
54
+ env?: Record<string, string>;
55
+ /** Security restrictions for local execution */
56
+ restrictions?: {
57
+ /** Paths allowed for access */
58
+ allowedPaths?: string[];
59
+ /** Commands that are blocked */
60
+ blockedCommands?: string[];
61
+ };
62
+ /** Container configuration for Docker execution */
63
+ container?: {
64
+ /** Docker image name */
65
+ image?: string;
66
+ /** Memory limit (e.g., "512m") */
67
+ memory?: string;
68
+ /** CPU limit (e.g., "0.5") */
69
+ cpu?: string;
70
+ };
71
+ }
72
+ /**
73
+ * 执行结果
74
+ *
75
+ * Result of a command execution.
76
+ */
77
+ export interface ExecuteResult {
78
+ /** Standard output from the command */
79
+ stdout: string;
80
+ /** Standard error from the command */
81
+ stderr: string;
82
+ /** Exit code of the command */
83
+ exitCode: number;
84
+ /** Execution duration in milliseconds */
85
+ duration: number;
86
+ }
87
+ /**
88
+ * 执行器接口
89
+ *
90
+ * Interface for command executors supporting different execution modes.
91
+ */
92
+ export interface Executor {
93
+ /**
94
+ * Execute a command with the given options
95
+ * @param command - The command to execute
96
+ * @param options - Execution options
97
+ * @returns Promise resolving to execution result
98
+ */
99
+ execute(command: string, options?: ExecuteOptions): Promise<ExecuteResult>;
100
+ /** The execution mode of this executor */
101
+ readonly mode: 'local' | 'docker' | 'hybrid';
102
+ }
103
+ /**
104
+ * 上下文管理器接口
105
+ *
106
+ * Interface for managing agent context and knowledge.
107
+ */
108
+ export interface ContextManager {
109
+ /**
110
+ * Establish connection to the context backend
111
+ */
112
+ connect(): Promise<void>;
113
+ /**
114
+ * Disconnect from the context backend
115
+ */
116
+ disconnect(): Promise<void>;
117
+ /**
118
+ * Query the context for relevant information
119
+ * @param question - The question to query
120
+ * @param options - Query options including topK for result count
121
+ * @returns Relevant context as string
122
+ */
123
+ query(question: string, options?: {
124
+ topK?: number;
125
+ }): Promise<string>;
126
+ /**
127
+ * Add a resource to the context
128
+ * @param resourcePath - Path to the resource to add
129
+ * @returns Resource identifier
130
+ */
131
+ addResource(resourcePath: string): Promise<string>;
132
+ }
133
+ /**
134
+ * 能力定义
135
+ *
136
+ * Describes a capability provided by an extension.
137
+ */
138
+ export interface Capability {
139
+ /** Name of the capability */
140
+ name: string;
141
+ /** Human-readable description */
142
+ description: string;
143
+ /** JSON Schema for input validation (optional) */
144
+ inputSchema?: Record<string, unknown>;
145
+ }
146
+ /**
147
+ * 扩展接口
148
+ *
149
+ * Interface that all JClaw extensions must implement.
150
+ */
151
+ export interface Extension {
152
+ /** Extension name (unique identifier) */
153
+ name: string;
154
+ /** Semantic version string */
155
+ version: string;
156
+ /** Human-readable description */
157
+ description: string;
158
+ /** Required extension dependencies */
159
+ dependencies?: string[];
160
+ /** Optional extension dependencies */
161
+ optionalDependencies?: string[];
162
+ /** Capabilities provided by this extension */
163
+ capabilities: Capability[];
164
+ /**
165
+ * Install the extension into the runtime
166
+ * @param runtime - The agent runtime instance
167
+ */
168
+ install(runtime: unknown): Promise<void>;
169
+ /**
170
+ * Uninstall and cleanup the extension
171
+ */
172
+ uninstall(): Promise<void>;
173
+ }
174
+ /**
175
+ * Agent 运行时接口
176
+ *
177
+ * Core interface for the JClaw agent runtime.
178
+ */
179
+ export interface AgentRuntime {
180
+ /**
181
+ * Execute a task
182
+ * @param task - The task to execute
183
+ * @returns Promise resolving to task result
184
+ */
185
+ execute(task: Task): Promise<TaskResult>;
186
+ /**
187
+ * Start the agent runtime
188
+ */
189
+ start(): Promise<void>;
190
+ /**
191
+ * Stop the agent runtime
192
+ */
193
+ stop(): Promise<void>;
194
+ /** Context manager instance */
195
+ readonly context: ContextManager;
196
+ /** Current execution mode */
197
+ readonly executionMode: 'local' | 'docker' | 'hybrid';
198
+ }
199
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,WAAW,IAAI;IACnB,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,gDAAgD;IAChD,YAAY,CAAC,EAAE;QACb,+BAA+B;QAC/B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,gCAAgC;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CAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sCAAsC;IACtC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,8CAA8C;IAC9C,YAAY,EAAE,UAAU,EAAE,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEzC;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtB,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IAEjC,6BAA6B;IAC7B,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACvD"}
package/dist/types.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * JClaw Core Type Interfaces
3
+ *
4
+ * This file contains all core interface definitions for the JClaw agent framework.
5
+ * These interfaces define the contracts between components without implementation.
6
+ *
7
+ * @module @jclaw/core/types
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@jclaw/core",
3
+ "version": "0.1.0",
4
+ "description": "Universal self-evolving Agent framework with persistent memory and AutoSkill",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsc"
20
+ },
21
+ "keywords": [
22
+ "ai",
23
+ "agent",
24
+ "self-evolving",
25
+ "typescript",
26
+ "llm"
27
+ ],
28
+ "author": "JClaw Team",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/jabing/jclaw.git"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/jabing/jclaw/issues"
36
+ },
37
+ "homepage": "https://github.com/jabing/jclaw#readme",
38
+ "engines": {
39
+ "node": ">=18.0.0"
40
+ }
41
+ }