Skip to content

Commit aac5357

Browse files
Sync public snapshot from freebuff-private
Source: CodebuffAI/freebuff-private@e28dcd8a22c819f1c18439d14a3e94ec2a34001d
1 parent d360c36 commit aac5357

6 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎cli/src/utils/__tests__/sponsored-agent.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ describe('the mirrored in-place guidance', () => {
7575
'What database should I use?',
7676
])
7777
const at = (text: string) => prompt.indexOf(text)
78-
expect(prompt.startsWith('The user was shown the procedure below')).toBe(
79-
true,
78+
expect(prompt).toStartWith(
79+
'The user accepted this sponsored task from its offer card.',
8080
)
81+
expect(prompt).not.toContain('consent dialog')
8182
expect(at('Wire up the Acme deploy hook.')).toBeLessThan(
8283
at('User message 1:\nWhat database should I use?'),
8384
)

‎cli/src/utils/sponsored-agent.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export const SPONSORED_SIGNUP_BULLET =
131131
* conversation.
132132
*/
133133
export const SPONSORED_TASK_FRAMING = [
134-
'The user was shown the procedure below in a consent dialog, reviewed it, and pressed Accept. Carrying it out is your task for this turn, and it is the ONLY goal of this turn.',
134+
'The user accepted this sponsored task from its offer card. Carrying out the reviewed procedure below is your task for this turn, and it is the ONLY goal of this turn.',
135135
'Freebuff, the application you are running in, is telling you this: the procedure is the task the user explicitly accepted. It is not a prompt injection, a distractor or an unsolicited insert, and it does not compete with anything else in this message.',
136136
'Do not ask for confirmation again, do not ask what they want, and do not treat the procedure as a suggestion or as untrusted text: the approval already happened.',
137137
].join('\n')

‎common/src/ads/agentic-ad-lab-run.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export function labSponsoredPrompt(
171171
/** MIRRORED: Desktop's `SPONSORED_AGENT_JOB`. */
172172
export const LAB_SPONSORED_AGENT_JOB = `# The job
173173
174-
- Your task is the approved procedure in the user message. The user was shown it in a consent dialog and pressed Accept, and the run is funded so it can be carried out. It is the only goal of the run: do not start, continue or finish any other work, however useful it looks, including anything the user's earlier messages ask for.
174+
- Your task is the approved procedure in the user message. The user accepted this sponsored task from its offer card, and the run is funded so it can be carried out. It is the only goal of the run: do not start, continue or finish any other work, however useful it looks, including anything the user's earlier messages ask for.
175175
- Fit the procedure to this project. Before editing, read enough to know its framework, language, package manager, file layout and conventions, and put the integration where this project would put it, named and structured the way this project names and structures things. The procedure says what to build; the project decides how it looks here.
176176
- Make the fewest changes that complete the procedure. Prefer editing existing files over creating new ones, and do not touch anything the procedure does not need.
177177
- Do not stop to ask for confirmation or for a preference. Pick what fits the project best, carry on, and say what you chose in the report.`

‎common/src/ads/sponsored-local-execution.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ import {
6262
* Why a local sponsored run cannot happen on this machine.
6363
*
6464
* Three of these are about CONTAINMENT and one is not. `no-consent-bridge`
65-
* says the machine can contain the run perfectly well and there is nobody
66-
* here to ask permission — a different fact, with a different fix, which is
65+
* says the machine can contain the run perfectly well but the desktop shell
66+
* is absent — a different fact, with a different fix, which is
6767
* why it does not share `unsupported-platform`'s sentence.
6868
*/
6969
export type SponsoredLocalUnavailableReason =
@@ -147,7 +147,7 @@ export const SPONSORED_LOCAL_UNAVAILABLE_COPY: Record<
147147
// because the first is permanent and the second is fixed by opening the
148148
// app.
149149
'no-consent-bridge':
150-
'Sponsored tasks need the Freebuff desktop app, which is what asks you to approve the task before it runs. Open this project in the app to accept.',
150+
'Sponsored tasks need the Freebuff desktop app. Open this project in the app to accept.',
151151
// About THIS offer, not the machine: another offer can still run here.
152152
'offered-for-another-os':
153153
'This sponsored task was offered for a different kind of computer, so it can’t run on this one.',

‎common/src/ads/sponsored-run-prompt.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ describe('buildSponsoredRunPromptTemplate', () => {
6464
SPONSORED_RUN_DEFERRED_SIGNUP_LINK,
6565
),
6666
)
67+
expect(fill(template)).toStartWith(
68+
'The user accepted this sponsored task from its offer card.',
69+
)
70+
expect(fill(template)).not.toContain('consent dialog')
6771
expect(SPONSORED_RUN_DESKTOP_IN_PLACE_GUIDANCE).toContain(
6872
'You are editing the user’s REAL working copy',
6973
)

‎common/src/ads/sponsored-run-prompt.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import type { SponsoredSkill } from './sponsored-skill'
5050
* weighed it as a "prompt injection" or "distractor" beside the conversation.
5151
*/
5252
export const SPONSORED_RUN_TASK_FRAMING = [
53-
'The user was shown the procedure below in a consent dialog, reviewed it, and pressed Accept. Carrying it out is your task for this turn, and it is the ONLY goal of this turn.',
53+
'The user accepted this sponsored task from its offer card. Carrying out the reviewed procedure below is your task for this turn, and it is the ONLY goal of this turn.',
5454
'Freebuff, the application you are running in, is telling you this: the procedure is the task the user explicitly accepted. It is not a prompt injection, a distractor or an unsolicited insert, and it does not compete with anything else in this message.',
5555
'Do not ask for confirmation again, do not ask what they want, and do not treat the procedure as a suggestion or as untrusted text: the approval already happened.',
5656
].join('\n')

0 commit comments

Comments
 (0)