@odla-ai/chapter 0.39.0 → 0.39.2
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 +62 -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-Dbu9Bbq1.d.ts} +24 -0
- package/dist/index.cjs +457 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +195 -2
- package/dist/index.d.ts +195 -2
- package/dist/index.js +457 -130
- 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 +601 -108
- 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 +597 -104
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
- package/runbooks/greenfield.md +27 -0
- package/dist/chunk-SI3JHSEX.js.map +0 -1
package/dist/worker/index.d.cts
CHANGED
|
@@ -113,6 +113,26 @@ 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
|
+
/** Existing Chapter-network peers this app accepts. Hub sources must be
|
|
121
|
+
* configured network targets; a Chapter source must be a configured reader. */
|
|
122
|
+
sources?: readonly {
|
|
123
|
+
sourceId: string;
|
|
124
|
+
}[];
|
|
125
|
+
}
|
|
126
|
+
interface ResolvedBuilderLibrarySource {
|
|
127
|
+
sourceId: string;
|
|
128
|
+
}
|
|
129
|
+
/** Validated Builder Library settings carried on a resolved Chapter. */
|
|
130
|
+
interface ResolvedBuilderLibrary {
|
|
131
|
+
enabled: true;
|
|
132
|
+
localAuthoring: boolean;
|
|
133
|
+
sources: readonly ResolvedBuilderLibrarySource[];
|
|
134
|
+
}
|
|
135
|
+
|
|
116
136
|
/** Scalar kinds accepted by the Chapter schema adapter. */
|
|
117
137
|
type AttrType = "string" | "number" | "boolean" | "json";
|
|
118
138
|
/** One odla-db attribute: its type and index/uniqueness/optionality flags. */
|
|
@@ -544,6 +564,8 @@ interface ChapterConfig {
|
|
|
544
564
|
signupControl?: ChapterSignupControl;
|
|
545
565
|
/** Authenticated parent + chapter member pages with server-enforced tier access. */
|
|
546
566
|
memberContent?: ChapterMemberContent;
|
|
567
|
+
/** Private docs, Brand asset references, and links for authorized site-building agents. */
|
|
568
|
+
builderLibrary?: ChapterBuilderLibrary;
|
|
547
569
|
/** Enable a public, host-rendered formation application workflow. */
|
|
548
570
|
formation?: LeaderFormationConfig;
|
|
549
571
|
thesis?: unknown;
|
|
@@ -642,6 +664,8 @@ interface Chapter {
|
|
|
642
664
|
signupControl: ResolvedSignupControl | null;
|
|
643
665
|
/** Null unless the standard authenticated member-content surface is enabled. */
|
|
644
666
|
memberContent: ResolvedMemberContent | null;
|
|
667
|
+
/** Null unless the private scoped Builder Library is enabled. */
|
|
668
|
+
builderLibrary: ResolvedBuilderLibrary | null;
|
|
645
669
|
/** Resolved public formation intake contract (disabled when omitted). */
|
|
646
670
|
formation: ResolvedLeaderFormation;
|
|
647
671
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
@@ -1006,6 +1030,108 @@ interface MemberContentDeliveryOptions {
|
|
|
1006
1030
|
/** Deliver one exact revision. Durable retry and approval remain Parent concerns. */
|
|
1007
1031
|
declare function deliverMemberContent(options: MemberContentDeliveryOptions): Promise<MemberContentReceipt>;
|
|
1008
1032
|
|
|
1033
|
+
/** Versioned contract for private Builder Library source material. */
|
|
1034
|
+
declare const BUILDER_LIBRARY_SCHEMA_VERSION: 1;
|
|
1035
|
+
/** Authority kind attached to one complete Builder Library document. */
|
|
1036
|
+
type BuilderLibrarySourceType = "chapter" | "built_not_found";
|
|
1037
|
+
/** Stable authority identity attached to a Builder Library document. */
|
|
1038
|
+
interface BuilderLibrarySource {
|
|
1039
|
+
type: BuilderLibrarySourceType;
|
|
1040
|
+
appId: string;
|
|
1041
|
+
}
|
|
1042
|
+
/** Exact app deployment that a signed Builder Library revision targets. */
|
|
1043
|
+
interface BuilderLibraryTarget {
|
|
1044
|
+
appId: string;
|
|
1045
|
+
environment: string;
|
|
1046
|
+
}
|
|
1047
|
+
/** Exactly one visibility scope. There are deliberately no groups or audience arrays. */
|
|
1048
|
+
type BuilderLibraryScope = {
|
|
1049
|
+
kind: "chapter";
|
|
1050
|
+
chapterId: string;
|
|
1051
|
+
} | {
|
|
1052
|
+
kind: "built_not_found";
|
|
1053
|
+
} | {
|
|
1054
|
+
kind: "global";
|
|
1055
|
+
};
|
|
1056
|
+
/** Supported private source-material representations. */
|
|
1057
|
+
type BuilderLibraryResourceKind = "document" | "note" | "link" | "inspiration" | "image" | "file";
|
|
1058
|
+
/** Explicit authoring lifecycle; only published resources enter agent manifests. */
|
|
1059
|
+
type BuilderLibraryResourceStatus = "draft" | "published" | "archived";
|
|
1060
|
+
/** Durable Brand identity only; URLs, bytes, and storage credentials never enter a manifest. */
|
|
1061
|
+
interface BuilderLibraryBrandAssetRef {
|
|
1062
|
+
bookId: string;
|
|
1063
|
+
assetId: string;
|
|
1064
|
+
filename?: string;
|
|
1065
|
+
}
|
|
1066
|
+
/** Immutable origin recorded when Built Not Found promotes Chapter material. */
|
|
1067
|
+
interface BuilderLibraryPromotionProvenance {
|
|
1068
|
+
chapterId: string;
|
|
1069
|
+
resourceId: string;
|
|
1070
|
+
resourceRevision: number;
|
|
1071
|
+
documentRevision: number;
|
|
1072
|
+
promotedBy: string;
|
|
1073
|
+
promotedAt: number;
|
|
1074
|
+
}
|
|
1075
|
+
/** Server-authored creation/update history for one resource. */
|
|
1076
|
+
interface BuilderLibraryResourceProvenance {
|
|
1077
|
+
createdBy: string;
|
|
1078
|
+
createdAt: number;
|
|
1079
|
+
updatedBy: string;
|
|
1080
|
+
updatedAt: number;
|
|
1081
|
+
promotedFrom?: BuilderLibraryPromotionProvenance;
|
|
1082
|
+
}
|
|
1083
|
+
/** One bounded, revisioned private source item. */
|
|
1084
|
+
interface BuilderLibraryResource {
|
|
1085
|
+
id: string;
|
|
1086
|
+
kind: BuilderLibraryResourceKind;
|
|
1087
|
+
title: string;
|
|
1088
|
+
summary?: string;
|
|
1089
|
+
tags: readonly string[];
|
|
1090
|
+
scope: BuilderLibraryScope;
|
|
1091
|
+
status: BuilderLibraryResourceStatus;
|
|
1092
|
+
revision: number;
|
|
1093
|
+
bodyMarkdown?: string;
|
|
1094
|
+
url?: string;
|
|
1095
|
+
brandAsset?: BuilderLibraryBrandAssetRef;
|
|
1096
|
+
provenance: BuilderLibraryResourceProvenance;
|
|
1097
|
+
}
|
|
1098
|
+
/** Complete local or federated authoring layer. */
|
|
1099
|
+
interface BuilderLibraryDocument {
|
|
1100
|
+
schemaVersion: typeof BUILDER_LIBRARY_SCHEMA_VERSION;
|
|
1101
|
+
revision: number;
|
|
1102
|
+
generatedAt: number;
|
|
1103
|
+
source: BuilderLibrarySource;
|
|
1104
|
+
target?: BuilderLibraryTarget;
|
|
1105
|
+
resources: readonly BuilderLibraryResource[];
|
|
1106
|
+
}
|
|
1107
|
+
/** Canonical document and digest transmitted over the signed library edge. */
|
|
1108
|
+
interface BuilderLibraryEnvelope {
|
|
1109
|
+
digest: string;
|
|
1110
|
+
document: BuilderLibraryDocument;
|
|
1111
|
+
}
|
|
1112
|
+
/** Durable acknowledgement for an accepted or idempotently replayed revision. */
|
|
1113
|
+
interface BuilderLibraryReceipt {
|
|
1114
|
+
ok: true;
|
|
1115
|
+
target: BuilderLibraryTarget;
|
|
1116
|
+
revision: number;
|
|
1117
|
+
digest: string;
|
|
1118
|
+
status: "accepted" | "replayed";
|
|
1119
|
+
acknowledgedAt: number;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/** Inputs for one signed Builder Library peer delivery. */
|
|
1123
|
+
interface BuilderLibraryDeliveryOptions {
|
|
1124
|
+
/** Existing Chapter-network share secret for this parent/chapter edge. */
|
|
1125
|
+
secret: string;
|
|
1126
|
+
sender: string;
|
|
1127
|
+
targetUrl: string | URL;
|
|
1128
|
+
envelope: BuilderLibraryEnvelope;
|
|
1129
|
+
fetch?: typeof globalThis.fetch;
|
|
1130
|
+
}
|
|
1131
|
+
/** Deliver one exact Builder Library revision over the existing signed Chapter
|
|
1132
|
+
* network edge. No Builder-specific credential is created. */
|
|
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,26 @@ 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
|
+
/** Existing Chapter-network peers this app accepts. Hub sources must be
|
|
121
|
+
* configured network targets; a Chapter source must be a configured reader. */
|
|
122
|
+
sources?: readonly {
|
|
123
|
+
sourceId: string;
|
|
124
|
+
}[];
|
|
125
|
+
}
|
|
126
|
+
interface ResolvedBuilderLibrarySource {
|
|
127
|
+
sourceId: string;
|
|
128
|
+
}
|
|
129
|
+
/** Validated Builder Library settings carried on a resolved Chapter. */
|
|
130
|
+
interface ResolvedBuilderLibrary {
|
|
131
|
+
enabled: true;
|
|
132
|
+
localAuthoring: boolean;
|
|
133
|
+
sources: readonly ResolvedBuilderLibrarySource[];
|
|
134
|
+
}
|
|
135
|
+
|
|
116
136
|
/** Scalar kinds accepted by the Chapter schema adapter. */
|
|
117
137
|
type AttrType = "string" | "number" | "boolean" | "json";
|
|
118
138
|
/** One odla-db attribute: its type and index/uniqueness/optionality flags. */
|
|
@@ -544,6 +564,8 @@ interface ChapterConfig {
|
|
|
544
564
|
signupControl?: ChapterSignupControl;
|
|
545
565
|
/** Authenticated parent + chapter member pages with server-enforced tier access. */
|
|
546
566
|
memberContent?: ChapterMemberContent;
|
|
567
|
+
/** Private docs, Brand asset references, and links for authorized site-building agents. */
|
|
568
|
+
builderLibrary?: ChapterBuilderLibrary;
|
|
547
569
|
/** Enable a public, host-rendered formation application workflow. */
|
|
548
570
|
formation?: LeaderFormationConfig;
|
|
549
571
|
thesis?: unknown;
|
|
@@ -642,6 +664,8 @@ interface Chapter {
|
|
|
642
664
|
signupControl: ResolvedSignupControl | null;
|
|
643
665
|
/** Null unless the standard authenticated member-content surface is enabled. */
|
|
644
666
|
memberContent: ResolvedMemberContent | null;
|
|
667
|
+
/** Null unless the private scoped Builder Library is enabled. */
|
|
668
|
+
builderLibrary: ResolvedBuilderLibrary | null;
|
|
645
669
|
/** Resolved public formation intake contract (disabled when omitted). */
|
|
646
670
|
formation: ResolvedLeaderFormation;
|
|
647
671
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
@@ -1006,6 +1030,108 @@ interface MemberContentDeliveryOptions {
|
|
|
1006
1030
|
/** Deliver one exact revision. Durable retry and approval remain Parent concerns. */
|
|
1007
1031
|
declare function deliverMemberContent(options: MemberContentDeliveryOptions): Promise<MemberContentReceipt>;
|
|
1008
1032
|
|
|
1033
|
+
/** Versioned contract for private Builder Library source material. */
|
|
1034
|
+
declare const BUILDER_LIBRARY_SCHEMA_VERSION: 1;
|
|
1035
|
+
/** Authority kind attached to one complete Builder Library document. */
|
|
1036
|
+
type BuilderLibrarySourceType = "chapter" | "built_not_found";
|
|
1037
|
+
/** Stable authority identity attached to a Builder Library document. */
|
|
1038
|
+
interface BuilderLibrarySource {
|
|
1039
|
+
type: BuilderLibrarySourceType;
|
|
1040
|
+
appId: string;
|
|
1041
|
+
}
|
|
1042
|
+
/** Exact app deployment that a signed Builder Library revision targets. */
|
|
1043
|
+
interface BuilderLibraryTarget {
|
|
1044
|
+
appId: string;
|
|
1045
|
+
environment: string;
|
|
1046
|
+
}
|
|
1047
|
+
/** Exactly one visibility scope. There are deliberately no groups or audience arrays. */
|
|
1048
|
+
type BuilderLibraryScope = {
|
|
1049
|
+
kind: "chapter";
|
|
1050
|
+
chapterId: string;
|
|
1051
|
+
} | {
|
|
1052
|
+
kind: "built_not_found";
|
|
1053
|
+
} | {
|
|
1054
|
+
kind: "global";
|
|
1055
|
+
};
|
|
1056
|
+
/** Supported private source-material representations. */
|
|
1057
|
+
type BuilderLibraryResourceKind = "document" | "note" | "link" | "inspiration" | "image" | "file";
|
|
1058
|
+
/** Explicit authoring lifecycle; only published resources enter agent manifests. */
|
|
1059
|
+
type BuilderLibraryResourceStatus = "draft" | "published" | "archived";
|
|
1060
|
+
/** Durable Brand identity only; URLs, bytes, and storage credentials never enter a manifest. */
|
|
1061
|
+
interface BuilderLibraryBrandAssetRef {
|
|
1062
|
+
bookId: string;
|
|
1063
|
+
assetId: string;
|
|
1064
|
+
filename?: string;
|
|
1065
|
+
}
|
|
1066
|
+
/** Immutable origin recorded when Built Not Found promotes Chapter material. */
|
|
1067
|
+
interface BuilderLibraryPromotionProvenance {
|
|
1068
|
+
chapterId: string;
|
|
1069
|
+
resourceId: string;
|
|
1070
|
+
resourceRevision: number;
|
|
1071
|
+
documentRevision: number;
|
|
1072
|
+
promotedBy: string;
|
|
1073
|
+
promotedAt: number;
|
|
1074
|
+
}
|
|
1075
|
+
/** Server-authored creation/update history for one resource. */
|
|
1076
|
+
interface BuilderLibraryResourceProvenance {
|
|
1077
|
+
createdBy: string;
|
|
1078
|
+
createdAt: number;
|
|
1079
|
+
updatedBy: string;
|
|
1080
|
+
updatedAt: number;
|
|
1081
|
+
promotedFrom?: BuilderLibraryPromotionProvenance;
|
|
1082
|
+
}
|
|
1083
|
+
/** One bounded, revisioned private source item. */
|
|
1084
|
+
interface BuilderLibraryResource {
|
|
1085
|
+
id: string;
|
|
1086
|
+
kind: BuilderLibraryResourceKind;
|
|
1087
|
+
title: string;
|
|
1088
|
+
summary?: string;
|
|
1089
|
+
tags: readonly string[];
|
|
1090
|
+
scope: BuilderLibraryScope;
|
|
1091
|
+
status: BuilderLibraryResourceStatus;
|
|
1092
|
+
revision: number;
|
|
1093
|
+
bodyMarkdown?: string;
|
|
1094
|
+
url?: string;
|
|
1095
|
+
brandAsset?: BuilderLibraryBrandAssetRef;
|
|
1096
|
+
provenance: BuilderLibraryResourceProvenance;
|
|
1097
|
+
}
|
|
1098
|
+
/** Complete local or federated authoring layer. */
|
|
1099
|
+
interface BuilderLibraryDocument {
|
|
1100
|
+
schemaVersion: typeof BUILDER_LIBRARY_SCHEMA_VERSION;
|
|
1101
|
+
revision: number;
|
|
1102
|
+
generatedAt: number;
|
|
1103
|
+
source: BuilderLibrarySource;
|
|
1104
|
+
target?: BuilderLibraryTarget;
|
|
1105
|
+
resources: readonly BuilderLibraryResource[];
|
|
1106
|
+
}
|
|
1107
|
+
/** Canonical document and digest transmitted over the signed library edge. */
|
|
1108
|
+
interface BuilderLibraryEnvelope {
|
|
1109
|
+
digest: string;
|
|
1110
|
+
document: BuilderLibraryDocument;
|
|
1111
|
+
}
|
|
1112
|
+
/** Durable acknowledgement for an accepted or idempotently replayed revision. */
|
|
1113
|
+
interface BuilderLibraryReceipt {
|
|
1114
|
+
ok: true;
|
|
1115
|
+
target: BuilderLibraryTarget;
|
|
1116
|
+
revision: number;
|
|
1117
|
+
digest: string;
|
|
1118
|
+
status: "accepted" | "replayed";
|
|
1119
|
+
acknowledgedAt: number;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/** Inputs for one signed Builder Library peer delivery. */
|
|
1123
|
+
interface BuilderLibraryDeliveryOptions {
|
|
1124
|
+
/** Existing Chapter-network share secret for this parent/chapter edge. */
|
|
1125
|
+
secret: string;
|
|
1126
|
+
sender: string;
|
|
1127
|
+
targetUrl: string | URL;
|
|
1128
|
+
envelope: BuilderLibraryEnvelope;
|
|
1129
|
+
fetch?: typeof globalThis.fetch;
|
|
1130
|
+
}
|
|
1131
|
+
/** Deliver one exact Builder Library revision over the existing signed Chapter
|
|
1132
|
+
* network edge. No Builder-specific credential is created. */
|
|
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 };
|