|
75 | 75 | const results = messages.slice(request + 1).filter(message => message.role === 'tool') |
76 | 76 | if (results.length >= steps.length) return { text: 'CI-TEAM-CREATED' } |
77 | 77 | const [name, args] = steps[results.length] |
78 | | - const available = new Set((body.tools ?? []).map(tool => tool.function?.name)) |
| 78 | + const available = new Set((body.tools ?? []).map(tool => tool.function?.name).filter(Boolean)) |
79 | 79 | if (available.has(name)) return { call: { name, arguments: JSON.stringify(args) }, step: results.length } |
80 | 80 | if (available.has('run_code')) { |
81 | 81 | return { call: { name: 'run_code', arguments: JSON.stringify({ |
82 | 82 | description: 'Create the fixture team', |
83 | 83 | code: `return await tools.${name}(${JSON.stringify(args)})`, |
84 | 84 | }) }, step: results.length } |
85 | 85 | } |
86 | | - return { text: 'CI-TEAM-TOOL-MISSING: ' + name } |
| 86 | + const guidance = messages.some(message => message.role === 'system' && |
| 87 | + JSON.stringify(message.content).includes('## FlyBot personal workspace')) |
| 88 | + return { text: `CI-TEAM-TOOL-MISSING: ${name} (guide=${guidance}, tools=${[...available].sort().join(',')})` } |
87 | 89 | } |
88 | 90 |
|
89 | 91 | require('node:http').createServer((req, res) => { |
@@ -177,8 +179,10 @@ def start_bot_social(tmp, network, subnet, run, started): |
177 | 179 | host, app = f'ot-gw-{run}-social', f'ot-gw-{run}-social-app' |
178 | 180 | origin = f'https://{host}' |
179 | 181 | ca, key, cert = make_tls(tmp, host) |
180 | | - image = 'flybot-workspace-bot-social:ci-gateway' |
181 | | - docker('build', '-q', '-t', image, str(ROOT / 'services' / 'bot-social'), timeout=900) |
| 182 | + image = os.environ.get('FLYBOT_WORKSPACE_GATEWAY_BOT_SOCIAL_IMAGE') |
| 183 | + if not image: |
| 184 | + image = 'flybot-workspace-bot-social:ci-gateway' |
| 185 | + docker('build', '-q', '-t', image, str(ROOT / 'services' / 'bot-social'), timeout=900) |
182 | 186 | docker('run', '--detach', '--name', app, '--network', network, '--tmpfs', '/data', |
183 | 187 | '-e', f'PUBLIC_BASE_URL={origin}', '-e', f'TRUST_PROXY={subnet}', image) |
184 | 188 | started.append(app) |
|
0 commit comments