@autono/pinbox-core 0.15.0 → 0.16.0

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.
@@ -1,4 +1,4 @@
1
- import { r as ConnectorTransport, t as Connector } from "../types-ArXPudwn.js";
1
+ import { r as ConnectorTransport, t as Connector } from "../types-BmfT_m1p.js";
2
2
  //#region src/connectors/github.d.ts
3
3
  declare function createGithubConnector(transport: ConnectorTransport): Connector;
4
4
  //#endregion
@@ -1,6 +1,6 @@
1
- import { g as ThreadMessage } from "../schema-DrY4XoLZ.js";
2
- import { a as RemoteStatus, i as RemoteComment, n as ConnectorEvents, r as ConnectorTransport, t as Connector } from "../types-ArXPudwn.js";
3
- import { c as PinStore } from "../store-K72bMbn7.js";
1
+ import { g as ThreadMessage } from "../schema-BlM4lTLW.js";
2
+ import { a as RemoteStatus, i as RemoteComment, n as ConnectorEvents, r as ConnectorTransport, t as Connector } from "../types-BmfT_m1p.js";
3
+ import { c as PinStore } from "../store-DAB5CEA1.js";
4
4
  //#region src/connectors/mirror.d.ts
5
5
  declare function createConnectorEvents(store: PinStore, pinId: string): ConnectorEvents;
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { t as GetPin } from "../payload-Bfo0QpKF.js";
2
- import { n as DeliveryAdapter } from "../router-BTQxKdcc.js";
1
+ import { t as GetPin } from "../payload-CYbjb8ZB.js";
2
+ import { n as DeliveryAdapter } from "../router-DOwWVak2.js";
3
3
  //#region src/delivery/openclaw.d.ts
