agentic-documents 0.3.0 → 0.4.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/CHANGELOG.md +13 -0
- package/README.md +32 -1
- package/dist/client.d.ts +171 -0
- package/dist/client.js +114 -0
- package/dist/{service-BKkxEnaJ.d.ts → doc-C_8kCsl7.d.ts} +1 -56
- package/dist/index.d.ts +6 -99
- package/dist/live-worker.d.ts +2 -1
- package/dist/live.d.ts +2 -1
- package/dist/review-BQW2Ci2h.d.ts +99 -0
- package/dist/service-Do2Jwb5U.d.ts +58 -0
- package/dist/worker.d.ts +2 -1
- package/llms.txt +1 -0
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- A typed client for the Worker HTTP API: `createClient({ baseUrl, token, fetch? })` from the new
|
|
8
|
+
`agentic-documents/client` subpath. It has one method per HTTP route, except the WebSocket route. It throws `DocsApiError` with the API
|
|
9
|
+
error code and the HTTP status, takes an `AbortSignal` on every call, and never retries. A 2xx reply
|
|
10
|
+
with the wrong content type or shape throws `DocsApiError` with the code `BAD_RESPONSE`. It uses only
|
|
11
|
+
`fetch`, so it runs in browsers, Workers, and Node 22. Tests run it against the real Worker under
|
|
12
|
+
`wrangler dev`.
|
|
13
|
+
|
|
14
|
+
Nothing else changed since 0.3.0.
|
|
15
|
+
|
|
3
16
|
## 0.3.0
|
|
4
17
|
|
|
5
18
|
### Breaking changes
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
Write documents with people and agents in real time.
|
|
9
9
|
|
|
10
|
-
> Status: early, version 0.
|
|
10
|
+
> Status: early, version 0.4.0. The document model, the text operations, the CLI, the MCP server,
|
|
11
11
|
> the Worker API, and live editing in a room work. The web UI is not built yet.
|
|
12
12
|
|
|
13
13
|
## Install
|
|
@@ -98,6 +98,37 @@ curl "$URL/api/v1/docs/plan/export?format=html" -H "authorization: Bearer $TOKEN
|
|
|
98
98
|
residency check off.
|
|
99
99
|
- Run it locally with `npx wrangler dev`. Set `WRANGLER_SEND_METRICS=false` to turn off wrangler telemetry.
|
|
100
100
|
|
|
101
|
+
## SDK
|
|
102
|
+
|
|
103
|
+
`agentic-documents/client` is a typed client for the Worker HTTP API. It uses only `fetch`, so it runs in
|
|
104
|
+
browsers, Workers, and Node 22. The token sets the author and the role.
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
import { createClient, DocsApiError } from "agentic-documents/client";
|
|
108
|
+
|
|
109
|
+
const docs = createClient({ baseUrl: "https://docs.example.com", token: process.env.AGENTIC_DOCS_TOKEN! });
|
|
110
|
+
await docs.create({ id: "plan", markdown: "# Plan" });
|
|
111
|
+
const [section] = await docs.outline("plan");
|
|
112
|
+
await docs.replace("plan", { section: section.id, content: "Ship it." });
|
|
113
|
+
console.log(await docs.read("plan"));
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
await docs.read("missing", {}, { signal: AbortSignal.timeout(5000) });
|
|
117
|
+
} catch (error) {
|
|
118
|
+
if (error instanceof DocsApiError) console.log(error.code, error.status); // NO_DOCUMENT 404
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- One method per route: `create`, `read`, `outline`, `edits`, `insert`, `replace`, `delete`, `append`,
|
|
123
|
+
`suggest`, `suggestions`, `accept`, `reject`, `comment`, `reply`, `resolve`, `reopen`, `threads`,
|
|
124
|
+
`export`, `room`, `me`, `health`, `state`, and `checkpoint`. The WebSocket route is not a method. Use
|
|
125
|
+
`LiveDoc` from `agentic-documents/live` for it.
|
|
126
|
+
- Every method takes an optional `{ signal }` last. An abort rejects with what `fetch` throws.
|
|
127
|
+
- An API error throws `DocsApiError` with `code` (the API error code), `status` (the HTTP status), and
|
|
128
|
+
`matches`. A reply that is not an API error has the code `HTTP_ERROR`. A 2xx reply with the wrong content type or shape has the code `BAD_RESPONSE`.
|
|
129
|
+
- The client never retries. A write is not safe to send twice.
|
|
130
|
+
- Pass `fetch` to use your own, for a Worker service binding or for tests.
|
|
131
|
+
|
|
101
132
|
## Features
|
|
102
133
|
|
|
103
134
|
- A Yjs document that a Tiptap editor can open. It uses the y-prosemirror layout.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { P as PrincipalKind, S as Section, E as EditEntry } from './doc-C_8kCsl7.js';
|
|
2
|
+
export { A as Anchor } from './doc-C_8kCsl7.js';
|
|
3
|
+
import { D as DocErrorCode, S as Suggestion, T as Thread, E as ExportFormat } from './review-BQW2Ci2h.js';
|
|
4
|
+
import 'yjs';
|
|
5
|
+
|
|
6
|
+
/** The place an edit goes: a section id, or exact text. */
|
|
7
|
+
type Where = {
|
|
8
|
+
section: string;
|
|
9
|
+
at?: "start" | "end";
|
|
10
|
+
} | {
|
|
11
|
+
text: string;
|
|
12
|
+
occurrence?: number;
|
|
13
|
+
at?: "before" | "after";
|
|
14
|
+
};
|
|
15
|
+
interface Me {
|
|
16
|
+
kind: PrincipalKind;
|
|
17
|
+
name: string;
|
|
18
|
+
scopes: string[];
|
|
19
|
+
role: "editor" | "viewer";
|
|
20
|
+
}
|
|
21
|
+
interface Contributor {
|
|
22
|
+
name: string;
|
|
23
|
+
kind: string;
|
|
24
|
+
machine: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface ClientOptions {
|
|
27
|
+
/** The Worker origin, for example `https://docs.example.com`. */
|
|
28
|
+
baseUrl: string;
|
|
29
|
+
/** A bearer token. It sets the author and the role. */
|
|
30
|
+
token: string;
|
|
31
|
+
/** Your own `fetch`. The default is the global one. */
|
|
32
|
+
fetch?: typeof fetch;
|
|
33
|
+
}
|
|
34
|
+
/** Every call takes this last. `signal` cancels the request. */
|
|
35
|
+
interface CallOptions {
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
}
|
|
38
|
+
/** The codes a call can fail with. `BAD_RESPONSE` means a 2xx reply that does not have the expected shape. */
|
|
39
|
+
type DocsApiErrorCode = DocErrorCode | "UNAUTHENTICATED" | "NOT_FOUND" | "UPGRADE_REQUIRED" | "INTERNAL" | "HTTP_ERROR" | "BAD_RESPONSE";
|
|
40
|
+
/** The API refused a call, or sent a reply that is not what it should be. `code` is the API error code. */
|
|
41
|
+
declare class DocsApiError extends Error {
|
|
42
|
+
readonly code: DocsApiErrorCode;
|
|
43
|
+
readonly status: number;
|
|
44
|
+
readonly matches: {
|
|
45
|
+
occurrence: number;
|
|
46
|
+
context: string;
|
|
47
|
+
}[];
|
|
48
|
+
constructor(code: DocsApiErrorCode, message: string, status: number, matches?: {
|
|
49
|
+
occurrence: number;
|
|
50
|
+
context: string;
|
|
51
|
+
}[]);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A client for one Worker. A call that fails with an API error throws `DocsApiError`. A network
|
|
55
|
+
* failure or an abort throws what `fetch` throws. The client never retries: a write is not safe to repeat.
|
|
56
|
+
*/
|
|
57
|
+
declare function createClient(options: ClientOptions): {
|
|
58
|
+
/** `GET /health`. It needs no token, but the client sends it anyway. */
|
|
59
|
+
health(call?: CallOptions): Promise<{
|
|
60
|
+
ok: boolean;
|
|
61
|
+
pack: string;
|
|
62
|
+
}>;
|
|
63
|
+
/** `GET /api/v1/me`: who the token stands for. */
|
|
64
|
+
me: (call?: CallOptions) => Promise<Me>;
|
|
65
|
+
/** `POST /api/v1/docs`. */
|
|
66
|
+
create: (input: {
|
|
67
|
+
id: string;
|
|
68
|
+
markdown?: string;
|
|
69
|
+
}, call?: CallOptions) => Promise<{
|
|
70
|
+
id: string;
|
|
71
|
+
}>;
|
|
72
|
+
/** `GET /read`: the whole document, or one section, as Markdown. */
|
|
73
|
+
read(id: string, input?: {
|
|
74
|
+
section?: string;
|
|
75
|
+
}, call?: CallOptions): Promise<string>;
|
|
76
|
+
outline: (id: string, call?: CallOptions) => Promise<Section[]>;
|
|
77
|
+
edits: (id: string, call?: CallOptions) => Promise<EditEntry[]>;
|
|
78
|
+
insert: (id: string, input: Where & {
|
|
79
|
+
content: string;
|
|
80
|
+
}, call?: CallOptions) => Promise<{
|
|
81
|
+
ok: true;
|
|
82
|
+
}>;
|
|
83
|
+
replace: (id: string, input: Where & {
|
|
84
|
+
content: string;
|
|
85
|
+
}, call?: CallOptions) => Promise<{
|
|
86
|
+
ok: true;
|
|
87
|
+
}>;
|
|
88
|
+
delete: (id: string, input: Where, call?: CallOptions) => Promise<{
|
|
89
|
+
ok: true;
|
|
90
|
+
}>;
|
|
91
|
+
append: (id: string, input: {
|
|
92
|
+
content: string;
|
|
93
|
+
}, call?: CallOptions) => Promise<{
|
|
94
|
+
ok: true;
|
|
95
|
+
}>;
|
|
96
|
+
suggest: (id: string, input: {
|
|
97
|
+
text: string;
|
|
98
|
+
replacement: string;
|
|
99
|
+
occurrence?: number;
|
|
100
|
+
at?: "before" | "after";
|
|
101
|
+
}, call?: CallOptions) => Promise<{
|
|
102
|
+
suggestion: string;
|
|
103
|
+
}>;
|
|
104
|
+
suggestions: (id: string, input?: {
|
|
105
|
+
status?: Suggestion["status"];
|
|
106
|
+
}, call?: CallOptions) => Promise<Suggestion[]>;
|
|
107
|
+
accept: (id: string, input: {
|
|
108
|
+
suggestion: string;
|
|
109
|
+
}, call?: CallOptions) => Promise<{
|
|
110
|
+
ok: true;
|
|
111
|
+
}>;
|
|
112
|
+
reject: (id: string, input: {
|
|
113
|
+
suggestion: string;
|
|
114
|
+
}, call?: CallOptions) => Promise<{
|
|
115
|
+
ok: true;
|
|
116
|
+
}>;
|
|
117
|
+
comment: (id: string, input: {
|
|
118
|
+
text: string;
|
|
119
|
+
body: string;
|
|
120
|
+
occurrence?: number;
|
|
121
|
+
}, call?: CallOptions) => Promise<{
|
|
122
|
+
thread: string;
|
|
123
|
+
}>;
|
|
124
|
+
reply: (id: string, input: {
|
|
125
|
+
thread: string;
|
|
126
|
+
body: string;
|
|
127
|
+
}, call?: CallOptions) => Promise<{
|
|
128
|
+
ok: true;
|
|
129
|
+
}>;
|
|
130
|
+
resolve: (id: string, input: {
|
|
131
|
+
thread: string;
|
|
132
|
+
}, call?: CallOptions) => Promise<{
|
|
133
|
+
ok: true;
|
|
134
|
+
}>;
|
|
135
|
+
reopen: (id: string, input: {
|
|
136
|
+
thread: string;
|
|
137
|
+
}, call?: CallOptions) => Promise<{
|
|
138
|
+
ok: true;
|
|
139
|
+
}>;
|
|
140
|
+
threads: (id: string, input?: {
|
|
141
|
+
status?: Thread["status"];
|
|
142
|
+
}, call?: CallOptions) => Promise<Thread[]>;
|
|
143
|
+
/** `GET /export`. `md` and `html` return text. `odt` returns the file bytes. */
|
|
144
|
+
export: {
|
|
145
|
+
(id: string, input: {
|
|
146
|
+
format: "odt";
|
|
147
|
+
remoteImages?: boolean;
|
|
148
|
+
}, call?: CallOptions): Promise<Uint8Array>;
|
|
149
|
+
(id: string, input: {
|
|
150
|
+
format: "md" | "html";
|
|
151
|
+
remoteImages?: boolean;
|
|
152
|
+
}, call?: CallOptions): Promise<string>;
|
|
153
|
+
(id: string, input: {
|
|
154
|
+
format: ExportFormat;
|
|
155
|
+
remoteImages?: boolean;
|
|
156
|
+
}, call?: CallOptions): Promise<string | Uint8Array>;
|
|
157
|
+
};
|
|
158
|
+
/** `GET /room`: who sent updates in the live room. */
|
|
159
|
+
room: (id: string, call?: CallOptions) => Promise<{
|
|
160
|
+
contributors: Contributor[];
|
|
161
|
+
}>;
|
|
162
|
+
/** `GET /state`: the stored document as a Yjs update. */
|
|
163
|
+
state(id: string, call?: CallOptions): Promise<Uint8Array>;
|
|
164
|
+
/** `POST /checkpoint`: merge a Yjs update into the stored document. */
|
|
165
|
+
checkpoint(id: string, update: Uint8Array, call?: CallOptions): Promise<{
|
|
166
|
+
ok: true;
|
|
167
|
+
}>;
|
|
168
|
+
};
|
|
169
|
+
type DocsClient = ReturnType<typeof createClient>;
|
|
170
|
+
|
|
171
|
+
export { type CallOptions, type ClientOptions, type Contributor, DocsApiError, type DocsApiErrorCode, type DocsClient, EditEntry, ExportFormat, type Me, Section, Suggestion, Thread, type Where, createClient };
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// src/client.ts
|
|
2
|
+
var DocsApiError = class extends Error {
|
|
3
|
+
constructor(code, message, status, matches = []) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.code = code;
|
|
6
|
+
this.status = status;
|
|
7
|
+
this.matches = matches;
|
|
8
|
+
this.name = "DocsApiError";
|
|
9
|
+
}
|
|
10
|
+
code;
|
|
11
|
+
status;
|
|
12
|
+
matches;
|
|
13
|
+
};
|
|
14
|
+
var enc = encodeURIComponent;
|
|
15
|
+
function createClient(options) {
|
|
16
|
+
if (!options.token) throw new TypeError("createClient needs a token");
|
|
17
|
+
const base = options.baseUrl.replace(/\/+$/, "");
|
|
18
|
+
const doFetch = options.fetch ?? ((...args) => globalThis.fetch(...args));
|
|
19
|
+
const bad = (status, why) => new DocsApiError("BAD_RESPONSE", `the server sent a reply that is not valid: ${why}`, status);
|
|
20
|
+
const isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
21
|
+
const isMatch = (m) => isObject(m) && typeof m.occurrence === "number" && typeof m.context === "string";
|
|
22
|
+
async function send(path, init, call = {}, expect = "application/json") {
|
|
23
|
+
const params = new URLSearchParams();
|
|
24
|
+
for (const [key, value] of Object.entries(init.query ?? {})) if (value !== void 0) params.set(key, String(value));
|
|
25
|
+
const qs = params.toString();
|
|
26
|
+
const url = `${base}${path}${qs ? `?${qs}` : ""}`;
|
|
27
|
+
const headers = { authorization: `Bearer ${options.token}` };
|
|
28
|
+
if (init.json) headers["content-type"] = "application/json";
|
|
29
|
+
const response = await doFetch(url, { method: init.method, headers, body: init.body, signal: call.signal });
|
|
30
|
+
if (response.ok) {
|
|
31
|
+
const type = (response.headers.get("content-type") ?? "").toLowerCase();
|
|
32
|
+
if (!type.startsWith(expect)) throw bad(response.status, `unexpected content type "${type}"`);
|
|
33
|
+
return response;
|
|
34
|
+
}
|
|
35
|
+
let error;
|
|
36
|
+
try {
|
|
37
|
+
const parsed = await response.json();
|
|
38
|
+
if (isObject(parsed.error)) error = parsed.error;
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
throw new DocsApiError(
|
|
42
|
+
typeof error?.code === "string" ? error.code : "HTTP_ERROR",
|
|
43
|
+
typeof error?.message === "string" ? error.message : `the server answered ${response.status}`,
|
|
44
|
+
response.status,
|
|
45
|
+
Array.isArray(error?.matches) ? error.matches.filter(isMatch) : []
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
async function json(response, check, what) {
|
|
49
|
+
let value;
|
|
50
|
+
try {
|
|
51
|
+
value = await response.json();
|
|
52
|
+
} catch {
|
|
53
|
+
throw bad(response.status, "the body is not JSON");
|
|
54
|
+
}
|
|
55
|
+
if (!check(value)) throw bad(response.status, `expected ${what}`);
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
const doc = (id) => `/api/v1/docs/${enc(id)}`;
|
|
59
|
+
const isOk = (v) => isObject(v) && v.ok === true;
|
|
60
|
+
const isList = (v) => Array.isArray(v) && v.every(isObject);
|
|
61
|
+
const get = async (path, query, check, what, call) => await json(await send(path, { method: "GET", query }, call), check, what);
|
|
62
|
+
const post = async (path, body, check, what, call) => await json(await send(path, { method: "POST", json: true, body: JSON.stringify(body) }, call), check, what);
|
|
63
|
+
const ok = (path, body, call) => post(path, body, isOk, "{ ok: true }", call);
|
|
64
|
+
const list = (path, query, call) => get(path, query, isList, "a list", call);
|
|
65
|
+
const withKey = (path, body, key, call) => post(path, body, (v) => isObject(v) && typeof v[key] === "string", `{ ${key}: string }`, call);
|
|
66
|
+
return {
|
|
67
|
+
/** `GET /health`. It needs no token, but the client sends it anyway. */
|
|
68
|
+
async health(call) {
|
|
69
|
+
return await json(await send("/health", { method: "GET" }, call), (v) => isObject(v) && v.ok === true && typeof v.pack === "string", "{ ok, pack }");
|
|
70
|
+
},
|
|
71
|
+
/** `GET /api/v1/me`: who the token stands for. */
|
|
72
|
+
me: (call) => get("/api/v1/me", {}, (v) => isObject(v) && typeof v.kind === "string" && typeof v.name === "string" && Array.isArray(v.scopes) && (v.role === "editor" || v.role === "viewer"), "the token identity", call),
|
|
73
|
+
/** `POST /api/v1/docs`. */
|
|
74
|
+
create: (input, call) => withKey("/api/v1/docs", input, "id", call),
|
|
75
|
+
/** `GET /read`: the whole document, or one section, as Markdown. */
|
|
76
|
+
async read(id, input = {}, call) {
|
|
77
|
+
return (await send(`${doc(id)}/read`, { method: "GET", query: input }, call, "text/markdown")).text();
|
|
78
|
+
},
|
|
79
|
+
outline: (id, call) => list(`${doc(id)}/outline`, {}, call),
|
|
80
|
+
edits: (id, call) => list(`${doc(id)}/edits`, {}, call),
|
|
81
|
+
insert: (id, input, call) => ok(`${doc(id)}/insert`, input, call),
|
|
82
|
+
replace: (id, input, call) => ok(`${doc(id)}/replace`, input, call),
|
|
83
|
+
delete: (id, input, call) => ok(`${doc(id)}/delete`, input, call),
|
|
84
|
+
append: (id, input, call) => ok(`${doc(id)}/append`, input, call),
|
|
85
|
+
suggest: (id, input, call) => withKey(`${doc(id)}/suggest`, input, "suggestion", call),
|
|
86
|
+
suggestions: (id, input = {}, call) => list(`${doc(id)}/suggestions`, input, call),
|
|
87
|
+
accept: (id, input, call) => ok(`${doc(id)}/accept`, input, call),
|
|
88
|
+
reject: (id, input, call) => ok(`${doc(id)}/reject`, input, call),
|
|
89
|
+
comment: (id, input, call) => withKey(`${doc(id)}/comment`, input, "thread", call),
|
|
90
|
+
reply: (id, input, call) => ok(`${doc(id)}/reply`, input, call),
|
|
91
|
+
resolve: (id, input, call) => ok(`${doc(id)}/resolve`, input, call),
|
|
92
|
+
reopen: (id, input, call) => ok(`${doc(id)}/reopen`, input, call),
|
|
93
|
+
threads: (id, input = {}, call) => list(`${doc(id)}/threads`, input, call),
|
|
94
|
+
/** `GET /export`. `md` and `html` return text. `odt` returns the file bytes. */
|
|
95
|
+
export: (async (id, input, call) => {
|
|
96
|
+
const response = await send(`${doc(id)}/export`, { method: "GET", query: input }, call, { md: "text/markdown", html: "text/html", odt: "application/vnd.oasis.opendocument.text" }[input.format]);
|
|
97
|
+
return input.format === "odt" ? new Uint8Array(await response.arrayBuffer()) : response.text();
|
|
98
|
+
}),
|
|
99
|
+
/** `GET /room`: who sent updates in the live room. */
|
|
100
|
+
room: (id, call) => get(`${doc(id)}/room`, {}, (v) => isObject(v) && Array.isArray(v.contributors), "{ contributors }", call),
|
|
101
|
+
/** `GET /state`: the stored document as a Yjs update. */
|
|
102
|
+
async state(id, call) {
|
|
103
|
+
return new Uint8Array(await (await send(`${doc(id)}/state`, { method: "GET" }, call, "application/octet-stream")).arrayBuffer());
|
|
104
|
+
},
|
|
105
|
+
/** `POST /checkpoint`: merge a Yjs update into the stored document. */
|
|
106
|
+
async checkpoint(id, update, call) {
|
|
107
|
+
return await json(await send(`${doc(id)}/checkpoint`, { method: "POST", body: update }, call), isOk, "{ ok: true }");
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
DocsApiError,
|
|
113
|
+
createClient
|
|
114
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Y from 'yjs';
|
|
2
|
-
import { Blobs, Store } from 'agentic-identity';
|
|
3
2
|
|
|
4
3
|
/** A ProseMirror node in JSON form, the shape y-prosemirror reads and writes. */
|
|
5
4
|
interface PmNode {
|
|
@@ -124,58 +123,4 @@ declare class AgenticDoc {
|
|
|
124
123
|
append(markdown: string, author: Principal): void;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
|
-
|
|
128
|
-
interface DocInfo {
|
|
129
|
-
createdBy: {
|
|
130
|
-
kind: PrincipalKind;
|
|
131
|
-
name: string;
|
|
132
|
-
};
|
|
133
|
-
createdAt: number;
|
|
134
|
-
}
|
|
135
|
-
interface DocsPorts {
|
|
136
|
-
/** Holds each document as a Yjs update. Saves are conditional on the version that was read. */
|
|
137
|
-
blobs: Blobs;
|
|
138
|
-
/** Holds the catalog: who created each document, and when. */
|
|
139
|
-
store: Store;
|
|
140
|
-
}
|
|
141
|
-
/** What every command needs: make a document, read it, and change it. A live room can stand behind it as well as the ports. */
|
|
142
|
-
interface DocAccess {
|
|
143
|
-
create(id: string, markdown: string, author: Principal): Promise<void>;
|
|
144
|
-
read<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
145
|
-
write<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
146
|
-
}
|
|
147
|
-
/** Loads and saves documents as Yjs updates in a Blobs port. The CLI, MCP server, and API share it. */
|
|
148
|
-
declare class DocsService implements DocAccess {
|
|
149
|
-
private readonly options;
|
|
150
|
-
private readonly blobs;
|
|
151
|
-
private readonly store;
|
|
152
|
-
constructor(ports: DocsPorts, options?: DocOptions);
|
|
153
|
-
private key;
|
|
154
|
-
create(id: string, markdown: string, author: Principal): Promise<void>;
|
|
155
|
-
/** The stored document as a Yjs update. A live client seeds its room from it. */
|
|
156
|
-
state(id: string): Promise<Uint8Array>;
|
|
157
|
-
/**
|
|
158
|
-
* Merge a Yjs update from a live room into the stored document, and create the document when it
|
|
159
|
-
* has none. A merge is safe to repeat and to run in any order. The save is conditional, so two
|
|
160
|
-
* checkpoints at once both land.
|
|
161
|
-
*/
|
|
162
|
-
checkpoint(id: string, update: Uint8Array, author: Principal): Promise<void>;
|
|
163
|
-
/**
|
|
164
|
-
* The encoded document, once it reads back and every stored entry has the shape the commands rely on. Yjs does not
|
|
165
|
-
* check types, so an update can put text where the editor expects blocks, or a thread with no messages, and then a
|
|
166
|
-
* command fails on every later call.
|
|
167
|
-
*/
|
|
168
|
-
private checked;
|
|
169
|
-
private fits;
|
|
170
|
-
private catalog;
|
|
171
|
-
/** Who created the document and when, or null when it has no catalog entry (made before the catalog, or a failed catalog write). */
|
|
172
|
-
info(id: string): Promise<DocInfo | null>;
|
|
173
|
-
read<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
174
|
-
/**
|
|
175
|
-
* Load, run the change, and save only if nobody saved in between. When someone did, load again and
|
|
176
|
-
* run the change again, so a check such as "is it still pending" sees the new state.
|
|
177
|
-
*/
|
|
178
|
-
write<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export { type Anchor as A, type DocAccess as D, type EditEntry as E, type Principal as P, type Section as S, type TextTarget as T, AgenticDoc as a, type AnchorTarget as b, type PmNode as c, type DocInfo as d, type DocOptions as e, type DocsPorts as f, DocsService as g, PRINCIPAL_KINDS as h, type PrincipalKind as i, type SectionTarget as j, type Target as k, blocksToMarkdown as l, markdownToBlocks as m, parseAuthor as p };
|
|
126
|
+
export { type Anchor as A, type DocOptions as D, type EditEntry as E, type PrincipalKind as P, type Section as S, type Target as T, type Principal as a, type PmNode as b, AgenticDoc as c, type AnchorTarget as d, PRINCIPAL_KINDS as e, type SectionTarget as f, type TextTarget as g, blocksToMarkdown as h, markdownToBlocks as m, parseAuthor as p };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,94 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as Principal, b as PmNode } from './doc-C_8kCsl7.js';
|
|
2
|
+
export { c as AgenticDoc, A as Anchor, d as AnchorTarget, D as DocOptions, E as EditEntry, e as PRINCIPAL_KINDS, P as PrincipalKind, S as Section, f as SectionTarget, T as Target, g as TextTarget, h as blocksToMarkdown, m as markdownToBlocks, p as parseAuthor } from './doc-C_8kCsl7.js';
|
|
3
3
|
import { Schema } from 'prosemirror-model';
|
|
4
|
+
export { a as DocError, D as DocErrorCode, b as EXPORT_FORMATS, E as ExportFormat, c as ExportOptions, d as ExportResult, M as Message, S as Suggestion, e as Suggestions, T as Thread, f as Threads, g as exportDoc } from './review-BQW2Ci2h.js';
|
|
4
5
|
import { z } from 'zod';
|
|
6
|
+
import { D as DocAccess } from './service-Do2Jwb5U.js';
|
|
7
|
+
export { a as DocInfo, b as DocsPorts, c as DocsService } from './service-Do2Jwb5U.js';
|
|
5
8
|
import { AdapterOptions, Blobs, Store } from 'agentic-identity';
|
|
6
9
|
import 'yjs';
|
|
7
10
|
|
|
8
|
-
type DocErrorCode = "NO_MATCH" | "AMBIGUOUS_MATCH" | "STALE_ANCHOR" | "NO_SECTION" | "INVALID_AUTHOR" | "INVALID_INPUT" | "NO_THREAD" | "NO_SUGGESTION" | "ALREADY_DECIDED" | "FORBIDDEN" | "NO_DOCUMENT" | "DOCUMENT_EXISTS" | "LOCKED" | "CONFLICT" | "MISCONFIGURED";
|
|
9
|
-
declare class DocError extends Error {
|
|
10
|
-
readonly code: DocErrorCode;
|
|
11
|
-
readonly matches: {
|
|
12
|
-
occurrence: number;
|
|
13
|
-
context: string;
|
|
14
|
-
}[];
|
|
15
|
-
constructor(code: DocErrorCode, message: string, matches?: {
|
|
16
|
-
occurrence: number;
|
|
17
|
-
context: string;
|
|
18
|
-
}[]);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
11
|
declare const schema: Schema<string, string>;
|
|
22
12
|
|
|
23
|
-
interface Message {
|
|
24
|
-
id: string;
|
|
25
|
-
at: string;
|
|
26
|
-
author: Principal;
|
|
27
|
-
body: string;
|
|
28
|
-
}
|
|
29
|
-
interface Thread {
|
|
30
|
-
id: string;
|
|
31
|
-
anchor: Anchor;
|
|
32
|
-
status: "open" | "resolved";
|
|
33
|
-
resolvedBy?: Principal;
|
|
34
|
-
resolvedAt?: string;
|
|
35
|
-
messages: Message[];
|
|
36
|
-
/** The anchored text no longer matches what the comment was made on. */
|
|
37
|
-
stale: boolean;
|
|
38
|
-
/** The text now under the anchor, or null when it is gone. */
|
|
39
|
-
currentText: string | null;
|
|
40
|
-
}
|
|
41
|
-
interface Suggestion {
|
|
42
|
-
id: string;
|
|
43
|
-
kind: "insert" | "replace" | "delete";
|
|
44
|
-
at?: "before" | "after";
|
|
45
|
-
anchor: Anchor;
|
|
46
|
-
replacement: string;
|
|
47
|
-
author: Principal;
|
|
48
|
-
createdAt: string;
|
|
49
|
-
status: "pending" | "accepted" | "rejected";
|
|
50
|
-
decidedBy?: Principal;
|
|
51
|
-
decidedAt?: string;
|
|
52
|
-
stale: boolean;
|
|
53
|
-
}
|
|
54
|
-
/** Comment threads anchored to text. Replies and status merge across replicas. */
|
|
55
|
-
declare class Threads {
|
|
56
|
-
private readonly doc;
|
|
57
|
-
constructor(doc: AgenticDoc);
|
|
58
|
-
private get map();
|
|
59
|
-
private get;
|
|
60
|
-
private message;
|
|
61
|
-
add(target: TextTarget | AnchorTarget, body: string, author: Principal): string;
|
|
62
|
-
reply(id: string, body: string, author: Principal): void;
|
|
63
|
-
private setStatus;
|
|
64
|
-
resolve(id: string, author: Principal): void;
|
|
65
|
-
reopen(id: string, author: Principal): void;
|
|
66
|
-
list(filter?: {
|
|
67
|
-
status?: Thread["status"];
|
|
68
|
-
}): Thread[];
|
|
69
|
-
}
|
|
70
|
-
/** Suggested edits. Nothing changes in the text until a person, or an agent with the accept scope, accepts one. */
|
|
71
|
-
declare class Suggestions {
|
|
72
|
-
private readonly doc;
|
|
73
|
-
constructor(doc: AgenticDoc);
|
|
74
|
-
private get map();
|
|
75
|
-
private get;
|
|
76
|
-
private read;
|
|
77
|
-
/** An `at` on the target means insert. An empty replacement means delete. */
|
|
78
|
-
add(target: TextTarget | AnchorTarget, replacement: string, author: Principal): string;
|
|
79
|
-
private decide;
|
|
80
|
-
/**
|
|
81
|
-
* Apply the edit as the accepting author. The check and the edit share one transaction. Accepting
|
|
82
|
-
* an accepted suggestion changes nothing. A stale anchor throws and the suggestion stays pending.
|
|
83
|
-
*/
|
|
84
|
-
accept(id: string, author: Principal): void;
|
|
85
|
-
/** Same right as accept. A person can withdraw their own suggestion. An agent can never decide its own. */
|
|
86
|
-
reject(id: string, author: Principal): void;
|
|
87
|
-
list(filter?: {
|
|
88
|
-
status?: Suggestion["status"];
|
|
89
|
-
}): Suggestion[];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
13
|
/** One table drives the CLI, the MCP server, and the HTTP API, so they stay the same. */
|
|
93
14
|
interface Command {
|
|
94
15
|
name: string;
|
|
@@ -99,20 +20,6 @@ interface Command {
|
|
|
99
20
|
}
|
|
100
21
|
declare const commands: Command[];
|
|
101
22
|
|
|
102
|
-
declare const EXPORT_FORMATS: readonly ["md", "html", "odt"];
|
|
103
|
-
type ExportFormat = (typeof EXPORT_FORMATS)[number];
|
|
104
|
-
interface ExportOptions {
|
|
105
|
-
/** Keep `<img>` for web and relative sources. Opening the page then asks those hosts for the image. Off by default. */
|
|
106
|
-
remoteImages?: boolean;
|
|
107
|
-
}
|
|
108
|
-
interface ExportResult {
|
|
109
|
-
format: ExportFormat;
|
|
110
|
-
contentType: string;
|
|
111
|
-
encoding: "utf8" | "base64";
|
|
112
|
-
data: string;
|
|
113
|
-
}
|
|
114
|
-
declare function exportDoc(doc: AgenticDoc, format: ExportFormat, options?: ExportOptions): ExportResult;
|
|
115
|
-
|
|
116
23
|
interface FileBlobsOptions extends AdapterOptions {
|
|
117
24
|
/** A lock older than this is taken over. Default 10 seconds. A save takes milliseconds. */
|
|
118
25
|
lockStaleMs?: number;
|
|
@@ -142,4 +49,4 @@ declare const ODT_MIME = "application/vnd.oasis.opendocument.text";
|
|
|
142
49
|
/** Write blocks as an OpenDocument text file (.odt): content, styles, and images as embedded files. */
|
|
143
50
|
declare function exportOdt(blocks: PmNode[]): Uint8Array;
|
|
144
51
|
|
|
145
|
-
export {
|
|
52
|
+
export { type Command, type FileBlobsOptions, ODT_MIME, PmNode, Principal, commands, createFileBlobs, createFileStore, exportOdt, schema };
|
package/dist/live-worker.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ import 'hono';
|
|
|
5
5
|
import 'agentic-identity';
|
|
6
6
|
import 'agentic-identity/cloudflare';
|
|
7
7
|
import 'agentic-realtime';
|
|
8
|
-
import './
|
|
8
|
+
import './doc-C_8kCsl7.js';
|
|
9
9
|
import 'yjs';
|
|
10
|
+
import './service-Do2Jwb5U.js';
|
|
10
11
|
|
|
11
12
|
type Namespace = Parameters<typeof createDurableObjectRealtime>[0];
|
|
12
13
|
interface LiveEnv extends WorkerEnv {
|
package/dist/live.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Peer } from 'agentic-realtime/client';
|
|
2
|
-
import {
|
|
2
|
+
import { c as AgenticDoc, a as Principal, D as DocOptions } from './doc-C_8kCsl7.js';
|
|
3
|
+
import { D as DocAccess } from './service-Do2Jwb5U.js';
|
|
3
4
|
import 'yjs';
|
|
4
5
|
import 'agentic-identity';
|
|
5
6
|
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { c as AgenticDoc, A as Anchor, a as Principal, g as TextTarget, d as AnchorTarget } from './doc-C_8kCsl7.js';
|
|
2
|
+
|
|
3
|
+
type DocErrorCode = "NO_MATCH" | "AMBIGUOUS_MATCH" | "STALE_ANCHOR" | "NO_SECTION" | "INVALID_AUTHOR" | "INVALID_INPUT" | "NO_THREAD" | "NO_SUGGESTION" | "ALREADY_DECIDED" | "FORBIDDEN" | "NO_DOCUMENT" | "DOCUMENT_EXISTS" | "LOCKED" | "CONFLICT" | "MISCONFIGURED";
|
|
4
|
+
declare class DocError extends Error {
|
|
5
|
+
readonly code: DocErrorCode;
|
|
6
|
+
readonly matches: {
|
|
7
|
+
occurrence: number;
|
|
8
|
+
context: string;
|
|
9
|
+
}[];
|
|
10
|
+
constructor(code: DocErrorCode, message: string, matches?: {
|
|
11
|
+
occurrence: number;
|
|
12
|
+
context: string;
|
|
13
|
+
}[]);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const EXPORT_FORMATS: readonly ["md", "html", "odt"];
|
|
17
|
+
type ExportFormat = (typeof EXPORT_FORMATS)[number];
|
|
18
|
+
interface ExportOptions {
|
|
19
|
+
/** Keep `<img>` for web and relative sources. Opening the page then asks those hosts for the image. Off by default. */
|
|
20
|
+
remoteImages?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface ExportResult {
|
|
23
|
+
format: ExportFormat;
|
|
24
|
+
contentType: string;
|
|
25
|
+
encoding: "utf8" | "base64";
|
|
26
|
+
data: string;
|
|
27
|
+
}
|
|
28
|
+
declare function exportDoc(doc: AgenticDoc, format: ExportFormat, options?: ExportOptions): ExportResult;
|
|
29
|
+
|
|
30
|
+
interface Message {
|
|
31
|
+
id: string;
|
|
32
|
+
at: string;
|
|
33
|
+
author: Principal;
|
|
34
|
+
body: string;
|
|
35
|
+
}
|
|
36
|
+
interface Thread {
|
|
37
|
+
id: string;
|
|
38
|
+
anchor: Anchor;
|
|
39
|
+
status: "open" | "resolved";
|
|
40
|
+
resolvedBy?: Principal;
|
|
41
|
+
resolvedAt?: string;
|
|
42
|
+
messages: Message[];
|
|
43
|
+
/** The anchored text no longer matches what the comment was made on. */
|
|
44
|
+
stale: boolean;
|
|
45
|
+
/** The text now under the anchor, or null when it is gone. */
|
|
46
|
+
currentText: string | null;
|
|
47
|
+
}
|
|
48
|
+
interface Suggestion {
|
|
49
|
+
id: string;
|
|
50
|
+
kind: "insert" | "replace" | "delete";
|
|
51
|
+
at?: "before" | "after";
|
|
52
|
+
anchor: Anchor;
|
|
53
|
+
replacement: string;
|
|
54
|
+
author: Principal;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
status: "pending" | "accepted" | "rejected";
|
|
57
|
+
decidedBy?: Principal;
|
|
58
|
+
decidedAt?: string;
|
|
59
|
+
stale: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** Comment threads anchored to text. Replies and status merge across replicas. */
|
|
62
|
+
declare class Threads {
|
|
63
|
+
private readonly doc;
|
|
64
|
+
constructor(doc: AgenticDoc);
|
|
65
|
+
private get map();
|
|
66
|
+
private get;
|
|
67
|
+
private message;
|
|
68
|
+
add(target: TextTarget | AnchorTarget, body: string, author: Principal): string;
|
|
69
|
+
reply(id: string, body: string, author: Principal): void;
|
|
70
|
+
private setStatus;
|
|
71
|
+
resolve(id: string, author: Principal): void;
|
|
72
|
+
reopen(id: string, author: Principal): void;
|
|
73
|
+
list(filter?: {
|
|
74
|
+
status?: Thread["status"];
|
|
75
|
+
}): Thread[];
|
|
76
|
+
}
|
|
77
|
+
/** Suggested edits. Nothing changes in the text until a person, or an agent with the accept scope, accepts one. */
|
|
78
|
+
declare class Suggestions {
|
|
79
|
+
private readonly doc;
|
|
80
|
+
constructor(doc: AgenticDoc);
|
|
81
|
+
private get map();
|
|
82
|
+
private get;
|
|
83
|
+
private read;
|
|
84
|
+
/** An `at` on the target means insert. An empty replacement means delete. */
|
|
85
|
+
add(target: TextTarget | AnchorTarget, replacement: string, author: Principal): string;
|
|
86
|
+
private decide;
|
|
87
|
+
/**
|
|
88
|
+
* Apply the edit as the accepting author. The check and the edit share one transaction. Accepting
|
|
89
|
+
* an accepted suggestion changes nothing. A stale anchor throws and the suggestion stays pending.
|
|
90
|
+
*/
|
|
91
|
+
accept(id: string, author: Principal): void;
|
|
92
|
+
/** Same right as accept. A person can withdraw their own suggestion. An agent can never decide its own. */
|
|
93
|
+
reject(id: string, author: Principal): void;
|
|
94
|
+
list(filter?: {
|
|
95
|
+
status?: Suggestion["status"];
|
|
96
|
+
}): Suggestion[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { type DocErrorCode as D, type ExportFormat as E, type Message as M, type Suggestion as S, type Thread as T, DocError as a, EXPORT_FORMATS as b, type ExportOptions as c, type ExportResult as d, Suggestions as e, Threads as f, exportDoc as g };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { a as Principal, c as AgenticDoc, P as PrincipalKind, D as DocOptions } from './doc-C_8kCsl7.js';
|
|
2
|
+
import { Blobs, Store } from 'agentic-identity';
|
|
3
|
+
|
|
4
|
+
/** What the catalog keeps for each document. The author kind stays, so machine-made work stays labeled. */
|
|
5
|
+
interface DocInfo {
|
|
6
|
+
createdBy: {
|
|
7
|
+
kind: PrincipalKind;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
createdAt: number;
|
|
11
|
+
}
|
|
12
|
+
interface DocsPorts {
|
|
13
|
+
/** Holds each document as a Yjs update. Saves are conditional on the version that was read. */
|
|
14
|
+
blobs: Blobs;
|
|
15
|
+
/** Holds the catalog: who created each document, and when. */
|
|
16
|
+
store: Store;
|
|
17
|
+
}
|
|
18
|
+
/** What every command needs: make a document, read it, and change it. A live room can stand behind it as well as the ports. */
|
|
19
|
+
interface DocAccess {
|
|
20
|
+
create(id: string, markdown: string, author: Principal): Promise<void>;
|
|
21
|
+
read<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
22
|
+
write<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
23
|
+
}
|
|
24
|
+
/** Loads and saves documents as Yjs updates in a Blobs port. The CLI, MCP server, and API share it. */
|
|
25
|
+
declare class DocsService implements DocAccess {
|
|
26
|
+
private readonly options;
|
|
27
|
+
private readonly blobs;
|
|
28
|
+
private readonly store;
|
|
29
|
+
constructor(ports: DocsPorts, options?: DocOptions);
|
|
30
|
+
private key;
|
|
31
|
+
create(id: string, markdown: string, author: Principal): Promise<void>;
|
|
32
|
+
/** The stored document as a Yjs update. A live client seeds its room from it. */
|
|
33
|
+
state(id: string): Promise<Uint8Array>;
|
|
34
|
+
/**
|
|
35
|
+
* Merge a Yjs update from a live room into the stored document, and create the document when it
|
|
36
|
+
* has none. A merge is safe to repeat and to run in any order. The save is conditional, so two
|
|
37
|
+
* checkpoints at once both land.
|
|
38
|
+
*/
|
|
39
|
+
checkpoint(id: string, update: Uint8Array, author: Principal): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* The encoded document, once it reads back and every stored entry has the shape the commands rely on. Yjs does not
|
|
42
|
+
* check types, so an update can put text where the editor expects blocks, or a thread with no messages, and then a
|
|
43
|
+
* command fails on every later call.
|
|
44
|
+
*/
|
|
45
|
+
private checked;
|
|
46
|
+
private fits;
|
|
47
|
+
private catalog;
|
|
48
|
+
/** Who created the document and when, or null when it has no catalog entry (made before the catalog, or a failed catalog write). */
|
|
49
|
+
info(id: string): Promise<DocInfo | null>;
|
|
50
|
+
read<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Load, run the change, and save only if nobody saved in between. When someone did, load again and
|
|
53
|
+
* run the change again, so a check such as "is it still pending" sees the new state.
|
|
54
|
+
*/
|
|
55
|
+
write<T>(id: string, run: (doc: AgenticDoc) => T): Promise<T>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { type DocAccess as D, type DocInfo as a, type DocsPorts as b, DocsService as c };
|
package/dist/worker.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { Hono } from 'hono';
|
|
|
2
2
|
import { Region } from 'agentic-identity';
|
|
3
3
|
import { D1Like, R2Like } from 'agentic-identity/cloudflare';
|
|
4
4
|
import { Realtime, Role } from 'agentic-realtime';
|
|
5
|
-
import {
|
|
5
|
+
import { a as Principal } from './doc-C_8kCsl7.js';
|
|
6
|
+
import { c as DocsService } from './service-Do2Jwb5U.js';
|
|
6
7
|
import 'yjs';
|
|
7
8
|
|
|
8
9
|
interface WorkerEnv {
|
package/llms.txt
CHANGED
|
@@ -6,6 +6,7 @@ Keywords: documents, editor, rich-text, tiptap, yjs, collaboration, agents.
|
|
|
6
6
|
|
|
7
7
|
- SDK: import { AgenticDoc } from "agentic-documents".
|
|
8
8
|
- Read as Markdown, read an outline, edit by section id or exact text.
|
|
9
|
+
- Remote client: import { createClient } from "agentic-documents/client"; createClient({ baseUrl, token, fetch? }). It has one method per HTTP route. An error is a DocsApiError with a code and a status. Every call takes { signal }. The client never retries.
|
|
9
10
|
- CLI: npx agentic-documents <command> <id>. MCP: npx agentic-documents mcp --as <kind>:<name>.
|
|
10
11
|
- Every edit carries an author kind and name.
|
|
11
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-documents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Write documents with people and agents in real time.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documents",
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"types": "./dist/live.d.ts",
|
|
55
55
|
"import": "./dist/live.js"
|
|
56
56
|
},
|
|
57
|
+
"./client": {
|
|
58
|
+
"types": "./dist/client.d.ts",
|
|
59
|
+
"import": "./dist/client.js"
|
|
60
|
+
},
|
|
57
61
|
"./live-worker": {
|
|
58
62
|
"types": "./dist/live-worker.d.ts",
|
|
59
63
|
"import": "./dist/live-worker.js"
|