Accept Scattermind private reading envelopes

This commit is contained in:
OpenClaw Bot
2026-05-27 19:57:34 +02:00
parent 85e2a83d3b
commit 9c35af237f
3 changed files with 51 additions and 4 deletions
+39
View File
@@ -960,6 +960,45 @@ try {
assert.ok(scattermindPaidShape.ranked.find(item => item.id === 'build-order-4').metrics.nonGoalConflicts.length >= 1);
assert.deepEqual(scattermindPaidShape.handoff.warnings, []);
const privateReadingEnvelopeResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
ok: true,
referenceCode: 'SM-PRIVATE1',
initialPrompt: 'I need to know what to build after Scattermind clarified my local workshop idea.',
reading: {
working_name: 'Local Workshop Starter',
opening_reflection: 'The paid Concept Map says to prove one tiny workshop manually before building signup machinery.',
lenses: {
risk: { title: 'What Can Mislead You', content: 'Avoid accounts, saved calendars, and payment dashboards until one workshop has real interest.' },
question: { title: 'Proof Steps', content: 'Proof steps: Ask five local makers if they would attend the first workshop. Run a manual invite and record yes/no replies.' },
channel: { title: 'Build Order', content: 'Build first: Manual workshop invite - ask five real makers before building signup UI. Test manually: One-page workshop promise - collect replies. Defer: Polished calendar after one committed group. Probably noise: Account dashboard with saved calendars and subscriptions.' },
},
questions_to_sit_with: ['Will five real makers commit to the first session?'],
closing_note: 'In the next 48 hours, send the manual workshop invite to five named makers.',
reference_code: 'SM-PRIVATE1',
},
glimpse: {
working_name: 'Local Workshop Starter Snapshot',
restated_idea: 'A local workshop idea that needs proof before software.',
questions_to_sit_with: ['Who would attend first?'],
},
}),
});
assert.equal(privateReadingEnvelopeResponse.status, 200);
const privateReadingEnvelope = await privateReadingEnvelopeResponse.json();
assert.equal(privateReadingEnvelope.input.provenance.artifactId, 'SM-PRIVATE1');
assert.equal(privateReadingEnvelope.input.provenance.snapshotTitle, 'Local Workshop Starter');
assert.match(privateReadingEnvelope.input.provenance.originalPrompt, /Scattermind clarified/);
assert.equal(privateReadingEnvelope.input.optionCount, 6);
assert.equal(privateReadingEnvelope.ranked[0].id, 'build-order-1');
assert.equal(privateReadingEnvelope.ranked[0].provenance.sourceSection, 'concept-map.lenses.channel');
assert.equal(privateReadingEnvelope.ranked.find(item => item.id === 'proof-step-1').lane.id, 'test');
assert.equal(privateReadingEnvelope.ranked.find(item => item.id === 'build-order-4').lane.id, 'park');
assert.ok(privateReadingEnvelope.input.decisionContext.nonGoals.includes('Avoid accounts, saved calendars, and payment dashboards until one workshop has real interest'));
assert.deepEqual(privateReadingEnvelope.handoff.warnings, []);
const softLabelLensResponse = await fetch(`${base}/api/rank-feedback`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },