@autono/pinbox-core 0.19.0 → 0.21.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.
- package/dist/connectors/github.d.ts +1 -1
- package/dist/connectors/index.d.ts +3 -3
- package/dist/delivery/openclaw.d.ts +2 -2
- package/dist/delivery/openclaw.js +1 -1
- package/dist/delivery/resume.d.ts +2 -2
- package/dist/delivery/resume.js +1 -1
- package/dist/delivery/router.d.ts +1 -1
- package/dist/delivery/router.js +1 -1
- package/dist/delivery/webhook.d.ts +1 -1
- package/dist/do.d.ts +4 -4
- package/dist/do.js +4 -4
- package/dist/{hub-D-cHpKmA.js → hub-Ds7W5n89.js} +1 -1
- package/dist/hub-server.d.ts +2 -2
- package/dist/hub-server.js +1 -1
- package/dist/hub.d.ts +30 -2
- package/dist/hub.js +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +5 -0
- package/dist/payload-CmKx5yL2.d.ts +6 -0
- package/dist/{proc-BMp_pbPS.js → proc-CBLeAM7c.js} +1 -1
- package/dist/{router-BH74psWn.js → router-DrYLHCF4.js} +1 -1
- package/dist/{router-DOwWVak2.d.ts → router-NoiuUFb-.d.ts} +3 -3
- package/dist/{schema-BlM4lTLW.d.ts → schema-BLZ3MqMD.d.ts} +101 -1
- package/dist/schema-DDpii7iQ.js +192 -0
- package/dist/schema.d.ts +2 -2
- package/dist/schema.js +2 -163
- package/dist/schema.json +246 -0
- package/dist/{sessions-BOrd8Yvv.d.ts → sessions-Bd7_G5jW.d.ts} +1 -1
- package/dist/sessions.d.ts +1 -1
- package/dist/{store-IR3o5YwY.js → store-Daziyk0_.js} +1 -1
- package/dist/{store-DAB5CEA1.d.ts → store-QLtACKhW.d.ts} +2 -2
- package/dist/store.d.ts +1 -1
- package/dist/store.js +1 -1
- package/dist/{types-BmfT_m1p.d.ts → types-BIm_s4nu.d.ts} +1 -1
- package/dist/ws-protocol.d.ts +1 -1
- package/package.json +1 -1
- package/dist/payload-CYbjb8ZB.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ConnectorTransport, t as Connector } from "../types-
|
|
1
|
+
import { r as ConnectorTransport, t as Connector } from "../types-BIm_s4nu.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-
|
|
2
|
-
import { a as RemoteStatus, i as RemoteComment, n as ConnectorEvents, r as ConnectorTransport, t as Connector } from "../types-
|
|
3
|
-
import { c as PinStore } from "../store-
|
|
1
|
+
import { g as ThreadMessage } from "../schema-BLZ3MqMD.js";
|
|
2
|
+
import { a as RemoteStatus, i as RemoteComment, n as ConnectorEvents, r as ConnectorTransport, t as Connector } from "../types-BIm_s4nu.js";
|
|
3
|
+
import { c as PinStore } from "../store-QLtACKhW.js";
|
|
4
4
|
//#region src/connectors/github-app.d.ts
|
|
5
5
|
/** The slice of fetch this transport uses — injectable without dragging in Bun's extras. */
|
|
6
6
|
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as GetPin } from "../payload-
|
|
2
|
-
import { n as DeliveryAdapter } from "../router-
|
|
1
|
+
import { t as GetPin } from "../payload-CmKx5yL2.js";
|
|
2
|
+
import { n as DeliveryAdapter } from "../router-NoiuUFb-.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-
|
|
2
|
-
import { n as DeliveryAdapter } from "../router-
|
|
1
|
+
import { t as GetPin } from "../payload-CmKx5yL2.js";
|
|
2
|
+
import { n as DeliveryAdapter } from "../router-NoiuUFb-.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>;
|
package/dist/delivery/resume.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as resolveBinary, r as payloadForEvent, t as drainToExit } from "../proc-
|
|
1
|
+
import { n as resolveBinary, r as payloadForEvent, t as drainToExit } from "../proc-CBLeAM7c.js";
|
|
2
2
|
//#region src/delivery/resume.ts
|
|
3
3
|
const RESUME_COMMANDS = {
|
|
4
4
|
claude: (key, prompt) => [
|
|
@@ -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-
|
|
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-NoiuUFb-.js";
|
|
2
2
|
export { DEFAULT_HOOKS_ESCALATE_MS, DeliveryAdapter, DeliveryRouter, HOOK_CAPABLE_AGENTS, buildInjectionContext, buildReplyPrompt, createHooksAdapter, hooksEscalateMs };
|
package/dist/delivery/router.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { a as createHooksAdapter, i as HOOK_CAPABLE_AGENTS, n as DeliveryRouter, r as hooksEscalateMs, t as DEFAULT_HOOKS_ESCALATE_MS } from "../router-DrYLHCF4.js";
|
|
3
3
|
export { DEFAULT_HOOKS_ESCALATE_MS, DeliveryRouter, HOOK_CAPABLE_AGENTS, buildInjectionContext, buildReplyPrompt, createHooksAdapter, hooksEscalateMs };
|
package/dist/do.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Link, g as ThreadMessage, m as SessionRef, r as Attachment, s as Pin, t as AppliedEdit } from "./schema-
|
|
2
|
-
import { t as Connector } from "./types-
|
|
3
|
-
import { r as SessionStore } from "./sessions-
|
|
4
|
-
import { a as LinkStore, c as PinStore, i as DeliveryStore, l as StoredEvent, t as CursorStore } from "./store-
|
|
1
|
+
import { a as Link, g as ThreadMessage, m as SessionRef, r as Attachment, s as Pin, t as AppliedEdit } from "./schema-BLZ3MqMD.js";
|
|
2
|
+
import { t as Connector } from "./types-BIm_s4nu.js";
|
|
3
|
+
import { r as SessionStore } from "./sessions-Bd7_G5jW.js";
|
|
4
|
+
import { a as LinkStore, c as PinStore, i as DeliveryStore, l as StoredEvent, t as CursorStore } from "./store-QLtACKhW.js";
|
|
5
5
|
import { Broadcaster } from "./ws.js";
|
|
6
6
|
import { DurableObjectState, R2Bucket, WebSocket } from "@cloudflare/workers-types";
|
|
7
7
|
//#region src/do-store.d.ts
|
package/dist/do.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as PinSchema, c as SessionRefSchema, i as PinInputSchema, l as ThreadMessageSchema, n as AttachmentSchema } from "./schema-DDpii7iQ.js";
|
|
2
2
|
import { a as NotFoundError, i as ConflictError, o as newId, t as SessionSchema } from "./sessions-DrCVTMfI.js";
|
|
3
|
-
import { t as MIGRATIONS } from "./store-
|
|
3
|
+
import { t as MIGRATIONS } from "./store-Daziyk0_.js";
|
|
4
4
|
import { r as drainConnectorPolls } from "./poll-ZSv3wN9C.js";
|
|
5
|
-
import { n as createHubHandler, o as ok, r as err } from "./hub-
|
|
5
|
+
import { n as createHubHandler, o as ok, r as err } from "./hub-Ds7W5n89.js";
|
|
6
6
|
import { ClientHelloSchema, WS_CLOSE_PROTOCOL, WS_CLOSE_UNAUTHORIZED, WS_TOKEN_SUBPROTOCOL_PREFIX, encodeWsEvent } from "./ws-protocol.js";
|
|
7
|
-
import { n as DeliveryRouter } from "./router-
|
|
7
|
+
import { n as DeliveryRouter } from "./router-DrYLHCF4.js";
|
|
8
8
|
import { createWebhookAdapter } from "./delivery/webhook.js";
|
|
9
9
|
import { n as createSlackTransport, o as createGithubAppTransport, r as handleGithubWebhook, t as createSlackConnector } from "./slack-C4P0AbuZ.js";
|
|
10
10
|
import { createGithubConnector } from "./connectors/github.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as SessionRefSchema, i as PinInputSchema, n as AttachmentSchema, t as AppliedEditSchema } from "./schema-DDpii7iQ.js";
|
|
2
2
|
import { a as NotFoundError, i as ConflictError, o as newId } from "./sessions-DrCVTMfI.js";
|
|
3
3
|
import { t as POLL_OPEN_MS } from "./poll-ZSv3wN9C.js";
|
|
4
4
|
import { t as buildInjectionContext } from "./context-BHcEpzVb.js";
|
package/dist/hub-server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as Attachment } from "./schema-
|
|
2
|
-
import { c as PinStore } from "./store-
|
|
1
|
+
import { r as Attachment } from "./schema-BLZ3MqMD.js";
|
|
2
|
+
import { c as PinStore } from "./store-QLtACKhW.js";
|
|
3
3
|
import { HubOptions } from "./hub.js";
|
|
4
4
|
//#region src/attachments.d.ts
|
|
5
5
|
interface AttachmentSink {
|
package/dist/hub-server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as registerAttachmentSink, n as createHubHandler } from "./hub-
|
|
1
|
+
import { c as registerAttachmentSink, n as createHubHandler } from "./hub-Ds7W5n89.js";
|
|
2
2
|
import { ClientHelloSchema, WS_CLOSE_PROTOCOL, WS_CLOSE_UNAUTHORIZED, WS_TOKEN_SUBPROTOCOL_PREFIX, encodeWsEvent } from "./ws-protocol.js";
|
|
3
3
|
//#region src/attachments-local.ts
|
|
4
4
|
const EXTENSIONS = {
|
package/dist/hub.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Connector } from "./types-
|
|
2
|
-
import { c as PinStore } from "./store-
|
|
1
|
+
import { t as Connector } from "./types-BIm_s4nu.js";
|
|
2
|
+
import { c as PinStore } from "./store-QLtACKhW.js";
|
|
3
3
|
//#region src/hub.d.ts
|
|
4
4
|
type Identity = {
|
|
5
5
|
userId: string;
|
|
@@ -26,6 +26,20 @@ declare function mustGetPin(store: PinStore, id: string): {
|
|
|
26
26
|
text: string;
|
|
27
27
|
kind: "comment" | "move" | "note";
|
|
28
28
|
target?: {
|
|
29
|
+
model?: {
|
|
30
|
+
modelId: string;
|
|
31
|
+
revision: string;
|
|
32
|
+
partId: string;
|
|
33
|
+
position: [number, number, number];
|
|
34
|
+
normal?: [number, number, number] | undefined;
|
|
35
|
+
units: "cm" | "in" | "m" | "mm";
|
|
36
|
+
faceIndex?: number | undefined;
|
|
37
|
+
camera?: {
|
|
38
|
+
position: [number, number, number];
|
|
39
|
+
target: [number, number, number];
|
|
40
|
+
up: [number, number, number];
|
|
41
|
+
} | undefined;
|
|
42
|
+
} | undefined;
|
|
29
43
|
url?: string | undefined;
|
|
30
44
|
selector?: string | undefined;
|
|
31
45
|
tag?: string | undefined;
|
|
@@ -55,6 +69,20 @@ declare function mustGetPin(store: PinStore, id: string): {
|
|
|
55
69
|
textRuns?: string[] | undefined;
|
|
56
70
|
} | undefined;
|
|
57
71
|
targets?: {
|
|
72
|
+
model?: {
|
|
73
|
+
modelId: string;
|
|
74
|
+
revision: string;
|
|
75
|
+
partId: string;
|
|
76
|
+
position: [number, number, number];
|
|
77
|
+
normal?: [number, number, number] | undefined;
|
|
78
|
+
units: "cm" | "in" | "m" | "mm";
|
|
79
|
+
faceIndex?: number | undefined;
|
|
80
|
+
camera?: {
|
|
81
|
+
position: [number, number, number];
|
|
82
|
+
target: [number, number, number];
|
|
83
|
+
up: [number, number, number];
|
|
84
|
+
} | undefined;
|
|
85
|
+
} | undefined;
|
|
58
86
|
url?: string | undefined;
|
|
59
87
|
selector?: string | undefined;
|
|
60
88
|
tag?: string | undefined;
|
package/dist/hub.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as mustGetPin, i as match, n as createHubHandler, o as ok, r as err, s as readJson, t as BodyNotJsonError } from "./hub-
|
|
1
|
+
import { a as mustGetPin, i as match, n as createHubHandler, o as ok, r as err, s as readJson, t as BodyNotJsonError } from "./hub-Ds7W5n89.js";
|
|
2
2
|
export { BodyNotJsonError, createHubHandler, err, match, mustGetPin, ok, readJson };
|
package/dist/markdown.d.ts
CHANGED
package/dist/markdown.js
CHANGED
|
@@ -29,6 +29,8 @@ function standardFacts(pin) {
|
|
|
29
29
|
const target = pin.target;
|
|
30
30
|
const lines = [];
|
|
31
31
|
if (target?.url !== void 0) lines.push(` - url: ${target.url}`);
|
|
32
|
+
const model = target?.model;
|
|
33
|
+
if (model) lines.push(` - model: ${model.modelId} @ ${model.revision}; part: ${model.partId}; local point: ${model.position.join(", ")} ${model.units}`);
|
|
32
34
|
const source = sourceRef(pin);
|
|
33
35
|
if (source !== void 0) lines.push(` - source: ${source}`);
|
|
34
36
|
const rect = target?.rect;
|
|
@@ -44,6 +46,7 @@ function standardFacts(pin) {
|
|
|
44
46
|
*/
|
|
45
47
|
function forensicBlock(pin) {
|
|
46
48
|
const forensic = {};
|
|
49
|
+
if (pin.target?.model) forensic["model"] = pin.target.model;
|
|
47
50
|
if (pin.target?.context) forensic["context"] = pin.target.context;
|
|
48
51
|
if (pin.env && Object.keys(pin.env).length > 0) forensic["env"] = pin.env;
|
|
49
52
|
if (Object.keys(forensic).length === 0) return [];
|
|
@@ -62,6 +65,8 @@ function forensicBlock(pin) {
|
|
|
62
65
|
* a pin the same way.
|
|
63
66
|
*/
|
|
64
67
|
function pinLocus(pin) {
|
|
68
|
+
const model = pin.target?.model;
|
|
69
|
+
if (model) return `${model.modelId}/${model.partId} @ ${model.revision}`;
|
|
65
70
|
return pin.target?.selector ?? sourceRef(pin) ?? pin.target?.url;
|
|
66
71
|
}
|
|
67
72
|
function sourceRef(pin) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PinSchema, ThreadMessageSchema } from "./schema.js";
|
|
1
|
+
import { a as PinSchema, l as ThreadMessageSchema } from "./schema-DDpii7iQ.js";
|
|
2
2
|
import { n as buildReplyPrompt, t as buildInjectionContext } from "./context-BHcEpzVb.js";
|
|
3
3
|
//#region src/delivery/payload.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PinSchema, ThreadMessageSchema } from "./schema.js";
|
|
1
|
+
import { a as PinSchema, l as ThreadMessageSchema } from "./schema-DDpii7iQ.js";
|
|
2
2
|
//#region src/delivery/hooks.ts
|
|
3
3
|
/** Agents whose hook systems can register + pull (research §1: shared hooks schema). */
|
|
4
4
|
const HOOK_CAPABLE_AGENTS = /* @__PURE__ */ new Set([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as ThreadMessage, s as Pin } from "./schema-
|
|
2
|
-
import { t as Session } from "./sessions-
|
|
3
|
-
import { c as PinStore, l as StoredEvent } from "./store-
|
|
1
|
+
import { g as ThreadMessage, s as Pin } from "./schema-BLZ3MqMD.js";
|
|
2
|
+
import { t as Session } from "./sessions-Bd7_G5jW.js";
|
|
3
|
+
import { c as PinStore, l as StoredEvent } from "./store-QLtACKhW.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,
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
//#region src/model-anchor.d.ts
|
|
3
|
+
/** A point in a named part's LOCAL coordinates, pinned to an immutable model revision.
|
|
4
|
+
* No implicit reprojection across edits: hosts must explicitly migrate stale anchors. */
|
|
5
|
+
declare const ModelAnchorSchema: z.ZodObject<{
|
|
6
|
+
modelId: z.ZodString;
|
|
7
|
+
revision: z.ZodString;
|
|
8
|
+
partId: z.ZodString;
|
|
9
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
10
|
+
normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
11
|
+
units: z.ZodEnum<{
|
|
12
|
+
cm: "cm";
|
|
13
|
+
in: "in";
|
|
14
|
+
m: "m";
|
|
15
|
+
mm: "mm";
|
|
16
|
+
}>;
|
|
17
|
+
faceIndex: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
20
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
21
|
+
up: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
type ModelAnchor = z.infer<typeof ModelAnchorSchema>;
|
|
25
|
+
//#endregion
|
|
2
26
|
//#region src/schema.d.ts
|
|
3
27
|
declare const SCHEMA_VERSION = 1;
|
|
4
28
|
declare const RectSchema: z.ZodType<{
|
|
@@ -80,6 +104,25 @@ declare const PinInputSchema: z.ZodObject<{
|
|
|
80
104
|
note: "note";
|
|
81
105
|
}>>;
|
|
82
106
|
target: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
modelId: z.ZodString;
|
|
109
|
+
revision: z.ZodString;
|
|
110
|
+
partId: z.ZodString;
|
|
111
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
112
|
+
normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
113
|
+
units: z.ZodEnum<{
|
|
114
|
+
cm: "cm";
|
|
115
|
+
in: "in";
|
|
116
|
+
m: "m";
|
|
117
|
+
mm: "mm";
|
|
118
|
+
}>;
|
|
119
|
+
faceIndex: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
122
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
123
|
+
up: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
}, z.core.$strict>>;
|
|
83
126
|
url: z.ZodOptional<z.ZodString>;
|
|
84
127
|
selector: z.ZodOptional<z.ZodString>;
|
|
85
128
|
tag: z.ZodOptional<z.ZodString>;
|
|
@@ -118,6 +161,25 @@ declare const PinInputSchema: z.ZodObject<{
|
|
|
118
161
|
textRuns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
162
|
}, z.core.$strip>>;
|
|
120
163
|
targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
164
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
165
|
+
modelId: z.ZodString;
|
|
166
|
+
revision: z.ZodString;
|
|
167
|
+
partId: z.ZodString;
|
|
168
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
169
|
+
normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
170
|
+
units: z.ZodEnum<{
|
|
171
|
+
cm: "cm";
|
|
172
|
+
in: "in";
|
|
173
|
+
m: "m";
|
|
174
|
+
mm: "mm";
|
|
175
|
+
}>;
|
|
176
|
+
faceIndex: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
178
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
179
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
180
|
+
up: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
}, z.core.$strict>>;
|
|
121
183
|
url: z.ZodOptional<z.ZodString>;
|
|
122
184
|
selector: z.ZodOptional<z.ZodString>;
|
|
123
185
|
tag: z.ZodOptional<z.ZodString>;
|
|
@@ -227,6 +289,25 @@ declare const PinSchema: z.ZodObject<{
|
|
|
227
289
|
note: "note";
|
|
228
290
|
}>>;
|
|
229
291
|
target: z.ZodOptional<z.ZodObject<{
|
|
292
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
293
|
+
modelId: z.ZodString;
|
|
294
|
+
revision: z.ZodString;
|
|
295
|
+
partId: z.ZodString;
|
|
296
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
297
|
+
normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
298
|
+
units: z.ZodEnum<{
|
|
299
|
+
cm: "cm";
|
|
300
|
+
in: "in";
|
|
301
|
+
m: "m";
|
|
302
|
+
mm: "mm";
|
|
303
|
+
}>;
|
|
304
|
+
faceIndex: z.ZodOptional<z.ZodNumber>;
|
|
305
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
306
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
307
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
308
|
+
up: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
}, z.core.$strict>>;
|
|
230
311
|
url: z.ZodOptional<z.ZodString>;
|
|
231
312
|
selector: z.ZodOptional<z.ZodString>;
|
|
232
313
|
tag: z.ZodOptional<z.ZodString>;
|
|
@@ -265,6 +346,25 @@ declare const PinSchema: z.ZodObject<{
|
|
|
265
346
|
textRuns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
266
347
|
}, z.core.$strip>>;
|
|
267
348
|
targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
349
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
350
|
+
modelId: z.ZodString;
|
|
351
|
+
revision: z.ZodString;
|
|
352
|
+
partId: z.ZodString;
|
|
353
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
354
|
+
normal: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
355
|
+
units: z.ZodEnum<{
|
|
356
|
+
cm: "cm";
|
|
357
|
+
in: "in";
|
|
358
|
+
m: "m";
|
|
359
|
+
mm: "mm";
|
|
360
|
+
}>;
|
|
361
|
+
faceIndex: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
camera: z.ZodOptional<z.ZodObject<{
|
|
363
|
+
position: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
364
|
+
target: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
365
|
+
up: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
366
|
+
}, z.core.$strip>>;
|
|
367
|
+
}, z.core.$strict>>;
|
|
268
368
|
url: z.ZodOptional<z.ZodString>;
|
|
269
369
|
selector: z.ZodOptional<z.ZodString>;
|
|
270
370
|
tag: z.ZodOptional<z.ZodString>;
|
|
@@ -405,4 +505,4 @@ type Attachment = z.infer<typeof AttachmentSchema>;
|
|
|
405
505
|
type Link = z.infer<typeof LinkSchema>;
|
|
406
506
|
declare function pinJsonSchema(): Record<string, unknown>;
|
|
407
507
|
//#endregion
|
|
408
|
-
export { ThreadMessageSchema as _, Link as a, PinInput as c, Rect as d, RectSchema as f, ThreadMessage as g, SessionRefSchema as h, AttachmentSchema as i, PinInputSchema as l, SessionRef as m, AppliedEditSchema as n, LinkSchema as o, SCHEMA_VERSION as p, Attachment as r, Pin as s, AppliedEdit as t, PinSchema as u, pinJsonSchema as v };
|
|
508
|
+
export { ThreadMessageSchema as _, Link as a, ModelAnchorSchema as b, PinInput as c, Rect as d, RectSchema as f, ThreadMessage as g, SessionRefSchema as h, AttachmentSchema as i, PinInputSchema as l, SessionRef as m, AppliedEditSchema as n, LinkSchema as o, SCHEMA_VERSION as p, Attachment as r, Pin as s, AppliedEdit as t, PinSchema as u, pinJsonSchema as v, ModelAnchor as y };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/model-anchor.ts
|
|
3
|
+
const vector = z.tuple([
|
|
4
|
+
z.number().finite(),
|
|
5
|
+
z.number().finite(),
|
|
6
|
+
z.number().finite()
|
|
7
|
+
]);
|
|
8
|
+
/** A point in a named part's LOCAL coordinates, pinned to an immutable model revision.
|
|
9
|
+
* No implicit reprojection across edits: hosts must explicitly migrate stale anchors. */
|
|
10
|
+
const ModelAnchorSchema = z.object({
|
|
11
|
+
modelId: z.string().min(1).max(256),
|
|
12
|
+
revision: z.string().min(1).max(256),
|
|
13
|
+
partId: z.string().min(1).max(256),
|
|
14
|
+
position: vector,
|
|
15
|
+
normal: vector.refine((v) => Math.hypot(...v) > 0, "normal must be nonzero").optional(),
|
|
16
|
+
units: z.enum([
|
|
17
|
+
"mm",
|
|
18
|
+
"cm",
|
|
19
|
+
"m",
|
|
20
|
+
"in"
|
|
21
|
+
]),
|
|
22
|
+
faceIndex: z.number().int().nonnegative().optional(),
|
|
23
|
+
camera: z.object({
|
|
24
|
+
position: vector,
|
|
25
|
+
target: vector,
|
|
26
|
+
up: vector
|
|
27
|
+
}).optional()
|
|
28
|
+
}).strict();
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/schema.ts
|
|
31
|
+
const SCHEMA_VERSION = 1;
|
|
32
|
+
const RectSchema = z.object({
|
|
33
|
+
x: z.number(),
|
|
34
|
+
y: z.number(),
|
|
35
|
+
width: z.number(),
|
|
36
|
+
height: z.number()
|
|
37
|
+
});
|
|
38
|
+
const SessionRefSchema = z.object({
|
|
39
|
+
agent: z.string(),
|
|
40
|
+
key: z.string(),
|
|
41
|
+
cwd: z.string().optional()
|
|
42
|
+
});
|
|
43
|
+
const AttachmentSchema = z.object({
|
|
44
|
+
id: z.string(),
|
|
45
|
+
kind: z.enum(["screenshot", "file"]),
|
|
46
|
+
path: z.string().optional(),
|
|
47
|
+
url: z.string().optional(),
|
|
48
|
+
contentType: z.string().optional(),
|
|
49
|
+
width: z.number().int().optional(),
|
|
50
|
+
height: z.number().int().optional()
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* A change an agent made directly to the live page, rather than to a file.
|
|
54
|
+
*
|
|
55
|
+
* On a project with a repo the agent edits source and the dev server reloads, so the change needs
|
|
56
|
+
* no wire representation. A hosted page has no repo to edit, so the only way an agent can actually
|
|
57
|
+
* change what you are looking at is to say which element and what it should now read.
|
|
58
|
+
*
|
|
59
|
+
* `selector` is the pin's own captured selector, never one the agent chose. `texts` lines up with
|
|
60
|
+
* that element's captured `textRuns`, so pinning a nav bar and asking for all four labels to
|
|
61
|
+
* change is a single edit. Text only, never markup, so this can carry no script.
|
|
62
|
+
*/
|
|
63
|
+
const AppliedEditSchema = z.object({
|
|
64
|
+
selector: z.string(),
|
|
65
|
+
/** New text for each of the element's text runs, in order. Length must match, or nothing is applied. */
|
|
66
|
+
texts: z.array(z.string())
|
|
67
|
+
});
|
|
68
|
+
const ThreadMessageSchema = z.object({
|
|
69
|
+
id: z.string(),
|
|
70
|
+
pinId: z.string(),
|
|
71
|
+
role: z.enum([
|
|
72
|
+
"human",
|
|
73
|
+
"agent",
|
|
74
|
+
"mirror"
|
|
75
|
+
]),
|
|
76
|
+
origin: z.string().optional(),
|
|
77
|
+
text: z.string(),
|
|
78
|
+
edit: AppliedEditSchema.optional(),
|
|
79
|
+
attachments: z.array(AttachmentSchema).optional(),
|
|
80
|
+
at: z.string()
|
|
81
|
+
});
|
|
82
|
+
const SourceSchema = z.object({
|
|
83
|
+
file: z.string(),
|
|
84
|
+
line: z.number().optional(),
|
|
85
|
+
via: z.enum([
|
|
86
|
+
"plugin",
|
|
87
|
+
"framework",
|
|
88
|
+
"none"
|
|
89
|
+
])
|
|
90
|
+
});
|
|
91
|
+
const ContextSchema = z.object({
|
|
92
|
+
classes: z.array(z.string()).optional(),
|
|
93
|
+
styles: z.record(z.string(), z.string()).optional(),
|
|
94
|
+
aria: z.record(z.string(), z.string()).optional(),
|
|
95
|
+
nearbyText: z.string().optional(),
|
|
96
|
+
selectedText: z.string().optional(),
|
|
97
|
+
/**
|
|
98
|
+
* The pinned element's text, split the way the markup splits it — one entry per element that
|
|
99
|
+
* actually holds words. A heading is one entry; a nav bar is one per link.
|
|
100
|
+
*
|
|
101
|
+
* `nearbyText` runs them together, which is fine to read and useless to edit: it cannot tell an
|
|
102
|
+
* agent that "work approach people contact" is four separate elements. This can, and it is what
|
|
103
|
+
* lets feedback on a group ("capitalise these") reach every item in it.
|
|
104
|
+
*/
|
|
105
|
+
textRuns: z.array(z.string()).optional()
|
|
106
|
+
});
|
|
107
|
+
const TargetBaseSchema = z.object({
|
|
108
|
+
model: ModelAnchorSchema.optional(),
|
|
109
|
+
url: z.string().optional(),
|
|
110
|
+
selector: z.string().optional(),
|
|
111
|
+
tag: z.string().optional(),
|
|
112
|
+
rect: RectSchema.optional(),
|
|
113
|
+
/** Where inside `rect` the click landed, 0–1 on each axis. Absent ⇒ anchor at the centre. */
|
|
114
|
+
spot: z.object({
|
|
115
|
+
x: z.number(),
|
|
116
|
+
y: z.number()
|
|
117
|
+
}).optional(),
|
|
118
|
+
fixed: z.boolean().optional(),
|
|
119
|
+
anchor: z.string().optional(),
|
|
120
|
+
source: SourceSchema.optional(),
|
|
121
|
+
context: ContextSchema.optional()
|
|
122
|
+
});
|
|
123
|
+
const TargetSchema = TargetBaseSchema.extend({ targets: z.array(TargetBaseSchema).optional() });
|
|
124
|
+
const EnvSchema = z.object({
|
|
125
|
+
viewport: z.object({
|
|
126
|
+
w: z.number(),
|
|
127
|
+
h: z.number(),
|
|
128
|
+
dpr: z.number()
|
|
129
|
+
}).optional(),
|
|
130
|
+
browser: z.string().optional(),
|
|
131
|
+
os: z.string().optional(),
|
|
132
|
+
colorScheme: z.enum(["light", "dark"]).optional(),
|
|
133
|
+
branch: z.string().optional(),
|
|
134
|
+
commit: z.string().optional()
|
|
135
|
+
});
|
|
136
|
+
const AuthorSchema = z.object({
|
|
137
|
+
userId: z.string(),
|
|
138
|
+
name: z.string().optional(),
|
|
139
|
+
email: z.string().optional()
|
|
140
|
+
});
|
|
141
|
+
const ResolutionSchema = z.object({
|
|
142
|
+
by: z.enum(["human", "agent"]),
|
|
143
|
+
note: z.string().optional(),
|
|
144
|
+
commit: z.string().optional(),
|
|
145
|
+
at: z.string()
|
|
146
|
+
});
|
|
147
|
+
const VerificationSchema = z.object({
|
|
148
|
+
outcome: z.enum(["accepted", "reopened"]),
|
|
149
|
+
at: z.string()
|
|
150
|
+
});
|
|
151
|
+
const LinkSchema = z.object({
|
|
152
|
+
connector: z.string(),
|
|
153
|
+
ref: z.string(),
|
|
154
|
+
url: z.string()
|
|
155
|
+
});
|
|
156
|
+
const PinInputSchema = z.object({
|
|
157
|
+
text: z.string().min(1),
|
|
158
|
+
kind: z.enum([
|
|
159
|
+
"note",
|
|
160
|
+
"move",
|
|
161
|
+
"comment"
|
|
162
|
+
]).default("note"),
|
|
163
|
+
target: TargetSchema.optional(),
|
|
164
|
+
move: z.object({
|
|
165
|
+
from: RectSchema,
|
|
166
|
+
to: RectSchema
|
|
167
|
+
}).optional(),
|
|
168
|
+
env: EnvSchema.optional(),
|
|
169
|
+
author: AuthorSchema,
|
|
170
|
+
agentSession: SessionRefSchema.optional(),
|
|
171
|
+
attachments: z.array(AttachmentSchema).optional()
|
|
172
|
+
});
|
|
173
|
+
const PinSchema = PinInputSchema.extend({
|
|
174
|
+
id: z.string().regex(/^pin_[a-z0-9]{10}$/),
|
|
175
|
+
/**
|
|
176
|
+
* Stable per-project ordinal, hub-assigned at creation like an issue number —
|
|
177
|
+
* never renumbered by resolution or reordering (dogfood: index-derived chip
|
|
178
|
+
* numbers kept shifting). Optional because pins predate it; readers fall back.
|
|
179
|
+
*/
|
|
180
|
+
n: z.number().int().positive().optional(),
|
|
181
|
+
schemaVersion: z.literal(1),
|
|
182
|
+
status: z.enum(["open", "resolved"]).default("open"),
|
|
183
|
+
createdAt: z.string(),
|
|
184
|
+
resolution: ResolutionSchema.optional(),
|
|
185
|
+
verification: VerificationSchema.optional(),
|
|
186
|
+
links: z.array(LinkSchema).optional()
|
|
187
|
+
});
|
|
188
|
+
function pinJsonSchema() {
|
|
189
|
+
return z.toJSONSchema(PinSchema);
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { PinSchema as a, SessionRefSchema as c, ModelAnchorSchema as d, PinInputSchema as i, ThreadMessageSchema as l, AttachmentSchema as n, RectSchema as o, LinkSchema as r, SCHEMA_VERSION as s, AppliedEditSchema as t, pinJsonSchema as u };
|
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-
|
|
2
|
-
export { AppliedEdit, AppliedEditSchema, Attachment, AttachmentSchema, Link, LinkSchema, Pin, PinInput, PinInputSchema, PinSchema, Rect, RectSchema, SCHEMA_VERSION, SessionRef, SessionRefSchema, ThreadMessage, ThreadMessageSchema, pinJsonSchema };
|
|
1
|
+
import { _ as ThreadMessageSchema, a as Link, b as ModelAnchorSchema, 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, y as ModelAnchor } from "./schema-BLZ3MqMD.js";
|
|
2
|
+
export { AppliedEdit, AppliedEditSchema, Attachment, AttachmentSchema, Link, LinkSchema, type ModelAnchor, ModelAnchorSchema, Pin, PinInput, PinInputSchema, PinSchema, Rect, RectSchema, SCHEMA_VERSION, SessionRef, SessionRefSchema, ThreadMessage, ThreadMessageSchema, pinJsonSchema };
|
package/dist/schema.js
CHANGED
|
@@ -1,163 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const SCHEMA_VERSION = 1;
|
|
4
|
-
const RectSchema = z.object({
|
|
5
|
-
x: z.number(),
|
|
6
|
-
y: z.number(),
|
|
7
|
-
width: z.number(),
|
|
8
|
-
height: z.number()
|
|
9
|
-
});
|
|
10
|
-
const SessionRefSchema = z.object({
|
|
11
|
-
agent: z.string(),
|
|
12
|
-
key: z.string(),
|
|
13
|
-
cwd: z.string().optional()
|
|
14
|
-
});
|
|
15
|
-
const AttachmentSchema = z.object({
|
|
16
|
-
id: z.string(),
|
|
17
|
-
kind: z.enum(["screenshot", "file"]),
|
|
18
|
-
path: z.string().optional(),
|
|
19
|
-
url: z.string().optional(),
|
|
20
|
-
contentType: z.string().optional(),
|
|
21
|
-
width: z.number().int().optional(),
|
|
22
|
-
height: z.number().int().optional()
|
|
23
|
-
});
|
|
24
|
-
/**
|
|
25
|
-
* A change an agent made directly to the live page, rather than to a file.
|
|
26
|
-
*
|
|
27
|
-
* On a project with a repo the agent edits source and the dev server reloads, so the change needs
|
|
28
|
-
* no wire representation. A hosted page has no repo to edit, so the only way an agent can actually
|
|
29
|
-
* change what you are looking at is to say which element and what it should now read.
|
|
30
|
-
*
|
|
31
|
-
* `selector` is the pin's own captured selector, never one the agent chose. `texts` lines up with
|
|
32
|
-
* that element's captured `textRuns`, so pinning a nav bar and asking for all four labels to
|
|
33
|
-
* change is a single edit. Text only, never markup, so this can carry no script.
|
|
34
|
-
*/
|
|
35
|
-
const AppliedEditSchema = z.object({
|
|
36
|
-
selector: z.string(),
|
|
37
|
-
/** New text for each of the element's text runs, in order. Length must match, or nothing is applied. */
|
|
38
|
-
texts: z.array(z.string())
|
|
39
|
-
});
|
|
40
|
-
const ThreadMessageSchema = z.object({
|
|
41
|
-
id: z.string(),
|
|
42
|
-
pinId: z.string(),
|
|
43
|
-
role: z.enum([
|
|
44
|
-
"human",
|
|
45
|
-
"agent",
|
|
46
|
-
"mirror"
|
|
47
|
-
]),
|
|
48
|
-
origin: z.string().optional(),
|
|
49
|
-
text: z.string(),
|
|
50
|
-
edit: AppliedEditSchema.optional(),
|
|
51
|
-
attachments: z.array(AttachmentSchema).optional(),
|
|
52
|
-
at: z.string()
|
|
53
|
-
});
|
|
54
|
-
const SourceSchema = z.object({
|
|
55
|
-
file: z.string(),
|
|
56
|
-
line: z.number().optional(),
|
|
57
|
-
via: z.enum([
|
|
58
|
-
"plugin",
|
|
59
|
-
"framework",
|
|
60
|
-
"none"
|
|
61
|
-
])
|
|
62
|
-
});
|
|
63
|
-
const ContextSchema = z.object({
|
|
64
|
-
classes: z.array(z.string()).optional(),
|
|
65
|
-
styles: z.record(z.string(), z.string()).optional(),
|
|
66
|
-
aria: z.record(z.string(), z.string()).optional(),
|
|
67
|
-
nearbyText: z.string().optional(),
|
|
68
|
-
selectedText: z.string().optional(),
|
|
69
|
-
/**
|
|
70
|
-
* The pinned element's text, split the way the markup splits it — one entry per element that
|
|
71
|
-
* actually holds words. A heading is one entry; a nav bar is one per link.
|
|
72
|
-
*
|
|
73
|
-
* `nearbyText` runs them together, which is fine to read and useless to edit: it cannot tell an
|
|
74
|
-
* agent that "work approach people contact" is four separate elements. This can, and it is what
|
|
75
|
-
* lets feedback on a group ("capitalise these") reach every item in it.
|
|
76
|
-
*/
|
|
77
|
-
textRuns: z.array(z.string()).optional()
|
|
78
|
-
});
|
|
79
|
-
const TargetBaseSchema = z.object({
|
|
80
|
-
url: z.string().optional(),
|
|
81
|
-
selector: z.string().optional(),
|
|
82
|
-
tag: z.string().optional(),
|
|
83
|
-
rect: RectSchema.optional(),
|
|
84
|
-
/** Where inside `rect` the click landed, 0–1 on each axis. Absent ⇒ anchor at the centre. */
|
|
85
|
-
spot: z.object({
|
|
86
|
-
x: z.number(),
|
|
87
|
-
y: z.number()
|
|
88
|
-
}).optional(),
|
|
89
|
-
fixed: z.boolean().optional(),
|
|
90
|
-
anchor: z.string().optional(),
|
|
91
|
-
source: SourceSchema.optional(),
|
|
92
|
-
context: ContextSchema.optional()
|
|
93
|
-
});
|
|
94
|
-
const TargetSchema = TargetBaseSchema.extend({ targets: z.array(TargetBaseSchema).optional() });
|
|
95
|
-
const EnvSchema = z.object({
|
|
96
|
-
viewport: z.object({
|
|
97
|
-
w: z.number(),
|
|
98
|
-
h: z.number(),
|
|
99
|
-
dpr: z.number()
|
|
100
|
-
}).optional(),
|
|
101
|
-
browser: z.string().optional(),
|
|
102
|
-
os: z.string().optional(),
|
|
103
|
-
colorScheme: z.enum(["light", "dark"]).optional(),
|
|
104
|
-
branch: z.string().optional(),
|
|
105
|
-
commit: z.string().optional()
|
|
106
|
-
});
|
|
107
|
-
const AuthorSchema = z.object({
|
|
108
|
-
userId: z.string(),
|
|
109
|
-
name: z.string().optional(),
|
|
110
|
-
email: z.string().optional()
|
|
111
|
-
});
|
|
112
|
-
const ResolutionSchema = z.object({
|
|
113
|
-
by: z.enum(["human", "agent"]),
|
|
114
|
-
note: z.string().optional(),
|
|
115
|
-
commit: z.string().optional(),
|
|
116
|
-
at: z.string()
|
|
117
|
-
});
|
|
118
|
-
const VerificationSchema = z.object({
|
|
119
|
-
outcome: z.enum(["accepted", "reopened"]),
|
|
120
|
-
at: z.string()
|
|
121
|
-
});
|
|
122
|
-
const LinkSchema = z.object({
|
|
123
|
-
connector: z.string(),
|
|
124
|
-
ref: z.string(),
|
|
125
|
-
url: z.string()
|
|
126
|
-
});
|
|
127
|
-
const PinInputSchema = z.object({
|
|
128
|
-
text: z.string().min(1),
|
|
129
|
-
kind: z.enum([
|
|
130
|
-
"note",
|
|
131
|
-
"move",
|
|
132
|
-
"comment"
|
|
133
|
-
]).default("note"),
|
|
134
|
-
target: TargetSchema.optional(),
|
|
135
|
-
move: z.object({
|
|
136
|
-
from: RectSchema,
|
|
137
|
-
to: RectSchema
|
|
138
|
-
}).optional(),
|
|
139
|
-
env: EnvSchema.optional(),
|
|
140
|
-
author: AuthorSchema,
|
|
141
|
-
agentSession: SessionRefSchema.optional(),
|
|
142
|
-
attachments: z.array(AttachmentSchema).optional()
|
|
143
|
-
});
|
|
144
|
-
const PinSchema = PinInputSchema.extend({
|
|
145
|
-
id: z.string().regex(/^pin_[a-z0-9]{10}$/),
|
|
146
|
-
/**
|
|
147
|
-
* Stable per-project ordinal, hub-assigned at creation like an issue number —
|
|
148
|
-
* never renumbered by resolution or reordering (dogfood: index-derived chip
|
|
149
|
-
* numbers kept shifting). Optional because pins predate it; readers fall back.
|
|
150
|
-
*/
|
|
151
|
-
n: z.number().int().positive().optional(),
|
|
152
|
-
schemaVersion: z.literal(1),
|
|
153
|
-
status: z.enum(["open", "resolved"]).default("open"),
|
|
154
|
-
createdAt: z.string(),
|
|
155
|
-
resolution: ResolutionSchema.optional(),
|
|
156
|
-
verification: VerificationSchema.optional(),
|
|
157
|
-
links: z.array(LinkSchema).optional()
|
|
158
|
-
});
|
|
159
|
-
function pinJsonSchema() {
|
|
160
|
-
return z.toJSONSchema(PinSchema);
|
|
161
|
-
}
|
|
162
|
-
//#endregion
|
|
163
|
-
export { AppliedEditSchema, AttachmentSchema, LinkSchema, PinInputSchema, PinSchema, RectSchema, SCHEMA_VERSION, SessionRefSchema, ThreadMessageSchema, pinJsonSchema };
|
|
1
|
+
import { a as PinSchema, c as SessionRefSchema, d as ModelAnchorSchema, i as PinInputSchema, l as ThreadMessageSchema, n as AttachmentSchema, o as RectSchema, r as LinkSchema, s as SCHEMA_VERSION, t as AppliedEditSchema, u as pinJsonSchema } from "./schema-DDpii7iQ.js";
|
|
2
|
+
export { AppliedEditSchema, AttachmentSchema, LinkSchema, ModelAnchorSchema, PinInputSchema, PinSchema, RectSchema, SCHEMA_VERSION, SessionRefSchema, ThreadMessageSchema, pinJsonSchema };
|
package/dist/schema.json
CHANGED
|
@@ -18,6 +18,129 @@
|
|
|
18
18
|
"target": {
|
|
19
19
|
"type": "object",
|
|
20
20
|
"properties": {
|
|
21
|
+
"model": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"modelId": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"maxLength": 256
|
|
28
|
+
},
|
|
29
|
+
"revision": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"maxLength": 256
|
|
33
|
+
},
|
|
34
|
+
"partId": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 256
|
|
38
|
+
},
|
|
39
|
+
"position": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"prefixItems": [
|
|
42
|
+
{
|
|
43
|
+
"type": "number"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "number"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "number"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"normal": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"prefixItems": [
|
|
56
|
+
{
|
|
57
|
+
"type": "number"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "number"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "number"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"units": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": [
|
|
70
|
+
"mm",
|
|
71
|
+
"cm",
|
|
72
|
+
"m",
|
|
73
|
+
"in"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"faceIndex": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"maximum": 9007199254740991
|
|
80
|
+
},
|
|
81
|
+
"camera": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"position": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"prefixItems": [
|
|
87
|
+
{
|
|
88
|
+
"type": "number"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "number"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"type": "number"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"target": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"prefixItems": [
|
|
101
|
+
{
|
|
102
|
+
"type": "number"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "number"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"type": "number"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"up": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"prefixItems": [
|
|
115
|
+
{
|
|
116
|
+
"type": "number"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "number"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "number"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": [
|
|
128
|
+
"position",
|
|
129
|
+
"target",
|
|
130
|
+
"up"
|
|
131
|
+
],
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": [
|
|
136
|
+
"modelId",
|
|
137
|
+
"revision",
|
|
138
|
+
"partId",
|
|
139
|
+
"position",
|
|
140
|
+
"units"
|
|
141
|
+
],
|
|
142
|
+
"additionalProperties": false
|
|
143
|
+
},
|
|
21
144
|
"url": {
|
|
22
145
|
"type": "string"
|
|
23
146
|
},
|
|
@@ -144,6 +267,129 @@
|
|
|
144
267
|
"items": {
|
|
145
268
|
"type": "object",
|
|
146
269
|
"properties": {
|
|
270
|
+
"model": {
|
|
271
|
+
"type": "object",
|
|
272
|
+
"properties": {
|
|
273
|
+
"modelId": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"minLength": 1,
|
|
276
|
+
"maxLength": 256
|
|
277
|
+
},
|
|
278
|
+
"revision": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"minLength": 1,
|
|
281
|
+
"maxLength": 256
|
|
282
|
+
},
|
|
283
|
+
"partId": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"minLength": 1,
|
|
286
|
+
"maxLength": 256
|
|
287
|
+
},
|
|
288
|
+
"position": {
|
|
289
|
+
"type": "array",
|
|
290
|
+
"prefixItems": [
|
|
291
|
+
{
|
|
292
|
+
"type": "number"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"type": "number"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"type": "number"
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"normal": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"prefixItems": [
|
|
305
|
+
{
|
|
306
|
+
"type": "number"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"type": "number"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"type": "number"
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"units": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"enum": [
|
|
319
|
+
"mm",
|
|
320
|
+
"cm",
|
|
321
|
+
"m",
|
|
322
|
+
"in"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"faceIndex": {
|
|
326
|
+
"type": "integer",
|
|
327
|
+
"minimum": 0,
|
|
328
|
+
"maximum": 9007199254740991
|
|
329
|
+
},
|
|
330
|
+
"camera": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"properties": {
|
|
333
|
+
"position": {
|
|
334
|
+
"type": "array",
|
|
335
|
+
"prefixItems": [
|
|
336
|
+
{
|
|
337
|
+
"type": "number"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"type": "number"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"type": "number"
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"target": {
|
|
348
|
+
"type": "array",
|
|
349
|
+
"prefixItems": [
|
|
350
|
+
{
|
|
351
|
+
"type": "number"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"type": "number"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"type": "number"
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"up": {
|
|
362
|
+
"type": "array",
|
|
363
|
+
"prefixItems": [
|
|
364
|
+
{
|
|
365
|
+
"type": "number"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"type": "number"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"type": "number"
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"required": [
|
|
377
|
+
"position",
|
|
378
|
+
"target",
|
|
379
|
+
"up"
|
|
380
|
+
],
|
|
381
|
+
"additionalProperties": false
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"required": [
|
|
385
|
+
"modelId",
|
|
386
|
+
"revision",
|
|
387
|
+
"partId",
|
|
388
|
+
"position",
|
|
389
|
+
"units"
|
|
390
|
+
],
|
|
391
|
+
"additionalProperties": false
|
|
392
|
+
},
|
|
147
393
|
"url": {
|
|
148
394
|
"type": "string"
|
|
149
395
|
},
|
package/dist/sessions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseTrailers, i as SqliteSessionStore, n as SessionSchema, r as SessionStore, t as Session } from "./sessions-
|
|
1
|
+
import { a as parseTrailers, i as SqliteSessionStore, n as SessionSchema, r as SessionStore, t as Session } from "./sessions-Bd7_G5jW.js";
|
|
2
2
|
export { Session, SessionSchema, SessionStore, SqliteSessionStore, parseTrailers };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as PinSchema, c as SessionRefSchema, i as PinInputSchema, l as ThreadMessageSchema, r as LinkSchema } from "./schema-DDpii7iQ.js";
|
|
2
2
|
import { a as NotFoundError, i as ConflictError, n as SqliteSessionStore, o as newId } from "./sessions-DrCVTMfI.js";
|
|
3
3
|
import { Database } from "bun:sqlite";
|
|
4
4
|
//#region src/store-deliveries.ts
|
|
@@ -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-
|
|
2
|
-
import { r as SessionStore } from "./sessions-
|
|
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-BLZ3MqMD.js";
|
|
2
|
+
import { r as SessionStore } from "./sessions-Bd7_G5jW.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-
|
|
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-QLtACKhW.js";
|
|
2
2
|
export { ConflictError, CursorStore, DeliveryRow, DeliveryStatus, DeliveryStore, LinkStore, MIGRATIONS, Migration, NotFoundError, PinStore, StoredEvent, openStore };
|
package/dist/store.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as NotFoundError, i as ConflictError } from "./sessions-DrCVTMfI.js";
|
|
2
|
-
import { n as openStore, t as MIGRATIONS } from "./store-
|
|
2
|
+
import { n as openStore, t as MIGRATIONS } from "./store-Daziyk0_.js";
|
|
3
3
|
export { ConflictError, MIGRATIONS, NotFoundError, openStore };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Link, g as ThreadMessage, s as Pin } from "./schema-
|
|
1
|
+
import { a as Link, g as ThreadMessage, s as Pin } from "./schema-BLZ3MqMD.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 {
|
package/dist/ws-protocol.d.ts
CHANGED
package/package.json
CHANGED