@conveno/cli 0.2.0-rc.1 → 0.2.0-rc.3

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.
@@ -3,7 +3,7 @@ import { mkdir, open, readFile, rm, stat } from "node:fs/promises";
3
3
  import { createConnection } from "node:net";
4
4
  import { homedir } from "node:os";
5
5
  import { dirname, join } from "node:path";
6
- import { An as encodeFrame, Ct as proofsMatch, E as clientProof, M as dataDir, Mn as isSocketPathTooLong, N as dataPaths, On as createLineDecoder, Wn as socketPathTooLongMessage, _n as PROTOCOL_VERSION, bn as RpcResponse, dn as EventPayload, j as daemonProof, jn as ipcMethods, kn as defaultSocketPath, r as ConvenoError, ut as newAuthNonce, yn as RpcErrorCode } from "./dist-_qrCNXUP.js";
6
+ import { An as defaultSocketPath, Ct as proofsMatch, E as clientProof, Gn as socketPathTooLongMessage, M as dataDir, Mn as ipcMethods, N as dataPaths, Nn as isSocketPathTooLong, bn as RpcErrorCode, dn as EventPayload, j as daemonProof, jn as encodeFrame, kn as createLineDecoder, r as ConvenoError, ut as newAuthNonce, vn as PROTOCOL_VERSION, xn as RpcResponse } from "./dist-M9Gs7e_K.js";
7
7
  // ../client/dist/index.js
8
8
  const DEFAULT_REQUEST_TIMEOUT_MS = 5e3;
9
9
  const DEFAULT_START_TIMEOUT_MS = 1e4;
@@ -28,6 +28,9 @@ const CLIENT_METHODS = [
28
28
  "message.inbox",
29
29
  "message.deliver",
30
30
  "message.ack",
31
+ "owner.inbox",
32
+ "owner.ack",
33
+ "owner.send",
31
34
  "session.setCliInfo",
32
35
  "session.setPeekable",
33
36
  "session.peek",
@@ -54,6 +57,7 @@ const CLIENT_METHODS = [
54
57
  */
55
58
  const NOT_REPLAYABLE = /* @__PURE__ */ new Set([
56
59
  "message.send",
60
+ "owner.send",
57
61
  "session.register",
58
62
  "daemon.shutdown",
59
63
  "turn.end",
@@ -1,4 +1,4 @@
1
- import { Ft as relayPermission, Gt as startTurnContext, H as entriesNewestFirst, Ht as samePath, I as describeToolCall, Jt as tailJsonl, Mt as readTailLines, Ot as readHeadLine, Pt as recordCliInfo, V as endTurnContinuation, X as formatPermissionDecision, Zt as toIso, _ as asString, dt as notFound, it as isTranscriptPath, pt as parseCliVersion, qt as subdirsNewestFirst, rn as waitForWork, rt as isRecord, vt as pendingHookContext, yt as pickNewestSince } from "./dist-_qrCNXUP.js";
1
+ import { Ft as relayPermission, Gt as startTurnContext, H as entriesNewestFirst, Ht as samePath, I as describeToolCall, Jt as tailJsonl, Mt as readTailLines, Ot as readHeadLine, Pt as recordCliInfo, V as endTurnContinuation, X as formatPermissionDecision, Zt as toIso, _ as asString, dt as notFound, it as isTranscriptPath, pt as parseCliVersion, qt as subdirsNewestFirst, rn as waitForWork, rt as isRecord, vt as pendingHookContext, yt as pickNewestSince } from "./dist-M9Gs7e_K.js";
2
2
  import { isAbsolute, join } from "node:path";
3
3
  import { readFile, stat } from "node:fs/promises";
4
4
  import { applyEdits, modify, parse, printParseErrorCode } from "jsonc-parser";
@@ -506,7 +506,7 @@ const stopHookActive = (input) => isObject(input) && input.stop_hook_active ===
506
506
  * listener armed on this Stop wakes the session with what waits, as a new turn.
507
507
  * - Listen: the background listener (`asyncRewake`). Waits for work and exits 2 with the framed
508
508
  * messages on stderr, which wakes Claude even when the session is idle. Exit 0, silent, when it
509
- * stops for any other reason.
509
+ * stops for any other reason, and at once in `claude -p` (`CLAUDE_CODE_ENTRYPOINT=sdk-cli`).
510
510
  */
511
511
  async function hook$2(event, input, ctx) {
512
512
  switch (event) {
@@ -535,6 +535,7 @@ async function hook$2(event, input, ctx) {
535
535
  }
536
536
  case PERMISSION_EVENT$1: return permissionHook$1(input, ctx);
537
537
  case LISTEN_EVENT: {
538
+ if (process.env.CLAUDE_CODE_ENTRYPOINT === "sdk-cli") return EMPTY$4;
538
539
  const text = await waitForWork(ctx, { maxMs: LISTEN_MAX_MS });
539
540
  return text === null ? EMPTY$4 : {
540
541
  stdout: "",