osborn 0.9.256 → 0.9.257

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.
@@ -2075,8 +2075,8 @@ class ClaudeLLMStream extends llm.LLMStream {
2075
2075
  // only, no shell chaining — not a general curl allowance.
2076
2076
  if (toolName === 'Bash') {
2077
2077
  const cmd = String(input?.command || '');
2078
- if (/^\s*curl\b[^;&|]*https?:\/\/(localhost|127\.0\.0\.1):\d+\/(canvas|tts)\b/.test(cmd) && !/[;&|]/.test(cmd)) {
2079
- console.log(`✅ Auto-approved Bash → own API (canvas/tts speak path)`);
2078
+ if (/^\s*curl\b[^;&|]*https?:\/\/(localhost|127\.0\.0\.1):\d+\/(canvas|tts|noise-cancel)\b/.test(cmd) && !/[;&|]/.test(cmd)) {
2079
+ console.log(`✅ Auto-approved Bash → own API (canvas/tts/noise-cancel path)`);
2080
2080
  return { behavior: 'allow', updatedInput: input };
2081
2081
  }
2082
2082
  }
package/dist/index.js CHANGED
@@ -311,7 +311,7 @@ function parseDevSubdomainPort(req) {
311
311
  const AGENT_ROUTE_PREFIXES = [
312
312
  '/health', '/sessions', '/skills', '/agents', '/canvas', '/canvas-token',
313
313
  '/canvas-stream', '/events', '/room-code', '/connect-room', '/leave-room',
314
- '/report-bug', '/restart', '/tts', '/webhook', '/sessions/export',
314
+ '/report-bug', '/restart', '/tts', '/noise-cancel', '/webhook', '/sessions/export',
315
315
  '/sessions/import', '/sessions/manifest',
316
316
  '/secrets',
317
317
  '/editor',
@@ -932,6 +932,32 @@ function startApiServer(workingDir, port) {
932
932
  });
933
933
  return;
934
934
  }
935
+ // ── Noise cancellation: agent self-service toggle ────────────────────────
936
+ // POST /noise-cancel { enabled: boolean }. Lets the AGENT flip the gate the
937
+ // moment its own meeting-mode detection fires ("that sounded like it was for
938
+ // someone near you") — the skill-based detection produces no [MEETING chunks,
939
+ // so without this bridge the gate never engaged in real side-conversations
940
+ // (verified in the 2026-10-21 Uber session). Auto-approved for the agent via
941
+ // the canvas/tts localhost curl allowance in claude-llm.ts canUseTool.
942
+ if (req.method === 'POST' && url.pathname === '/noise-cancel') {
943
+ let body = '';
944
+ req.on('data', (c) => { body += c; });
945
+ req.on('end', () => {
946
+ try {
947
+ const { enabled } = JSON.parse(body || '{}');
948
+ if (typeof enabled !== 'boolean')
949
+ throw new Error('enabled must be a boolean');
950
+ noiseGate.setEnabled(enabled, 'meeting');
951
+ res.writeHead(200, { 'Content-Type': 'application/json' });
952
+ res.end(JSON.stringify({ ok: true, enabled: noiseGate.enabled, reason: noiseGate.reason }));
953
+ }
954
+ catch (e) {
955
+ res.writeHead(400, { 'Content-Type': 'application/json' });
956
+ res.end(JSON.stringify({ error: e.message }));
957
+ }
958
+ });
959
+ return;
960
+ }
935
961
  // GET /sessions/export — stream a gzipped tar of ~/.claude/projects/ AND
936
962
  // ~/.claude/skills/ to the client. Both directories ship in one archive so
937
963
  // a sync covers conversations (projects/) and learned skills together —
@@ -2820,7 +2846,13 @@ async function main() {
2820
2846
  console.warn('🧹 housekeeping failed:', e);
2821
2847
  }
2822
2848
  };
2823
- runHousekeeping();
2849
+ // PERF (sub-second-connect initiative): the BOOT run is always forced dry-run
2850
+ // (no active session yet) — it scans thousands of artifacts purely to LOG them,
2851
+ // which blocked the listen port on every cold start. Defer it off the critical
2852
+ // path so boot reaches "ready" first; the periodic 6h runs (when a session
2853
+ // exists) do the real pruning. unref so it never holds the process open.
2854
+ const firstHousekeeping = setTimeout(runHousekeeping, 60_000);
2855
+ firstHousekeeping.unref?.();
2824
2856
  setInterval(runHousekeeping, 6 * 60 * 60 * 1000);
2825
2857
  // Claude auth code submission handler (set during OAuth flow, cleared after)
2826
2858
  let pendingAuthSubmitCode = null;
@@ -283,3 +283,22 @@ RIGHT (shaped by in-flight conversation):
283
283
  "OK, here's what we landed on — Sprites is the right call for what you said about cold-start mattering more than features. Modal would have been my pick on raw feature breadth, but its cold-start is around eight seconds versus Sprites' under one. Daytona's cold-start is fine but its API is stateful in a way that would have forced you to write more glue code. Given you flagged glue code as a concern when we were halfway through, that pushed Sprites further ahead. I've written the full comparison to your session files. Want me to walk through the API differences, or are you ready to move on to provisioning?"
284
284
  ← The synthesis explicitly references things the user said DURING the wait. It's not a raw relay — it's shaped.
285
285
  </examples>
286
+
287
+ ## NOISE CANCELLATION — when the user is talking to someone else
288
+
289
+ The room has a transcript noise filter ("noise cancellation") that drops side-conversation
290
+ speech BEFORE it reaches you. You can and should flip it yourself:
291
+
292
+ - The moment you notice the user is talking to a person near them (driver, classmate,
293
+ someone in the room — the situations where you'd hold back), FIRST silently run:
294
+ `curl -s -X POST http://localhost:8741/noise-cancel -H 'Content-Type: application/json' -d '{"enabled":true}'`
295
+ (auto-approved, localhost-only). Do this BEFORE anything else.
296
+ - Then say NOTHING. No "that sounded like it was for someone else, I'll hold", no
297
+ acknowledgment — a spoken hold notice is itself an interruption of their real
298
+ conversation. Total silence is the correct response. With the filter on, further
299
+ side-speech is dropped before you ever see it, so you won't need to keep judging.
300
+ - When a message clearly addressed to you comes through the filter, answer normally.
301
+ If you're confident the side conversation is over (they say so, or they re-engage
302
+ you in an ongoing way), turn the filter off with `{"enabled":false}`.
303
+ - The filter auto-exits after ~5 minutes of quiet on its own — you don't need to
304
+ manage that case.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osborn",
3
- "version": "0.9.256",
3
+ "version": "0.9.257",
4
4
  "description": "Voice AI coding assistant - local agent that connects to Osborn frontend",
5
5
  "type": "module",
6
6
  "bin": {