@parley-im/parley 0.2.5 → 0.2.6

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/README.md CHANGED
@@ -6,7 +6,7 @@ The agent runs on your computer, with your Claude or Codex login and plan. Links
6
6
 
7
7
  ## Using it
8
8
 
9
- Link your computer to your parley.im account once:
9
+ Link your computer to your parley account once:
10
10
 
11
11
  ```bash
12
12
  parley login
@@ -22,6 +22,8 @@ Your agent writes a brief from what it knows and hands back a link like `https:/
22
22
 
23
23
  > We're done with Sam's session.
24
24
 
25
+ Send parleys only to people you trust. A guest can ask about anything in the project folder, and the interviewer answers from what it finds there, including files you may have forgotten about. The blocked list and the agents' sandboxes keep secrets out and keep it inside the folder, but they shouldn't be the only thing between a stranger and your work.
26
+
25
27
  Or from a terminal:
26
28
 
27
29
  ```bash
package/dist/account.js CHANGED
@@ -32,9 +32,9 @@ async function call(creds, path, init = {}) {
32
32
  signal: AbortSignal.timeout(15_000),
33
33
  });
34
34
  if (res.status === 401)
35
- throw Object.assign(new Error("This computer isn't linked to parley.im anymore. Run parley login."), { unlinked: true });
35
+ throw Object.assign(new Error("This computer isn't linked to your parley account anymore. Run parley login."), { unlinked: true });
36
36
  if (!res.ok)
37
- throw new Error((await res.json().catch(() => null))?.message ?? `parley.im answered ${res.status}`);
37
+ throw new Error((await res.json().catch(() => null))?.message ?? `parley's servers answered ${res.status}`);
38
38
  return res.json();
39
39
  }
40
40
  // What parley.im is told about a session: its id and a title for link
package/dist/cli.js CHANGED
@@ -37,8 +37,8 @@ Commands
37
37
  parley limit ID N Let a session give N replies in total
38
38
  parley end ID Kill its link for good; the transcript stays
39
39
  parley delete ID Erase it, screenshots included
40
- parley login | logout | whoami Link this computer to parley.im, or unlink it
41
- parley start | stop | status The background server (holds the parley.im connection)
40
+ parley login | logout | whoami Link this computer to your parley account
41
+ parley start | stop | status The background server (holds the connection to parley)
42
42
  parley panel Open the control panel (localhost)
43
43
  parley install Add parley's MCP tools to Claude Code and Codex; start at login
44
44
  parley uninstall Undo install (your conversations stay)
@@ -46,7 +46,7 @@ Commands
46
46
  parley --version
47
47
 
48
48
  Conversations and screenshots live in each project's .parley folder (kept out of git), with a
49
- readable transcript.md per session. Settings and your parley.im login live in ${paths.home}.`;
49
+ readable transcript.md per session. Settings and your parley login live in ${paths.home}.`;
50
50
  const CLI_PATH = fileURLToPath(import.meta.url);
