@syntero/orca-cli 1.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/README.md +122 -0
- package/dist/assistant.d.ts +31 -0
- package/dist/assistant.d.ts.map +1 -0
- package/dist/assistant.js +280 -0
- package/dist/assistant.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +310 -0
- package/dist/index.js.map +1 -0
- package/dist/providers.d.ts +26 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +283 -0
- package/dist/providers.js.map +1 -0
- package/dist/settings.d.ts +41 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +132 -0
- package/dist/settings.js.map +1 -0
- package/dist/tools.d.ts +332 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +359 -0
- package/dist/tools.js.map +1 -0
- package/dist/utils.d.ts +40 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +178 -0
- package/dist/utils.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const SETTINGS_FILE: string;
|
|
2
|
+
export declare function getDeploymentDir(): string;
|
|
3
|
+
export declare enum Provider {
|
|
4
|
+
ANTHROPIC = "anthropic",
|
|
5
|
+
OPENAI = "openai",
|
|
6
|
+
AZURE = "azure"
|
|
7
|
+
}
|
|
8
|
+
export declare const KNOWN_MODELS: Record<string, Array<[string, string]>>;
|
|
9
|
+
export interface AnthropicConfig {
|
|
10
|
+
api_key: string;
|
|
11
|
+
model: string;
|
|
12
|
+
}
|
|
13
|
+
export interface OpenAIConfig {
|
|
14
|
+
api_key: string;
|
|
15
|
+
model: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AzureConfig {
|
|
18
|
+
endpoint: string;
|
|
19
|
+
api_key: string;
|
|
20
|
+
api_version: string;
|
|
21
|
+
deployment: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SettingsData {
|
|
24
|
+
provider: string;
|
|
25
|
+
anthropic: AnthropicConfig;
|
|
26
|
+
openai: OpenAIConfig;
|
|
27
|
+
azure: AzureConfig;
|
|
28
|
+
}
|
|
29
|
+
export declare class Settings implements SettingsData {
|
|
30
|
+
provider: string;
|
|
31
|
+
anthropic: AnthropicConfig;
|
|
32
|
+
openai: OpenAIConfig;
|
|
33
|
+
azure: AzureConfig;
|
|
34
|
+
toDict(): SettingsData;
|
|
35
|
+
static fromDict(data: Partial<SettingsData>): Settings;
|
|
36
|
+
isConfigured(): boolean;
|
|
37
|
+
getMaskedDisplay(): string;
|
|
38
|
+
}
|
|
39
|
+
export declare function loadSettings(): Settings;
|
|
40
|
+
export declare function saveSettings(settings: Settings): void;
|
|
41
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,QAA0D,CAAC;AAErF,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,oBAAY,QAAQ;IAClB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAGD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAahE,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,qBAAa,QAAS,YAAW,YAAY;IAC3C,QAAQ,EAAE,MAAM,CAAsB;IACtC,SAAS,EAAE,eAAe,CAGxB;IACF,MAAM,EAAE,YAAY,CAGlB;IACF,KAAK,EAAE,WAAW,CAKhB;IAEF,MAAM,IAAI,YAAY;IAStB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,QAAQ;IAiBtD,YAAY,IAAI,OAAO;IAWvB,gBAAgB,IAAI,MAAM;CAwB3B;AAED,wBAAgB,YAAY,IAAI,QAAQ,CAUvC;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAQrD"}
|
package/dist/settings.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { Colors, color, maskSecret } from './utils.js';
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
// Settings file location - in the deployment directory
|
|
8
|
+
const DEPLOYMENT_DIR = process.env.DEPLOYMENT_DIR || path.resolve(__dirname, '..', '..');
|
|
9
|
+
export const SETTINGS_FILE = path.join(DEPLOYMENT_DIR, '.deployment_assistant.json');
|
|
10
|
+
export function getDeploymentDir() {
|
|
11
|
+
return process.env.DEPLOYMENT_DIR || path.resolve(__dirname, '..', '..');
|
|
12
|
+
}
|
|
13
|
+
export var Provider;
|
|
14
|
+
(function (Provider) {
|
|
15
|
+
Provider["ANTHROPIC"] = "anthropic";
|
|
16
|
+
Provider["OPENAI"] = "openai";
|
|
17
|
+
Provider["AZURE"] = "azure";
|
|
18
|
+
})(Provider || (Provider = {}));
|
|
19
|
+
// Known models per provider
|
|
20
|
+
export const KNOWN_MODELS = {
|
|
21
|
+
anthropic: [
|
|
22
|
+
['claude-opus-4-5', 'Claude Opus 4.5 - Most capable, advanced reasoning'],
|
|
23
|
+
['claude-sonnet-4-20250514', 'Claude Sonnet 4 - Balanced performance'],
|
|
24
|
+
['claude-haiku-4-5-20251001', 'Claude Haiku 4.5 - Fast and efficient'],
|
|
25
|
+
],
|
|
26
|
+
openai: [
|
|
27
|
+
['gpt-5.2', 'GPT-5.2 - Most capable OpenAI model'],
|
|
28
|
+
['gpt-5-mini', 'GPT-5 Mini - Fast and efficient'],
|
|
29
|
+
['gpt-4o', 'GPT-4o - Previous generation flagship'],
|
|
30
|
+
['gpt-4o-mini', 'GPT-4o Mini - Cost-effective'],
|
|
31
|
+
],
|
|
32
|
+
azure: [], // Azure uses deployment names, not model IDs
|
|
33
|
+
};
|
|
34
|
+
export class Settings {
|
|
35
|
+
provider = Provider.ANTHROPIC;
|
|
36
|
+
anthropic = {
|
|
37
|
+
api_key: '',
|
|
38
|
+
model: 'claude-sonnet-4-20250514',
|
|
39
|
+
};
|
|
40
|
+
openai = {
|
|
41
|
+
api_key: '',
|
|
42
|
+
model: 'gpt-4o',
|
|
43
|
+
};
|
|
44
|
+
azure = {
|
|
45
|
+
endpoint: '',
|
|
46
|
+
api_key: '',
|
|
47
|
+
api_version: '2024-10-21',
|
|
48
|
+
deployment: '',
|
|
49
|
+
};
|
|
50
|
+
toDict() {
|
|
51
|
+
return {
|
|
52
|
+
provider: this.provider,
|
|
53
|
+
anthropic: { ...this.anthropic },
|
|
54
|
+
openai: { ...this.openai },
|
|
55
|
+
azure: { ...this.azure },
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static fromDict(data) {
|
|
59
|
+
const settings = new Settings();
|
|
60
|
+
if (data.provider) {
|
|
61
|
+
settings.provider = data.provider;
|
|
62
|
+
}
|
|
63
|
+
if (data.anthropic) {
|
|
64
|
+
settings.anthropic = { ...settings.anthropic, ...data.anthropic };
|
|
65
|
+
}
|
|
66
|
+
if (data.openai) {
|
|
67
|
+
settings.openai = { ...settings.openai, ...data.openai };
|
|
68
|
+
}
|
|
69
|
+
if (data.azure) {
|
|
70
|
+
settings.azure = { ...settings.azure, ...data.azure };
|
|
71
|
+
}
|
|
72
|
+
return settings;
|
|
73
|
+
}
|
|
74
|
+
isConfigured() {
|
|
75
|
+
if (this.provider === Provider.ANTHROPIC) {
|
|
76
|
+
return Boolean(this.anthropic.api_key);
|
|
77
|
+
}
|
|
78
|
+
else if (this.provider === Provider.OPENAI) {
|
|
79
|
+
return Boolean(this.openai.api_key);
|
|
80
|
+
}
|
|
81
|
+
else if (this.provider === Provider.AZURE) {
|
|
82
|
+
return Boolean(this.azure.api_key && this.azure.endpoint && this.azure.deployment);
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
getMaskedDisplay() {
|
|
87
|
+
const active = (provider) => {
|
|
88
|
+
return this.provider === provider ? color(' (active)', Colors.green) : '';
|
|
89
|
+
};
|
|
90
|
+
const lines = [
|
|
91
|
+
`Current Provider: ${color(this.provider, Colors.cyan)}`,
|
|
92
|
+
'',
|
|
93
|
+
`Anthropic${active('anthropic')}:`,
|
|
94
|
+
` API Key: ${maskSecret(this.anthropic.api_key)}`,
|
|
95
|
+
` Model: ${this.anthropic.model}`,
|
|
96
|
+
'',
|
|
97
|
+
`OpenAI${active('openai')}:`,
|
|
98
|
+
` API Key: ${maskSecret(this.openai.api_key)}`,
|
|
99
|
+
` Model: ${this.openai.model}`,
|
|
100
|
+
'',
|
|
101
|
+
`Azure${active('azure')}:`,
|
|
102
|
+
` Endpoint: ${this.azure.endpoint || '(not set)'}`,
|
|
103
|
+
` API Key: ${maskSecret(this.azure.api_key)}`,
|
|
104
|
+
` API Version: ${this.azure.api_version}`,
|
|
105
|
+
` Deployment: ${this.azure.deployment || '(not set)'}`,
|
|
106
|
+
];
|
|
107
|
+
return lines.join('\n');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export function loadSettings() {
|
|
111
|
+
if (fs.existsSync(SETTINGS_FILE)) {
|
|
112
|
+
try {
|
|
113
|
+
const data = JSON.parse(fs.readFileSync(SETTINGS_FILE, 'utf-8'));
|
|
114
|
+
return Settings.fromDict(data);
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
console.log(color(`Warning: Could not load settings: ${e}`, Colors.yellow));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return new Settings();
|
|
121
|
+
}
|
|
122
|
+
export function saveSettings(settings) {
|
|
123
|
+
fs.writeFileSync(SETTINGS_FILE, JSON.stringify(settings.toDict(), null, 2));
|
|
124
|
+
// Set restrictive permissions (owner read/write only)
|
|
125
|
+
try {
|
|
126
|
+
fs.chmodSync(SETTINGS_FILE, 0o600);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// Ignore chmod errors on Windows
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,uDAAuD;AACvD,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC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,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,UAAU,YAAY;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;YACjE,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,qCAAqC,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC;IACD,OAAO,IAAI,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAkB;IAC7C,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5E,sDAAsD;IACtD,IAAI,CAAC;QACH,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,iCAAiC;IACnC,CAAC;AACH,CAAC"}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
export declare const TOOLS_ANTHROPIC: ({
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
input_schema: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
command: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
path?: undefined;
|
|
12
|
+
tail?: undefined;
|
|
13
|
+
show_all?: undefined;
|
|
14
|
+
query?: undefined;
|
|
15
|
+
container?: undefined;
|
|
16
|
+
pattern?: undefined;
|
|
17
|
+
case_insensitive?: undefined;
|
|
18
|
+
context_lines?: undefined;
|
|
19
|
+
};
|
|
20
|
+
required: string[];
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
input_schema: {
|
|
26
|
+
type: string;
|
|
27
|
+
properties: {
|
|
28
|
+
path: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
tail: {
|
|
33
|
+
type: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
command?: undefined;
|
|
37
|
+
show_all?: undefined;
|
|
38
|
+
query?: undefined;
|
|
39
|
+
container?: undefined;
|
|
40
|
+
pattern?: undefined;
|
|
41
|
+
case_insensitive?: undefined;
|
|
42
|
+
context_lines?: undefined;
|
|
43
|
+
};
|
|
44
|
+
required: string[];
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
input_schema: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
path: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
command?: undefined;
|
|
57
|
+
tail?: undefined;
|
|
58
|
+
show_all?: undefined;
|
|
59
|
+
query?: undefined;
|
|
60
|
+
container?: undefined;
|
|
61
|
+
pattern?: undefined;
|
|
62
|
+
case_insensitive?: undefined;
|
|
63
|
+
context_lines?: undefined;
|
|
64
|
+
};
|
|
65
|
+
required: string[];
|
|
66
|
+
};
|
|
67
|
+
} | {
|
|
68
|
+
name: string;
|
|
69
|
+
description: string;
|
|
70
|
+
input_schema: {
|
|
71
|
+
type: string;
|
|
72
|
+
properties: {
|
|
73
|
+
show_all: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
command?: undefined;
|
|
78
|
+
path?: undefined;
|
|
79
|
+
tail?: undefined;
|
|
80
|
+
query?: undefined;
|
|
81
|
+
container?: undefined;
|
|
82
|
+
pattern?: undefined;
|
|
83
|
+
case_insensitive?: undefined;
|
|
84
|
+
context_lines?: undefined;
|
|
85
|
+
};
|
|
86
|
+
required?: undefined;
|
|
87
|
+
};
|
|
88
|
+
} | {
|
|
89
|
+
name: string;
|
|
90
|
+
description: string;
|
|
91
|
+
input_schema: {
|
|
92
|
+
type: string;
|
|
93
|
+
properties: {
|
|
94
|
+
query: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
command?: undefined;
|
|
99
|
+
path?: undefined;
|
|
100
|
+
tail?: undefined;
|
|
101
|
+
show_all?: undefined;
|
|
102
|
+
container?: undefined;
|
|
103
|
+
pattern?: undefined;
|
|
104
|
+
case_insensitive?: undefined;
|
|
105
|
+
context_lines?: undefined;
|
|
106
|
+
};
|
|
107
|
+
required: string[];
|
|
108
|
+
};
|
|
109
|
+
} | {
|
|
110
|
+
name: string;
|
|
111
|
+
description: string;
|
|
112
|
+
input_schema: {
|
|
113
|
+
type: string;
|
|
114
|
+
properties: {
|
|
115
|
+
container: {
|
|
116
|
+
type: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
pattern: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
case_insensitive: {
|
|
124
|
+
type: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
context_lines: {
|
|
128
|
+
type: string;
|
|
129
|
+
description: string;
|
|
130
|
+
};
|
|
131
|
+
command?: undefined;
|
|
132
|
+
path?: undefined;
|
|
133
|
+
tail?: undefined;
|
|
134
|
+
show_all?: undefined;
|
|
135
|
+
query?: undefined;
|
|
136
|
+
};
|
|
137
|
+
required: string[];
|
|
138
|
+
};
|
|
139
|
+
} | {
|
|
140
|
+
name: string;
|
|
141
|
+
description: string;
|
|
142
|
+
input_schema: {
|
|
143
|
+
type: string;
|
|
144
|
+
properties: {
|
|
145
|
+
container: {
|
|
146
|
+
type: string;
|
|
147
|
+
description: string;
|
|
148
|
+
};
|
|
149
|
+
command?: undefined;
|
|
150
|
+
path?: undefined;
|
|
151
|
+
tail?: undefined;
|
|
152
|
+
show_all?: undefined;
|
|
153
|
+
query?: undefined;
|
|
154
|
+
pattern?: undefined;
|
|
155
|
+
case_insensitive?: undefined;
|
|
156
|
+
context_lines?: undefined;
|
|
157
|
+
};
|
|
158
|
+
required?: undefined;
|
|
159
|
+
};
|
|
160
|
+
})[];
|
|
161
|
+
export declare const TOOLS_OPENAI: {
|
|
162
|
+
type: "function";
|
|
163
|
+
function: {
|
|
164
|
+
name: string;
|
|
165
|
+
description: string;
|
|
166
|
+
parameters: {
|
|
167
|
+
type: string;
|
|
168
|
+
properties: {
|
|
169
|
+
command: {
|
|
170
|
+
type: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
path?: undefined;
|
|
174
|
+
tail?: undefined;
|
|
175
|
+
show_all?: undefined;
|
|
176
|
+
query?: undefined;
|
|
177
|
+
container?: undefined;
|
|
178
|
+
pattern?: undefined;
|
|
179
|
+
case_insensitive?: undefined;
|
|
180
|
+
context_lines?: undefined;
|
|
181
|
+
};
|
|
182
|
+
required: string[];
|
|
183
|
+
} | {
|
|
184
|
+
type: string;
|
|
185
|
+
properties: {
|
|
186
|
+
path: {
|
|
187
|
+
type: string;
|
|
188
|
+
description: string;
|
|
189
|
+
};
|
|
190
|
+
tail: {
|
|
191
|
+
type: string;
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
194
|
+
command?: undefined;
|
|
195
|
+
show_all?: undefined;
|
|
196
|
+
query?: undefined;
|
|
197
|
+
container?: undefined;
|
|
198
|
+
pattern?: undefined;
|
|
199
|
+
case_insensitive?: undefined;
|
|
200
|
+
context_lines?: undefined;
|
|
201
|
+
};
|
|
202
|
+
required: string[];
|
|
203
|
+
} | {
|
|
204
|
+
type: string;
|
|
205
|
+
properties: {
|
|
206
|
+
path: {
|
|
207
|
+
type: string;
|
|
208
|
+
description: string;
|
|
209
|
+
};
|
|
210
|
+
command?: undefined;
|
|
211
|
+
tail?: undefined;
|
|
212
|
+
show_all?: undefined;
|
|
213
|
+
query?: undefined;
|
|
214
|
+
container?: undefined;
|
|
215
|
+
pattern?: undefined;
|
|
216
|
+
case_insensitive?: undefined;
|
|
217
|
+
context_lines?: undefined;
|
|
218
|
+
};
|
|
219
|
+
required: string[];
|
|
220
|
+
} | {
|
|
221
|
+
type: string;
|
|
222
|
+
properties: {
|
|
223
|
+
show_all: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
command?: undefined;
|
|
228
|
+
path?: undefined;
|
|
229
|
+
tail?: undefined;
|
|
230
|
+
query?: undefined;
|
|
231
|
+
container?: undefined;
|
|
232
|
+
pattern?: undefined;
|
|
233
|
+
case_insensitive?: undefined;
|
|
234
|
+
context_lines?: undefined;
|
|
235
|
+
};
|
|
236
|
+
required?: undefined;
|
|
237
|
+
} | {
|
|
238
|
+
type: string;
|
|
239
|
+
properties: {
|
|
240
|
+
query: {
|
|
241
|
+
type: string;
|
|
242
|
+
description: string;
|
|
243
|
+
};
|
|
244
|
+
command?: undefined;
|
|
245
|
+
path?: undefined;
|
|
246
|
+
tail?: undefined;
|
|
247
|
+
show_all?: undefined;
|
|
248
|
+
container?: undefined;
|
|
249
|
+
pattern?: undefined;
|
|
250
|
+
case_insensitive?: undefined;
|
|
251
|
+
context_lines?: undefined;
|
|
252
|
+
};
|
|
253
|
+
required: string[];
|
|
254
|
+
} | {
|
|
255
|
+
type: string;
|
|
256
|
+
properties: {
|
|
257
|
+
container: {
|
|
258
|
+
type: string;
|
|
259
|
+
description: string;
|
|
260
|
+
};
|
|
261
|
+
pattern: {
|
|
262
|
+
type: string;
|
|
263
|
+
description: string;
|
|
264
|
+
};
|
|
265
|
+
case_insensitive: {
|
|
266
|
+
type: string;
|
|
267
|
+
description: string;
|
|
268
|
+
};
|
|
269
|
+
context_lines: {
|
|
270
|
+
type: string;
|
|
271
|
+
description: string;
|
|
272
|
+
};
|
|
273
|
+
command?: undefined;
|
|
274
|
+
path?: undefined;
|
|
275
|
+
tail?: undefined;
|
|
276
|
+
show_all?: undefined;
|
|
277
|
+
query?: undefined;
|
|
278
|
+
};
|
|
279
|
+
required: string[];
|
|
280
|
+
} | {
|
|
281
|
+
type: string;
|
|
282
|
+
properties: {
|
|
283
|
+
container: {
|
|
284
|
+
type: string;
|
|
285
|
+
description: string;
|
|
286
|
+
};
|
|
287
|
+
command?: undefined;
|
|
288
|
+
path?: undefined;
|
|
289
|
+
tail?: undefined;
|
|
290
|
+
show_all?: undefined;
|
|
291
|
+
query?: undefined;
|
|
292
|
+
pattern?: undefined;
|
|
293
|
+
case_insensitive?: undefined;
|
|
294
|
+
context_lines?: undefined;
|
|
295
|
+
};
|
|
296
|
+
required?: undefined;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
}[];
|
|
300
|
+
/**
|
|
301
|
+
* Execute a shell command with timeout.
|
|
302
|
+
*/
|
|
303
|
+
export declare function runCommand(command: string, timeout?: number): string;
|
|
304
|
+
/**
|
|
305
|
+
* Read a file's contents.
|
|
306
|
+
*/
|
|
307
|
+
export declare function readFile(filePath: string, tail?: number): string;
|
|
308
|
+
/**
|
|
309
|
+
* List directory contents.
|
|
310
|
+
*/
|
|
311
|
+
export declare function listDirectory(dirPath: string): string;
|
|
312
|
+
/**
|
|
313
|
+
* Inspect .env file with secrets redacted.
|
|
314
|
+
*/
|
|
315
|
+
export declare function inspectEnv(showAll?: boolean): string;
|
|
316
|
+
/**
|
|
317
|
+
* Execute a read-only SQL query.
|
|
318
|
+
*/
|
|
319
|
+
export declare function queryDatabase(query: string): string;
|
|
320
|
+
/**
|
|
321
|
+
* Search container logs for a pattern.
|
|
322
|
+
*/
|
|
323
|
+
export declare function searchLogs(container: string, pattern: string, caseInsensitive?: boolean, contextLines?: number): string;
|
|
324
|
+
/**
|
|
325
|
+
* Check health of Orca containers.
|
|
326
|
+
*/
|
|
327
|
+
export declare function checkContainerHealth(container?: string): string;
|
|
328
|
+
/**
|
|
329
|
+
* Handle a tool call and return the result.
|
|
330
|
+
*/
|
|
331
|
+
export declare function handleToolCall(name: string, inputData: Record<string, unknown>): string;
|
|
332
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyF3B,CAAC;AAGF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOtB,CAAC;AAUJ;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,SAAQ,GAAG,MAAM,CA0CnE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAyBhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQrD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,UAAQ,GAAG,MAAM,CAmClD;AAkCD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgDnD;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SA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