Skip to content

Commit a4d5d13

Browse files
Sync public snapshot from freebuff-private
Source: CodebuffAI/freebuff-private@310de52a660e56dd8a963d25735e16213e17b87b
1 parent 6ad408a commit a4d5d13

3 files changed

Lines changed: 60 additions & 1 deletion

File tree

bun.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/src/constants/freebuff-referral-tiers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
* Each *qualified* referral (referred user's GitHub account is at least
55
* MIN_GITHUB_ACCOUNT_AGE_MONTHS old at signup) raises the referrer's tier.
66
* Tiers scale the daily model usage limits and unlock perks (deploy
7-
* watermark removal). All tunable numbers live in this file.
7+
* watermark removal). In full/allowed regions both standard and premium
8+
* limits apply; in limited regions, users can still unlock tiers but only the
9+
* standard/free-model limit applies because premium models remain geo-gated.
10+
* All tunable numbers live in this file.
811
*/
912

1013
/** Referred users must have a GitHub account at least this old for the

packages/agent-runtime/src/__tests__/gravity-index-tool.test.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,60 @@ describe('gravity_index tool', () => {
202202
)
203203
})
204204

205+
test('does not special-case base2-free traffic as web surface', async () => {
206+
const spy = spyOn(webApi, 'callGravityIndexAPI').mockResolvedValue({
207+
result: { search_id: 'search-1' },
208+
})
209+
210+
mockAgentStream([
211+
createToolCallChunk('gravity_index', {
212+
action: 'search',
213+
query: 'transactional email for Next.js',
214+
}),
215+
createToolCallChunk('end_turn', {}),
216+
])
217+
218+
const fileContext = {
219+
...mockFileContext,
220+
agentTemplates: {
221+
'base2-free-deepseek': {
222+
...gravityTestAgent,
223+
id: 'base2-free-deepseek',
224+
displayName: 'Buffy the DeepSeek Free Orchestrator',
225+
},
226+
},
227+
}
228+
const sessionState = getInitialSessionState(fileContext)
229+
const agentState = {
230+
...sessionState.mainAgentState,
231+
agentType: 'base2-free-deepseek',
232+
}
233+
const { agentTemplates } = assembleLocalAgentTemplates({
234+
...agentRuntimeImpl,
235+
fileContext,
236+
})
237+
238+
await runAgentStep({
239+
...runAgentStepBaseParams,
240+
agentType: 'base2-free-deepseek',
241+
fileContext,
242+
localAgentTemplates: agentTemplates,
243+
agentTemplate: agentTemplates['base2-free-deepseek'],
244+
agentState,
245+
prompt: 'Find an email provider',
246+
})
247+
248+
expect(spy).toHaveBeenCalledWith(
249+
expect.objectContaining({
250+
input: expect.objectContaining({
251+
metadata: expect.objectContaining({
252+
surface: 'codebuff_cli',
253+
}),
254+
}),
255+
}),
256+
)
257+
})
258+
205259
test('stores recommendation and setup URL in tool output', async () => {
206260
spyOn(webApi, 'callGravityIndexAPI').mockResolvedValue({
207261
result: {

0 commit comments

Comments
 (0)