narrarium 0.1.16 → 0.1.19
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/README.md +50 -0
- package/dist/azure-devops-provider.d.ts +21 -0
- package/dist/azure-devops-provider.d.ts.map +1 -0
- package/dist/azure-devops-provider.js +222 -0
- package/dist/azure-devops-provider.js.map +1 -0
- package/dist/book-manager.d.ts +269 -0
- package/dist/book-manager.d.ts.map +1 -0
- package/dist/book-manager.js +531 -0
- package/dist/book-manager.js.map +1 -0
- package/dist/book-snapshot.d.ts +19 -0
- package/dist/book-snapshot.d.ts.map +1 -0
- package/dist/book-snapshot.js +267 -0
- package/dist/book-snapshot.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/github-provider.d.ts +21 -0
- package/dist/github-provider.d.ts.map +1 -0
- package/dist/github-provider.js +190 -0
- package/dist/github-provider.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/repo.d.ts +12 -4
- package/dist/repo.d.ts.map +1 -1
- package/dist/repo.js +346 -86
- package/dist/repo.js.map +1 -1
- package/dist/schemas.d.ts +6 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +7 -0
- package/dist/schemas.js.map +1 -1
- package/dist/skill-template.d.ts.map +1 -1
- package/dist/skill-template.js +6 -2
- package/dist/skill-template.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,6 +78,56 @@ console.log(report.ok, report.issues);
|
|
|
78
78
|
- use `secret_refs` and `private_notes` for author-facing hidden canon
|
|
79
79
|
- store asset metadata in markdown beside images and prefer `alt_text` plus `caption` so web and EPUB output stay accessible
|
|
80
80
|
|
|
81
|
+
## Remote book manager foundations
|
|
82
|
+
|
|
83
|
+
`narrarium` now also exports the first SDK foundations for remote book access:
|
|
84
|
+
|
|
85
|
+
- `BookManager` as the high-level entry point
|
|
86
|
+
- `LocalStorageBookProfileStore` and `InMemoryBookProfileStore` for connection profiles
|
|
87
|
+
- `NarrariumBookWorkspace` for in-memory edits before commit and push
|
|
88
|
+
- `NarrariumRemoteProvider` so GitHub and Azure DevOps adapters can plug into the same flow
|
|
89
|
+
- `GitHubRemoteProvider` with real GitHub snapshot loading plus direct commit/push scaffolding
|
|
90
|
+
- `AzureDevOpsRemoteProvider` with matching Azure DevOps snapshot loading and direct push support
|
|
91
|
+
- high-level workspace helpers like `upsertCharacter`, `updateChapter`, and `updateParagraph`
|
|
92
|
+
|
|
93
|
+
Quick example:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
import {
|
|
97
|
+
AzureDevOpsRemoteProvider,
|
|
98
|
+
BookManager,
|
|
99
|
+
GitHubRemoteProvider,
|
|
100
|
+
LocalStorageBookProfileStore,
|
|
101
|
+
} from "narrarium";
|
|
102
|
+
|
|
103
|
+
const manager = new BookManager({
|
|
104
|
+
profileStore: new LocalStorageBookProfileStore(),
|
|
105
|
+
providers: [new GitHubRemoteProvider()],
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const profile = await manager.createGitHubProfile({
|
|
109
|
+
name: "Primary Book",
|
|
110
|
+
owner: "your-org",
|
|
111
|
+
repository: "your-book",
|
|
112
|
+
branch: "main",
|
|
113
|
+
token: "github-token",
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
const snapshot = await manager.loadBook(profile);
|
|
117
|
+
const workspace = manager.beginWorkspace(snapshot);
|
|
118
|
+
|
|
119
|
+
workspace.updateChapter("chapter:001-the-arrival", {
|
|
120
|
+
frontmatter: { title: "The Arrival Revised" },
|
|
121
|
+
});
|
|
122
|
+
workspace.updateParagraph("paragraph:001-the-arrival:001-at-the-gate", {
|
|
123
|
+
body: "# Scene\n\nThe harbor measures every returning face.",
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
`GitHubRemoteProvider` can now resolve the branch head, read the Narrarium markdown tree, build a typed snapshot, and push workspace changes back with GitHub commits. `AzureDevOpsRemoteProvider` now supports the same load and direct push flow through the Azure DevOps Git REST API.
|
|
128
|
+
|
|
129
|
+
For Azure DevOps, register `new AzureDevOpsRemoteProvider()` and create a profile with `organization`, `project`, `repository`, `branch`, and PAT token.
|
|
130
|
+
|
|
81
131
|
## Story state and continuity
|
|
82
132
|
|
|
83
133
|
Narrarium keeps structured continuity separate from the narrative summaries:
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { BookPushResult, NarrariumBookSnapshot, NarrariumRemoteProvider, NarrariumRemoteProviderCommitArgs, NarrariumRemoteProviderLoadArgs } from "./book-manager.js";
|
|
2
|
+
type FetchLike = typeof fetch;
|
|
3
|
+
export interface AzureDevOpsRemoteProviderOptions {
|
|
4
|
+
fetch?: FetchLike;
|
|
5
|
+
apiBaseUrl?: string;
|
|
6
|
+
apiVersion?: string;
|
|
7
|
+
concurrency?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class AzureDevOpsRemoteProvider implements NarrariumRemoteProvider {
|
|
10
|
+
readonly kind: "azure-devops";
|
|
11
|
+
private readonly fetchImpl;
|
|
12
|
+
private readonly apiBaseUrl;
|
|
13
|
+
private readonly apiVersion;
|
|
14
|
+
private readonly concurrency;
|
|
15
|
+
constructor(options?: AzureDevOpsRemoteProviderOptions);
|
|
16
|
+
loadBookSnapshot(args: NarrariumRemoteProviderLoadArgs): Promise<NarrariumBookSnapshot>;
|
|
17
|
+
commitAndPush(args: NarrariumRemoteProviderCommitArgs): Promise<BookPushResult>;
|
|
18
|
+
private requestJson;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=azure-devops-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azure-devops-provider.d.ts","sourceRoot":"","sources":["../src/azure-devops-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,cAAc,EACd,qBAAqB,EAErB,uBAAuB,EACvB,iCAAiC,EACjC,+BAA+B,EAChC,MAAM,mBAAmB,CAAC;AAG3B,KAAK,SAAS,GAAG,OAAO,KAAK,CAAC;AA0C9B,MAAM,WAAW,gCAAgC;IAC/C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,yBAA0B,YAAW,uBAAuB;IACvE,QAAQ,CAAC,IAAI,EAAG,cAAc,CAAU;IAExC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,OAAO,GAAE,gCAAqC;IAOpD,gBAAgB,CAAC,IAAI,EAAE,+BAA+B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAiEvF,aAAa,CAAC,IAAI,EAAE,iCAAiC,GAAG,OAAO,CAAC,cAAc,CAAC;YAkGvE,WAAW;CA2B1B"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { buildNarrariumBookSnapshot, serializeNarrariumDocument } from "./book-snapshot.js";
|
|
2
|
+
export class AzureDevOpsRemoteProvider {
|
|
3
|
+
kind = "azure-devops";
|
|
4
|
+
fetchImpl;
|
|
5
|
+
apiBaseUrl;
|
|
6
|
+
apiVersion;
|
|
7
|
+
concurrency;
|
|
8
|
+
constructor(options = {}) {
|
|
9
|
+
this.fetchImpl = options.fetch ?? fetch;
|
|
10
|
+
this.apiBaseUrl = (options.apiBaseUrl ?? "https://dev.azure.com").replace(/\/$/, "");
|
|
11
|
+
this.apiVersion = options.apiVersion ?? "7.1";
|
|
12
|
+
this.concurrency = Math.max(1, options.concurrency ?? 8);
|
|
13
|
+
}
|
|
14
|
+
async loadBookSnapshot(args) {
|
|
15
|
+
const profile = asAzureDevOpsProfile(args.profile);
|
|
16
|
+
const refName = buildAzureDevOpsRef(profile);
|
|
17
|
+
const refFilter = refName.replace(/^refs\//, "");
|
|
18
|
+
const refs = await this.requestJson(profile, "/refs", {
|
|
19
|
+
filter: refFilter,
|
|
20
|
+
});
|
|
21
|
+
const ref = refs.value?.find((entry) => entry.name === refName);
|
|
22
|
+
if (!ref) {
|
|
23
|
+
throw new Error(`Azure DevOps branch ${profile.branch} was not found in ${profile.organization}/${profile.project}/${profile.repository}`);
|
|
24
|
+
}
|
|
25
|
+
const items = await this.requestJson(profile, "/items", {
|
|
26
|
+
scopePath: "/",
|
|
27
|
+
recursionLevel: "Full",
|
|
28
|
+
includeContentMetadata: "true",
|
|
29
|
+
"versionDescriptor.version": ref.objectId,
|
|
30
|
+
"versionDescriptor.versionType": "commit",
|
|
31
|
+
});
|
|
32
|
+
const markdownEntries = (items.value ?? []).filter((entry) => !entry.isFolder && entry.gitObjectType === "blob" && typeof entry.path === "string" && entry.path.toLowerCase().endsWith(".md"));
|
|
33
|
+
const documents = await mapWithConcurrency(markdownEntries, this.concurrency, async (entry) => {
|
|
34
|
+
const item = await this.requestJson(profile, "/items", {
|
|
35
|
+
path: entry.path,
|
|
36
|
+
includeContent: "true",
|
|
37
|
+
$format: "json",
|
|
38
|
+
"versionDescriptor.version": ref.objectId,
|
|
39
|
+
"versionDescriptor.versionType": "commit",
|
|
40
|
+
});
|
|
41
|
+
return {
|
|
42
|
+
path: normalizeAzureItemPath(entry.path),
|
|
43
|
+
rawMarkdown: readAzureItemContent(item),
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
return buildNarrariumBookSnapshot({
|
|
47
|
+
profileId: profile.id,
|
|
48
|
+
provider: profile.provider,
|
|
49
|
+
branch: profile.branch,
|
|
50
|
+
ref: ref.name,
|
|
51
|
+
commitSha: ref.objectId,
|
|
52
|
+
loadedAt: new Date(),
|
|
53
|
+
documents,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async commitAndPush(args) {
|
|
57
|
+
const profile = asAzureDevOpsProfile(args.profile);
|
|
58
|
+
const workspace = args.workspace;
|
|
59
|
+
const snapshot = args.snapshot;
|
|
60
|
+
if (!workspace.hasChanges()) {
|
|
61
|
+
throw new Error("No workspace changes to commit.");
|
|
62
|
+
}
|
|
63
|
+
const refName = buildAzureDevOpsRef(profile);
|
|
64
|
+
const refFilter = refName.replace(/^refs\//, "");
|
|
65
|
+
const refs = await this.requestJson(profile, "/refs", {
|
|
66
|
+
filter: refFilter,
|
|
67
|
+
});
|
|
68
|
+
const ref = refs.value?.find((entry) => entry.name === refName);
|
|
69
|
+
if (!ref) {
|
|
70
|
+
throw new Error(`Azure DevOps branch ${profile.branch} was not found in ${profile.organization}/${profile.project}/${profile.repository}`);
|
|
71
|
+
}
|
|
72
|
+
if (ref.objectId !== snapshot.commitSha) {
|
|
73
|
+
throw new Error(`Azure DevOps branch ${profile.branch} moved from ${snapshot.commitSha} to ${ref.objectId}. Reload the book before pushing.`);
|
|
74
|
+
}
|
|
75
|
+
const author = buildAzureCommitAuthor(args.request);
|
|
76
|
+
const pushBody = {
|
|
77
|
+
refUpdates: [
|
|
78
|
+
{
|
|
79
|
+
name: refName,
|
|
80
|
+
oldObjectId: ref.objectId,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
commits: [
|
|
84
|
+
{
|
|
85
|
+
comment: args.request.message,
|
|
86
|
+
...(author ? { author, committer: author } : {}),
|
|
87
|
+
changes: workspace.listChanges().map((change) => {
|
|
88
|
+
if (change.kind === "delete") {
|
|
89
|
+
return {
|
|
90
|
+
changeType: "delete",
|
|
91
|
+
item: {
|
|
92
|
+
path: toAzureServerPath(change.path),
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const content = change.rawMarkdown ?? (change.document ? serializeNarrariumDocument(change.document) : null);
|
|
97
|
+
if (typeof content !== "string") {
|
|
98
|
+
throw new Error(`Missing markdown content for changed path ${change.path}`);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
changeType: snapshot.documentsByPath[change.path] ? "edit" : "add",
|
|
102
|
+
item: {
|
|
103
|
+
path: toAzureServerPath(change.path),
|
|
104
|
+
},
|
|
105
|
+
newContent: {
|
|
106
|
+
content,
|
|
107
|
+
contentType: "rawtext",
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}),
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
};
|
|
114
|
+
const push = await this.requestJson(profile, "/pushes", undefined, {
|
|
115
|
+
method: "POST",
|
|
116
|
+
body: JSON.stringify(pushBody),
|
|
117
|
+
});
|
|
118
|
+
const updatedRef = push.refUpdates?.find((entry) => entry.name === refName) ?? push.refUpdates?.[0];
|
|
119
|
+
const commitSha = updatedRef?.newObjectId ?? push.commits?.[0]?.commitId;
|
|
120
|
+
if (!commitSha) {
|
|
121
|
+
throw new Error("Azure DevOps push response did not include the new commit SHA.");
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
profileId: profile.id,
|
|
125
|
+
provider: profile.provider,
|
|
126
|
+
branch: profile.branch,
|
|
127
|
+
previousCommitSha: snapshot.commitSha,
|
|
128
|
+
commitSha,
|
|
129
|
+
pushedAt: push.date ?? new Date().toISOString(),
|
|
130
|
+
changedPaths: workspace.listChangedPaths(),
|
|
131
|
+
message: args.request.message,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
async requestJson(profile, endpoint, query = {}, init = {}) {
|
|
135
|
+
const url = buildAzureDevOpsApiUrl(this.apiBaseUrl, profile, endpoint, {
|
|
136
|
+
...query,
|
|
137
|
+
"api-version": this.apiVersion,
|
|
138
|
+
});
|
|
139
|
+
const response = await this.fetchImpl(url, {
|
|
140
|
+
...init,
|
|
141
|
+
headers: {
|
|
142
|
+
Accept: "application/json",
|
|
143
|
+
Authorization: `Basic ${encodeBasicToken(profile.token)}`,
|
|
144
|
+
...(init.body ? { "Content-Type": "application/json" } : {}),
|
|
145
|
+
...(init.headers ?? {}),
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
if (!response.ok) {
|
|
149
|
+
const text = await response.text();
|
|
150
|
+
throw new Error(`Azure DevOps API request failed (${response.status} ${response.statusText}) for ${endpoint}: ${text}`);
|
|
151
|
+
}
|
|
152
|
+
return (await response.json());
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function asAzureDevOpsProfile(profile) {
|
|
156
|
+
if (profile.provider !== "azure-devops") {
|
|
157
|
+
throw new Error(`AzureDevOpsRemoteProvider cannot handle provider ${profile.provider}`);
|
|
158
|
+
}
|
|
159
|
+
return profile;
|
|
160
|
+
}
|
|
161
|
+
function buildAzureDevOpsRef(profile) {
|
|
162
|
+
const candidate = (profile.ref && profile.ref.trim()) || profile.branch;
|
|
163
|
+
return candidate.startsWith("refs/") ? candidate : `refs/heads/${candidate.replace(/^heads\//, "")}`;
|
|
164
|
+
}
|
|
165
|
+
function buildAzureDevOpsApiUrl(apiBaseUrl, profile, endpoint, query) {
|
|
166
|
+
const url = new URL(`${encodeURIComponent(profile.organization)}/${encodeURIComponent(profile.project)}/_apis/git/repositories/${encodeURIComponent(profile.repository)}${endpoint}`, `${apiBaseUrl}/`);
|
|
167
|
+
for (const [key, value] of Object.entries(query)) {
|
|
168
|
+
url.searchParams.set(key, value);
|
|
169
|
+
}
|
|
170
|
+
return url.toString();
|
|
171
|
+
}
|
|
172
|
+
function readAzureItemContent(response) {
|
|
173
|
+
if (typeof response.content === "string") {
|
|
174
|
+
return response.content;
|
|
175
|
+
}
|
|
176
|
+
const first = response.value?.[0];
|
|
177
|
+
if (typeof first?.content === "string") {
|
|
178
|
+
return first.content;
|
|
179
|
+
}
|
|
180
|
+
return "";
|
|
181
|
+
}
|
|
182
|
+
function normalizeAzureItemPath(path) {
|
|
183
|
+
return path.replace(/^\/+/, "").replace(/\\/g, "/");
|
|
184
|
+
}
|
|
185
|
+
function toAzureServerPath(path) {
|
|
186
|
+
const normalized = normalizeAzureItemPath(path);
|
|
187
|
+
return `/${normalized}`;
|
|
188
|
+
}
|
|
189
|
+
function buildAzureCommitAuthor(request) {
|
|
190
|
+
if (!request.authorName || !request.authorEmail) {
|
|
191
|
+
return undefined;
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
name: request.authorName,
|
|
195
|
+
email: request.authorEmail,
|
|
196
|
+
date: new Date().toISOString(),
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function encodeBasicToken(token) {
|
|
200
|
+
const value = `:${token}`;
|
|
201
|
+
if (typeof btoa === "function") {
|
|
202
|
+
return btoa(value);
|
|
203
|
+
}
|
|
204
|
+
return Buffer.from(value, "utf8").toString("base64");
|
|
205
|
+
}
|
|
206
|
+
async function mapWithConcurrency(values, concurrency, mapper) {
|
|
207
|
+
const results = new Array(values.length);
|
|
208
|
+
let nextIndex = 0;
|
|
209
|
+
const workers = Array.from({ length: Math.min(concurrency, values.length) }, async () => {
|
|
210
|
+
while (true) {
|
|
211
|
+
const currentIndex = nextIndex;
|
|
212
|
+
nextIndex += 1;
|
|
213
|
+
if (currentIndex >= values.length) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
results[currentIndex] = await mapper(values[currentIndex], currentIndex);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
await Promise.all(workers);
|
|
220
|
+
return results;
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=azure-devops-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azure-devops-provider.js","sourceRoot":"","sources":["../src/azure-devops-provider.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAmD5F,MAAM,OAAO,yBAAyB;IAC3B,IAAI,GAAG,cAAuB,CAAC;IAEvB,SAAS,CAAY;IACrB,UAAU,CAAS;IAC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,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import type { AssetFrontmatter, BookFrontmatter, ChapterDraftFrontmatter, ChapterFrontmatter, CharacterFrontmatter, ContextFrontmatter, FactionFrontmatter, GuidelineFrontmatter, ItemFrontmatter, LocationFrontmatter, ParagraphDraftFrontmatter, ParagraphFrontmatter, PlotFrontmatter, ResearchNoteFrontmatter, SecretFrontmatter, TimelineEventFrontmatter } from "./schemas.js";
|
|
2
|
+
export type BookProviderKind = "github" | "azure-devops";
|
|
3
|
+
export interface StringKeyValueStore {
|
|
4
|
+
getItem(key: string): string | null;
|
|
5
|
+
setItem(key: string, value: string): void;
|
|
6
|
+
removeItem(key: string): void;
|
|
7
|
+
}
|
|
8
|
+
export interface BaseBookConnectionProfile {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
provider: BookProviderKind;
|
|
12
|
+
branch: string;
|
|
13
|
+
ref?: string;
|
|
14
|
+
isDefault: boolean;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
}
|
|
18
|
+
export interface GitHubBookConnectionProfile extends BaseBookConnectionProfile {
|
|
19
|
+
provider: "github";
|
|
20
|
+
owner: string;
|
|
21
|
+
repository: string;
|
|
22
|
+
token: string;
|
|
23
|
+
}
|
|
24
|
+
export interface AzureDevOpsBookConnectionProfile extends BaseBookConnectionProfile {
|
|
25
|
+
provider: "azure-devops";
|
|
26
|
+
organization: string;
|
|
27
|
+
project: string;
|
|
28
|
+
repository: string;
|
|
29
|
+
token: string;
|
|
30
|
+
}
|
|
31
|
+
export type BookConnectionProfile = GitHubBookConnectionProfile | AzureDevOpsBookConnectionProfile;
|
|
32
|
+
export interface CreateGitHubBookConnectionProfileInput {
|
|
33
|
+
id?: string;
|
|
34
|
+
name: string;
|
|
35
|
+
owner: string;
|
|
36
|
+
repository: string;
|
|
37
|
+
branch: string;
|
|
38
|
+
token: string;
|
|
39
|
+
ref?: string;
|
|
40
|
+
isDefault?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface CreateAzureDevOpsBookConnectionProfileInput {
|
|
43
|
+
id?: string;
|
|
44
|
+
name: string;
|
|
45
|
+
organization: string;
|
|
46
|
+
project: string;
|
|
47
|
+
repository: string;
|
|
48
|
+
branch: string;
|
|
49
|
+
token: string;
|
|
50
|
+
ref?: string;
|
|
51
|
+
isDefault?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export type NarrariumDocumentKind = "book" | "plot" | "context" | "guideline" | "character" | "item" | "location" | "faction" | "secret" | "timeline-main" | "timeline-event" | "chapter" | "paragraph" | "chapter-draft" | "paragraph-draft" | "resume" | "evaluation" | "state" | "research-note" | "asset" | "unknown";
|
|
54
|
+
type LooseFrontmatter = Record<string, unknown>;
|
|
55
|
+
export type NarrariumKnownFrontmatter = BookFrontmatter | PlotFrontmatter | ContextFrontmatter | GuidelineFrontmatter | CharacterFrontmatter | ItemFrontmatter | LocationFrontmatter | FactionFrontmatter | SecretFrontmatter | TimelineEventFrontmatter | AssetFrontmatter | ChapterFrontmatter | ChapterDraftFrontmatter | ParagraphFrontmatter | ParagraphDraftFrontmatter | ResearchNoteFrontmatter | LooseFrontmatter;
|
|
56
|
+
export interface NarrariumDocument<TFrontmatter = NarrariumKnownFrontmatter> {
|
|
57
|
+
kind: NarrariumDocumentKind;
|
|
58
|
+
path: string;
|
|
59
|
+
frontmatter: TFrontmatter;
|
|
60
|
+
body: string;
|
|
61
|
+
rawMarkdown?: string;
|
|
62
|
+
}
|
|
63
|
+
export type NarrariumAnyDocument = NarrariumDocument<NarrariumKnownFrontmatter>;
|
|
64
|
+
export type NarrariumContextDocument = NarrariumDocument<ContextFrontmatter>;
|
|
65
|
+
export interface NarrariumChapterSnapshot {
|
|
66
|
+
slug: string;
|
|
67
|
+
chapter: NarrariumDocument<ChapterFrontmatter>;
|
|
68
|
+
paragraphs: Array<NarrariumDocument<ParagraphFrontmatter>>;
|
|
69
|
+
}
|
|
70
|
+
export interface NarrariumDraftChapterSnapshot {
|
|
71
|
+
slug: string;
|
|
72
|
+
chapter: NarrariumDocument<ChapterDraftFrontmatter>;
|
|
73
|
+
paragraphs: Array<NarrariumDocument<ParagraphDraftFrontmatter>>;
|
|
74
|
+
}
|
|
75
|
+
export interface NarrariumBookSnapshot {
|
|
76
|
+
profileId: string;
|
|
77
|
+
provider: BookProviderKind;
|
|
78
|
+
branch: string;
|
|
79
|
+
ref: string | null;
|
|
80
|
+
commitSha: string;
|
|
81
|
+
loadedAt: string;
|
|
82
|
+
book: NarrariumDocument<BookFrontmatter> | null;
|
|
83
|
+
plot: NarrariumDocument<PlotFrontmatter> | null;
|
|
84
|
+
context: NarrariumContextDocument | null;
|
|
85
|
+
guidelines: Array<NarrariumDocument<GuidelineFrontmatter>>;
|
|
86
|
+
characters: Array<NarrariumDocument<CharacterFrontmatter>>;
|
|
87
|
+
items: Array<NarrariumDocument<ItemFrontmatter>>;
|
|
88
|
+
locations: Array<NarrariumDocument<LocationFrontmatter>>;
|
|
89
|
+
factions: Array<NarrariumDocument<FactionFrontmatter>>;
|
|
90
|
+
secrets: Array<NarrariumDocument<SecretFrontmatter>>;
|
|
91
|
+
timelineMain: NarrariumDocument<LooseFrontmatter> | null;
|
|
92
|
+
timelineEvents: Array<NarrariumDocument<TimelineEventFrontmatter>>;
|
|
93
|
+
chapters: Array<NarrariumChapterSnapshot>;
|
|
94
|
+
draftChapters: Array<NarrariumDraftChapterSnapshot>;
|
|
95
|
+
resumes: Array<NarrariumDocument<LooseFrontmatter>>;
|
|
96
|
+
stateDocuments: Array<NarrariumDocument<LooseFrontmatter>>;
|
|
97
|
+
evaluations: Array<NarrariumDocument<LooseFrontmatter>>;
|
|
98
|
+
researchNotes: Array<NarrariumDocument<ResearchNoteFrontmatter>>;
|
|
99
|
+
assets: Array<NarrariumDocument<AssetFrontmatter>>;
|
|
100
|
+
otherDocuments: Array<NarrariumDocument<LooseFrontmatter>>;
|
|
101
|
+
documentsByPath: Record<string, NarrariumAnyDocument>;
|
|
102
|
+
chaptersBySlug: Record<string, NarrariumChapterSnapshot>;
|
|
103
|
+
paragraphsById: Record<string, NarrariumDocument<ParagraphFrontmatter>>;
|
|
104
|
+
}
|
|
105
|
+
export interface CreateEmptyBookSnapshotInput {
|
|
106
|
+
profileId: string;
|
|
107
|
+
provider: BookProviderKind;
|
|
108
|
+
branch: string;
|
|
109
|
+
commitSha: string;
|
|
110
|
+
ref?: string | null;
|
|
111
|
+
loadedAt?: string | Date;
|
|
112
|
+
}
|
|
113
|
+
export declare function createEmptyBookSnapshot(input: CreateEmptyBookSnapshotInput): NarrariumBookSnapshot;
|
|
114
|
+
export interface NarrariumWorkspaceUpsertChange {
|
|
115
|
+
kind: "upsert";
|
|
116
|
+
path: string;
|
|
117
|
+
document?: NarrariumAnyDocument;
|
|
118
|
+
rawMarkdown?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface NarrariumWorkspaceDeleteChange {
|
|
121
|
+
kind: "delete";
|
|
122
|
+
path: string;
|
|
123
|
+
}
|
|
124
|
+
export type NarrariumWorkspaceChange = NarrariumWorkspaceUpsertChange | NarrariumWorkspaceDeleteChange;
|
|
125
|
+
export interface NarrariumDocumentPatch<TFrontmatter> {
|
|
126
|
+
frontmatter?: Partial<TFrontmatter>;
|
|
127
|
+
body?: string;
|
|
128
|
+
rawMarkdown?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface CharacterDocumentInput {
|
|
131
|
+
slug: string;
|
|
132
|
+
frontmatter: CharacterFrontmatter;
|
|
133
|
+
body: string;
|
|
134
|
+
rawMarkdown?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface ChapterDocumentInput {
|
|
137
|
+
slug: string;
|
|
138
|
+
frontmatter: ChapterFrontmatter;
|
|
139
|
+
body: string;
|
|
140
|
+
rawMarkdown?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface ParagraphDocumentInput {
|
|
143
|
+
chapterSlug: string;
|
|
144
|
+
slug: string;
|
|
145
|
+
frontmatter: ParagraphFrontmatter;
|
|
146
|
+
body: string;
|
|
147
|
+
rawMarkdown?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface CharacterDocumentLocator {
|
|
150
|
+
slug?: string;
|
|
151
|
+
id?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface ChapterDocumentLocator {
|
|
154
|
+
slug?: string;
|
|
155
|
+
id?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface ParagraphDocumentLocator {
|
|
158
|
+
chapterSlug?: string;
|
|
159
|
+
slug?: string;
|
|
160
|
+
id?: string;
|
|
161
|
+
}
|
|
162
|
+
export declare class NarrariumBookWorkspace {
|
|
163
|
+
readonly snapshot: NarrariumBookSnapshot;
|
|
164
|
+
readonly createdAt: string;
|
|
165
|
+
private readonly changesByPath;
|
|
166
|
+
constructor(snapshot: NarrariumBookSnapshot, createdAt?: string | Date);
|
|
167
|
+
upsertDocument(document: NarrariumAnyDocument, options?: {
|
|
168
|
+
rawMarkdown?: string;
|
|
169
|
+
}): this;
|
|
170
|
+
upsertCharacter(input: CharacterDocumentInput): this;
|
|
171
|
+
updateCharacter(locator: string | CharacterDocumentLocator, patch: NarrariumDocumentPatch<CharacterFrontmatter>): this;
|
|
172
|
+
upsertChapter(input: ChapterDocumentInput): this;
|
|
173
|
+
updateChapter(locator: string | ChapterDocumentLocator, patch: NarrariumDocumentPatch<ChapterFrontmatter>): this;
|
|
174
|
+
upsertParagraph(input: ParagraphDocumentInput): this;
|
|
175
|
+
updateParagraph(locator: string | ParagraphDocumentLocator, patch: NarrariumDocumentPatch<ParagraphFrontmatter>): this;
|
|
176
|
+
upsertMarkdown(path: string, rawMarkdown: string): this;
|
|
177
|
+
deleteDocument(path: string): this;
|
|
178
|
+
getChange(path: string): NarrariumWorkspaceChange | null;
|
|
179
|
+
listChanges(): NarrariumWorkspaceChange[];
|
|
180
|
+
listChangedPaths(): string[];
|
|
181
|
+
hasChanges(): boolean;
|
|
182
|
+
clearChanges(): void;
|
|
183
|
+
private requireTypedDocument;
|
|
184
|
+
}
|
|
185
|
+
export interface BookCommitRequest {
|
|
186
|
+
message: string;
|
|
187
|
+
authorName?: string;
|
|
188
|
+
authorEmail?: string;
|
|
189
|
+
}
|
|
190
|
+
export interface BookPushResult {
|
|
191
|
+
profileId: string;
|
|
192
|
+
provider: BookProviderKind;
|
|
193
|
+
branch: string;
|
|
194
|
+
previousCommitSha: string;
|
|
195
|
+
commitSha: string;
|
|
196
|
+
pushedAt: string;
|
|
197
|
+
changedPaths: string[];
|
|
198
|
+
message: string;
|
|
199
|
+
}
|
|
200
|
+
export interface NarrariumRemoteProviderLoadArgs {
|
|
201
|
+
profile: BookConnectionProfile;
|
|
202
|
+
}
|
|
203
|
+
export interface NarrariumRemoteProviderCommitArgs {
|
|
204
|
+
profile: BookConnectionProfile;
|
|
205
|
+
snapshot: NarrariumBookSnapshot;
|
|
206
|
+
workspace: NarrariumBookWorkspace;
|
|
207
|
+
request: BookCommitRequest;
|
|
208
|
+
}
|
|
209
|
+
export interface NarrariumRemoteProvider {
|
|
210
|
+
readonly kind: BookProviderKind;
|
|
211
|
+
loadBookSnapshot(args: NarrariumRemoteProviderLoadArgs): Promise<NarrariumBookSnapshot>;
|
|
212
|
+
commitAndPush(args: NarrariumRemoteProviderCommitArgs): Promise<BookPushResult>;
|
|
213
|
+
}
|
|
214
|
+
export interface BookConnectionProfileStore {
|
|
215
|
+
listProfiles(): Promise<BookConnectionProfile[]>;
|
|
216
|
+
getProfile(id: string): Promise<BookConnectionProfile | null>;
|
|
217
|
+
saveProfile(profile: BookConnectionProfile): Promise<BookConnectionProfile>;
|
|
218
|
+
deleteProfile(id: string): Promise<boolean>;
|
|
219
|
+
}
|
|
220
|
+
export declare class InMemoryBookProfileStore implements BookConnectionProfileStore {
|
|
221
|
+
private readonly profiles;
|
|
222
|
+
listProfiles(): Promise<BookConnectionProfile[]>;
|
|
223
|
+
getProfile(id: string): Promise<BookConnectionProfile | null>;
|
|
224
|
+
saveProfile(profile: BookConnectionProfile): Promise<BookConnectionProfile>;
|
|
225
|
+
deleteProfile(id: string): Promise<boolean>;
|
|
226
|
+
}
|
|
227
|
+
export interface LocalStorageBookProfileStoreOptions {
|
|
228
|
+
storage?: StringKeyValueStore;
|
|
229
|
+
storageKey?: string;
|
|
230
|
+
}
|
|
231
|
+
export declare class LocalStorageBookProfileStore implements BookConnectionProfileStore {
|
|
232
|
+
private readonly storage;
|
|
233
|
+
private readonly storageKey;
|
|
234
|
+
constructor(options?: LocalStorageBookProfileStoreOptions);
|
|
235
|
+
listProfiles(): Promise<BookConnectionProfile[]>;
|
|
236
|
+
getProfile(id: string): Promise<BookConnectionProfile | null>;
|
|
237
|
+
saveProfile(profile: BookConnectionProfile): Promise<BookConnectionProfile>;
|
|
238
|
+
deleteProfile(id: string): Promise<boolean>;
|
|
239
|
+
private readProfiles;
|
|
240
|
+
private writeProfiles;
|
|
241
|
+
}
|
|
242
|
+
export interface BookManagerOptions {
|
|
243
|
+
profileStore?: BookConnectionProfileStore;
|
|
244
|
+
providers?: NarrariumRemoteProvider[];
|
|
245
|
+
now?: () => Date;
|
|
246
|
+
}
|
|
247
|
+
export declare class BookManager {
|
|
248
|
+
private readonly profileStore;
|
|
249
|
+
private readonly providers;
|
|
250
|
+
private readonly now;
|
|
251
|
+
constructor(options?: BookManagerOptions);
|
|
252
|
+
registerProvider(provider: NarrariumRemoteProvider): this;
|
|
253
|
+
listProfiles(): Promise<BookConnectionProfile[]>;
|
|
254
|
+
getProfile(id: string): Promise<BookConnectionProfile | null>;
|
|
255
|
+
getDefaultProfile(): Promise<BookConnectionProfile | null>;
|
|
256
|
+
createGitHubProfile(input: CreateGitHubBookConnectionProfileInput): Promise<GitHubBookConnectionProfile>;
|
|
257
|
+
createAzureDevOpsProfile(input: CreateAzureDevOpsBookConnectionProfileInput): Promise<AzureDevOpsBookConnectionProfile>;
|
|
258
|
+
saveProfile(profile: BookConnectionProfile): Promise<BookConnectionProfile>;
|
|
259
|
+
deleteProfile(id: string): Promise<boolean>;
|
|
260
|
+
setDefaultProfile(id: string): Promise<BookConnectionProfile>;
|
|
261
|
+
beginWorkspace(snapshot: NarrariumBookSnapshot): NarrariumBookWorkspace;
|
|
262
|
+
loadBook(profileOrId: string | BookConnectionProfile): Promise<NarrariumBookSnapshot>;
|
|
263
|
+
commitAndPush(profileOrId: string | BookConnectionProfile, snapshot: NarrariumBookSnapshot, workspace: NarrariumBookWorkspace, request: BookCommitRequest): Promise<BookPushResult>;
|
|
264
|
+
private persistProfile;
|
|
265
|
+
private resolveProfile;
|
|
266
|
+
private resolveProvider;
|
|
267
|
+
}
|
|
268
|
+
export {};
|
|
269
|
+
//# sourceMappingURL=book-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"book-manager.d.ts","sourceRoot":"","sources":["../src/book-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,cAAc,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,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