arki 0.0.5 → 0.0.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/README.md +19 -3
- package/dist/config/.arki/config.json +3 -0
- package/dist/config/.arki/state.json +4 -0
- package/dist/index.d.ts +56 -32
- package/dist/index.js +683 -332
- package/package.json +1 -1
- /package/dist/config/{config.json → arki/config.json} +0 -0
package/README.md
CHANGED
|
@@ -80,9 +80,25 @@ Ways to enable:
|
|
|
80
80
|
1. Add `--debug` or `-d` parameter at startup
|
|
81
81
|
2. Type `/debug` during runtime to toggle
|
|
82
82
|
|
|
83
|
-
## Configuration
|
|
83
|
+
## Configuration
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
### Global Configuration
|
|
86
|
+
|
|
87
|
+
Global configuration is stored in system-specific locations:
|
|
88
|
+
|
|
89
|
+
- **macOS/Linux**: `~/.config/arki/config.json`
|
|
90
|
+
- **Windows**: `%APPDATA%\arki\config.json`
|
|
91
|
+
|
|
92
|
+
On first run, Arki copies the default configuration template to this location.
|
|
93
|
+
|
|
94
|
+
### Project Configuration
|
|
95
|
+
|
|
96
|
+
Each project can have its own configuration in `.arki/` directory:
|
|
97
|
+
|
|
98
|
+
- `.arki/config.json` - Project-specific settings (overrides global config)
|
|
99
|
+
- `.arki/state.json` - Project state and cache
|
|
100
|
+
|
|
101
|
+
On first run in a new project, Arki will ask if you trust the project before initializing the `.arki/` directory.
|
|
86
102
|
|
|
87
103
|
### Reset to Factory Defaults
|
|
88
104
|
|
|
@@ -90,7 +106,7 @@ Configuration file is located at `~/.config/arki/config.json`:
|
|
|
90
106
|
arki --reset
|
|
91
107
|
```
|
|
92
108
|
|
|
93
|
-
This will delete the
|
|
109
|
+
This will delete the global configuration file. The default configuration will be used on next startup.
|
|
94
110
|
|
|
95
111
|
## Development
|
|
96
112
|
|
package/dist/index.d.ts
CHANGED
|
@@ -135,6 +135,31 @@ declare class Procedure {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
/** OS type definition */
|
|
139
|
+
interface OS_TYPE {
|
|
140
|
+
/** Operating system name: 'windows' | 'mac' | 'linux' | 'other' */
|
|
141
|
+
name: 'windows' | 'mac' | 'linux' | 'other';
|
|
142
|
+
/** Operating system version */
|
|
143
|
+
version: string;
|
|
144
|
+
}
|
|
145
|
+
/** Global OS information */
|
|
146
|
+
declare const OS: OS_TYPE;
|
|
147
|
+
/** Working directory */
|
|
148
|
+
declare let workingDir: string;
|
|
149
|
+
/** Set working directory (for testing) */
|
|
150
|
+
declare function setWorkingDir(dir: string): void;
|
|
151
|
+
/** Global paths configuration */
|
|
152
|
+
declare const PATHS: {
|
|
153
|
+
/** Global config directory (~/.config/arki or %APPDATA%\arki) */
|
|
154
|
+
globalConfig: string;
|
|
155
|
+
/** Project config directory (.arki/) - returns path based on current workingDir */
|
|
156
|
+
readonly projectConfig: string;
|
|
157
|
+
/** Package's global config template directory */
|
|
158
|
+
globalTemplate: string;
|
|
159
|
+
/** Package's project config template directory */
|
|
160
|
+
projectTemplate: string;
|
|
161
|
+
};
|
|
162
|
+
|
|
138
163
|
/**
|
|
139
164
|
* Fixed parameters
|
|
140
165
|
*/
|
|
@@ -183,6 +208,17 @@ declare abstract class Adapter {
|
|
|
183
208
|
getModel(): string;
|
|
184
209
|
}
|
|
185
210
|
|
|
211
|
+
/** Global tool registry */
|
|
212
|
+
declare const TOOLS: Record<string, Tool>;
|
|
213
|
+
/** Global procedure registry */
|
|
214
|
+
declare const PROCEDURES: Record<string, Procedure>;
|
|
215
|
+
/** Global Adapter instance */
|
|
216
|
+
declare let adapter: Adapter | null;
|
|
217
|
+
/** Initialize global Adapter */
|
|
218
|
+
declare function initAdapter(): void;
|
|
219
|
+
/** Initialize global state */
|
|
220
|
+
declare function init(cwd?: string): Promise<void>;
|
|
221
|
+
|
|
186
222
|
/**
|
|
187
223
|
* Agent type
|
|
188
224
|
*/
|
|
@@ -217,38 +253,21 @@ interface GlobalConfig {
|
|
|
217
253
|
};
|
|
218
254
|
}
|
|
219
255
|
/**
|
|
220
|
-
*
|
|
256
|
+
* Get loaded configuration
|
|
221
257
|
*/
|
|
222
|
-
declare
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
getAgentConfig(agentType: AgentType): AgentModelConfig;
|
|
236
|
-
private loadEnvApiKeys;
|
|
237
|
-
}
|
|
238
|
-
declare const config: ConfigManager;
|
|
239
|
-
|
|
240
|
-
/** Working directory */
|
|
241
|
-
declare let workingDir: string;
|
|
242
|
-
/** Set working directory (for testing) */
|
|
243
|
-
declare function setWorkingDir(dir: string): void;
|
|
244
|
-
/** Global tool registry */
|
|
245
|
-
declare const TOOLS: Record<string, Tool>;
|
|
246
|
-
/** Global procedure registry */
|
|
247
|
-
declare const PROCEDURES: Record<string, Procedure>;
|
|
248
|
-
/** Global Adapter instance */
|
|
249
|
-
declare let adapter: Adapter | null;
|
|
250
|
-
/** Initialize global state */
|
|
251
|
-
declare function init(cwd?: string): Promise<void>;
|
|
258
|
+
declare function getConfig(): GlobalConfig;
|
|
259
|
+
/**
|
|
260
|
+
* Get API key for a provider
|
|
261
|
+
*/
|
|
262
|
+
declare function getApiKey(provider: string): string | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* Get agent configuration
|
|
265
|
+
*/
|
|
266
|
+
declare function getAgentConfig(agentType: AgentType): AgentModelConfig;
|
|
267
|
+
/**
|
|
268
|
+
* Save configuration to global config file
|
|
269
|
+
*/
|
|
270
|
+
declare function saveConfig(): Promise<void>;
|
|
252
271
|
|
|
253
272
|
/**
|
|
254
273
|
* Debug logging module
|
|
@@ -271,6 +290,11 @@ declare function debug(category: string, message: string, data?: unknown): void;
|
|
|
271
290
|
* All log output is single-line with timestamp prefix
|
|
272
291
|
* Supports XML-style color tags: <red>text</red>, <bold>text</bold>, etc.
|
|
273
292
|
*/
|
|
293
|
+
/**
|
|
294
|
+
* Print output without timestamp (for prompts and simple messages)
|
|
295
|
+
* @param message Message string with optional XML color tags
|
|
296
|
+
*/
|
|
297
|
+
declare function print(message: string): void;
|
|
274
298
|
/**
|
|
275
299
|
* Log output with timestamp and XML color tag support
|
|
276
300
|
* @param message Message string with optional XML color tags
|
|
@@ -404,4 +428,4 @@ interface Model {
|
|
|
404
428
|
readonly capabilities: ModelCapabilities;
|
|
405
429
|
}
|
|
406
430
|
|
|
407
|
-
export { AIMsg, Adapter, type AdapterResponse, Agent, type AgentResponse, type ColorName, HAS_MANUAL, MAX_COMPLETION_TOKENS, MODELS, type Model, type ModelCapabilities, type ModelProvider, Msg, MsgType, OpenAIAdapter, PROCEDURES, type ReasoningEffort$1 as ReasoningEffort, SystemMsg, TEMPERATURE, TOOLS, Tool, type ToolCall, ToolCallMsg, type ToolResult, ToolResultMsg, UserMsg, adapter, colors,
|
|
431
|
+
export { AIMsg, Adapter, type AdapterResponse, Agent, type AgentModelConfig, type AgentResponse, type AgentType, type ColorName, type GlobalConfig, HAS_MANUAL, MAX_COMPLETION_TOKENS, MODELS, type Model, type ModelCapabilities, type ModelProvider, Msg, MsgType, OS, type OS_TYPE, OpenAIAdapter, PATHS, PROCEDURES, type ReasoningEffort$1 as ReasoningEffort, SystemMsg, TEMPERATURE, TOOLS, Tool, type ToolCall, ToolCallMsg, type ToolResult, ToolResultMsg, UserMsg, adapter, colors, convertColorTags, createColorConverter, debug, error, getAgentConfig, getApiKey, getConfig, info, init, initAdapter, isDebugMode, log, print, saveConfig, setDebugMode, setWorkingDir, success, warn, workingDir };
|