tibiaway-ai 1.0.3 → 1.0.5
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/commands/sync.md +31 -0
- package/package.json +1 -1
- package/src/installer.js +10 -0
package/commands/sync.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Sync character profile from tibiadata.com — refresh the agent's context with updated level, vocation, and guild data
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Refresh the character profile. Follow these steps:
|
|
6
|
+
|
|
7
|
+
1. **Try to read `~/.tibiaway/config.json`** using available file tools.
|
|
8
|
+
|
|
9
|
+
2. **If the file exists:**
|
|
10
|
+
- Extract `character.name`, `character.vocation`, `character.level`, `character.world`, `character.guild`, `last_sync`
|
|
11
|
+
- Update your context with the new data for the rest of this conversation
|
|
12
|
+
- Respond confirming the updated profile, for example:
|
|
13
|
+
> "✓ Perfil actualizado: **[nombre]** | Level **[X]** | [vocación] | [world]
|
|
14
|
+
> Última sincronización: [fecha]"
|
|
15
|
+
|
|
16
|
+
3. **If the file does not exist or is unreadable:**
|
|
17
|
+
- Tell the user to run this in their terminal:
|
|
18
|
+
```
|
|
19
|
+
tibiaway sync
|
|
20
|
+
```
|
|
21
|
+
- Or if they don't have the CLI installed:
|
|
22
|
+
```
|
|
23
|
+
npx tibiaway-ai setup
|
|
24
|
+
```
|
|
25
|
+
- Then ask them to paste their updated character data directly and update the context manually.
|
|
26
|
+
|
|
27
|
+
4. **If the user pastes data manually** (name, level, vocation, world):
|
|
28
|
+
- Accept any format ("soy ed 250 antica", "Nombre: X, Level: Y", etc.)
|
|
29
|
+
- Update context and confirm.
|
|
30
|
+
|
|
31
|
+
Respond in Spanish.
|
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -4,6 +4,7 @@ import fetch from 'node-fetch';
|
|
|
4
4
|
import { showBanner, success, error, info, highlight, separator, warn } from './utils/banner.js';
|
|
5
5
|
import { setupCharacter } from './utils/character.js';
|
|
6
6
|
import { setApiKey, getApiKey, setOllamaConfig, getOllamaConfig, getProvider, writeConfig, readConfig } from './utils/config.js';
|
|
7
|
+
import { handleSetupOpencode } from './commands/setup-opencode.js';
|
|
7
8
|
|
|
8
9
|
const OLLAMA_MODELS = [
|
|
9
10
|
{ name: 'llama3.2 (Recomendado · 3 GB · rápido y equilibrado)', value: 'llama3.2' },
|
|
@@ -167,6 +168,10 @@ export async function runInstaller() {
|
|
|
167
168
|
name: `${chalk.hex('#4ade80').bold('Ollama (local)')} ${chalk.hex('#888')('· Completamente gratis · Corre en tu PC · Sin internet')}`,
|
|
168
169
|
value: 'ollama',
|
|
169
170
|
},
|
|
171
|
+
{
|
|
172
|
+
name: `${chalk.hex('#60a5fa').bold('Plugin de OpenCode')} ${chalk.hex('#888')('· Sin API key · Usa el modelo de OpenCode · Un comando')}`,
|
|
173
|
+
value: 'opencode',
|
|
174
|
+
},
|
|
170
175
|
],
|
|
171
176
|
},
|
|
172
177
|
]);
|
|
@@ -174,6 +179,11 @@ export async function runInstaller() {
|
|
|
174
179
|
console.log('');
|
|
175
180
|
separator();
|
|
176
181
|
|
|
182
|
+
if (provider === 'opencode') {
|
|
183
|
+
await handleSetupOpencode();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
177
187
|
if (provider === 'anthropic') {
|
|
178
188
|
await setupAnthropic(getApiKey());
|
|
179
189
|
} else {
|