@odla-ai/chapter 0.38.1 → 0.39.1
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 +49 -0
- package/dist/{chunk-SI3JHSEX.js → chunk-4K2Q5JBC.js} +660 -553
- package/dist/chunk-4K2Q5JBC.js.map +1 -0
- package/dist/{copy-context-Pbs3keLx.d.ts → copy-context-Buz_27Ed.d.ts} +26 -0
- package/dist/index.cjs +471 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +202 -3
- package/dist/index.d.ts +202 -3
- package/dist/index.js +471 -132
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +106 -3
- package/dist/ui/admin/index.js +5 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +5 -1
- package/dist/ui/member/index.d.ts +2 -2
- package/dist/worker/index.cjs +614 -111
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +127 -1
- package/dist/worker/index.d.ts +127 -1
- package/dist/worker/index.js +610 -107
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
- package/runbooks/greenfield.md +15 -0
- package/dist/chunk-SI3JHSEX.js.map +0 -1
package/dist/worker/index.d.cts
CHANGED
|
@@ -113,6 +113,28 @@ interface ResolvedMemberContent {
|
|
|
113
113
|
} | null;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/** Optional private Builder Library shared across Built Not Found and Chapters. */
|
|
117
|
+
interface ChapterBuilderLibrary {
|
|
118
|
+
/** Keep local admin authoring enabled. Defaults to true. */
|
|
119
|
+
localAuthoring?: boolean;
|
|
120
|
+
/** Signed sources this app accepts. Hub sources are Chapters; Chapter sources are Built Not Found. */
|
|
121
|
+
sources?: readonly {
|
|
122
|
+
sourceId: string;
|
|
123
|
+
/** Vault key holding the dedicated Builder Library edge secret. */
|
|
124
|
+
secretName?: string;
|
|
125
|
+
}[];
|
|
126
|
+
}
|
|
127
|
+
interface ResolvedBuilderLibrarySource {
|
|
128
|
+
sourceId: string;
|
|
129
|
+
secretName: string;
|
|
130
|
+
}
|
|
131
|
+
/** Validated Builder Library settings carried on a resolved Chapter. */
|
|
132
|
+
interface ResolvedBuilderLibrary {
|
|
133
|
+
enabled: true;
|
|
134
|
+
localAuthoring: boolean;
|
|
135
|
+
sources: readonly ResolvedBuilderLibrarySource[];
|
|
136
|
+
}
|
|
137
|
+
|
|
116
138
|
/** Scalar kinds accepted by the Chapter schema adapter. */
|
|
117
139
|
type AttrType = "string" | "number" | "boolean" | "json";
|
|
118
140
|
/** One odla-db attribute: its type and index/uniqueness/optionality flags. */
|
|
@@ -544,6 +566,8 @@ interface ChapterConfig {
|
|
|
544
566
|
signupControl?: ChapterSignupControl;
|
|
545
567
|
/** Authenticated parent + chapter member pages with server-enforced tier access. */
|
|
546
568
|
memberContent?: ChapterMemberContent;
|
|
569
|
+
/** Private docs, Brand asset references, and links for authorized site-building agents. */
|
|
570
|
+
builderLibrary?: ChapterBuilderLibrary;
|
|
547
571
|
/** Enable a public, host-rendered formation application workflow. */
|
|
548
572
|
formation?: LeaderFormationConfig;
|
|
549
573
|
thesis?: unknown;
|
|
@@ -642,6 +666,8 @@ interface Chapter {
|
|
|
642
666
|
signupControl: ResolvedSignupControl | null;
|
|
643
667
|
/** Null unless the standard authenticated member-content surface is enabled. */
|
|
644
668
|
memberContent: ResolvedMemberContent | null;
|
|
669
|
+
/** Null unless the private scoped Builder Library is enabled. */
|
|
670
|
+
builderLibrary: ResolvedBuilderLibrary | null;
|
|
645
671
|
/** Resolved public formation intake contract (disabled when omitted). */
|
|
646
672
|
formation: ResolvedLeaderFormation;
|
|
647
673
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
@@ -1006,6 +1032,106 @@ interface MemberContentDeliveryOptions {
|
|
|
1006
1032
|
/** Deliver one exact revision. Durable retry and approval remain Parent concerns. */
|
|
1007
1033
|
declare function deliverMemberContent(options: MemberContentDeliveryOptions): Promise<MemberContentReceipt>;
|
|
1008
1034
|
|
|
1035
|
+
/** Versioned contract for private Builder Library source material. */
|
|
1036
|
+
declare const BUILDER_LIBRARY_SCHEMA_VERSION: 1;
|
|
1037
|
+
/** Authority kind attached to one complete Builder Library document. */
|
|
1038
|
+
type BuilderLibrarySourceType = "chapter" | "built_not_found";
|
|
1039
|
+
/** Stable authority identity attached to a Builder Library document. */
|
|
1040
|
+
interface BuilderLibrarySource {
|
|
1041
|
+
type: BuilderLibrarySourceType;
|
|
1042
|
+
appId: string;
|
|
1043
|
+
}
|
|
1044
|
+
/** Exact app deployment that a signed Builder Library revision targets. */
|
|
1045
|
+
interface BuilderLibraryTarget {
|
|
1046
|
+
appId: string;
|
|
1047
|
+
environment: string;
|
|
1048
|
+
}
|
|
1049
|
+
/** Exactly one visibility scope. There are deliberately no groups or audience arrays. */
|
|
1050
|
+
type BuilderLibraryScope = {
|
|
1051
|
+
kind: "chapter";
|
|
1052
|
+
chapterId: string;
|
|
1053
|
+
} | {
|
|
1054
|
+
kind: "built_not_found";
|
|
1055
|
+
} | {
|
|
1056
|
+
kind: "global";
|
|
1057
|
+
};
|
|
1058
|
+
/** Supported private source-material representations. */
|
|
1059
|
+
type BuilderLibraryResourceKind = "document" | "note" | "link" | "inspiration" | "image" | "file";
|
|
1060
|
+
/** Explicit authoring lifecycle; only published resources enter agent manifests. */
|
|
1061
|
+
type BuilderLibraryResourceStatus = "draft" | "published" | "archived";
|
|
1062
|
+
/** Durable Brand identity only; URLs, bytes, and storage credentials never enter a manifest. */
|
|
1063
|
+
interface BuilderLibraryBrandAssetRef {
|
|
1064
|
+
bookId: string;
|
|
1065
|
+
assetId: string;
|
|
1066
|
+
filename?: string;
|
|
1067
|
+
}
|
|
1068
|
+
/** Immutable origin recorded when Built Not Found promotes Chapter material. */
|
|
1069
|
+
interface BuilderLibraryPromotionProvenance {
|
|
1070
|
+
chapterId: string;
|
|
1071
|
+
resourceId: string;
|
|
1072
|
+
resourceRevision: number;
|
|
1073
|
+
documentRevision: number;
|
|
1074
|
+
promotedBy: string;
|
|
1075
|
+
promotedAt: number;
|
|
1076
|
+
}
|
|
1077
|
+
/** Server-authored creation/update history for one resource. */
|
|
1078
|
+
interface BuilderLibraryResourceProvenance {
|
|
1079
|
+
createdBy: string;
|
|
1080
|
+
createdAt: number;
|
|
1081
|
+
updatedBy: string;
|
|
1082
|
+
updatedAt: number;
|
|
1083
|
+
promotedFrom?: BuilderLibraryPromotionProvenance;
|
|
1084
|
+
}
|
|
1085
|
+
/** One bounded, revisioned private source item. */
|
|
1086
|
+
interface BuilderLibraryResource {
|
|
1087
|
+
id: string;
|
|
1088
|
+
kind: BuilderLibraryResourceKind;
|
|
1089
|
+
title: string;
|
|
1090
|
+
summary?: string;
|
|
1091
|
+
tags: readonly string[];
|
|
1092
|
+
scope: BuilderLibraryScope;
|
|
1093
|
+
status: BuilderLibraryResourceStatus;
|
|
1094
|
+
revision: number;
|
|
1095
|
+
bodyMarkdown?: string;
|
|
1096
|
+
url?: string;
|
|
1097
|
+
brandAsset?: BuilderLibraryBrandAssetRef;
|
|
1098
|
+
provenance: BuilderLibraryResourceProvenance;
|
|
1099
|
+
}
|
|
1100
|
+
/** Complete local or federated authoring layer. */
|
|
1101
|
+
interface BuilderLibraryDocument {
|
|
1102
|
+
schemaVersion: typeof BUILDER_LIBRARY_SCHEMA_VERSION;
|
|
1103
|
+
revision: number;
|
|
1104
|
+
generatedAt: number;
|
|
1105
|
+
source: BuilderLibrarySource;
|
|
1106
|
+
target?: BuilderLibraryTarget;
|
|
1107
|
+
resources: readonly BuilderLibraryResource[];
|
|
1108
|
+
}
|
|
1109
|
+
/** Canonical document and digest transmitted over the signed library edge. */
|
|
1110
|
+
interface BuilderLibraryEnvelope {
|
|
1111
|
+
digest: string;
|
|
1112
|
+
document: BuilderLibraryDocument;
|
|
1113
|
+
}
|
|
1114
|
+
/** Durable acknowledgement for an accepted or idempotently replayed revision. */
|
|
1115
|
+
interface BuilderLibraryReceipt {
|
|
1116
|
+
ok: true;
|
|
1117
|
+
target: BuilderLibraryTarget;
|
|
1118
|
+
revision: number;
|
|
1119
|
+
digest: string;
|
|
1120
|
+
status: "accepted" | "replayed";
|
|
1121
|
+
acknowledgedAt: number;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/** Inputs for one signed Builder Library peer delivery. */
|
|
1125
|
+
interface BuilderLibraryDeliveryOptions {
|
|
1126
|
+
secret: string;
|
|
1127
|
+
sender: string;
|
|
1128
|
+
targetUrl: string | URL;
|
|
1129
|
+
envelope: BuilderLibraryEnvelope;
|
|
1130
|
+
fetch?: typeof globalThis.fetch;
|
|
1131
|
+
}
|
|
1132
|
+
/** Deliver one exact Builder Library revision over its dedicated signed edge. */
|
|
1133
|
+
declare function deliverBuilderLibrary(options: BuilderLibraryDeliveryOptions): Promise<BuilderLibraryReceipt>;
|
|
1134
|
+
|
|
1009
1135
|
/** Current wire version for parent-authored admission decisions. */
|
|
1010
1136
|
declare const ADMISSION_GRANTS_SCHEMA_VERSION: 1;
|
|
1011
1137
|
/** Whether an exact email can skip or must retain the Chapter interview. */
|
|
@@ -1132,4 +1258,4 @@ declare function chapterWorker(options: ChapterWorkerOptions): {
|
|
|
1132
1258
|
fetch(req: Request, env: ChapterEnv): Promise<Response>;
|
|
1133
1259
|
};
|
|
1134
1260
|
|
|
1135
|
-
export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type AdmissionGrantDeliveryOptions, type ChapterEnv, type ChapterWorkerOptions, type MemberContentDeliveryOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverAdmissionGrants, deliverMemberContent, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
|
|
1261
|
+
export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type AdmissionGrantDeliveryOptions, type BuilderLibraryDeliveryOptions, type ChapterEnv, type ChapterWorkerOptions, type MemberContentDeliveryOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverAdmissionGrants, deliverBuilderLibrary, deliverMemberContent, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
|
package/dist/worker/index.d.ts
CHANGED
|
@@ -113,6 +113,28 @@ interface ResolvedMemberContent {
|
|
|
113
113
|
} | null;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/** Optional private Builder Library shared across Built Not Found and Chapters. */
|
|
117
|
+
interface ChapterBuilderLibrary {
|
|
118
|
+
/** Keep local admin authoring enabled. Defaults to true. */
|
|
119
|
+
localAuthoring?: boolean;
|
|
120
|
+
/** Signed sources this app accepts. Hub sources are Chapters; Chapter sources are Built Not Found. */
|
|
121
|
+
sources?: readonly {
|
|
122
|
+
sourceId: string;
|
|
123
|
+
/** Vault key holding the dedicated Builder Library edge secret. */
|
|
124
|
+
secretName?: string;
|
|
125
|
+
}[];
|
|
126
|
+
}
|
|
127
|
+
interface ResolvedBuilderLibrarySource {
|
|
128
|
+
sourceId: string;
|
|
129
|
+
secretName: string;
|
|
130
|
+
}
|
|
131
|
+
/** Validated Builder Library settings carried on a resolved Chapter. */
|
|
132
|
+
interface ResolvedBuilderLibrary {
|
|
133
|
+
enabled: true;
|
|
134
|
+
localAuthoring: boolean;
|
|
135
|
+
sources: readonly ResolvedBuilderLibrarySource[];
|
|
136
|
+
}
|
|
137
|
+
|
|
116
138
|
/** Scalar kinds accepted by the Chapter schema adapter. */
|
|
117
139
|
type AttrType = "string" | "number" | "boolean" | "json";
|
|
118
140
|
/** One odla-db attribute: its type and index/uniqueness/optionality flags. */
|
|
@@ -544,6 +566,8 @@ interface ChapterConfig {
|
|
|
544
566
|
signupControl?: ChapterSignupControl;
|
|
545
567
|
/** Authenticated parent + chapter member pages with server-enforced tier access. */
|
|
546
568
|
memberContent?: ChapterMemberContent;
|
|
569
|
+
/** Private docs, Brand asset references, and links for authorized site-building agents. */
|
|
570
|
+
builderLibrary?: ChapterBuilderLibrary;
|
|
547
571
|
/** Enable a public, host-rendered formation application workflow. */
|
|
548
572
|
formation?: LeaderFormationConfig;
|
|
549
573
|
thesis?: unknown;
|
|
@@ -642,6 +666,8 @@ interface Chapter {
|
|
|
642
666
|
signupControl: ResolvedSignupControl | null;
|
|
643
667
|
/** Null unless the standard authenticated member-content surface is enabled. */
|
|
644
668
|
memberContent: ResolvedMemberContent | null;
|
|
669
|
+
/** Null unless the private scoped Builder Library is enabled. */
|
|
670
|
+
builderLibrary: ResolvedBuilderLibrary | null;
|
|
645
671
|
/** Resolved public formation intake contract (disabled when omitted). */
|
|
646
672
|
formation: ResolvedLeaderFormation;
|
|
647
673
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
@@ -1006,6 +1032,106 @@ interface MemberContentDeliveryOptions {
|
|
|
1006
1032
|
/** Deliver one exact revision. Durable retry and approval remain Parent concerns. */
|
|
1007
1033
|
declare function deliverMemberContent(options: MemberContentDeliveryOptions): Promise<MemberContentReceipt>;
|
|
1008
1034
|
|
|
1035
|
+
/** Versioned contract for private Builder Library source material. */
|
|
1036
|
+
declare const BUILDER_LIBRARY_SCHEMA_VERSION: 1;
|
|
1037
|
+
/** Authority kind attached to one complete Builder Library document. */
|
|
1038
|
+
type BuilderLibrarySourceType = "chapter" | "built_not_found";
|
|
1039
|
+
/** Stable authority identity attached to a Builder Library document. */
|
|
1040
|
+
interface BuilderLibrarySource {
|
|
1041
|
+
type: BuilderLibrarySourceType;
|
|
1042
|
+
appId: string;
|
|
1043
|
+
}
|
|
1044
|
+
/** Exact app deployment that a signed Builder Library revision targets. */
|
|
1045
|
+
interface BuilderLibraryTarget {
|
|
1046
|
+
appId: string;
|
|
1047
|
+
environment: string;
|
|
1048
|
+
}
|
|
1049
|
+
/** Exactly one visibility scope. There are deliberately no groups or audience arrays. */
|
|
1050
|
+
type BuilderLibraryScope = {
|
|
1051
|
+
kind: "chapter";
|
|
1052
|
+
chapterId: string;
|
|
1053
|
+
} | {
|
|
1054
|
+
kind: "built_not_found";
|
|
1055
|
+
} | {
|
|
1056
|
+
kind: "global";
|
|
1057
|
+
};
|
|
1058
|
+
/** Supported private source-material representations. */
|
|
1059
|
+
type BuilderLibraryResourceKind = "document" | "note" | "link" | "inspiration" | "image" | "file";
|
|
1060
|
+
/** Explicit authoring lifecycle; only published resources enter agent manifests. */
|
|
1061
|
+
type BuilderLibraryResourceStatus = "draft" | "published" | "archived";
|
|
1062
|
+
/** Durable Brand identity only; URLs, bytes, and storage credentials never enter a manifest. */
|
|
1063
|
+
interface BuilderLibraryBrandAssetRef {
|
|
1064
|
+
bookId: string;
|
|
1065
|
+
assetId: string;
|
|
1066
|
+
filename?: string;
|
|
1067
|
+
}
|
|
1068
|
+
/** Immutable origin recorded when Built Not Found promotes Chapter material. */
|
|
1069
|
+
interface BuilderLibraryPromotionProvenance {
|
|
1070
|
+
chapterId: string;
|
|
1071
|
+
resourceId: string;
|
|
1072
|
+
resourceRevision: number;
|
|
1073
|
+
documentRevision: number;
|
|
1074
|
+
promotedBy: string;
|
|
1075
|
+
promotedAt: number;
|
|
1076
|
+
}
|
|
1077
|
+
/** Server-authored creation/update history for one resource. */
|
|
1078
|
+
interface BuilderLibraryResourceProvenance {
|
|
1079
|
+
createdBy: string;
|
|
1080
|
+
createdAt: number;
|
|
1081
|
+
updatedBy: string;
|
|
1082
|
+
updatedAt: number;
|
|
1083
|
+
promotedFrom?: BuilderLibraryPromotionProvenance;
|
|
1084
|
+
}
|
|
1085
|
+
/** One bounded, revisioned private source item. */
|
|
1086
|
+
interface BuilderLibraryResource {
|
|
1087
|
+
id: string;
|
|
1088
|
+
kind: BuilderLibraryResourceKind;
|
|
1089
|
+
title: string;
|
|
1090
|
+
summary?: string;
|
|
1091
|
+
tags: readonly string[];
|
|
1092
|
+
scope: BuilderLibraryScope;
|
|
1093
|
+
status: BuilderLibraryResourceStatus;
|
|
1094
|
+
revision: number;
|
|
1095
|
+
bodyMarkdown?: string;
|
|
1096
|
+
url?: string;
|
|
1097
|
+
brandAsset?: BuilderLibraryBrandAssetRef;
|
|
1098
|
+
provenance: BuilderLibraryResourceProvenance;
|
|
1099
|
+
}
|
|
1100
|
+
/** Complete local or federated authoring layer. */
|
|
1101
|
+
interface BuilderLibraryDocument {
|
|
1102
|
+
schemaVersion: typeof BUILDER_LIBRARY_SCHEMA_VERSION;
|
|
1103
|
+
revision: number;
|
|
1104
|
+
generatedAt: number;
|
|
1105
|
+
source: BuilderLibrarySource;
|
|
1106
|
+
target?: BuilderLibraryTarget;
|
|
1107
|
+
resources: readonly BuilderLibraryResource[];
|
|
1108
|
+
}
|
|
1109
|
+
/** Canonical document and digest transmitted over the signed library edge. */
|
|
1110
|
+
interface BuilderLibraryEnvelope {
|
|
1111
|
+
digest: string;
|
|
1112
|
+
document: BuilderLibraryDocument;
|
|
1113
|
+
}
|
|
1114
|
+
/** Durable acknowledgement for an accepted or idempotently replayed revision. */
|
|
1115
|
+
interface BuilderLibraryReceipt {
|
|
1116
|
+
ok: true;
|
|
1117
|
+
target: BuilderLibraryTarget;
|
|
1118
|
+
revision: number;
|
|
1119
|
+
digest: string;
|
|
1120
|
+
status: "accepted" | "replayed";
|
|
1121
|
+
acknowledgedAt: number;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/** Inputs for one signed Builder Library peer delivery. */
|
|
1125
|
+
interface BuilderLibraryDeliveryOptions {
|
|
1126
|
+
secret: string;
|
|
1127
|
+
sender: string;
|
|
1128
|
+
targetUrl: string | URL;
|
|
1129
|
+
envelope: BuilderLibraryEnvelope;
|
|
1130
|
+
fetch?: typeof globalThis.fetch;
|
|
1131
|
+
}
|
|
1132
|
+
/** Deliver one exact Builder Library revision over its dedicated signed edge. */
|
|
1133
|
+
declare function deliverBuilderLibrary(options: BuilderLibraryDeliveryOptions): Promise<BuilderLibraryReceipt>;
|
|
1134
|
+
|
|
1009
1135
|
/** Current wire version for parent-authored admission decisions. */
|
|
1010
1136
|
declare const ADMISSION_GRANTS_SCHEMA_VERSION: 1;
|
|
1011
1137
|
/** Whether an exact email can skip or must retain the Chapter interview. */
|
|
@@ -1132,4 +1258,4 @@ declare function chapterWorker(options: ChapterWorkerOptions): {
|
|
|
1132
1258
|
fetch(req: Request, env: ChapterEnv): Promise<Response>;
|
|
1133
1259
|
};
|
|
1134
1260
|
|
|
1135
|
-
export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type AdmissionGrantDeliveryOptions, type ChapterEnv, type ChapterWorkerOptions, type MemberContentDeliveryOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverAdmissionGrants, deliverMemberContent, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
|
|
1261
|
+
export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type AdmissionGrantDeliveryOptions, type BuilderLibraryDeliveryOptions, type ChapterEnv, type ChapterWorkerOptions, type MemberContentDeliveryOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverAdmissionGrants, deliverBuilderLibrary, deliverMemberContent, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
|