@mulmoclaude/core 3.7.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collection/core/itemId.d.ts +28 -0
- package/dist/collection/firestore.cjs +9 -1
- package/dist/collection/firestore.cjs.map +1 -1
- package/dist/collection/firestore.js +10 -2
- package/dist/collection/firestore.js.map +1 -1
- package/dist/collection/index.cjs +55 -66
- package/dist/collection/index.cjs.map +1 -1
- package/dist/collection/index.d.ts +1 -1
- package/dist/collection/index.js +3 -15
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/registry/server/index.cjs +19 -19
- package/dist/collection/registry/server/index.cjs.map +1 -1
- package/dist/collection/registry/server/index.js +2 -2
- package/dist/collection/server/firestoreDocs.d.ts +18 -0
- package/dist/collection/server/host.d.ts +29 -0
- package/dist/collection/server/index.cjs +70 -62
- package/dist/collection/server/index.d.ts +2 -3
- package/dist/collection/server/index.js +4 -4
- package/dist/collection/server/io.d.ts +5 -3
- package/dist/collection/server/manageTool.d.ts +0 -4
- package/dist/collection/server/publishProject.d.ts +171 -2
- package/dist/collection-watchers/index.cjs +82 -38
- package/dist/collection-watchers/index.cjs.map +1 -1
- package/dist/collection-watchers/index.js +67 -23
- package/dist/collection-watchers/index.js.map +1 -1
- package/dist/{store-_61sO8K8.js → discovery-B9zdNkgW.js} +2525 -2354
- package/dist/discovery-B9zdNkgW.js.map +1 -0
- package/dist/{store-5_P_NsGa.cjs → discovery-BsXiDZBR.cjs} +2545 -2362
- package/dist/discovery-BsXiDZBR.cjs.map +1 -0
- package/dist/feeds/index.cjs +4 -4
- package/dist/feeds/index.js +2 -2
- package/dist/feeds/server/index.cjs +14 -14
- package/dist/feeds/server/index.cjs.map +1 -1
- package/dist/feeds/server/index.js +4 -4
- package/dist/firestore/listen.d.ts +4 -0
- package/dist/google/index.cjs +16 -16
- package/dist/google/index.cjs.map +1 -1
- package/dist/google/index.js +2 -2
- package/dist/{ingestTypes-CEi-Ot7F.js → ingestTypes-B312BwXg.js} +2 -2
- package/dist/{ingestTypes-CEi-Ot7F.js.map → ingestTypes-B312BwXg.js.map} +1 -1
- package/dist/{ingestTypes-iaiq33Ph.cjs → ingestTypes-B4XfrUoq.cjs} +3 -3
- package/dist/{ingestTypes-iaiq33Ph.cjs.map → ingestTypes-B4XfrUoq.cjs.map} +1 -1
- package/dist/{calendarGrid-CQ8MVSRb.js → itemId-DfTm08jm.js} +34 -2
- package/dist/itemId-DfTm08jm.js.map +1 -0
- package/dist/{calendarGrid-DGILaVxI.cjs → itemId-Dzrr3vs5.cjs} +45 -1
- package/dist/itemId-Dzrr3vs5.cjs.map +1 -0
- package/dist/listen-D5av7GzB.js +22 -0
- package/dist/listen-D5av7GzB.js.map +1 -0
- package/dist/listen-UZA68Upt.cjs +45 -0
- package/dist/listen-UZA68Upt.cjs.map +1 -0
- package/dist/{promptSafety-CpiME8pj.js → promptSafety-CSdyp7RF.js} +2 -2
- package/dist/{promptSafety-CpiME8pj.js.map → promptSafety-CSdyp7RF.js.map} +1 -1
- package/dist/{promptSafety-NNGViiCr.cjs → promptSafety-CWqYq-NS.cjs} +8 -8
- package/dist/{promptSafety-NNGViiCr.cjs.map → promptSafety-CWqYq-NS.cjs.map} +1 -1
- package/dist/remote-host/server/hostRunner.d.ts +2 -4
- package/dist/remote-host/server/index.cjs +4 -19
- package/dist/remote-host/server/index.cjs.map +1 -1
- package/dist/remote-host/server/index.js +1 -16
- package/dist/remote-host/server/index.js.map +1 -1
- package/dist/{server-B48Jyxcj.js → server-BNe8XMtu.js} +388 -568
- package/dist/server-BNe8XMtu.js.map +1 -0
- package/dist/{server-CWZyg8fn.cjs → server-CgkkWWBd.cjs} +590 -734
- package/dist/server-CgkkWWBd.cjs.map +1 -0
- package/dist/whisper/index.cjs +1 -1
- package/dist/whisper/index.js +1 -1
- package/package.json +1 -1
- package/dist/calendarGrid-CQ8MVSRb.js.map +0 -1
- package/dist/calendarGrid-DGILaVxI.cjs.map +0 -1
- package/dist/collection/core/shortHexId.d.ts +0 -8
- package/dist/collection/server/publish.d.ts +0 -56
- package/dist/server-B48Jyxcj.js.map +0 -1
- package/dist/server-CWZyg8fn.cjs.map +0 -1
- package/dist/store-5_P_NsGa.cjs.map +0 -1
- package/dist/store-_61sO8K8.js.map +0 -1
|
@@ -1,115 +1,123 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_root = require("../../root-rPH6FGDT.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const require_server = require("../../server-
|
|
3
|
+
const require_itemId = require("../../itemId-Dzrr3vs5.cjs");
|
|
4
|
+
const require_discovery = require("../../discovery-BsXiDZBR.cjs");
|
|
5
|
+
const require_server = require("../../server-CgkkWWBd.cjs");
|
|
6
6
|
const require_templatePath = require("../../templatePath-27vUZowm.cjs");
|
|
7
7
|
exports.APPS_COLLECTION = require_server.APPS_COLLECTION;
|
|
8
|
-
exports.APP_MANIFEST_FILE =
|
|
8
|
+
exports.APP_MANIFEST_FILE = require_discovery.APP_MANIFEST_FILE;
|
|
9
9
|
exports.APP_ROLES = require_server.APP_ROLES;
|
|
10
|
+
exports.APP_SLUGS_COLLECTION = require_server.APP_SLUGS_COLLECTION;
|
|
10
11
|
exports.AuthoredAppZ = require_server.AuthoredAppZ;
|
|
11
|
-
exports.BackendUnavailableError =
|
|
12
|
-
exports.COLLECTION_ROOT_REQUIRED =
|
|
13
|
-
exports.COMPUTED_TYPES =
|
|
14
|
-
exports.CollectionQueryZ =
|
|
15
|
-
exports.CollectionSchemaZ =
|
|
16
|
-
exports.DEFAULT_QUERY_ROWS =
|
|
17
|
-
exports.MAX_CSV_ROWS =
|
|
18
|
-
exports.MAX_QUERY_ROWS =
|
|
12
|
+
exports.BackendUnavailableError = require_discovery.BackendUnavailableError;
|
|
13
|
+
exports.COLLECTION_ROOT_REQUIRED = require_discovery.COLLECTION_ROOT_REQUIRED;
|
|
14
|
+
exports.COMPUTED_TYPES = require_itemId.COMPUTED_TYPES;
|
|
15
|
+
exports.CollectionQueryZ = require_discovery.CollectionQueryZ;
|
|
16
|
+
exports.CollectionSchemaZ = require_discovery.CollectionSchemaZ;
|
|
17
|
+
exports.DEFAULT_QUERY_ROWS = require_discovery.DEFAULT_QUERY_ROWS;
|
|
18
|
+
exports.MAX_CSV_ROWS = require_discovery.MAX_CSV_ROWS;
|
|
19
|
+
exports.MAX_QUERY_ROWS = require_discovery.MAX_QUERY_ROWS;
|
|
19
20
|
exports.MAX_RECORD_ISSUES = require_server.MAX_RECORD_ISSUES;
|
|
20
21
|
exports.MAX_SCHEMA_ISSUES = require_server.MAX_SCHEMA_ISSUES;
|
|
21
22
|
exports.MAX_UNSELECTIVE_ITEMS = require_server.MAX_UNSELECTIVE_ITEMS;
|
|
22
23
|
exports.PUBLIC_CONFIG_DOC = require_server.PUBLIC_CONFIG_DOC;
|
|
23
|
-
exports.SCHEMA_FILE =
|
|
24
|
+
exports.SCHEMA_FILE = require_discovery.SCHEMA_FILE;
|
|
24
25
|
exports.STORE_UNREADABLE = require_server.STORE_UNREADABLE;
|
|
25
|
-
exports.acceptParsedSchema =
|
|
26
|
+
exports.acceptParsedSchema = require_discovery.acceptParsedSchema;
|
|
26
27
|
exports.advanceTriggerDate = require_server.advanceTriggerDate;
|
|
27
28
|
exports.appConfigPath = require_server.appConfigPath;
|
|
28
|
-
exports.appManifestReason =
|
|
29
|
+
exports.appManifestReason = require_discovery.appManifestReason;
|
|
29
30
|
exports.appSchemasPath = require_server.appSchemasPath;
|
|
31
|
+
exports.appSlugDoc = require_server.appSlugDoc;
|
|
32
|
+
exports.appStagingPath = require_server.appStagingPath;
|
|
30
33
|
exports.applyMutateAction = require_server.applyMutateAction;
|
|
31
34
|
exports.bindsSubmitterIdentity = require_server.bindsSubmitterIdentity;
|
|
32
35
|
exports.buildActionSeedPrompt = require_server.buildActionSeedPrompt;
|
|
33
36
|
exports.buildCollectionActionSeedPrompt = require_server.buildCollectionActionSeedPrompt;
|
|
34
37
|
exports.buildWorkspaceOntology = require_server.buildWorkspaceOntology;
|
|
35
38
|
exports.canonicalRoot = require_root.canonicalRoot;
|
|
36
|
-
exports.collectionChangeKey =
|
|
37
|
-
exports.collectionChangePayload =
|
|
38
|
-
exports.collectionWritable =
|
|
39
|
-
exports.compileCsvQuery =
|
|
40
|
-
exports.compileJsonlQuery =
|
|
39
|
+
exports.collectionChangeKey = require_discovery.collectionChangeKey;
|
|
40
|
+
exports.collectionChangePayload = require_discovery.collectionChangePayload;
|
|
41
|
+
exports.collectionWritable = require_discovery.collectionWritable;
|
|
42
|
+
exports.compileCsvQuery = require_discovery.compileCsvQuery;
|
|
43
|
+
exports.compileJsonlQuery = require_discovery.compileJsonlQuery;
|
|
41
44
|
exports.compileRecordZ = require_server.compileRecordZ;
|
|
42
45
|
exports.computeCollectionIcon = require_server.computeCollectionIcon;
|
|
43
46
|
exports.computeSuccessor = require_server.computeSuccessor;
|
|
44
|
-
exports.configureCollectionHost =
|
|
45
|
-
exports.csvRowToItem =
|
|
47
|
+
exports.configureCollectionHost = require_discovery.configureCollectionHost;
|
|
48
|
+
exports.csvRowToItem = require_discovery.csvRowToItem;
|
|
46
49
|
exports.daysInMonth = require_server.daysInMonth;
|
|
47
|
-
exports.decodeCsvRecordId =
|
|
48
|
-
exports.dedupeByRecordId =
|
|
50
|
+
exports.decodeCsvRecordId = require_discovery.decodeCsvRecordId;
|
|
51
|
+
exports.dedupeByRecordId = require_discovery.dedupeByRecordId;
|
|
49
52
|
exports.deleteCollection = require_server.deleteCollection;
|
|
50
53
|
exports.deleteCollectionRefusalMessage = require_server.deleteCollectionRefusalMessage;
|
|
51
54
|
exports.deleteCustomView = require_server.deleteCustomView;
|
|
52
|
-
exports.deleteItem =
|
|
53
|
-
exports.discoverCollections =
|
|
54
|
-
exports.encodeCsvRecordId =
|
|
55
|
+
exports.deleteItem = require_discovery.deleteItem;
|
|
56
|
+
exports.discoverCollections = require_discovery.discoverCollections;
|
|
57
|
+
exports.encodeCsvRecordId = require_discovery.encodeCsvRecordId;
|
|
55
58
|
exports.enrichItems = require_server.enrichItems;
|
|
56
|
-
exports.firestoreHandle =
|
|
59
|
+
exports.firestoreHandle = require_discovery.firestoreHandle;
|
|
57
60
|
exports.firstMutateParamProblem = require_server.firstMutateParamProblem;
|
|
58
61
|
exports.formatCivil = require_server.formatCivil;
|
|
59
|
-
exports.generateItemId =
|
|
60
|
-
exports.getWorkspaceRoot =
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
62
|
+
exports.generateItemId = require_discovery.generateItemId;
|
|
63
|
+
exports.getWorkspaceRoot = require_discovery.getWorkspaceRoot;
|
|
64
|
+
exports.hostSupportsSharedCollections = require_discovery.hostSupportsSharedCollections;
|
|
65
|
+
exports.isBackendUnavailable = require_discovery.isBackendUnavailable;
|
|
66
|
+
exports.isContainedInRoot = require_discovery.isContainedInRoot;
|
|
67
|
+
exports.isRegularFile = require_discovery.isRegularFile;
|
|
64
68
|
exports.isSafeActionTemplatePath = require_templatePath.isSafeActionTemplatePath;
|
|
65
69
|
exports.isSafeCustomViewI18nPath = require_templatePath.isSafeCustomViewI18nPath;
|
|
66
70
|
exports.isSafeCustomViewPath = require_templatePath.isSafeCustomViewPath;
|
|
67
71
|
exports.isSafeTemplatePath = require_templatePath.isSafeTemplatePath;
|
|
68
72
|
exports.isTriggerDue = require_server.isTriggerDue;
|
|
69
|
-
exports.itemFilePath =
|
|
70
|
-
exports.listItems =
|
|
71
|
-
exports.loadAppManifest =
|
|
72
|
-
exports.loadCollection =
|
|
73
|
-
exports.localCollectionKey =
|
|
74
|
-
exports.log =
|
|
73
|
+
exports.itemFilePath = require_discovery.itemFilePath;
|
|
74
|
+
exports.listItems = require_discovery.listItems;
|
|
75
|
+
exports.loadAppManifest = require_discovery.loadAppManifest;
|
|
76
|
+
exports.loadCollection = require_discovery.loadCollection;
|
|
77
|
+
exports.localCollectionKey = require_discovery.localCollectionKey;
|
|
78
|
+
exports.log = require_discovery.log;
|
|
75
79
|
exports.makeManageCollectionTool = require_server.makeManageCollectionTool;
|
|
76
80
|
exports.maybeSpawnSuccessor = require_server.maybeSpawnSuccessor;
|
|
77
|
-
exports.normalizeCsvValue =
|
|
78
|
-
exports.pageFromFullRead =
|
|
79
|
-
exports.parseAppManifest =
|
|
81
|
+
exports.normalizeCsvValue = require_discovery.normalizeCsvValue;
|
|
82
|
+
exports.pageFromFullRead = require_discovery.pageFromFullRead;
|
|
83
|
+
exports.parseAppManifest = require_discovery.parseAppManifest;
|
|
80
84
|
exports.parseAuthoredApp = require_server.parseAuthoredApp;
|
|
81
85
|
exports.parseCivil = require_server.parseCivil;
|
|
82
|
-
exports.peekWorkspaceRoot =
|
|
86
|
+
exports.peekWorkspaceRoot = require_discovery.peekWorkspaceRoot;
|
|
83
87
|
exports.projectApp = require_server.projectApp;
|
|
84
|
-
exports.
|
|
88
|
+
exports.projectDeploy = require_server.projectDeploy;
|
|
89
|
+
exports.projectItemFields = require_discovery.projectItemFields;
|
|
90
|
+
exports.projectPublish = require_server.projectPublish;
|
|
91
|
+
exports.promoteSchema = require_server.promoteSchema;
|
|
85
92
|
exports.promptPathsFor = require_server.promptPathsFor;
|
|
86
|
-
exports.
|
|
87
|
-
exports.publishCollectionChange = require_store.publishCollectionChange;
|
|
93
|
+
exports.publishCollectionChange = require_discovery.publishCollectionChange;
|
|
88
94
|
exports.publishProblems = require_server.publishProblems;
|
|
89
95
|
exports.readCustomViewHtml = require_server.readCustomViewHtml;
|
|
90
96
|
exports.readCustomViewI18n = require_server.readCustomViewI18n;
|
|
91
|
-
exports.readItem =
|
|
92
|
-
exports.readOnlyRefusal =
|
|
97
|
+
exports.readItem = require_discovery.readItem;
|
|
98
|
+
exports.readOnlyRefusal = require_discovery.readOnlyRefusal;
|
|
93
99
|
exports.readSkillTemplate = require_server.readSkillTemplate;
|
|
94
100
|
exports.recordFieldProblem = require_server.recordFieldProblem;
|
|
95
|
-
exports.resolveCreateItemId =
|
|
96
|
-
exports.resolveDataDir =
|
|
101
|
+
exports.resolveCreateItemId = require_discovery.resolveCreateItemId;
|
|
102
|
+
exports.resolveDataDir = require_discovery.resolveDataDir;
|
|
97
103
|
exports.resolveEvery = require_server.resolveEvery;
|
|
98
|
-
exports.resolvePrimaryField =
|
|
99
|
-
exports.resolveTemplatePath =
|
|
104
|
+
exports.resolvePrimaryField = require_discovery.resolvePrimaryField;
|
|
105
|
+
exports.resolveTemplatePath = require_discovery.resolveTemplatePath;
|
|
100
106
|
exports.runCollectionQuery = require_server.runCollectionQuery;
|
|
101
107
|
exports.runQueryOverRows = require_server.runQueryOverRows;
|
|
102
|
-
exports.safeRecordId =
|
|
103
|
-
exports.safeSlugName =
|
|
108
|
+
exports.safeRecordId = require_discovery.safeRecordId;
|
|
109
|
+
exports.safeSlugName = require_discovery.safeSlugName;
|
|
104
110
|
exports.schemaRelations = require_server.schemaRelations;
|
|
105
|
-
exports.setCollectionChangePublisher =
|
|
106
|
-
exports.setFirestoreAccessor =
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
111
|
+
exports.setCollectionChangePublisher = require_discovery.setCollectionChangePublisher;
|
|
112
|
+
exports.setFirestoreAccessor = require_discovery.setFirestoreAccessor;
|
|
113
|
+
exports.setSharedCollectionsSupport = require_discovery.setSharedCollectionsSupport;
|
|
114
|
+
exports.sharedCollectionChangePayload = require_discovery.sharedCollectionChangePayload;
|
|
115
|
+
exports.sharedItemsPath = require_discovery.sharedItemsPath;
|
|
116
|
+
exports.stagedRuleConfig = require_server.stagedRuleConfig;
|
|
117
|
+
exports.storeFor = require_discovery.storeFor;
|
|
110
118
|
exports.successorId = require_server.successorId;
|
|
111
|
-
exports.toDetail =
|
|
112
|
-
exports.toSummary =
|
|
119
|
+
exports.toDetail = require_discovery.toDetail;
|
|
120
|
+
exports.toSummary = require_discovery.toSummary;
|
|
113
121
|
exports.validateCollectionRecords = require_server.validateCollectionRecords;
|
|
114
122
|
exports.validateRecordObject = require_server.validateRecordObject;
|
|
115
|
-
exports.writeItem =
|
|
123
|
+
exports.writeItem = require_discovery.writeItem;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export { configureCollectionHost, canonicalRoot, getWorkspaceRoot, peekWorkspaceRoot, COLLECTION_ROOT_REQUIRED, log, setCollectionChangePublisher, publishCollectionChange, collectionChangePayload, sharedCollectionChangePayload, collectionChangeKey, localCollectionKey, type CollectionHost, type CollectionLogger, type CollectionChangePayload, firestoreHandle, setFirestoreAccessor, type FirestoreHandle, type LocalCollectionChange, type SharedCollectionChange, } from './host';
|
|
1
|
+
export { configureCollectionHost, canonicalRoot, getWorkspaceRoot, peekWorkspaceRoot, COLLECTION_ROOT_REQUIRED, log, setCollectionChangePublisher, publishCollectionChange, collectionChangePayload, sharedCollectionChangePayload, collectionChangeKey, localCollectionKey, type CollectionHost, type CollectionLogger, type CollectionChangePayload, firestoreHandle, setFirestoreAccessor, hostSupportsSharedCollections, setSharedCollectionsSupport, type FirestoreHandle, type LocalCollectionChange, type SharedCollectionChange, } from './host';
|
|
2
2
|
export type { FirestoreDoc, FirestoreDocs } from './firestoreDocs';
|
|
3
3
|
export { sharedItemsPath } from './firestoreStore';
|
|
4
4
|
export { loadAppManifest, parseAppManifest, appManifestReason, APP_MANIFEST_FILE, type AppManifest, type AppManifestResult } from './appManifest';
|
|
5
5
|
export { AuthoredAppZ, parseAuthoredApp, APP_ROLES, type AuthoredApp, type AuthoredCollectionConfig, type AuthoredMail, type AuthoredSubmit, } from './publishManifest';
|
|
6
|
-
export { projectApp, APPS_COLLECTION, PUBLIC_CONFIG_DOC, appConfigPath, appSchemasPath, type PublishStamp, type PublishedApp, type PublishedConfigDoc, type PublishedSchemaDoc, } from './publishProject';
|
|
6
|
+
export { projectApp, projectDeploy, projectPublish, stagedRuleConfig, promoteSchema, appStagingPath, APP_SLUGS_COLLECTION, appSlugDoc, type AppSlugDoc, type DeployedApp, type PublishedFace, APPS_COLLECTION, PUBLIC_CONFIG_DOC, appConfigPath, appSchemasPath, type PublishStamp, type PublishedApp, type PublishedConfigDoc, type PublishedSchemaDoc, type StagedSchemaDoc, } from './publishProject';
|
|
7
7
|
export { publishProblems, bindsSubmitterIdentity, type PublishableCollection } from './publishChecks';
|
|
8
|
-
export { publishApp, type PublishOptions, type PublishResult } from './publish';
|
|
9
8
|
export type { LoadedCollection } from './discoveredCollection';
|
|
10
9
|
export * from './paths';
|
|
11
10
|
export * from './templatePath';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as canonicalRoot } from "../../root-BMroU_mB.js";
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import { A as
|
|
2
|
+
import { N as COMPUTED_TYPES } from "../../itemId-DfTm08jm.js";
|
|
3
|
+
import { A as readItem, B as SCHEMA_FILE, C as CollectionQueryZ, D as generateItemId, E as deleteItem, F as loadAppManifest, G as safeRecordId, H as itemFilePath, I as parseAppManifest, J as isBackendUnavailable, K as safeSlugName, L as sharedItemsPath, M as writeItem, N as APP_MANIFEST_FILE, O as isRegularFile, P as appManifestReason, Q as collectionChangePayload, R as pageFromFullRead, S as compileJsonlQuery, T as MAX_QUERY_ROWS, U as resolveDataDir, V as isContainedInRoot, W as resolveTemplatePath, Y as COLLECTION_ROOT_REQUIRED, Z as collectionChangeKey, _ as dedupeByRecordId, a as toDetail, at as localCollectionKey, d as storeFor, dt as setFirestoreAccessor, et as configureCollectionHost, ft as setSharedCollectionsSupport, g as decodeCsvRecordId, h as csvRowToItem, i as resolvePrimaryField, j as resolveCreateItemId, k as listItems, l as collectionWritable, lt as publishCollectionChange, n as discoverCollections, nt as getWorkspaceRoot, o as toSummary, ot as log, p as MAX_CSV_ROWS, pt as sharedCollectionChangePayload, q as BackendUnavailableError, r as loadCollection, rt as hostSupportsSharedCollections, s as CollectionSchemaZ, st as peekWorkspaceRoot, t as acceptParsedSchema, tt as firestoreHandle, u as readOnlyRefusal, ut as setCollectionChangePublisher, v as encodeCsvRecordId, w as DEFAULT_QUERY_ROWS, x as compileCsvQuery, y as normalizeCsvValue, z as projectItemFields } from "../../discovery-B9zdNkgW.js";
|
|
4
|
+
import { $ as parseAuthoredApp, A as runQueryOverRows, B as APP_SLUGS_COLLECTION, C as STORE_UNREADABLE, D as recordFieldProblem, E as compileRecordZ, F as readCustomViewI18n, G as appStagingPath, H as appConfigPath, I as readSkillTemplate, J as projectPublish, K as projectApp, L as bindsSubmitterIdentity, M as buildCollectionActionSeedPrompt, N as promptPathsFor, O as runCollectionQuery, P as readCustomViewHtml, Q as AuthoredAppZ, R as publishProblems, S as MAX_RECORD_ISSUES, T as validateRecordObject, U as appSchemasPath, V as PUBLIC_CONFIG_DOC, W as appSlugDoc, X as stagedRuleConfig, Y as promoteSchema, Z as APP_ROLES, _ as computeCollectionIcon, a as deleteCollection, b as applyMutateAction, c as computeSuccessor, d as isTriggerDue, f as maybeSpawnSuccessor, h as successorId, i as deleteCustomView, j as buildActionSeedPrompt, k as enrichItems, l as daysInMonth, m as resolveEvery, n as MAX_UNSELECTIVE_ITEMS, o as deleteCollectionRefusalMessage, p as parseCivil, q as projectDeploy, r as makeManageCollectionTool, s as advanceTriggerDate, t as MAX_SCHEMA_ISSUES, u as formatCivil, v as buildWorkspaceOntology, w as validateCollectionRecords, x as firstMutateParamProblem, y as schemaRelations, z as APPS_COLLECTION } from "../../server-BNe8XMtu.js";
|
|
5
5
|
import { i as isSafeTemplatePath, n as isSafeCustomViewI18nPath, r as isSafeCustomViewPath, t as isSafeActionTemplatePath } from "../../templatePath-k_WNbL_Q.js";
|
|
6
|
-
export { APPS_COLLECTION, APP_MANIFEST_FILE, APP_ROLES, AuthoredAppZ, BackendUnavailableError, COLLECTION_ROOT_REQUIRED, COMPUTED_TYPES, CollectionQueryZ, CollectionSchemaZ, DEFAULT_QUERY_ROWS, MAX_CSV_ROWS, MAX_QUERY_ROWS, MAX_RECORD_ISSUES, MAX_SCHEMA_ISSUES, MAX_UNSELECTIVE_ITEMS, PUBLIC_CONFIG_DOC, SCHEMA_FILE, STORE_UNREADABLE, acceptParsedSchema, advanceTriggerDate, appConfigPath, appManifestReason, appSchemasPath, applyMutateAction, bindsSubmitterIdentity, buildActionSeedPrompt, buildCollectionActionSeedPrompt, buildWorkspaceOntology, canonicalRoot, collectionChangeKey, collectionChangePayload, collectionWritable, compileCsvQuery, compileJsonlQuery, compileRecordZ, computeCollectionIcon, computeSuccessor, configureCollectionHost, csvRowToItem, daysInMonth, decodeCsvRecordId, dedupeByRecordId, deleteCollection, deleteCollectionRefusalMessage, deleteCustomView, deleteItem, discoverCollections, encodeCsvRecordId, enrichItems, firestoreHandle, firstMutateParamProblem, formatCivil, generateItemId, getWorkspaceRoot, isBackendUnavailable, isContainedInRoot, isRegularFile, isSafeActionTemplatePath, isSafeCustomViewI18nPath, isSafeCustomViewPath, isSafeTemplatePath, isTriggerDue, itemFilePath, listItems, loadAppManifest, loadCollection, localCollectionKey, log, makeManageCollectionTool, maybeSpawnSuccessor, normalizeCsvValue, pageFromFullRead, parseAppManifest, parseAuthoredApp, parseCivil, peekWorkspaceRoot, projectApp, projectItemFields,
|
|
6
|
+
export { APPS_COLLECTION, APP_MANIFEST_FILE, APP_ROLES, APP_SLUGS_COLLECTION, AuthoredAppZ, BackendUnavailableError, COLLECTION_ROOT_REQUIRED, COMPUTED_TYPES, CollectionQueryZ, CollectionSchemaZ, DEFAULT_QUERY_ROWS, MAX_CSV_ROWS, MAX_QUERY_ROWS, MAX_RECORD_ISSUES, MAX_SCHEMA_ISSUES, MAX_UNSELECTIVE_ITEMS, PUBLIC_CONFIG_DOC, SCHEMA_FILE, STORE_UNREADABLE, acceptParsedSchema, advanceTriggerDate, appConfigPath, appManifestReason, appSchemasPath, appSlugDoc, appStagingPath, applyMutateAction, bindsSubmitterIdentity, buildActionSeedPrompt, buildCollectionActionSeedPrompt, buildWorkspaceOntology, canonicalRoot, collectionChangeKey, collectionChangePayload, collectionWritable, compileCsvQuery, compileJsonlQuery, compileRecordZ, computeCollectionIcon, computeSuccessor, configureCollectionHost, csvRowToItem, daysInMonth, decodeCsvRecordId, dedupeByRecordId, deleteCollection, deleteCollectionRefusalMessage, deleteCustomView, deleteItem, discoverCollections, encodeCsvRecordId, enrichItems, firestoreHandle, firstMutateParamProblem, formatCivil, generateItemId, getWorkspaceRoot, hostSupportsSharedCollections, isBackendUnavailable, isContainedInRoot, isRegularFile, isSafeActionTemplatePath, isSafeCustomViewI18nPath, isSafeCustomViewPath, isSafeTemplatePath, isTriggerDue, itemFilePath, listItems, loadAppManifest, loadCollection, localCollectionKey, log, makeManageCollectionTool, maybeSpawnSuccessor, normalizeCsvValue, pageFromFullRead, parseAppManifest, parseAuthoredApp, parseCivil, peekWorkspaceRoot, projectApp, projectDeploy, projectItemFields, projectPublish, promoteSchema, promptPathsFor, publishCollectionChange, publishProblems, readCustomViewHtml, readCustomViewI18n, readItem, readOnlyRefusal, readSkillTemplate, recordFieldProblem, resolveCreateItemId, resolveDataDir, resolveEvery, resolvePrimaryField, resolveTemplatePath, runCollectionQuery, runQueryOverRows, safeRecordId, safeSlugName, schemaRelations, setCollectionChangePublisher, setFirestoreAccessor, setSharedCollectionsSupport, sharedCollectionChangePayload, sharedItemsPath, stagedRuleConfig, storeFor, successorId, toDetail, toSummary, validateCollectionRecords, validateRecordObject, writeItem };
|
|
@@ -82,9 +82,11 @@ export type DeleteItemResult = {
|
|
|
82
82
|
itemId: string;
|
|
83
83
|
};
|
|
84
84
|
export declare function deleteItem(dataDir: string, itemId: string, opts?: IoOptions): Promise<DeleteItemResult>;
|
|
85
|
-
/** Generate a
|
|
86
|
-
*
|
|
87
|
-
*
|
|
85
|
+
/** Generate a record id. Used by POST when the form doesn't carry a
|
|
86
|
+
* primary-key value (UI shortcut — Claude normally derives a semantic
|
|
87
|
+
* id from the record's name). Delegates to the isomorphic generator, so
|
|
88
|
+
* the id the UI pre-fills and the id a blank-id POST mints stay the
|
|
89
|
+
* same thing rather than two implementations that have to agree. */
|
|
88
90
|
export declare function generateItemId(): string;
|
|
89
91
|
/** The item id a CREATE should use for `schema`, or null when the
|
|
90
92
|
* caller should generate one. A singleton collection pins every
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectionSchema } from '../core/schema';
|
|
2
|
-
import { AuthoredApp } from './publishManifest';
|
|
2
|
+
import { AuthoredApp, AuthoredCollectionConfig } from './publishManifest';
|
|
3
3
|
/** Who and when. Threaded in rather than read from a clock inside the
|
|
4
4
|
* projection so the projection stays pure and the tests can assert on an
|
|
5
5
|
* exact document. */
|
|
@@ -16,6 +16,14 @@ export interface PublishStamp {
|
|
|
16
16
|
* resolve one. Absent is a normal state (a dirty tree, a repository
|
|
17
17
|
* without git), and absent is more honest than a fabricated value. */
|
|
18
18
|
commit?: string | undefined;
|
|
19
|
+
/** Was the working tree modified when the commit was read?
|
|
20
|
+
*
|
|
21
|
+
* Recorded as `publishedDirty` on the app document, because a commit that
|
|
22
|
+
* does not describe what was published is worse than no commit: it looks
|
|
23
|
+
* auditable. Publish-owned like the rest of the `published*` family — a
|
|
24
|
+
* deploy must not drop the marker, and a later CLEAN publish must clear it
|
|
25
|
+
* rather than inherit it forever. */
|
|
26
|
+
dirty?: boolean | undefined;
|
|
19
27
|
}
|
|
20
28
|
/** One collection's published schema document (`apps/{aid}/collections/{cid}`).
|
|
21
29
|
*
|
|
@@ -31,6 +39,34 @@ export interface PublishedSchemaDoc extends Record<string, unknown> {
|
|
|
31
39
|
publishedBy: string;
|
|
32
40
|
publishedCommit?: string;
|
|
33
41
|
}
|
|
42
|
+
/** A STAGED schema document (`apps/{aid}/staging/{cid}`) — what deploy writes
|
|
43
|
+
* and what `/staging/{aid}` renders from.
|
|
44
|
+
*
|
|
45
|
+
* Its provenance keys are `deployed*`, not `published*`. The two are different
|
|
46
|
+
* questions with different answers at almost every moment: `published*` says
|
|
47
|
+
* which revision the PUBLIC is looking at, and a deploy must not move it —
|
|
48
|
+
* otherwise staging a draft rewrites the recorded public revision (and, with
|
|
49
|
+
* `previousPublished`, the thing a rollback would restore) before anyone has
|
|
50
|
+
* published anything. */
|
|
51
|
+
export interface StagedSchemaDoc extends Record<string, unknown> {
|
|
52
|
+
publishedSchema: CollectionSchema;
|
|
53
|
+
/** This collection's RULE-FACING configuration (`transitions`, `immutable`,
|
|
54
|
+
* `submitOnly`, `peerVisibility`, …) — staged with the schema, not written
|
|
55
|
+
* straight onto the app document.
|
|
56
|
+
*
|
|
57
|
+
* It has to be staged for the same reason the `public` block is: the rules
|
|
58
|
+
* read `apps/{aid}.collections[cid]` when they authorize a PUBLIC write, so
|
|
59
|
+
* a deploy that landed it would change what anonymous visitors may do
|
|
60
|
+
* before anyone published. The cost is that `/staging/{aid}` exercises the
|
|
61
|
+
* new schema against the CURRENTLY PUBLISHED rule configuration; that is
|
|
62
|
+
* the safe direction to be wrong in. */
|
|
63
|
+
config?: AuthoredCollectionConfig;
|
|
64
|
+
/** Whether this cid is in `participantRead` — same reason, same treatment. */
|
|
65
|
+
participantRead?: boolean;
|
|
66
|
+
deployedAt: number;
|
|
67
|
+
deployedBy: string;
|
|
68
|
+
deployedCommit?: string;
|
|
69
|
+
}
|
|
34
70
|
/** The public settings document (`apps/{aid}/config/public`).
|
|
35
71
|
*
|
|
36
72
|
* `allow read: if true` — this is the one document an anonymous visitor can
|
|
@@ -77,10 +113,143 @@ export declare function projectApp(authored: AuthoredApp, schemas: {
|
|
|
77
113
|
cid: string;
|
|
78
114
|
schema: CollectionSchema;
|
|
79
115
|
}[], stamp: PublishStamp, existing: Record<string, unknown> | null): PublishedApp;
|
|
116
|
+
/** Everything `deploy` writes — the host's staging half of the split (the
|
|
117
|
+
* design's D10).
|
|
118
|
+
*
|
|
119
|
+
* Two things are deliberately ABSENT from the app document here:
|
|
120
|
+
*
|
|
121
|
+
* - **`public`**. That block is what the rules read to authorize anonymous
|
|
122
|
+
* access (`publicOn` / `subOpen` read `apps/{aid}.public`, never the
|
|
123
|
+
* world-readable `config/public`), so writing it on deploy would open the
|
|
124
|
+
* app the moment someone deployed to test. It belongs to `publish`.
|
|
125
|
+
* - **the published schemas**. They go to `staging/{cid}`, which only the
|
|
126
|
+
* roster can read, so a deploy against a LIVE app does not swap the view
|
|
127
|
+
* its visitors are looking at.
|
|
128
|
+
*
|
|
129
|
+
* A host writing this must MERGE the app document rather than replace it:
|
|
130
|
+
* a replace would drop a `public` block a previous publish put there and
|
|
131
|
+
* silently unpublish the app. */
|
|
132
|
+
export interface DeployedApp {
|
|
133
|
+
/** The COMPLETE app document. **Write it with `set`, replacing — never with
|
|
134
|
+
* `{ merge: true }`.**
|
|
135
|
+
*
|
|
136
|
+
* A merge cannot DELETE, and every deletion here is a permission change:
|
|
137
|
+
* removing `members.<email>` revokes access, and a merge would leave the
|
|
138
|
+
* entry live. Worse, the rules require `memberEmails` to equal the keys of
|
|
139
|
+
* `members` (`membersConsistent()`), so a merged member-removal is rejected
|
|
140
|
+
* outright — a deploy that silently does nothing would be the good case.
|
|
141
|
+
*
|
|
142
|
+
* Everything publish owns is carried through from `existing` verbatim, so
|
|
143
|
+
* replacing does not unpublish a live app. */
|
|
144
|
+
app: Record<string, unknown>;
|
|
145
|
+
/** The staged schema documents, for `apps/{aid}/staging/{cid}`. */
|
|
146
|
+
staging: {
|
|
147
|
+
cid: string;
|
|
148
|
+
doc: StagedSchemaDoc;
|
|
149
|
+
}[];
|
|
150
|
+
}
|
|
151
|
+
export declare function projectDeploy(authored: AuthoredApp, schemas: {
|
|
152
|
+
cid: string;
|
|
153
|
+
schema: CollectionSchema;
|
|
154
|
+
}[], stamp: PublishStamp, existing: Record<string, unknown> | null): DeployedApp;
|
|
155
|
+
/** Everything `publish` writes that is NOT a promotion — the public face.
|
|
156
|
+
*
|
|
157
|
+
* The schemas are absent on purpose: publish PROMOTES the documents deploy
|
|
158
|
+
* staged (copy `staging/{cid}` → `collections/{cid}`, re-stamped with
|
|
159
|
+
* {@link promoteSchema}) rather than re-projecting them from git. What the
|
|
160
|
+
* roster tested is then exactly what ships; re-projecting would publish
|
|
161
|
+
* whatever the working tree says at publish time, which nobody has looked at
|
|
162
|
+
* through `/staging/{aid}`.
|
|
163
|
+
*
|
|
164
|
+
* WRITE `public` LAST. It is the only one of the three that grants anything,
|
|
165
|
+
* so a partial failure with it last leaves the app private (fail closed).
|
|
166
|
+
* See the design note's publish ordering. */
|
|
167
|
+
export interface PublishedFace {
|
|
168
|
+
/** The COMPLETE app document **without `public`** — write it with `set`,
|
|
169
|
+
* replacing.
|
|
170
|
+
*
|
|
171
|
+
* Replacing (not merging) is what lets a key DISAPPEAR: withdrawing a
|
|
172
|
+
* collection's rule configuration, or taking `public` out of `app.json`,
|
|
173
|
+
* has to actually remove the field. Everything deploy owns is carried
|
|
174
|
+
* through from `existing`, so publishing does not revert an invitation.
|
|
175
|
+
*
|
|
176
|
+
* `public` is absent HERE on purpose — see {@link PublishedFace.public}. */
|
|
177
|
+
app: Record<string, unknown>;
|
|
178
|
+
/** `apps/{aid}/config/public` — the world-readable projection. */
|
|
179
|
+
config: PublishedConfigDoc;
|
|
180
|
+
/** The `public` block, to be written **LAST, as its own update** — or, when
|
|
181
|
+
* `undefined`, DELETED from the app document (that is how an app becomes
|
|
182
|
+
* private again).
|
|
183
|
+
*
|
|
184
|
+
* Separate from {@link PublishedFace.app} because it is the only one of
|
|
185
|
+
* publish's writes that GRANTS anything: the rules authorize anonymous
|
|
186
|
+
* reads and submissions from `apps/{aid}.public`. Writing it inside the
|
|
187
|
+
* replacement document would open the app before the promoted schemas and
|
|
188
|
+
* the world-readable config exist, so a failure part-way would leave
|
|
189
|
+
* anonymous access live against a half-published surface. Written last, the
|
|
190
|
+
* same failure leaves the app private — which is the direction to fail in.
|
|
191
|
+
*
|
|
192
|
+
* A re-publish therefore passes through a moment with no `public` block.
|
|
193
|
+
* That is a brief denial for visitors, not a brief exposure. */
|
|
194
|
+
public: Record<string, unknown> | undefined;
|
|
195
|
+
}
|
|
196
|
+
/** The rule-facing configuration to promote, read from the STAGED documents
|
|
197
|
+
* rather than from the manifest as it reads right now.
|
|
198
|
+
*
|
|
199
|
+
* Otherwise: deploy revision A, edit `app.json` to revision B, publish — and
|
|
200
|
+
* the promoted schema is A's while the authorization behaviour is B's, a
|
|
201
|
+
* combination nobody exercised through `/staging/{aid}`.
|
|
202
|
+
*
|
|
203
|
+
* (`public` is deliberately NOT part of this: it is not staged, because it is
|
|
204
|
+
* the decision being made AT publish rather than something under test.) */
|
|
205
|
+
export declare function stagedRuleConfig(staged: {
|
|
206
|
+
cid: string;
|
|
207
|
+
doc: StagedSchemaDoc;
|
|
208
|
+
}[]): {
|
|
209
|
+
collections: Record<string, AuthoredCollectionConfig> | undefined;
|
|
210
|
+
participantRead: string[] | undefined;
|
|
211
|
+
};
|
|
212
|
+
export declare function projectPublish(authored: AuthoredApp, staged: {
|
|
213
|
+
cid: string;
|
|
214
|
+
doc: StagedSchemaDoc;
|
|
215
|
+
}[], stamp: PublishStamp, existing: Record<string, unknown> | null): PublishedFace;
|
|
216
|
+
/** Re-stamp a staged schema document as it is promoted to `collections/{cid}`.
|
|
217
|
+
*
|
|
218
|
+
* The stamp answers "which version is PUBLIC right now, and who made it so",
|
|
219
|
+
* so it is written by the operation that changes the answer — publish — not
|
|
220
|
+
* carried over from the deploy that staged it. */
|
|
221
|
+
export declare function promoteSchema(staged: StagedSchemaDoc, stamp: PublishStamp): PublishedSchemaDoc;
|
|
80
222
|
/** The app documents' parent path — the `FirestoreDocs` seam takes a
|
|
81
223
|
* collection path plus a document id, and the app document's id is the aid. */
|
|
82
224
|
export declare const APPS_COLLECTION = "apps";
|
|
83
|
-
/** The collection (schema) documents' parent path
|
|
225
|
+
/** The collection (schema) documents' parent path — what the PUBLIC page
|
|
226
|
+
* reads, written only by publish (promotion). */
|
|
84
227
|
export declare const appSchemasPath: (aid: string) => string;
|
|
228
|
+
/** The URL-slug reservations — `appSlugs/{slug}` → `{ aid, published }`.
|
|
229
|
+
*
|
|
230
|
+
* A TOP-LEVEL collection, not a field on the app: the public page resolves a
|
|
231
|
+
* slug to an aid BEFORE it can read anything under `apps/{aid}`, and a slug
|
|
232
|
+
* has to be claimable atomically (create-if-absent) so two apps cannot hold
|
|
233
|
+
* the same URL.
|
|
234
|
+
*
|
|
235
|
+
* `published` is what makes the reservation invisible until publish. The slug
|
|
236
|
+
* is human-readable, so a readable reservation would let anyone guess the URL
|
|
237
|
+
* and get the aid — and the aid is the `/staging/{aid}` entrance. The rule is
|
|
238
|
+
* `allow read: if resource.data.published == true`, which needs no `get()` and
|
|
239
|
+
* so costs nothing against the rules' expression budget. */
|
|
240
|
+
export declare const APP_SLUGS_COLLECTION = "appSlugs";
|
|
241
|
+
/** The reservation document. Written by deploy as `{ aid, published: false }`
|
|
242
|
+
* and flipped by publish — never re-pointed at another aid, which the rules
|
|
243
|
+
* enforce on update. */
|
|
244
|
+
export interface AppSlugDoc extends Record<string, unknown> {
|
|
245
|
+
aid: string;
|
|
246
|
+
published: boolean;
|
|
247
|
+
}
|
|
248
|
+
export declare const appSlugDoc: (aid: string, published: boolean) => AppSlugDoc;
|
|
249
|
+
/** The staged schema documents' parent path — what `/staging/{aid}` reads,
|
|
250
|
+
* written by deploy. A separate DOCUMENT rather than a field beside
|
|
251
|
+
* `publishedSchema`, because the rules cannot hide a field: anything inside a
|
|
252
|
+
* document the public page may read is public. */
|
|
253
|
+
export declare const appStagingPath: (aid: string) => string;
|
|
85
254
|
/** The public-config documents' parent path. */
|
|
86
255
|
export declare const appConfigPath: (aid: string) => string;
|