4
4
  declare function createOpenclawAdapter(opts?: {
5
5
  command?: string[];
@@ -1,5 +1,5 @@
1
- import { t as GetPin } from "../payload-Bfo0QpKF.js";
2
- import { n as DeliveryAdapter } from "../router-BTQxKdcc.js";
1
+ import { t as GetPin } from "../payload-CYbjb8ZB.js";
2
+ import { n as DeliveryAdapter } from "../router-DOwWVak2.js";
3
3
  //#region src/delivery/resume.d.ts
4
4
  type ResumeCommand = (key: string, prompt: string) => string[];
5
5
  declare const RESUME_COMMANDS: Record<string, ResumeCommand>;
@@ -1,2 +1,2 @@
1
- import { a as HOOK_CAPABLE_AGENTS, c as buildReplyPrompt, i as hooksEscalateMs, n as DeliveryAdapter, o as createHooksAdapter, r as DeliveryRouter, s as buildInjectionContext, t as DEFAULT_HOOKS_ESCALATE_MS } from "../router-BTQxKdcc.js";
1
+ import { a as HOOK_CAPABLE_AGENTS, c as buildReplyPrompt, i as hooksEscalateMs, n as DeliveryAdapter, o as createHooksAdapter, r as DeliveryRouter, s as buildInjectionContext, t as DEFAULT_HOOKS_ESCALATE_MS } from "../router-DOwWVak2.js";
2
2
  export { DEFAULT_HOOKS_ESCALATE_MS, DeliveryAdapter, DeliveryRouter, HOOK_CAPABLE_AGENTS, buildInjectionContext, buildReplyPrompt, createHooksAdapter, hooksEscalateMs };
@@ -1,3 +1,3 @@
1
1
  import { n as buildReplyPrompt, t as buildInjectionContext } from "../context-BHcEpzVb.js";
2
- import { a as createHooksAdapter, i as HOOK_CAPABLE_AGENTS, n as DeliveryRouter, r as hooksEscalateMs, t as DEFAULT_HOOKS_ESCALATE_MS } from "../router-B8EOto30.js";
2
+ import { a as createHooksAdapter, i as HOOK_CAPABLE_AGENTS, n as DeliveryRouter, r as hooksEscalateMs, t as DEFAULT_HOOKS_ESCALATE_MS } from "../router-BH74psWn.js";
3
3
  export { DEFAULT_HOOKS_ESCALATE_MS, DeliveryRouter, HOOK_CAPABLE_AGENTS, buildInjectionContext, buildReplyPrompt, createHooksAdapter, hooksEscalateMs };
@@ -1,4 +1,4 @@
1
- import { n as DeliveryAdapter } from "../router-BTQxKdcc.js";
1
+ import { n as DeliveryAdapter } from "../router-DOwWVak2.js";
2
2
  //#region src/delivery/webhook.d.ts
3
3
  type WebhookConfig = {
4
4
  url: string;
package/dist/do.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as Link, g as ThreadMessage, m as SessionRef, r as Attachment, s as Pin, t as AppliedEdit } from "./schema-DrY4XoLZ.js";
2
- import { r as SessionStore } from "./sessions-B74wWsan.js";
3
- import { a as LinkStore, c as PinStore, i as DeliveryStore, l as StoredEvent, t as CursorStore } from "./store-K72bMbn7.js";
1
+ import { a as Link, g as ThreadMessage, m as SessionRef, r as Attachment, s as Pin, t as AppliedEdit } from "./schema-BlM4lTLW.js";
2
+ import { r as SessionStore } from "./sessions-BOrd8Yvv.js";
3
+ import { a as LinkStore, c as PinStore, i as DeliveryStore, l as StoredEvent, t as CursorStore } from "./store-DAB5CEA1.js";
4
4
  import { Broadcaster } from "./ws.js";
5
5
  import { DurableObjectState, R2Bucket, WebSocket } from "@cloudflare/workers-types";
6
6
  //#region src/do-store.d.ts
package/dist/do.js CHANGED
@@ -3,7 +3,7 @@ import { a as NotFoundError, i as ConflictError, o as newId, t as SessionSchema
3
3
  import { t as MIGRATIONS } from "./store-IR3o5YwY.js";
4
4
  import { n as createHubHandler, o as ok, r as err } from "./hub-I67BuX9S.js";
5
5
  import { ClientHelloSchema, WS_CLOSE_PROTOCOL, WS_CLOSE_UNAUTHORIZED, WS_TOKEN_SUBPROTOCOL_PREFIX, encodeWsEvent } from "./ws-protocol.js";
6
- import { n as DeliveryRouter } from "./router-B8EOto30.js";
6
+ import { n as DeliveryRouter } from "./router-BH74psWn.js";
7
7
  import { createWebhookAdapter } from "./delivery/webhook.js";
8
8
  import { i as verifyJwt, n as verifyNone, r as verifyToken } from "./verify-BDt9d9Np.js";
9
9
  //#region src/do-store-registries.ts
@@ -1,5 +1,5 @@
1
- import { r as Attachment } from "./schema-DrY4XoLZ.js";
2
- import { c as PinStore } from "./store-K72bMbn7.js";
1
+ import { r as Attachment } from "./schema-BlM4lTLW.js";
2
+ import { c as PinStore } from "./store-DAB5CEA1.js";
3
3
  import { HubOptions } from "./hub.js";
4
4
  //#region src/attachments.d.ts
5
5
  interface AttachmentSink {
package/dist/hub.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as Connector } from "./types-ArXPudwn.js";
2
- import { c as PinStore } from "./store-K72bMbn7.js";
1
+ import { t as Connector } from "./types-BmfT_m1p.js";
2
+ import { c as PinStore } from "./store-DAB5CEA1.js";
3
3
  //#region src/hub.d.ts
4
4
  type Identity = {
5
5
  userId: string;
@@ -24,7 +24,7 @@ declare function createHubHandler(opts: HubOptions): (req: Request) => Promise<R
24
24
  declare function match(path: string, pattern: RegExp): string | null;
25
25
  declare function mustGetPin(store: PinStore, id: string): {
26
26
  text: string;
27
- kind: "move" | "note";
27
+ kind: "comment" | "move" | "note";
28
28
  target?: {
29
29
  url?: string | undefined;
30
30
  selector?: string | undefined;
@@ -1,4 +1,4 @@
1
- import { s as Pin } from "./schema-DrY4XoLZ.js";
1
+ import { s as Pin } from "./schema-BlM4lTLW.js";
2
2
  //#region src/markdown.d.ts
3
3
  type DetailLevel = "compact" | "standard" | "forensic";
4
4
  declare function pinsToMarkdown(pins: Pin[], level: DetailLevel): string;
@@ -0,0 +1,6 @@
1
+ import { s as Pin } from "./schema-BlM4lTLW.js";
2
+ import "./store-DAB5CEA1.js";
3
+ //#region src/delivery/payload.d.ts
4
+ type GetPin = (id: string) => Pin | null;
5
+ //#endregion
6
+ export { GetPin as t };
@@ -87,18 +87,21 @@ var DeliveryRouter = class {
87
87
  /**
88
88
  * Deliverable events are pin.created and thread.message with role human|mirror
89
89
  * (rule 3: agent-authored events are never delivered back). Everything else —
90
- * pin.resolved, and later event types — is skipped-by-design.
90
+ * pin.resolved, and later event types — is skipped-by-design. So is anything on
91
+ * a `comment` pin (rule 4): a remark for people is context, not a task, and a
92
+ * human replying to a human note must not wake an agent either.
91
93
  */
92
94
  route(event) {
93
95
  if (event.type === "pin.created") {
94
96
  const pin = PinSchema.parse(event.payload);
97
+ if (pin.kind === "comment") return { kind: "skip" };
95
98
  return this.bindTarget(pin);
96
99
  }
97
100
  if (event.type === "thread.message") {
98
101
  const message = ThreadMessageSchema.parse(event.payload);
99
102
  if (message.role === "agent") return { kind: "skip" };
100
103
  const pin = this.store.getPin(message.pinId);
101
- if (pin === null) return { kind: "skip" };
104
+ if (pin === null || pin.kind === "comment") return { kind: "skip" };
102
105
  return this.bindTarget(pin);
103
106
  }
104
107
  return { kind: "skip" };
@@ -1,6 +1,6 @@
1
- import { g as ThreadMessage, s as Pin } from "./schema-DrY4XoLZ.js";
2
- import { t as Session } from "./sessions-B74wWsan.js";
3
- import { c as PinStore, l as StoredEvent } from "./store-K72bMbn7.js";
1
+ import { g as ThreadMessage, s as Pin } from "./schema-BlM4lTLW.js";
2
+ import { t as Session } from "./sessions-BOrd8Yvv.js";
3
+ import { c as PinStore, l as StoredEvent } from "./store-DAB5CEA1.js";
4
4
  //#region src/delivery/context.d.ts
5
5
  /**
6
6
  * The per-turn injection context: every open pin at the `compact` dial,
@@ -45,7 +45,9 @@ declare class DeliveryRouter {
45
45
  /**
46
46
  * Deliverable events are pin.created and thread.message with role human|mirror
47
47
  * (rule 3: agent-authored events are never delivered back). Everything else —
48
- * pin.resolved, and later event types — is skipped-by-design.
48
+ * pin.resolved, and later event types — is skipped-by-design. So is anything on
49
+ * a `comment` pin (rule 4): a remark for people is context, not a task, and a
50
+ * human replying to a human note must not wake an agent either.
49
51
  */
50
52
  private route;
51
53
  private bindTarget;
@@ -75,6 +75,7 @@ declare const LinkSchema: z.ZodObject<{
75
75
  declare const PinInputSchema: z.ZodObject<{
76
76
  text: z.ZodString;
77
77
  kind: z.ZodDefault<z.ZodEnum<{
78
+ comment: "comment";
78
79
  move: "move";
79
80
  note: "note";
80
81
  }>>;
@@ -221,6 +222,7 @@ declare const PinInputSchema: z.ZodObject<{
221
222
  declare const PinSchema: z.ZodObject<{
222
223
  text: z.ZodString;
223
224
  kind: z.ZodDefault<z.ZodEnum<{
225
+ comment: "comment";
224
226
  move: "move";
225
227
  note: "note";
226
228
  }>>;
package/dist/schema.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as ThreadMessageSchema, a as Link, c as PinInput, d as Rect, f as RectSchema, g as ThreadMessage, h as SessionRefSchema, i as AttachmentSchema, l as PinInputSchema, m as SessionRef, n as AppliedEditSchema, o as LinkSchema, p as SCHEMA_VERSION, r as Attachment, s as Pin, t as AppliedEdit, u as PinSchema, v as pinJsonSchema } from "./schema-DrY4XoLZ.js";
1
+ import { _ as ThreadMessageSchema, a as Link, c as PinInput, d as Rect, f as RectSchema, g as ThreadMessage, h as SessionRefSchema, i as AttachmentSchema, l as PinInputSchema, m as SessionRef, n as AppliedEditSchema, o as LinkSchema, p as SCHEMA_VERSION, r as Attachment, s as Pin, t as AppliedEdit, u as PinSchema, v as pinJsonSchema } from "./schema-BlM4lTLW.js";
2
2
  export { AppliedEdit, AppliedEditSchema, Attachment, AttachmentSchema, Link, LinkSchema, Pin, PinInput, PinInputSchema, PinSchema, Rect, RectSchema, SCHEMA_VERSION, SessionRef, SessionRefSchema, ThreadMessage, ThreadMessageSchema, pinJsonSchema };
package/dist/schema.js CHANGED
@@ -126,7 +126,11 @@ const LinkSchema = z.object({
126
126
  });
127
127
  const PinInputSchema = z.object({
128
128
  text: z.string().min(1),
129
- kind: z.enum(["note", "move"]).default("note"),
129
+ kind: z.enum([
130
+ "note",
131
+ "move",
132
+ "comment"
133
+ ]).default("note"),
130
134
  target: TargetSchema.optional(),
131
135
  move: z.object({
132
136
  from: RectSchema,
package/dist/schema.json CHANGED
@@ -11,7 +11,8 @@
11
11
  "type": "string",
12
12
  "enum": [
13
13
  "note",
14
- "move"
14
+ "move",
15
+ "comment"
15
16
  ]
16
17
  },
17
18
  "target": {
@@ -1,4 +1,4 @@
1
- import { m as SessionRef } from "./schema-DrY4XoLZ.js";
1
+ import { m as SessionRef } from "./schema-BlM4lTLW.js";
2
2
  import { z } from "zod";
3
3
  import { Database } from "bun:sqlite";
4
4
  //#region src/trailer.d.ts
@@ -1,2 +1,2 @@
1
- import { a as parseTrailers, i as SqliteSessionStore, n as SessionSchema, r as SessionStore, t as Session } from "./sessions-B74wWsan.js";
1
+ import { a as parseTrailers, i as SqliteSessionStore, n as SessionSchema, r as SessionStore, t as Session } from "./sessions-BOrd8Yvv.js";
2
2
  export { Session, SessionSchema, SessionStore, SqliteSessionStore, parseTrailers };
@@ -1,5 +1,5 @@
1
- import { a as Link, c as PinInput, g as ThreadMessage, m as SessionRef, r as Attachment, s as Pin, t as AppliedEdit } from "./schema-DrY4XoLZ.js";
2
- import { r as SessionStore } from "./sessions-B74wWsan.js";
1
+ import { a as Link, c as PinInput, g as ThreadMessage, m as SessionRef, r as Attachment, s as Pin, t as AppliedEdit } from "./schema-BlM4lTLW.js";
2
+ import { r as SessionStore } from "./sessions-BOrd8Yvv.js";
3
3
  //#region src/store-errors.d.ts
4
4
  /** The addressed row does not exist. Mapped to 404 / `E_NOT_FOUND` by the hub. */
5
5
  declare class NotFoundError extends Error {}
package/dist/store.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as LinkStore, c as PinStore, d as ConflictError, f as NotFoundError, i as DeliveryStore, l as StoredEvent, n as DeliveryRow, o as MIGRATIONS, r as DeliveryStatus, s as Migration, t as CursorStore, u as openStore } from "./store-K72bMbn7.js";
1
+ import { a as LinkStore, c as PinStore, d as ConflictError, f as NotFoundError, i as DeliveryStore, l as StoredEvent, n as DeliveryRow, o as MIGRATIONS, r as DeliveryStatus, s as Migration, t as CursorStore, u as openStore } from "./store-DAB5CEA1.js";
2
2
  export { ConflictError, CursorStore, DeliveryRow, DeliveryStatus, DeliveryStore, LinkStore, MIGRATIONS, Migration, NotFoundError, PinStore, StoredEvent, openStore };
@@ -1,4 +1,4 @@
1
- import { a as Link, g as ThreadMessage, s as Pin } from "./schema-DrY4XoLZ.js";
1
+ import { a as Link, g as ThreadMessage, s as Pin } from "./schema-BlM4lTLW.js";
2
2
  //#region src/connectors/types.d.ts
3
3
  /** Host-injected transport: local = `gh` CLI shell-out (impl in packages/cli, Bun.$); Worker = App token fetch. */
4
4
  interface ConnectorTransport {
@@ -1,4 +1,4 @@
1
- import { l as StoredEvent } from "./store-K72bMbn7.js";
1
+ import { l as StoredEvent } from "./store-DAB5CEA1.js";
2
2
  import { z } from "zod";
3
3
  //#region src/ws-protocol.d.ts
4
4
  declare const WS_PATH = "/ws";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autono/pinbox-core",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +0,0 @@
1
- import { s as Pin } from "./schema-DrY4XoLZ.js";
2
- import "./store-K72bMbn7.js";
3
- //#region src/delivery/payload.d.ts
4
- type GetPin = (id: string) => Pin | null;
5
- //#endregion
6
- export { GetPin as t };