51
51
  async function main() {
52
52
  const [command, ...rest] = process.argv.slice(2);
@@ -88,7 +88,7 @@ async function main() {
88
88
  clearCredentials();
89
89
  if (await isServerUp(config))
90
90
  await fetch(`http://localhost:${config.dashboardPort}/api/relay/restart`, { method: "POST" });
91
- console.log(`Unlinked from ${creds.account.email}. Existing parley.im links stop working until you sign in again.`);
91
+ console.log(`Unlinked from ${creds.account.email}. Shared links stop working until you sign in again.`);
92
92
  return;
93
93
  }
94
94
  case "whoami": {
@@ -149,10 +149,11 @@ async function main() {
149
149
  console.log(`Link: ${linkFor(session, config)}`);
150
150
  console.log(`Replies allowed: ${session.reply_limit}`);
151
151
  console.log(`Watch: ${dashboardUrl(config, session)}`);
152
+ console.log(`\nSend it only to someone you trust: they can ask about anything in this folder.`);
152
153
  if (!readCredentials(config))
153
154
  console.log("\nNot signed in, so this link only works on this computer. Run parley login to share links.");
154
155
  else if (!made.shared)
155
- console.log(`\nparley.im didn't take the session yet; it will once the connection is back (see ${paths.log}).`);
156
+ console.log(`\nparley's servers didn't take the session yet; it will once the connection is back (see ${paths.log}).`);
156
157
  return;
157
158
  }
158
159
  case "list": {
package/dist/mcp.js CHANGED
@@ -10,7 +10,7 @@ import { startSession, endSession, setReplyLimit } from "./control.js";
10
10
  import { readCredentials } from "./account.js";
11
11
  const INSTRUCTIONS = `Parley lets the user hand a guest a link to a private web chat with a read-only Claude or Codex running in their project folder. The guest talks; the agent listens, asks follow-ups, answers questions from the code, and everything is recorded.
12
12
 
13
- Use create_session when the user wants someone to give feedback on a project. Write the brief from what you know about the project and what the user wants to learn. Later, use list_sessions to see which sessions are open, which have new messages, and how many replies each has used and spent; get_transcript to read them; set_reply_limit to give a session more room or less; and end_session when the user is done with one. Links live on parley.im and are end-to-end encrypted; the conversation itself happens on the user's computer, so guests can only get replies while it's awake and the parley server is running.`;
13
+ Use create_session when the user wants someone to give feedback on a project. Write the brief from what you know about the project and what the user wants to learn. Later, use list_sessions to see which sessions are open, which have new messages, and how many replies each has used and spent; get_transcript to read them; set_reply_limit to give a session more room or less; and end_session when the user is done with one. Parleys are for people the user trusts: a guest can ask about anything in the project folder, and the interviewer may answer from files the user has forgotten are there. If the user wants to send one to strangers or post it publicly, say so plainly before making it. Links live on parley.im and are end-to-end encrypted; the conversation itself happens on the user's computer, so guests can only get replies while it's awake and the parley server is running.`;
14
14
  export async function runMcp() {
15
15
  const config = loadConfig();
16
16
  const store = new Store();
@@ -22,7 +22,8 @@ export async function runMcp() {
22
22
  title: "Create a feedback session",
23
23
  description: "Create a parley session: a private link the user can send to a guest. The guest chats with a fresh, read-only " +
24
24
  "agent in the project folder that hears their feedback, answers questions by reading the code, and records everything. " +
25
- "Starts the local server and tunnel if needed. Returns the link to give the user.",
25
+ "Starts the local server and tunnel if needed. Returns the link to give the user. Only for guests the user trusts, " +
26
+ "since the guest can ask about anything in the project folder.",
26
27
  inputSchema: {
27
28
  project_dir: z.string().describe("Absolute path of the project folder, normally your current working directory."),
28
29
  guest: z.string().describe("Name of the person who will give feedback, e.g. 'Sam'."),
@@ -72,18 +73,19 @@ export async function runMcp() {
72
73
  "",
73
74
  ];
74
75
  if (!readCredentials(config)) {
75
- lines.push("This computer isn't signed in to parley.im, so the link only works here. Have the user run `parley login` to share links.");
76
+ lines.push("This computer isn't signed in to parley, so the link only works here. Have the user run `parley login` to share links.");
76
77
  }
77
78
  else if (!made.serverUp) {
78
79
  lines.push("Warning: the parley server didn't come up, so the link won't answer yet. Check ~/.parley/server.log, then run `parley start`.");
79
80
  }
80
81
  else if (!made.shared) {
81
- lines.push("Warning: parley.im didn't take the session yet. It will once the connection is back; `parley status` shows it.");
82
+ lines.push("Warning: parley's servers didn't take the session yet. It will once the connection is back; `parley status` shows it.");
82
83
  }
83
84
  else {
84
85
  lines.push("Everything after the # in the link is the session's encryption key: share the whole link, and only with the guest. " +
85
86
  "Replies come from this computer, so it needs to be awake with parley running.");
86
87
  }
88
+ lines.push(`Tell the user to send it only to someone they trust: ${session.guest} can ask about anything in this project folder.`);
87
89
  return reply(lines.join("\n"));
88
90
  });
89
91
  server.registerTool("list_sessions", {
package/dist/relay.js CHANGED
@@ -100,7 +100,7 @@ export class RelayLink {
100
100
  return;
101
101
  this.ws = null;
102
102
  if (event.code === 4401) {
103
- this.status = { state: "unlinked", relayUrl: creds.relayUrl, error: "This computer was unlinked from its parley.im account. Run parley login." };
103
+ this.status = { state: "unlinked", relayUrl: creds.relayUrl, error: "This computer was unlinked from its parley account. Run parley login." };
104
104
  return;
105
105
  }
106
106
  if (event.code === 4426) {
@@ -123,7 +123,7 @@ export class RelayLink {
123
123
  try {
124
124
  const res = await fetch(`${creds.relayUrl}/api/me`, { headers: { authorization: `Bearer ${creds.token}` }, signal: AbortSignal.timeout(10_000) });
125
125
  if (res.status === 401) {
126
- this.status = { state: "unlinked", relayUrl: creds.relayUrl, error: "This computer isn't linked to a parley.im account anymore. Run parley login." };
126
+ this.status = { state: "unlinked", relayUrl: creds.relayUrl, error: "This computer isn't linked to a parley account anymore. Run parley login." };
127
127
  return;
128
128
  }
129
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parley-im/parley",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Send someone a link. They talk to a read-only Claude or Codex in your project, on your computer, and you get everything they said.",
5
5
  "keywords": [
6
6
  "claude",
package/web/app.css CHANGED
@@ -462,7 +462,9 @@ body.panel { overflow: auto; }
462
462
  .menu-who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
463
463
  @keyframes drop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
464
464
 
465
- .live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
465
+ /* A session's status on the dashboard (not the chat's reply in progress,
466
+ which is li.live). */
467
+ span.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
466
468
  .docs { padding-bottom: 40px; }
467
469
  .docs h2 { font-size: 17px; letter-spacing: -0.01em; margin: 36px 0 10px; }
468
470
  .docs p, .docs li { max-width: 66ch; }
@@ -475,8 +477,8 @@ body.panel { overflow: auto; }
475
477
  /* Long details shorten instead of pushing the buttons off a phone screen. */
476
478
  .trow.site-row .who-cell { min-width: 0; }
477
479
 
478
- /* parley.im's front page: what it is, in plain words, beside a glimpse of a
479
- parley. */
480
+ /* parley's front page: what it is, in plain words, beside a parley playing
481
+ out (home.js). */
480
482
  .landing { max-width: 1080px; }
481
483
  .front { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 8vh 0 24px; }
482
484
  .front .intro { flex: 999 1 440px; min-width: 0; display: grid; gap: 18px; padding: 0; border: 0; background: none; margin: 0; font-size: inherit; color: inherit; }
@@ -486,15 +488,27 @@ body.panel { overflow: auto; }
486
488
  .front .cta .btn { height: 46px; padding: 0 20px; border-radius: 11px; font-size: 16px; font-weight: 700; }
487
489
  .front .cta .btn.ghost { color: var(--text); font-weight: 500; }
488
490
  .front .fine { font-size: 14px; color: var(--muted); margin: 0; }
489
- .glimpse {
490
- flex: 1 1 320px; min-width: 0; display: grid; gap: 14px; padding: 20px; background: var(--panel);
491
- border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
492
- }
493
- .glimpse .says { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 16px; line-height: 1.55; }
494
- .glimpse .says .flag { margin-top: 5px; }
495
- .glimpse .reply { justify-self: end; max-width: 85%; padding: 8px 12px; background: var(--guest); color: var(--guest-ink); border-radius: 13px 13px 4px 13px; font-size: 14px; line-height: 1.45; }
496
- .glimpse .writing { display: flex; gap: 10px; align-items: center; }
497
- .glimpse .writing .thinking { padding: 0; height: 16px; }
491
+ .demo { flex: 1 1 380px; min-width: 0; margin: 0; display: grid; gap: 10px; }
492
+ .demo-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
493
+ .demo-tabs button { font-family: var(--mono); font-size: 12px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
494
+ .demo-tabs button:hover { color: var(--text); }
495
+ .demo-tabs button.on { background: var(--panel); border-color: var(--line); color: var(--text); }
496
+ .demo-chat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
497
+ .demo-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
498
+ .demo-top .mark { width: 20px; height: 20px; }
499
+ .demo-top .product { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; }
500
+ .demo-top .slash { color: var(--faint); }
501
+ .demo-top .here { font-weight: 600; flex: 1; }
502
+ .demo-msgs { list-style: none; margin: 0; padding: 18px 18px 6px; min-height: 340px; display: flex; flex-direction: column; gap: 14px; }
503
+ .demo .msg { margin: 0; animation: rise 0.25s ease-out; }
504
+ .demo .msg.agent .body { font-size: 15.5px; }
505
+ .demo .msg.guest .bubble { font-size: 14.5px; max-width: 86%; }
506
+ .demo .steps { margin-top: 2px; }
507
+ .demo-say { margin: 0 14px 14px; padding: 8px 8px 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 13px; color: var(--faint); font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
508
+ .demo-say .send-dot { width: 32px; height: 32px; border-radius: 9px; background: var(--subtle); }
509
+ @keyframes rise { from { opacity: 0; transform: translateY(4px); } }
510
+ @media (prefers-reduced-motion: reduce) { .demo .msg { animation: none; } }
511
+ @media (max-width: 560px) { .demo-msgs { min-height: 400px; padding: 14px 12px 6px; } }
498
512
  .how { list-style: none; counter-reset: step; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
499
513
  .how li { counter-increment: step; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--panel); display: grid; gap: 10px; align-content: start; }
500
514
  .how li::before { content: counter(step); font-family: var(--display); font-weight: 700; color: var(--accent); font-size: 15px; }
package/web/chat.js CHANGED
@@ -345,7 +345,7 @@
345
345
  end.onclick = () => endConversation(end);
346
346
  const open = !ended && session?.status !== "ended";
347
347
  els.sheetBody.replaceChildren(
348
- el("p", {}, strong(who), " set this up to hear what you think of ", strong(projectName), sender ? `. parley.im checked it's really them, with Google.` : "."),
348
+ el("p", {}, strong(who), " set this up to hear what you think of ", strong(projectName), sender ? `. parley checked it's really them, with Google.` : "."),
349
349
  kv(facts),
350
350
  el("div", { className: "sheet-actions" }, save, open ? end : null),
351
351
  open ? el("p", { className: "fine" }, `Ending it stops this link working, for you and anyone else who has it. ${ownerName || "They"} keep${ownerName ? "s" : ""} everything said so far.`) : null,
@@ -358,7 +358,7 @@
358
358
  ? el(
359
359
  "p",
360
360
  {},
361
- `Messages and screenshots are end-to-end encrypted between this page and ${theirs} computer. parley.im passes them along but can't read them; it knows who sent this link, the project's name and when messages go by. The key is the part of your link after the #, so anyone with the whole link can read this chat: keep it to yourself. (This page's code comes from parley.im, so that promise relies on parley.im serving it honestly. And ${agentName()} reads the conversation to reply, as with any ${agentName()} chat.)`,
361
+ `Messages and screenshots are end-to-end encrypted between this page and ${theirs} computer. parley passes them along but can't read them; it knows who sent this link, the project's name and when messages go by. The key is the part of your link after the #, so anyone with the whole link can read this chat: keep it to yourself. (This page's code comes from parley's servers, so that promise relies on parley serving it honestly. And ${agentName()} reads the conversation to reply, as with any ${agentName()} chat.)`,
362
362
  )
363
363
  : null,
364
364
  el("p", {}, `When the replies run out, the chat pauses until ${whom} adds more. Replies come from ${theirs} computer, so it needs to be on, and the link stops working for good once the chat ends.`),
package/web/home.js ADDED
@@ -0,0 +1,90 @@
1
+ // parley's front page: plays the demo, three short parleys in turn, the way
2
+ // a guest sees one. The first is already in the page, so without script (or
3
+ // for anyone who prefers less motion) it just sits there, and the tabs swap
4
+ // scenes without playing them.
5
+ (() => {
6
+ const root = document.getElementById("demo");
7
+ const list = document.getElementById("demo-msgs");
8
+ const data = document.getElementById("scenes");
9
+ if (!root || !list || !data) return;
10
+ const scenes = JSON.parse(data.textContent);
11
+ const tabs = [...root.querySelectorAll("[data-scene]")];
12
+ const still = matchMedia("(prefers-reduced-motion: reduce)").matches;
13
+ let run = 0; // a new run cancels the one playing
14
+
15
+ const el = (tag, className, text) => {
16
+ const node = document.createElement(tag);
17
+ if (className) node.className = className;
18
+ if (text != null) node.textContent = text;
19
+ return node;
20
+ };
21
+ const guest = (text) => {
22
+ const node = el("li", "msg guest");
23
+ node.append(el("div", "bubble", text));
24
+ return node;
25
+ };
26
+ const agent = (text) => {
27
+ const node = el("li", "msg agent");
28
+ const body = el("div", "body");
29
+ body.append(el("p", "", text));
30
+ node.append(body);
31
+ return node;
32
+ };
33
+ const wait = (ms, id) => new Promise((resolve, reject) => setTimeout(() => (id === run ? resolve() : reject(new Error("stopped"))), ms));
34
+
35
+ function pick(i) {
36
+ tabs.forEach((tab, j) => {
37
+ tab.classList.toggle("on", i === j);
38
+ tab.setAttribute("aria-pressed", String(i === j));
39
+ });
40
+ }
41
+
42
+ function show(i) {
43
+ const scene = scenes[i];
44
+ pick(i);
45
+ list.replaceChildren(guest(scene.asks), agent(scene.says), guest(scene.then));
46
+ }
47
+
48
+ async function play(i, id) {
49
+ const scene = scenes[i];
50
+ pick(i);
51
+ list.replaceChildren();
52
+ await wait(500, id);
53
+ list.append(guest(scene.asks));
54
+ await wait(900, id);
55
+ // Working: the agent looks something up in the project, then writes.
56
+ const node = el("li", "msg agent");
57
+ const body = el("div", "body");
58
+ body.innerHTML = `<span class="thinking"><span></span><span></span><span></span></span>`;
59
+ const steps = el("ul", "steps");
60
+ node.append(body, steps);
61
+ list.append(node);
62
+ await wait(700, id);
63
+ steps.append(el("li", "now", scene.step));
64
+ await wait(1400, id);
65
+ const p = el("p", "cursor");
66
+ body.replaceChildren(p);
67
+ const words = scene.says.split(" ");
68
+ for (let w = 1; w <= words.length; w++) {
69
+ p.textContent = words.slice(0, w).join(" ");
70
+ await wait(55, id);
71
+ }
72
+ p.classList.remove("cursor");
73
+ steps.remove();
74
+ await wait(1500, id);
75
+ list.append(guest(scene.then));
76
+ await wait(4500, id);
77
+ }
78
+
79
+ async function loop(from) {
80
+ const id = ++run;
81
+ try {
82
+ for (let i = from; ; i = (i + 1) % scenes.length) await play(i, id);
83
+ } catch {
84
+ // Stopped for another scene.
85
+ }
86
+ }
87
+
88
+ tabs.forEach((tab, i) => tab.addEventListener("click", () => (still ? show(i) : loop(i))));
89
+ if (!still) loop(0);
90
+ })();
package/web/panel.html CHANGED
@@ -15,7 +15,7 @@
15
15
  </header>
16
16
 
17
17
  <div class="page">
18
- <p class="notice" id="signed-out" hidden style="margin:18px 0 0">This computer isn't signed in to parley.im, so links only work on this computer. Run <code>parley login</code> in a terminal to share them.</p>
18
+ <p class="notice" id="signed-out" hidden style="margin:18px 0 0">This computer isn't signed in to parley, so links only work on this computer. Run <code>parley login</code> in a terminal to share them.</p>
19
19
  <div class="stats" id="stats"></div>
20
20
 
21
21
  <div class="toolbar">
package/web/panel.js CHANGED
@@ -207,7 +207,7 @@
207
207
  await navigator.clipboard.writeText(s.link);
208
208
  copy.textContent = "Copied";
209
209
  };
210
- $("made").replaceChildren(el("strong", { textContent: `Session for ${s.guest} is ready.` }), el("div", { className: "linkbox" }, link, copy), el("a", { className: "cell-muted", href: `/o/${s.id}`, textContent: "Open it" }));
210
+ $("made").replaceChildren(el("strong", { textContent: `Session for ${s.guest} is ready.` }), el("div", { className: "linkbox" }, link, copy), el("p", { className: "cell-muted", style: "margin:0", textContent: "Send it only to someone you trust: they can ask about anything in this project folder." }), el("a", { className: "cell-muted", href: `/o/${s.id}`, textContent: "Open it" }));
211
211
  $("made").hidden = false;
212
212
  $("f-guest").value = $("f-brief").value = $("f-greeting").value = "";
213
213
  refresh();