create-heresay 0.2.22 → 0.2.23
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 +1 -1
- package/release/VERSION +1 -1
- package/release/firebase.json +7 -0
- package/release/firestore.indexes.json +6 -0
- package/release/functions/lib/core/chat.js +220 -0
- package/release/functions/lib/core/handler.js +41 -5
- package/release/functions/lib/core/oauth.js +326 -0
- package/release/functions/lib/core/store.js +10 -0
- package/release/functions/lib/core/trail.js +16 -6
- package/release/functions/lib/core/types.js +1 -0
- package/release/functions/lib/core/version.js +1 -1
- package/release/functions/lib/providers/firebase/api.js +3 -3
- package/release/functions/lib/providers/firebase/firestore-store.js +28 -0
- package/release/functions/package.json +1 -1
- package/release/public/app/index.html +1 -0
- package/release/public/dashboard.css +15 -0
- package/release/public/dashboard.js +104 -4
- package/release/public/docs.html +8 -3
- package/release/public/guides/changes.json +1 -1
- package/release/public/guides/customize-apple.md +4 -3
- package/release/public/guides/customize-web.md +5 -3
- package/release/public/guides/index.json +1 -1
- package/release/public/guides/start.md +6 -5
- package/release/public/guides/whats-new.md +40 -18
- package/release/public/sdk.js +139 -23
|
@@ -139,6 +139,8 @@
|
|
|
139
139
|
var email = $('link-email').value.trim();
|
|
140
140
|
if (finishingLink) return finishLink(email);
|
|
141
141
|
gateMsg('Sending…');
|
|
142
|
+
// A chat app sent them here to say yes: come back to that page after the link.
|
|
143
|
+
if (/^#\/authorize\?/.test(location.hash)) localStorage.setItem('heresay.after', JSON.stringify({ hash: location.hash, at: Date.now() }));
|
|
142
144
|
auth.sendSignInLinkToEmail(email, { url: location.origin + '/app/', handleCodeInApp: true })
|
|
143
145
|
.then(function () {
|
|
144
146
|
localStorage.setItem('heresay.email', email);
|
|
@@ -178,6 +180,11 @@
|
|
|
178
180
|
api('GET', '/me').then(function (b) {
|
|
179
181
|
me = b;
|
|
180
182
|
$('who').textContent = b.email;
|
|
183
|
+
try {
|
|
184
|
+
var after = JSON.parse(localStorage.getItem('heresay.after') || 'null');
|
|
185
|
+
localStorage.removeItem('heresay.after');
|
|
186
|
+
if (after && Date.now() - after.at < 15 * 60000 && !location.hash) history.replaceState(null, '', '/app/' + after.hash);
|
|
187
|
+
} catch (e) { /* nothing saved */ }
|
|
181
188
|
route(); // first, so the view is already waiting when the app is shown
|
|
182
189
|
show('app');
|
|
183
190
|
checkForUpdate(b);
|
|
@@ -248,7 +255,7 @@
|
|
|
248
255
|
var query = new URLSearchParams(hash.split('?')[1] || '');
|
|
249
256
|
var parts = hash.split('?')[0].split('/').filter(Boolean);
|
|
250
257
|
document.querySelectorAll('[data-nav]').forEach(function (a) {
|
|
251
|
-
var active = parts[0] === 'team' || parts[0] === 'notifications' ? parts[0] : 'apps';
|
|
258
|
+
var active = parts[0] === 'team' || parts[0] === 'notifications' || parts[0] === 'chat' ? parts[0] : 'apps';
|
|
252
259
|
a.setAttribute('aria-current', String(active === a.dataset.nav));
|
|
253
260
|
});
|
|
254
261
|
var view = $('view');
|
|
@@ -258,6 +265,8 @@
|
|
|
258
265
|
if (parts[0] === 'team') return teamView(view);
|
|
259
266
|
if (parts[0] === 'notifications') return notificationsView(view);
|
|
260
267
|
if (parts[0] === 'connect') return connectView(view, query);
|
|
268
|
+
if (parts[0] === 'chat') return chatView(view);
|
|
269
|
+
if (parts[0] === 'authorize') return authorizeView(view, query);
|
|
261
270
|
if (parts[0] === 'new') return newAppView(view, parts[1], query);
|
|
262
271
|
if (parts[0] === 'apps' && parts[1]) {
|
|
263
272
|
return withProject(parts[1], function (p) {
|
|
@@ -1395,7 +1404,15 @@
|
|
|
1395
1404
|
return el('details', { class: 'trail', open: bad > 0 }, [
|
|
1396
1405
|
el('summary', { text: 'What happened before · ' + t.length + (t.length === 1 ? ' step' : ' steps') +
|
|
1397
1406
|
(bad ? ' · ' + bad + ' went wrong' : '') }),
|
|
1398
|
-
el('ol', {}, t.
|
|
1407
|
+
el('ol', {}, t.reduce(function (out, e, i) {
|
|
1408
|
+
// The run that crashed comes first, timed from when it ended; then this run.
|
|
1409
|
+
var prev = t[i - 1];
|
|
1410
|
+
if (e.run === 'last' && i === 0) out.push(el('li', { class: 'k-run' }, [el('span', { class: 'what', text: 'Last run, before the app closed' })]));
|
|
1411
|
+
if (e.run !== 'last' && prev && prev.run === 'last') out.push(el('li', { class: 'k-run' }, [el('span', { class: 'what', text: 'This run' })]));
|
|
1412
|
+
out.push(e);
|
|
1413
|
+
return out;
|
|
1414
|
+
}, []).map(function (e) {
|
|
1415
|
+
if (e.nodeType) return e;
|
|
1399
1416
|
return el('li', { class: 'k-' + e.kind }, [
|
|
1400
1417
|
el('span', { class: 'ago', text: ago(e.ago) }),
|
|
1401
1418
|
el('span', { class: 'kind', text: TRAIL_LABEL[e.kind] || e.kind }),
|
|
@@ -1551,12 +1568,15 @@
|
|
|
1551
1568
|
el('div', { class: 'meta' }, [
|
|
1552
1569
|
el('span', { class: 'pill ' + r.type, text: TYPE_LABEL[r.type] }),
|
|
1553
1570
|
showPlatform ? el('span', { class: 'pill platform-pill', text: platformOf(p.platform).label }) : null,
|
|
1571
|
+
r.source === 'chat' ? el('span', { class: 'pill chat-pill', text: 'From ' + (r.via || 'a chat app') }) : null,
|
|
1554
1572
|
el('time', { datetime: r.created_at, text: new Date(r.created_at).toLocaleString() }),
|
|
1555
1573
|
status,
|
|
1556
1574
|
]),
|
|
1557
1575
|
el('p', { class: 'text', text: r.text }),
|
|
1558
|
-
el('div', { class: 'ctx', text:
|
|
1559
|
-
|
|
1576
|
+
r.source === 'chat' ? el('div', { class: 'ctx', text: 'From the team: ' + (r.from_member || 'a team member') + ', in a conversation in ' + (r.via || 'a chat app') }) : null,
|
|
1577
|
+
r.details ? el('details', { class: 'chat-details', open: true }, [el('summary', { text: 'From the conversation' }), el('p', { text: r.details })]) : null,
|
|
1578
|
+
r.source === 'chat' ? null : el('div', { class: 'ctx', text: ctxLine(r.context) }),
|
|
1579
|
+
r.source !== 'chat' && deviceLine(r.context) ? el('div', { class: 'ctx', text: deviceLine(r.context) }) : null,
|
|
1560
1580
|
r.context.page_url ? el('div', { class: 'ctx' }, [el('a', { href: r.context.page_url, target: '_blank', rel: 'noopener noreferrer', text: r.context.page_url })]) : null,
|
|
1561
1581
|
reporterLine(r.context, r.reporter),
|
|
1562
1582
|
trailView(r.trail),
|
|
@@ -1965,6 +1985,86 @@
|
|
|
1965
1985
|
]);
|
|
1966
1986
|
}
|
|
1967
1987
|
|
|
1988
|
+
// ---- chat apps -------------------------------------------------------------------------
|
|
1989
|
+
|
|
1990
|
+
/**
|
|
1991
|
+
* ChatGPT and other chat apps: each member connects their own, with their own sign-in. Then
|
|
1992
|
+
* ideas from a conversation arrive in the inbox as from them, with the conversation's context.
|
|
1993
|
+
*/
|
|
1994
|
+
function chatView(view) {
|
|
1995
|
+
var mcpUrl = location.origin + '/v1/mcp';
|
|
1996
|
+
view.appendChild(el('div', { class: 'head' }, [el('h1', { text: 'ChatGPT and other chat apps' })]));
|
|
1997
|
+
view.appendChild(el('p', { class: 'mute', text: 'Send ideas and bugs from a conversation straight to an app’s inbox, with what the conversation worked out. They arrive as from you and wait for someone to accept them, like any report. The chat app can’t read other people’s reports, accept, decline or fix anything.' }));
|
|
1998
|
+
view.appendChild(el('section', { class: 'card' }, [
|
|
1999
|
+
el('h2', { text: 'Add Heresay to ChatGPT' }),
|
|
2000
|
+
el('ol', { class: 'howto' }, [
|
|
2001
|
+
el('li', { html: 'In ChatGPT, open <b>Settings › Apps & Connectors</b>. Under <b>Advanced settings</b>, turn on <b>Developer mode</b>.' }),
|
|
2002
|
+
el('li', { html: 'Choose <b>Create</b>, name it <b>Heresay</b>, and paste this as the <b>MCP server URL</b>. Authentication: <b>OAuth</b>.' }),
|
|
2003
|
+
el('li', {}, [el('div', { class: 'copy-prompt' }, [el('code', { class: 'url', text: mcpUrl }), copyButton(function () { return mcpUrl; }, 'Copy address')])]),
|
|
2004
|
+
el('li', { text: 'ChatGPT opens this dashboard to ask if it may send requests as you. Say yes.' }),
|
|
2005
|
+
el('li', { html: 'In a conversation, say <i>“Send this to Heresay as an idea for Greenroom”</i>, or <i>“What happened to my Heresay requests?”</i>.' }),
|
|
2006
|
+
]),
|
|
2007
|
+
el('p', { class: 'hint', text: 'Claude, Cursor and other apps that take a remote MCP server use the same address.' }),
|
|
2008
|
+
]));
|
|
2009
|
+
var list = el('ul', { class: 'members' }, [loading('li')]);
|
|
2010
|
+
var err = el('p', { class: 'err', role: 'alert' });
|
|
2011
|
+
view.appendChild(el('section', { class: 'card' }, [el('h2', { text: me.role === 'owner' ? 'Connected chat apps' : 'Your connected chat apps' }), list, err]));
|
|
2012
|
+
function draw(cs) {
|
|
2013
|
+
list.textContent = '';
|
|
2014
|
+
if (!cs.length) { list.appendChild(el('li', { class: 'mute', text: 'None yet.' })); return; }
|
|
2015
|
+
cs.forEach(function (c) {
|
|
2016
|
+
list.appendChild(el('li', {}, [
|
|
2017
|
+
el('span', { class: 'avatar', text: (c.client_name || '?').charAt(0).toUpperCase() }),
|
|
2018
|
+
el('div', {}, [el('b', { text: c.client_name + (c.email === me.email ? '' : ' · ' + c.email) }),
|
|
2019
|
+
el('span', { class: 'mute', text: 'Connected ' + new Date(c.created_at).toLocaleDateString() + (c.last_used_at ? ' · last used ' + new Date(c.last_used_at).toLocaleString() : '') })]),
|
|
2020
|
+
el('button', { class: 'btn ghost', type: 'button', text: 'Disconnect', onclick: function () {
|
|
2021
|
+
err.textContent = '';
|
|
2022
|
+
api('DELETE', '/chat-connections/' + c.id).then(load).catch(function (x) { err.textContent = x.message; });
|
|
2023
|
+
} }),
|
|
2024
|
+
]));
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
2027
|
+
function load() { api('GET', '/chat-connections').then(function (b) { draw(b.connections); }); }
|
|
2028
|
+
load();
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/** A chat app sent the person here (OAuth): say what it may do, as whom, and ask. */
|
|
2032
|
+
function authorizeView(view, query) {
|
|
2033
|
+
var ask = {};
|
|
2034
|
+
query.forEach(function (v, k) { ask[k] = v; });
|
|
2035
|
+
var qs = new URLSearchParams(ask).toString();
|
|
2036
|
+
api('GET', '/oauth/ask?' + qs).then(function (b) {
|
|
2037
|
+
view.textContent = '';
|
|
2038
|
+
var err = el('p', { class: 'err', role: 'alert' });
|
|
2039
|
+
var answer = function (allow, btn) {
|
|
2040
|
+
err.textContent = '';
|
|
2041
|
+
busyButton(btn, allow ? 'Connecting…' : 'Cancelling…');
|
|
2042
|
+
api('POST', '/oauth/approve', Object.assign({}, ask, { allow: allow })).then(function (x) { location.href = x.redirect; })
|
|
2043
|
+
.catch(function (x) { err.textContent = x.message; });
|
|
2044
|
+
};
|
|
2045
|
+
view.appendChild(el('section', { class: 'card authorize' }, [
|
|
2046
|
+
el('img', { src: '/mark.svg', alt: '', width: '48', height: '48' }),
|
|
2047
|
+
el('h1', { text: 'Connect ' + b.client_name + ' to Heresay?' }),
|
|
2048
|
+
el('p', { class: 'mute', text: 'As ' + me.email + '. It will be able to:' }),
|
|
2049
|
+
el('ul', { class: 'can' }, [
|
|
2050
|
+
el('li', { text: 'See the names of the apps on this Heresay' }),
|
|
2051
|
+
el('li', { text: 'Send bugs and ideas to them as you, with context from the conversation. They wait for someone to accept them.' }),
|
|
2052
|
+
el('li', { text: 'See what happened to the requests you sent' }),
|
|
2053
|
+
]),
|
|
2054
|
+
el('p', { class: 'mute', text: 'It can’t read anyone else’s reports, or accept, decline or fix anything. You can disconnect it any time under Chat apps.' }),
|
|
2055
|
+
el('div', { class: 'row' }, [
|
|
2056
|
+
el('button', { class: 'btn primary', type: 'button', text: 'Connect', onclick: function (e) { answer(true, e.currentTarget); } }),
|
|
2057
|
+
el('button', { class: 'btn ghost', type: 'button', text: 'Cancel', onclick: function (e) { answer(false, e.currentTarget); } }),
|
|
2058
|
+
]),
|
|
2059
|
+
el('p', { class: 'hint', text: 'You’ll go back to ' + b.redirect_host + '.' }),
|
|
2060
|
+
err,
|
|
2061
|
+
]));
|
|
2062
|
+
}).catch(function (x) {
|
|
2063
|
+
view.textContent = '';
|
|
2064
|
+
view.appendChild(el('section', { class: 'card' }, [el('h1', { text: 'This link doesn’t work' }), el('p', { class: 'mute', text: x.message })]));
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
|
|
1968
2068
|
function teamView(view) {
|
|
1969
2069
|
var owner = me.role === 'owner';
|
|
1970
2070
|
var list = el('ul', { class: 'members' }, [loading('li')]);
|
package/release/public/docs.html
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<tr><td><code>data-preferences</code></td><td><code>show</code> · <code>hide</code></td></tr>
|
|
103
103
|
<tr><td><code>data-trail</code></td><td>on · <code>off</code> · the parts to keep, like <code>pages errors requests</code>. What happened before a report: pages, clicks, failed requests, errors. The reporter sees it and can take it off. Never what anyone typed.</td></tr>
|
|
104
104
|
<tr><td><code>data-heresay-private</code></td><td>on any element of your app: clicks on it are recorded without its text</td></tr>
|
|
105
|
-
<tr><td><code>data-nudge</code></td><td>off · <code>on</code> · the signals to watch, like <code>clicks errors</code>. When
|
|
105
|
+
<tr><td><code>data-nudge</code></td><td>off · <code>on</code> · the signals to watch, like <code>clicks errors</code>. When something failed (a button pressed again and again with nothing happening, an error right after a click, requests failing), a small note by the button asks “Something not working?”. When someone seems unsure (<code>stalled</code>: typing that stopped; <code>circles</code>: the same few pages over and over; <code>refused</code>: a field refused 3 times), it asks “Stuck on something?” and opens as Confusing. Watched on the device, never sent. Once per tab; quiet for 7 days after “Not now”.</td></tr></table>
|
|
106
106
|
<p>Always there, whatever you choose: the Heresay mark on the button, the <b>Your reports</b> tab (people read why a report was declined), and <b>Powered by Heresay</b> in the panel and the introduction, so people can tell your app uses an outside tool. The widget lives in a shadow root, so your CSS can't restyle it.</p>
|
|
107
107
|
|
|
108
108
|
<h2 id="api">JavaScript API</h2>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<tr><td><code>Heresay.open({ type, text })</code></td><td>Open the report form from your own button or menu item. <code>type</code> and <code>text</code> are optional and fill it in, for example from an error screen; the person still reviews and sends it.</td></tr>
|
|
115
115
|
<tr><td><code>Heresay.on("sent", fn)</code></td><td>Calls <code>fn({ id, type })</code> after each report is sent, to thank people or count it in your analytics. Returns a function that stops it.</td></tr>
|
|
116
116
|
<tr><td><code>Heresay.introduce({ title, body })</code></td><td>Once per device, a small bubble over the button says what it's for, so people know it exists. Call it when your main screen is up (after sign-in or onboarding), or add <code>data-intro="auto"</code> to the tag. Later calls do nothing. <code>title</code> and <code>body</code> are optional, to use your own words.</td></tr>
|
|
117
|
-
<tr><td><code>Heresay.nudge()</code></td><td>Your app saw trouble itself, such as an error screen or a retry that failed: a small note by the button offers to report it. Works without <code>data-nudge</code>; the same limits apply. Returns whether it showed.</td></tr>
|
|
117
|
+
<tr><td><code>Heresay.nudge()</code></td><td>Your app saw trouble itself, such as an error screen or a retry that failed: a small note by the button offers to report it. <code>nudge({ stuck: true })</code> for someone who seems unsure. Works without <code>data-nudge</code>; the same limits apply. Returns whether it showed.</td></tr>
|
|
118
118
|
<tr><td><code>Heresay.openPreferences()</code></td><td>Open the Preferences tab: a note about their setup, sent with every report. People who aren't signed in can also add a name and an email for replies. It's all optional and saved on their device. Where the button sits is yours to choose, with <code>data-position</code>.</td></tr>
|
|
119
119
|
<tr><td><code>Heresay.close()</code></td><td>Close the panel.</td></tr></table>
|
|
120
120
|
<p>Each report also carries the page it came from: its title, its address without the query string, and the window size.</p>
|
|
@@ -158,9 +158,14 @@ router.afterEach((to) => Heresay.setScreen(to.name));</code></pre>
|
|
|
158
158
|
<h3>Without MCP</h3>
|
|
159
159
|
<p>The same actions are commands: <code>npx heresay briefs</code>, <code>brief <id></code>, <code>claim <id></code>, <code>note</code>, <code>handoff</code>, <code>fixed <id> "note"</code>, and <code>guide <topic></code>. Agents can also read <a href="/llms.txt">/llms.txt</a> and the guides under <a href="/guides/start.md">/guides/</a>.</p>
|
|
160
160
|
<h3>Keeping it current</h3>
|
|
161
|
-
<p>The skill in your repo is small and rarely changes. The detailed steps come from your own Heresay each time, so they match what you have deployed
|
|
161
|
+
<p>The skill in your repo is small and rarely changes. The detailed steps come from your own Heresay each time, so they match what you have deployed.</p>
|
|
162
|
+
<p>When a chat starts in a connected repo, Heresay checks for updates and the agent brings them up and asks before applying any: a newer Heresay (whoever set it up runs <code>npx create-heresay update</code>; web apps then get the new Report button with no code change), a newer Swift package than the one pinned in <code>Package.resolved</code>, older agent files (<code>npx heresay connect --update</code>), and features your app doesn't use yet. In Claude Code a session-start hook in <code>.claude/settings.json</code> runs the check, at most once a day per repo; other agents are asked to by <code>AGENTS.md</code>. A no is kept in <code>.claude/skills/heresay/decisions.json</code>, so nobody asks again. You can also ask "Update Heresay", or run <code>npx heresay updates</code>.</p>
|
|
162
163
|
<p>You can still copy a single prompt from any accepted report in the dashboard with <b>Copy prompt for agent</b>.</p>
|
|
163
164
|
|
|
165
|
+
<h2 id="chat">ChatGPT and other chat apps</h2>
|
|
166
|
+
<p>Ideas that come up in a conversation can go straight to an app's inbox, with what the conversation worked out. Your Heresay is an MCP server at <code>https://<your-heresay>/v1/mcp</code>. In ChatGPT, open <b>Settings › Apps & Connectors</b>, turn on <b>Developer mode</b> under Advanced settings, choose <b>Create</b>, paste that address and pick OAuth. ChatGPT opens your dashboard to ask if it may send requests as you. Then say <i>“Send this to Heresay as an idea for Greenroom”</i>.</p>
|
|
167
|
+
<p>Requests arrive as from you (<b>From ChatGPT · From the team</b>) and wait for someone to accept them, like any report. The chat app can list your apps, send requests and say what happened to yours; it can't read anyone else's reports, or accept, decline or fix anything. <b>Chat apps</b> in the dashboard shows each connection and disconnects it. Claude, Cursor and other remote MCP clients use the same address.</p>
|
|
168
|
+
|
|
164
169
|
<h2 id="security">Security and limits</h2>
|
|
165
170
|
<ul>
|
|
166
171
|
<li><b>Your key is public, and that's fine.</b> It's in your page's HTML. It only identifies your project; it can't read or change anything.</li>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"id": "nudge",
|
|
6
6
|
"since": "0.2.21",
|
|
7
7
|
"title": "Offer help when someone seems stuck",
|
|
8
|
-
"summary": "A small note by the Report button asks “Something not working?” when someone presses a button again and again with nothing happening, hits an error right after a click, or sees requests fail (web), clicks a disabled control again and again (macOS), or comes back after a crash (iOS and macOS). It opens the form as Broken, with what happened attached. Watched on the device, never sent; once per visit, and quiet for a week after “Not now”. Off until the app turns it on.",
|
|
8
|
+
"summary": "A small note by the Report button asks “Something not working?” when someone presses a button again and again with nothing happening, hits an error right after a click, or sees requests fail (web), clicks a disabled control again and again (macOS), or comes back after a crash (iOS and macOS). And “Stuck on something?” when someone seems unsure: typing that stopped, going back and forth between the same few pages or screens, a field refused again and again. It opens the form as Broken or Confusing, with what happened attached. Watched on the device, never sent; once per visit, and quiet for a week after “Not now”. Off until the app turns it on.",
|
|
9
9
|
"platforms": ["web", "ios", "macos"],
|
|
10
10
|
"detect": ["data-nudge", "nudge:", "nudge()"],
|
|
11
11
|
"how": { "web": "guide customize-web, Offering help", "ios": "guide customize-apple, Offering help", "macos": "guide customize-apple, Offering help" }
|
|
@@ -63,7 +63,8 @@ change. The first value is the default.
|
|
|
63
63
|
With each report, Heresay attaches what happened in the app in the last few minutes: screens
|
|
64
64
|
(named with `Heresay.setScreen` or `.heresayScreen("Settings")`), the app's own `Logger` errors,
|
|
65
65
|
the last crash, going offline, and on macOS clicks (by their accessibility label) and menu
|
|
66
|
-
commands.
|
|
66
|
+
commands. It is kept on disk as it happens, so after a crash the next report says what happened
|
|
67
|
+
before the app closed and whether it was the first launch after an update. The reporter sees it in the sheet and can switch it off or leave parts out. Never what
|
|
67
68
|
anyone typed. On by default; change it only when asked.
|
|
68
69
|
|
|
69
70
|
| Option | Values |
|
|
@@ -80,7 +81,7 @@ own screen, so add it only when asked.
|
|
|
80
81
|
|
|
81
82
|
| Option | Values |
|
|
82
83
|
| --- | --- |
|
|
83
|
-
| `configure(…, nudge:)` | `[]` (default, off) · `.all` · `.clicks` (macOS: a disabled control clicked 3 times in 10 s, or one spot clicked 5 times in 2 s; leave it out for games and drawing apps) · `.crash` (the app crashed last time; once, at the next launch) |
|
|
84
|
+
| `configure(…, nudge:)` | `[]` (default, off) · `.all` · `.clicks` (macOS: a disabled control clicked 3 times in 10 s, or one spot clicked 5 times in 2 s; leave it out for games and drawing apps) · `.crash` (the app crashed last time; once, at the next launch) · `.circles` (6 screen changes in a minute among at most 3 screens; needs named screens) · `.stalled` (typed, then 45 s still editing with nothing more: the keyboard still up on iOS; search fields don't count). The last two say "Stuck on something?" and open as Confusing. |
|
|
84
85
|
|
|
85
86
|
Screens make the trail readable: if the app has several screens and doesn't name them yet, add
|
|
86
87
|
`.heresayScreen("<name>")` to each screen's root view.
|
|
@@ -88,7 +89,7 @@ Screens make the trail readable: if the app has several screens and doesn't name
|
|
|
88
89
|
**Calls**
|
|
89
90
|
|
|
90
91
|
- `Heresay.present(type:text:)`: opens the sheet, filled in. The person still reviews and sends it.
|
|
91
|
-
- `Heresay.nudge()`: the app saw trouble itself (an error screen, a retry that failed): offer to report it. Works without `nudge:`; the same limits apply.
|
|
92
|
+
- `Heresay.nudge()`: the app saw trouble itself (an error screen, a retry that failed): offer to report it. `Heresay.nudge(stuck: true)` for someone who seems unsure. Works without `nudge:`; the same limits apply.
|
|
92
93
|
- `Heresay.onSent { event in ... }`: after each report is sent, with `event.id` and `event.type`, never the text.
|
|
93
94
|
- `Heresay.introduce(title:message:)`: the one-time introduction in your own words. Leave the
|
|
94
95
|
words out unless asked; the default says where to find it.
|
|
@@ -80,7 +80,9 @@ a second or more, and leaving the tab and coming back. Each report also carries
|
|
|
80
80
|
around the app: phone or desktop, touch or mouse, screen, light or dark, language, time zone,
|
|
81
81
|
connection, and settings such as reduced motion. The reporter sees all of it in the form and can
|
|
82
82
|
switch the trail off or leave parts out. Never what anyone typed, request bodies, headers or
|
|
83
|
-
query strings.
|
|
83
|
+
query strings. It survives a reload or a new page in the same tab (kept in that tab's
|
|
84
|
+
`sessionStorage`), says "The page was reloaded", and, with `data-version`, "First visit since the
|
|
85
|
+
app updated from 1.3 to 1.4". On by default; change it only when asked.
|
|
84
86
|
|
|
85
87
|
| Attribute | Values |
|
|
86
88
|
| --- | --- |
|
|
@@ -96,12 +98,12 @@ asked.
|
|
|
96
98
|
|
|
97
99
|
| Attribute | Values |
|
|
98
100
|
| --- | --- |
|
|
99
|
-
| `data-nudge` | off (default) · `on` · the signals to watch, e.g. `clicks errors
|
|
101
|
+
| `data-nudge` | off (default) · `on` (all of these) · the signals to watch, e.g. `clicks errors`. When something failed ("Something not working?", opens as Broken): `clicks`: the same button or link pressed 3 times in 10 s with no change to the page; `errors`: an uncaught error within 5 s of a click; `requests`: 2 requests failing with 5xx or no answer within 30 s. When someone seems unsure ("Stuck on something?", opens as Confusing): `stalled`: typed in a field, then 45 s with no more typing and nothing sent, while still moving or scrolling (search boxes don't count); `circles`: 6 page changes in a minute among at most 3 pages; `refused`: the same field refused 3 times in 2 minutes |
|
|
100
102
|
|
|
101
103
|
**Calls**
|
|
102
104
|
|
|
103
105
|
- `window.Heresay?.open({ type, text })`: opens the form, filled in. The person still reviews and sends it.
|
|
104
|
-
- `window.Heresay?.nudge()`: the app saw trouble itself (an error screen, a retry that failed): offer to report it. Works without `data-nudge`; the same limits apply.
|
|
106
|
+
- `window.Heresay?.nudge()`: the app saw trouble itself (an error screen, a retry that failed): offer to report it. `nudge({ stuck: true })` for someone who seems unsure. Works without `data-nudge`; the same limits apply.
|
|
105
107
|
- `window.Heresay?.on('sent', ({ id, type }) => ...)`: after each report is sent, for example to thank them or count it in the app's analytics. It returns a function that stops listening. It never gets the report text.
|
|
106
108
|
|
|
107
109
|
## Can't be changed
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"fix-brief": "Fix an accepted report: find, claim, fix, hand off, mark fixed",
|
|
10
10
|
"write-note": "Write the note the reporter reads when a report is fixed",
|
|
11
11
|
"uninstall": "Remove Heresay from an app, and disconnect the repo",
|
|
12
|
-
"whats-new": "Heresay features this app doesn't use yet: tell the person, and ask before
|
|
12
|
+
"whats-new": "Updates for this repo (a newer Heresay, Swift package or agent files, and features this app doesn't use yet): tell the person, and ask before applying any"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -22,11 +22,12 @@ sees the outcome in the app, including the note you write when you mark it fixed
|
|
|
22
22
|
where nobody looks unprompted. `check_install` lists anything still owed in `todo`; the
|
|
23
23
|
install isn't done until that list is empty.
|
|
24
24
|
|
|
25
|
-
## Before any task:
|
|
25
|
+
## Before any task: updates
|
|
26
26
|
|
|
27
|
-
Call `whats_new`. If it lists
|
|
28
|
-
|
|
29
|
-
yes; on a no, `skip_update`
|
|
27
|
+
Call `whats_new`. If it lists updates (a newer Heresay, Swift package or agent files, or
|
|
28
|
+
features this app doesn't use yet), tell the person what each does in a sentence and **ask
|
|
29
|
+
before applying any**. See `whats-new`. Never apply one without a yes; on a no, `skip_update`
|
|
30
|
+
so nobody asks again.
|
|
30
31
|
|
|
31
32
|
## Which topic next
|
|
32
33
|
|
|
@@ -36,7 +37,7 @@ yes; on a no, `skip_update` so nobody asks again.
|
|
|
36
37
|
change them only when asked.
|
|
37
38
|
- Fixing reports: `fix-brief`, then `write-note`.
|
|
38
39
|
- Removing Heresay from an app: `uninstall`.
|
|
39
|
-
-
|
|
40
|
+
- Updating Heresay, or new features for an app that already has it: `whats-new`.
|
|
40
41
|
|
|
41
42
|
## Tools
|
|
42
43
|
|
|
@@ -1,23 +1,45 @@
|
|
|
1
1
|
# What's new in Heresay
|
|
2
2
|
|
|
3
|
-
Heresay
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
Heresay keeps changing after an app has it: new versions of the Heresay itself and the Swift
|
|
4
|
+
package, and new features. In a connected repo, bring these up with the person and **ask before
|
|
5
|
+
applying any**.
|
|
6
|
+
|
|
7
|
+
## When to check
|
|
8
|
+
|
|
9
|
+
- **When a chat starts.** In Claude Code, a session-start check (`.claude/settings.json`, added
|
|
10
|
+
by `heresay connect`) does it and tells you what it found. Other agents: call `whats_new`
|
|
11
|
+
(or run `npx -y heresay@latest updates`) once early in the conversation, whatever it is about.
|
|
12
|
+
- **At the start of every Heresay task**, call `whats_new` yourself.
|
|
13
|
+
|
|
14
|
+
## What to do with it
|
|
15
|
+
|
|
16
|
+
1. If it returns nothing, carry on. Don't mention it.
|
|
17
|
+
2. If it returns updates, tell the person in one short sentence each, in their words, not ours,
|
|
18
|
+
for example: "Heresay has a newer Swift package (0.2.22) with more context in reports. Want me
|
|
19
|
+
to update it?" One question for all of them is fine. If they asked about something else,
|
|
20
|
+
help with that first and ask at the end of your reply.
|
|
21
|
+
3. **Never apply an update without a yes.** It changes what the app's users see.
|
|
22
|
+
- Yes: follow its `how` (below), then `check_install` for that app.
|
|
23
|
+
- No: call `skip_update` with its id (or `npx heresay updates --skip <id>`), so nobody asks
|
|
24
|
+
again. It is recorded in `.claude/skills/heresay/decisions.json`; commit that. A skipped
|
|
25
|
+
version is asked about again when a newer one comes out.
|
|
26
|
+
- Not now: leave it; it comes up again in a later chat.
|
|
27
|
+
|
|
28
|
+
## The kinds of update
|
|
29
|
+
|
|
30
|
+
- **`instance@x.y.z`: this team's Heresay is behind.** The dashboard, the API and the web Report
|
|
31
|
+
button (web apps load it from the Heresay, so they get it with no code change). Whoever set the
|
|
32
|
+
Heresay up runs `npx create-heresay update`; it signs in to Google with their account. Offer to
|
|
33
|
+
run it only if that's the person you're talking to.
|
|
34
|
+
- **`swift@x.y.z`: the Swift package is behind.** Xcode: File › Packages › Update to Latest
|
|
35
|
+
Package Versions. A Swift package: `swift package update heresay-swift`. From a terminal for an
|
|
36
|
+
Xcode project: delete the `heresay-swift` pin from its `Package.resolved` and run
|
|
37
|
+
`xcodebuild -resolvePackageDependencies`. Build, read the CHANGELOG for anything that needs a
|
|
38
|
+
code change, and commit `Package.resolved`.
|
|
39
|
+
- **`agent-files@N`: this repo's Heresay agent files are old.** Run
|
|
40
|
+
`npx -y heresay@latest connect --update` and commit what it lists, in its own commit.
|
|
41
|
+
- **Anything else is a feature this app doesn't use yet**, from this Heresay's feature list. Its
|
|
42
|
+
`how` names the guide to follow.
|
|
21
43
|
|
|
22
44
|
If the tool isn't there (an older `heresay` package), read `/guides/changes.json` on this Heresay
|
|
23
45
|
and check the code for each entry's `detect` strings yourself.
|