@fleox-agent-crm/agentcrm 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/changelog.json +13 -0
- package/dist/admin/admin-files.json +7 -7
- package/dist/admin/assets/{chartsImpl-aBuZ1X4W.js → chartsImpl-zjsXDhuy.js} +1 -1
- package/dist/admin/assets/firebase-C3h9mF8O.js +2 -0
- package/dist/admin/assets/{gitJson-DzX3eZ2P.js → gitJson-nrOYgX0x.js} +1 -1
- package/dist/admin/assets/{index-DLy5RpPl.js → index-0ejjkW0z.js} +6 -6
- package/dist/admin/assets/{lucide-react.min-BgcmukkH.js → lucide-react.min-CI5dCsSm.js} +1 -1
- package/dist/admin/assets/{sdk-DtP9zqdi.js → sdk-mepKXtVl.js} +135 -120
- package/dist/admin/index.html +1 -1
- package/dist/agent/agentcrm.mjs +29 -16
- package/dist/agent/chunks/api-BEl_EKwf.mjs +79 -0
- package/dist/agent/chunks/{firebase-DWR0K1OC.mjs → firebase-Bknru2pE.mjs} +230 -53
- package/dist/agent/chunks/firebaseCache-sK4jA0ru.mjs +39 -0
- package/dist/agent/chunks/{firebaseRules-iori-s7U.mjs → firebaseRules-Jq85MBBN.mjs} +14 -3
- package/dist/agent/chunks/{hosting-Dnn1k3cV.mjs → hosting-C_UDyMkm.mjs} +1 -1
- package/dist/agent/chunks/{index-DtCezG4R.mjs → index-DWecFbTi.mjs} +1 -1
- package/dist/agent/chunks/{install-Bp-CwDVC.mjs → install-BLNflFes.mjs} +3 -3
- package/dist/agent/chunks/{sdk-CYgNyuoK.mjs → sdk-NYUHv7WG.mjs} +493 -214
- package/dist/version.json +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/agentcrm-admin/SKILL.md +67 -67
- package/plugin/skills/agentcrm-admin/references/records.md +5 -5
- package/plugin/skills/agentcrm-admin/references/schema.md +19 -19
- package/plugin/skills/agentcrm-extensions/SKILL.md +8 -8
- package/plugin/skills/agentcrm-extensions/references/module-recipes.md +2 -2
- package/plugin/skills/agentcrm-extensions/references/testing.md +14 -14
- package/plugin/skills/agentcrm-extensions/references/theme-recipes.md +3 -3
- package/plugin/skills/agentcrm-install/SKILL.md +13 -13
- package/plugin/skills/agentcrm-install/references/firebase.md +1 -1
- package/plugin/skills/agentcrm-install/references/github.md +1 -1
- package/plugin/skills/agentcrm-install/references/mcp.md +2 -2
- package/plugin/skills/agentcrm-install/references/plans.md +1 -1
- package/plugin/skills/agentcrm-install/references/s3.md +1 -1
- package/plugin/skills/agentcrm-manage/SKILL.md +15 -15
- package/plugin/skills/agentcrm-sales/SKILL.md +18 -18
- package/dist/admin/assets/firebase-BG1GpyBB.js +0 -2
- package/dist/agent/chunks/api-Dwb4xz1k.mjs +0 -27
|
@@ -124,7 +124,7 @@ function buildFirestoreRules(input) {
|
|
|
124
124
|
" // Nobody changes their own role / email / disabled flag.",
|
|
125
125
|
" allow update: if (isAdmin() && validRole(request.resource.data.role))",
|
|
126
126
|
" || (isActive() && request.auth.uid == uid",
|
|
127
|
-
" && request.resource.data.diff(resource.data).affectedKeys().hasOnly(['name', 'avatarUrl', 'updatedAt']));",
|
|
127
|
+
" && request.resource.data.diff(resource.data).affectedKeys().hasOnly(['name', 'avatarUrl', 'updatedAt', '_ts']));",
|
|
128
128
|
" allow delete: if isAdmin();",
|
|
129
129
|
" }",
|
|
130
130
|
"",
|
|
@@ -152,7 +152,7 @@ function buildFirestoreRules(input) {
|
|
|
152
152
|
" allow read: if isActive();",
|
|
153
153
|
" allow create, delete: if isAdmin();",
|
|
154
154
|
" allow update: if isAdmin()",
|
|
155
|
-
" || (isMember() && request.resource.data.diff(resource.data).affectedKeys().hasOnly(['lastRunAt', 'updatedAt']));",
|
|
155
|
+
" || (isMember() && request.resource.data.diff(resource.data).affectedKeys().hasOnly(['lastRunAt', 'updatedAt', '_ts']));",
|
|
156
156
|
" }",
|
|
157
157
|
"",
|
|
158
158
|
" match /automationRuns/{id} {",
|
|
@@ -180,6 +180,17 @@ function buildFirestoreRules(input) {
|
|
|
180
180
|
" allow write: if isAdmin();",
|
|
181
181
|
" }",
|
|
182
182
|
"",
|
|
183
|
+
" // Tombstones of deleted documents, so cached copies drop them on the",
|
|
184
|
+
" // next incremental read (src/data/firebase/api.ts, withChangeTracking).",
|
|
185
|
+
" // Written in the same batch as the delete, which the rules above judge.",
|
|
186
|
+
" match /deletions/{id} {",
|
|
187
|
+
" allow read: if isActive();",
|
|
188
|
+
" allow create, update: if isMember()",
|
|
189
|
+
" && request.resource.data.keys().hasOnly(['collection', 'id', '_ts'])",
|
|
190
|
+
" && request.resource.data._ts == request.time;",
|
|
191
|
+
" allow delete: if isAdmin();",
|
|
192
|
+
" }",
|
|
193
|
+
"",
|
|
183
194
|
" // ─── inbox/{id}: public lead-form submissions ──────────────────────",
|
|
184
195
|
" function validSubmission(d) {",
|
|
185
196
|
" return d.keys().hasAll(['formId', 'data', 'createdAt'])",
|
|
@@ -213,7 +224,7 @@ function buildFirestoreRules(input) {
|
|
|
213
224
|
);
|
|
214
225
|
return lines.join("\n");
|
|
215
226
|
}
|
|
216
|
-
[...MEMBER_WRITE, "views", "automations", "automationRuns", "files", ...ADMIN_WRITE, "users"];
|
|
227
|
+
[...MEMBER_WRITE, "views", "automations", "automationRuns", "files", ...ADMIN_WRITE, "users", "deletions"];
|
|
217
228
|
export {
|
|
218
229
|
INBOX_LIMITS,
|
|
219
230
|
buildFirestoreRules,
|
|
@@ -8,7 +8,7 @@ import { statSync, rmSync, existsSync, unlinkSync, readFileSync, mkdirSync, writ
|
|
|
8
8
|
import { resolve, dirname, sep, join, relative } from "node:path";
|
|
9
9
|
import { buildConfigJsSource } from "./runtimeConfig-CCOFg1RM.mjs";
|
|
10
10
|
import { a as createGitPagesConnector, b as createS3Connector } from "./s3-Dz50-NuA.mjs";
|
|
11
|
-
import { C as CliError, r as readVersionInfo,
|
|
11
|
+
import { C as CliError, r as readVersionInfo, l as distRoot } from "../agentcrm.mjs";
|
|
12
12
|
import { pathToFileURL } from "node:url";
|
|
13
13
|
import "./index-BM8qeGOb.mjs";
|
|
14
14
|
import "./http-Bk9ICb7I.mjs";
|
|
@@ -126,7 +126,7 @@ registerBackend("journal", (config, opts) => {
|
|
|
126
126
|
store.identity = async () => (await missingJournalAccess(cfg.connectorId, settings)).length ? null : identity();
|
|
127
127
|
return store;
|
|
128
128
|
});
|
|
129
|
-
registerBackend("firebase", async (config, opts) => (await import("./firebase-
|
|
129
|
+
registerBackend("firebase", async (config, opts) => (await import("./firebase-Bknru2pE.mjs")).createFirebaseStore(config, opts));
|
|
130
130
|
registerBackend("git-json", async (config, opts) => (await import("./gitJson-fjr8mcHe.mjs")).createGitJsonStore(config, opts));
|
|
131
131
|
async function createDataStore(config, opts = {}) {
|
|
132
132
|
const factory = getBackendFactory(config.backend);
|
|
@@ -8,8 +8,8 @@ import { generatePassphrase } from "./index-CWrrF1wl.mjs";
|
|
|
8
8
|
import { r as resolveGitPagesToken, c as createRemoteGitTransport } from "./s3-Dz50-NuA.mjs";
|
|
9
9
|
import { i as instantiateStorageConnector } from "./registry-DijAKZ24.mjs";
|
|
10
10
|
import { S as StorageError, s as subscribeToToasts } from "./http-Bk9ICb7I.mjs";
|
|
11
|
-
import { s as setCredential,
|
|
12
|
-
import { adminOps, applyOps, buildConnector } from "./hosting-
|
|
11
|
+
import { s as setCredential, j as openStore, k as installBrowserEnv } from "../agentcrm.mjs";
|
|
12
|
+
import { adminOps, applyOps, buildConnector } from "./hosting-C_UDyMkm.mjs";
|
|
13
13
|
import "./index-BM8qeGOb.mjs";
|
|
14
14
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
15
15
|
import "./encoding-C9MzdP95.mjs";
|
|
@@ -134,7 +134,7 @@ async function checkPlan(plan) {
|
|
|
134
134
|
const runtime = plan.runtime;
|
|
135
135
|
try {
|
|
136
136
|
installBrowserEnv();
|
|
137
|
-
const { firebaseApiFor, checkFirebaseAccess } = await import("./firebase-
|
|
137
|
+
const { firebaseApiFor, checkFirebaseAccess } = await import("./firebase-Bknru2pE.mjs");
|
|
138
138
|
data = await checkFirebaseAccess(await firebaseApiFor(runtime), plan.backendSecrets, runtime.firebase.projectId ?? "");
|
|
139
139
|
} catch (err) {
|
|
140
140
|
data = { ok: false, detail: err.message, existing: false };
|