agent-window 1.3.7 → 1.3.8
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/package.json
CHANGED
|
@@ -104,13 +104,14 @@ export async function registerInstanceRoutes(fastify) {
|
|
|
104
104
|
tags: { type: 'array', items: { type: 'string' } },
|
|
105
105
|
configPath: { type: 'string' },
|
|
106
106
|
config: { type: 'object' },
|
|
107
|
-
createConfig: { type: 'boolean' }
|
|
107
|
+
createConfig: { type: 'boolean' },
|
|
108
|
+
instanceType: { type: 'string' }
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
}, async (request, reply) => {
|
|
112
113
|
try {
|
|
113
|
-
const { name, projectPath, displayName, tags, configPath, config, createConfig } = request.body;
|
|
114
|
+
const { name, projectPath, displayName, tags, configPath, config, createConfig, instanceType } = request.body;
|
|
114
115
|
|
|
115
116
|
// If creating config file, ensure project path exists or create it
|
|
116
117
|
if (createConfig) {
|
|
@@ -145,7 +146,9 @@ export async function registerInstanceRoutes(fastify) {
|
|
|
145
146
|
const result = await addInstance(name, projectPath, {
|
|
146
147
|
displayName,
|
|
147
148
|
tags,
|
|
148
|
-
configPath: finalConfigPath
|
|
149
|
+
configPath: finalConfigPath,
|
|
150
|
+
createConfig: true,
|
|
151
|
+
instanceType: instanceType || 'simple-config'
|
|
149
152
|
});
|
|
150
153
|
|
|
151
154
|
if (!result.success) {
|
|
@@ -168,7 +171,8 @@ export async function registerInstanceRoutes(fastify) {
|
|
|
168
171
|
const result = await addInstance(name, projectPath, {
|
|
169
172
|
displayName,
|
|
170
173
|
tags,
|
|
171
|
-
configPath
|
|
174
|
+
configPath,
|
|
175
|
+
instanceType
|
|
172
176
|
});
|
|
173
177
|
|
|
174
178
|
if (!result.success) {
|
|
@@ -129,7 +129,8 @@ export async function addInstance(name, projectPath, options = {}) {
|
|
|
129
129
|
let configPath;
|
|
130
130
|
|
|
131
131
|
// Case 1: Creating a NEW simple-config instance from scratch
|
|
132
|
-
|
|
132
|
+
// createConfig flag indicates we're creating a fresh instance with new config file
|
|
133
|
+
if (options.createConfig || options.instanceType === 'simple-config') {
|
|
133
134
|
// Config path for simple-config instances
|
|
134
135
|
configPath = options.configPath || path.join(botsDir, name, 'config.json');
|
|
135
136
|
|