create-heresay 0.2.28 → 0.2.29
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-heresay",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"description": "Set up your own Heresay: in-app feedback that every report gets a hearing. Creates a Firebase project in your Google account and deploys the dashboard, API and SDK to it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/release/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.29
|
|
@@ -116,9 +116,9 @@ export async function register(req, deps) {
|
|
|
116
116
|
if (!uris.length || uris.some((u) => !u)) {
|
|
117
117
|
return json(400, { error: 'invalid_redirect_uri', error_description: 'redirect_uris must be https URLs (or http on localhost)' }, OPEN_CORS);
|
|
118
118
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
// Every client is public here (PKCE does the proving). One that asks for a secret is told, in
|
|
120
|
+
// the response, that it has none; refusing it would leave apps that default to a secret
|
|
121
|
+
// (some do) unable to connect at all.
|
|
122
122
|
const client_id = `hc_${secret(16)}`;
|
|
123
123
|
const name = str(b.client_name, 80) ?? new URL(uris[0]).hostname;
|
|
124
124
|
await deps.store.putAuth({
|
|
@@ -223,6 +223,14 @@ export async function token(req, deps) {
|
|
|
223
223
|
if (!(await limited('token', 240, req, deps)))
|
|
224
224
|
return tokenError('too_many_requests', 'Try again later.', 429);
|
|
225
225
|
const b = fields(req.body);
|
|
226
|
+
// A client that registered as if it had a secret may send its id in Basic auth instead. The
|
|
227
|
+
// secret part means nothing here (there is none); the id still has to match.
|
|
228
|
+
const basic = /^Basic\s+([A-Za-z0-9+/=]+)$/.exec(req.headers['authorization'] ?? '');
|
|
229
|
+
if (basic && !b.client_id) {
|
|
230
|
+
const id = Buffer.from(basic[1], 'base64').toString('utf8').split(':')[0];
|
|
231
|
+
if (id)
|
|
232
|
+
b.client_id = decodeURIComponent(id);
|
|
233
|
+
}
|
|
226
234
|
const instance = await deps.store.getInstance();
|
|
227
235
|
if (b.grant_type === 'authorization_code') {
|
|
228
236
|
const code = str(b.code, 200), verifier = str(b.code_verifier, 200);
|
|
@@ -472,3 +472,7 @@ a.platform:hover { border-color:var(--acc); box-shadow:0 0 0 3px var(--mist); }
|
|
|
472
472
|
.pill.agent-pill { background:#fef3c7; color:#92400e; }
|
|
473
473
|
.report .files { margin:4px 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:6px; font-size:12.5px; }
|
|
474
474
|
.report .files a, .report .files code { font:12.5px var(--mono, ui-monospace, monospace); padding:2px 6px; border-radius:6px; background:rgba(127,127,127,.12); color:inherit; }
|
|
475
|
+
|
|
476
|
+
.seg { display:flex; flex-wrap:wrap; gap:6px; margin:4px 0 14px; }
|
|
477
|
+
.seg-btn { border:1px solid var(--line); background:none; border-radius:999px; padding:5px 12px; font:inherit; font-size:13px; cursor:pointer; color:var(--mute); }
|
|
478
|
+
.seg-btn[aria-selected=true] { border-color:var(--acc); color:var(--fg); background:var(--mist, rgba(15,118,110,.08)); font-weight:600; }
|
|
@@ -2127,19 +2127,49 @@
|
|
|
2127
2127
|
*/
|
|
2128
2128
|
function chatView(view) {
|
|
2129
2129
|
var mcpUrl = location.origin + '/v1/mcp';
|
|
2130
|
-
view.appendChild(el('div', { class: 'head' }, [el('h1', { text: '
|
|
2130
|
+
view.appendChild(el('div', { class: 'head' }, [el('h1', { text: 'Chat apps' })]));
|
|
2131
2131
|
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.' }));
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2132
|
+
// One address for every chat app that takes a remote MCP server; each signs in as the member.
|
|
2133
|
+
var steps = {
|
|
2134
|
+
ChatGPT: [
|
|
2135
|
+
'In ChatGPT, open <b>Settings › Apps & Connectors</b>. Under <b>Advanced settings</b>, turn on <b>Developer mode</b>.',
|
|
2136
|
+
'Choose <b>Create</b>, name it <b>Heresay</b>, paste the address below as the <b>MCP server URL</b>, and pick <b>OAuth</b>.',
|
|
2137
|
+
'If your workspace says plugins with MCPs aren’t allowed, use a chat token with a ChatGPT Sites bridge instead (below).',
|
|
2138
|
+
],
|
|
2139
|
+
Claude: [
|
|
2140
|
+
'In Claude (claude.ai or the desktop app), open <b>Settings › Connectors</b> and choose <b>Add custom connector</b>.',
|
|
2141
|
+
'Name it <b>Heresay</b> and paste the address below as the <b>remote MCP server URL</b>. Leave the client ID and secret empty.',
|
|
2142
|
+
'In a conversation, turn Heresay on from the tools menu if it isn’t already.',
|
|
2143
|
+
],
|
|
2144
|
+
Perplexity: [
|
|
2145
|
+
'In Perplexity (Pro, Max or Enterprise), open <b>Settings › Connectors</b> and choose <b>Add custom connector</b>, then <b>Remote</b>.',
|
|
2146
|
+
'Name it <b>Heresay</b>, paste the address below, set the transport to <b>Streamable HTTP</b> and the auth to <b>OAuth 2.0</b>.',
|
|
2147
|
+
'If OAuth doesn’t connect, pick <b>API key</b> and paste a chat token from below instead.',
|
|
2148
|
+
],
|
|
2149
|
+
Gemini: [
|
|
2150
|
+
'In the Gemini app, open <b>Settings & help › Connected apps</b>, and under <b>Custom apps</b> choose <b>Add a custom app</b>. (For now Google offers this to personal accounts in the US.)',
|
|
2151
|
+
'Paste the address below as the MCP server URL and follow the prompts. On Gemini Enterprise, an admin adds it under <b>Manage team › Connected apps › Add MCP server</b>.',
|
|
2152
|
+
],
|
|
2153
|
+
Others: [
|
|
2154
|
+
'Cursor, Claude Code, Codex, Windsurf and any app that takes a remote MCP server: add the address below as a Streamable HTTP server with OAuth.',
|
|
2155
|
+
'Apps that only take a fixed key: send <code>Authorization: Bearer <chat token></code> with a chat token from below.',
|
|
2156
|
+
],
|
|
2157
|
+
};
|
|
2158
|
+
var which = 'ChatGPT';
|
|
2159
|
+
var stepBox = el('ol', { class: 'howto' });
|
|
2160
|
+
var tabs = el('div', { class: 'seg', role: 'tablist', 'aria-label': 'Chat app' });
|
|
2161
|
+
function drawSteps() {
|
|
2162
|
+
stepBox.textContent = '';
|
|
2163
|
+
steps[which].forEach(function (h) { stepBox.appendChild(el('li', { html: h })); });
|
|
2164
|
+
stepBox.appendChild(el('li', {}, [el('div', { class: 'copy-prompt' }, [el('code', { class: 'url', text: mcpUrl }), copyButton(function () { return mcpUrl; }, 'Copy address')])]));
|
|
2165
|
+
stepBox.appendChild(el('li', { text: 'It opens this dashboard to ask if it may send requests as you. Say yes. Then, in a conversation: “Send this to Heresay as an idea for Greenroom”, or “What happened to my Heresay requests?”.' }));
|
|
2166
|
+
tabs.querySelectorAll('button').forEach(function (b) { b.setAttribute('aria-selected', String(b.dataset.app === which)); });
|
|
2167
|
+
}
|
|
2168
|
+
Object.keys(steps).forEach(function (name) {
|
|
2169
|
+
tabs.appendChild(el('button', { type: 'button', role: 'tab', class: 'seg-btn', 'data-app': name, text: name, onclick: function () { which = name; drawSteps(); } }));
|
|
2170
|
+
});
|
|
2171
|
+
view.appendChild(el('section', { class: 'card' }, [el('h2', { text: 'Add Heresay to a chat app' }), tabs, stepBox]));
|
|
2172
|
+
drawSteps();
|
|
2143
2173
|
// For chat apps that can't sign in with OAuth: a ChatGPT workspace that blocks MCP plugins
|
|
2144
2174
|
// (use a ChatGPT Sites bridge), or a script. Shown once.
|
|
2145
2175
|
var tokenName = el('input', { name: 'token-name', value: 'ChatGPT', 'aria-label': 'What it is for', maxlength: '80' });
|
package/release/public/docs.html
CHANGED
|
@@ -164,7 +164,7 @@ router.afterEach((to) => Heresay.setScreen(to.name));</code></pre>
|
|
|
164
164
|
|
|
165
165
|
<h2 id="chat">ChatGPT and other chat apps</h2>
|
|
166
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>
|
|
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 (Settings › Connectors › Add custom connector), Perplexity (Settings › Connectors › Add custom connector › Remote, Streamable HTTP, OAuth 2.0), Gemini (Settings & help › Connected apps › Custom apps, where Google offers it), Cursor and other remote MCP clients use the same address; the dashboard's Chat apps page has the steps for each.</p>
|
|
168
168
|
|
|
169
169
|
<h2 id="security">Security and limits</h2>
|
|
170
170
|
<ul>
|