@fleox-agent-crm/agentcrm 0.6.0 → 0.7.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 +9 -0
- package/dist/admin/admin-files.json +7 -7
- package/dist/admin/assets/{chartsImpl-zjsXDhuy.js → chartsImpl-Cx0bQmYg.js} +1 -1
- package/dist/admin/assets/{firebase-C3h9mF8O.js → firebase-DyAT9e1o.js} +2 -2
- package/dist/admin/assets/{gitJson-nrOYgX0x.js → gitJson-BeyPO6eJ.js} +1 -1
- package/dist/admin/assets/{index-0ejjkW0z.js → index-Bp5AxImK.js} +172 -172
- package/dist/admin/assets/{lucide-react.min-CI5dCsSm.js → lucide-react.min-BXJHmaO2.js} +1 -1
- package/dist/admin/assets/{sdk-mepKXtVl.js → sdk-hs3heWPk.js} +1 -1
- package/dist/admin/index.html +1 -1
- package/dist/agent/agentcrm.mjs +29 -29
- package/dist/agent/chunks/{compact-C_WX0_F5.mjs → compact-BqTG5cvC.mjs} +1 -1
- package/dist/agent/chunks/{extCheck-BKh_9aLA.mjs → extCheck-Bu8C87OV.mjs} +3 -3
- package/dist/agent/chunks/{files-Be7DZd1a.mjs → files-SMLUpCPs.mjs} +5 -1
- package/dist/agent/chunks/{loader-Bnu3GnMW.mjs → loader-CGIek5YG.mjs} +4 -4
- package/dist/agent/chunks/{registry-BpTyK6yU.mjs → registry-Bg8kGteS.mjs} +3 -3
- package/dist/agent/chunks/{runtime-D-hzk6s9.mjs → runtime-Bmwgx2hK.mjs} +10 -7
- package/dist/agent/chunks/{schema-CYm_n5BN.mjs → schema-Cwi7iFp2.mjs} +2 -2
- package/dist/agent/chunks/{schemaApply-j5hbwPrH.mjs → schemaApply-tEIr5lFK.mjs} +5 -1
- package/dist/agent/chunks/{server-BAQwVNtC.mjs → server-3awvGTvL.mjs} +2 -2
- package/dist/agent/chunks/{tools-BHmVIyP_.mjs → tools-BR3X1Uvm.mjs} +2 -2
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $v,g as eg}from"./index-
|
|
1
|
+
import{r as $v,g as eg}from"./index-Bp5AxImK.js";function tg(Ge,We){for(var e=0;e<We.length;e++){const h=We[e];if(typeof h!="string"&&!Array.isArray(h)){for(const r in h)if(r!=="default"&&!(r in Ge)){const Te=Object.getOwnPropertyDescriptor(h,r);Te&&Object.defineProperty(Ge,r,Te.get?Te:{enumerable:!0,get:()=>h[r]})}}}return Object.freeze(Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"}))}var Ze={exports:{}};/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.esm-BFc7vwnl.js","./index.esm2017-EOzKbpUS.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as kl}from"./index-
|
|
2
|
+
import{_ as kl}from"./index-Bp5AxImK.js";import"./index.esm-Dum0J07z.js";import{getAuth as xl,onAuthStateChanged as ho,signOut as Ol,sendEmailVerification as Ml,sendPasswordResetEmail as Fl,GoogleAuthProvider as Ll,signInWithPopup as Ul,signInWithEmailAndPassword as ql}from"./index.esm-CtEQZRb1.js";import{q as St,e as Ea,y as Ta,u as Vs,v as va,m as jl,t as Bl,F as zl,w as $l,x as Gl,L as Kl,z as qt,A as Ql,B as Wl,S as Hl,i as Xl,C as Yl,r as fo,h as Jl,g as Zl,n as tc}from"./index.esm2017-EOzKbpUS.js";import{withChangeTracking as ec,DELETE_FIELD as nc,SERVER_TIMESTAMP as rc,TS_FIELD as sc,splitTs as ic}from"./firebase-DyAT9e1o.js";var mo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license
|
|
3
3
|
Copyright The Closure Library Authors.
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/var Xt,Ia;(function(){var r;/** @license
|
package/dist/admin/index.html
CHANGED
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
</script>
|
|
123
|
-
<script type="module" crossorigin src="./assets/index-
|
|
123
|
+
<script type="module" crossorigin src="./assets/index-Bp5AxImK.js"></script>
|
|
124
124
|
<link rel="stylesheet" crossorigin href="./assets/index-TcjySLVg.css">
|
|
125
125
|
</head>
|
|
126
126
|
<body>
|
package/dist/agent/agentcrm.mjs
CHANGED
|
@@ -142,7 +142,7 @@ const output = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
142
142
|
toCliError
|
|
143
143
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
144
144
|
const name = "@fleox-agent-crm/agentcrm";
|
|
145
|
-
const version = "0.
|
|
145
|
+
const version = "0.7.0";
|
|
146
146
|
const type = "module";
|
|
147
147
|
const description = "The static CRM your AI agent can run: a Twenty / HubSpot-style CRM that runs entirely in the browser or headless through the agentcrm CLI, with data on storage you own.";
|
|
148
148
|
const license = "SEE LICENSE IN LICENSE";
|
|
@@ -524,7 +524,7 @@ function tmpFolder() {
|
|
|
524
524
|
return tmpBase;
|
|
525
525
|
}
|
|
526
526
|
async function nodeImportBundle() {
|
|
527
|
-
await import("./chunks/runtime-
|
|
527
|
+
await import("./chunks/runtime-Bmwgx2hK.mjs");
|
|
528
528
|
const { createNodeImportBundle } = await import("./chunks/nodeImport-ylfRDvqt.mjs");
|
|
529
529
|
return createNodeImportBundle({ runtimeDir: runtimeDir(), tmpDir: tmpFolder() });
|
|
530
530
|
}
|
|
@@ -539,7 +539,7 @@ async function loadSessionExtensions(store, opts = {}) {
|
|
|
539
539
|
if (!loadedAny && !opts.force && !hasEnabledExtensions(store)) return null;
|
|
540
540
|
try {
|
|
541
541
|
const importBundle = await nodeImportBundle();
|
|
542
|
-
const { syncExtensions } = await import("./chunks/loader-
|
|
542
|
+
const { syncExtensions } = await import("./chunks/loader-CGIek5YG.mjs");
|
|
543
543
|
loadedAny = true;
|
|
544
544
|
return await syncExtensions(store, { importBundle, onError: () => void 0 });
|
|
545
545
|
} catch (err) {
|
|
@@ -553,7 +553,7 @@ async function loadSessionExtensions(store, opts = {}) {
|
|
|
553
553
|
sync,
|
|
554
554
|
async close() {
|
|
555
555
|
if (!loadedAny) return;
|
|
556
|
-
(await import("./chunks/registry-
|
|
556
|
+
(await import("./chunks/registry-Bg8kGteS.mjs")).deactivateAllExtensions();
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
}
|
|
@@ -959,7 +959,7 @@ function readLocalFile(path) {
|
|
|
959
959
|
return { name: basename(full), bytes: new Uint8Array(readFileSync(full)) };
|
|
960
960
|
}
|
|
961
961
|
async function uploadLocalFiles(ctx, paths, targets2 = []) {
|
|
962
|
-
const { uploadFile } = await import("./chunks/files-
|
|
962
|
+
const { uploadFile } = await import("./chunks/files-SMLUpCPs.mjs");
|
|
963
963
|
const { guessMime, imageDimensions } = await import("./chunks/files-CjsPJSR6.mjs");
|
|
964
964
|
const out = [];
|
|
965
965
|
for (const p of paths) {
|
|
@@ -1007,7 +1007,7 @@ const filesCommand = {
|
|
|
1007
1007
|
switch (action) {
|
|
1008
1008
|
case "list":
|
|
1009
1009
|
return withSession(io, options, {}, async ({ ctx }) => {
|
|
1010
|
-
const { listFiles } = await import("./chunks/files-
|
|
1010
|
+
const { listFiles } = await import("./chunks/files-SMLUpCPs.mjs");
|
|
1011
1011
|
const target = strOpt(options, "record") ?? strOpt(options, "activity") ?? null;
|
|
1012
1012
|
const items = listFiles(ctx, target, { includeRelated: boolOpt(options, "related"), kind: strOpt(options, "kind"), search: strOpt(options, "search") });
|
|
1013
1013
|
const limit = Math.min(1e3, numOpt(options, "limit") ?? 100);
|
|
@@ -1022,7 +1022,7 @@ ${table(r.files, ["id", "name", "mime", "size", "createdAt"])}`);
|
|
|
1022
1022
|
if (record && activity) usage("Give --record or --activity, not both.");
|
|
1023
1023
|
for (const p of args) readLocalFile(p);
|
|
1024
1024
|
return withSession(io, options, { lock: true }, async ({ ctx }) => {
|
|
1025
|
-
const { attachFile } = await import("./chunks/files-
|
|
1025
|
+
const { attachFile } = await import("./chunks/files-SMLUpCPs.mjs");
|
|
1026
1026
|
const files2 = await uploadLocalFiles(ctx, args, record ? [record] : []);
|
|
1027
1027
|
if (activity) for (const f of files2) await attachFile(ctx, f.id, { kind: "activity", id: activity });
|
|
1028
1028
|
const { requireFile } = await import("./chunks/store-5gqRSKXg.mjs");
|
|
@@ -1035,7 +1035,7 @@ ${table(r.uploaded, ["id", "name", "size"])}`);
|
|
|
1035
1035
|
const out = strOpt(options, "out");
|
|
1036
1036
|
if (!out) usage("files get needs --out <path>.");
|
|
1037
1037
|
return withSession(io, options, {}, async ({ ctx }) => {
|
|
1038
|
-
const { getFile, getFileBytes } = await import("./chunks/files-
|
|
1038
|
+
const { getFile, getFileBytes } = await import("./chunks/files-SMLUpCPs.mjs");
|
|
1039
1039
|
const meta = getFile(ctx, id);
|
|
1040
1040
|
const bytes = await getFileBytes(ctx, id, { thumb: boolOpt(options, "thumb") });
|
|
1041
1041
|
writeOutFile(out, bytes);
|
|
@@ -1045,7 +1045,7 @@ ${table(r.uploaded, ["id", "name", "size"])}`);
|
|
|
1045
1045
|
case "delete": {
|
|
1046
1046
|
const id = positional(args, 0, "file id", U$1.delete);
|
|
1047
1047
|
return withSession(io, options, { lock: options.yes === true }, async ({ ctx }) => {
|
|
1048
|
-
const { getFile, deleteFile } = await import("./chunks/files-
|
|
1048
|
+
const { getFile, deleteFile } = await import("./chunks/files-SMLUpCPs.mjs");
|
|
1049
1049
|
const meta = fileOut(getFile(ctx, id));
|
|
1050
1050
|
if (options.yes !== true) return { needsConfirmation: true, plan: { delete: meta } };
|
|
1051
1051
|
await deleteFile(ctx, id);
|
|
@@ -1053,7 +1053,7 @@ ${table(r.uploaded, ["id", "name", "size"])}`);
|
|
|
1053
1053
|
}, (r) => "plan" in r && r.plan ? `Would delete ${r.plan.delete.name} (${r.plan.delete.id}). Re-run with --yes once the user agrees.` : `Deleted ${"deleted" in r ? r.deleted : id} (bytes purged by \`agentcrm compact\`).`);
|
|
1054
1054
|
}
|
|
1055
1055
|
case "usage":
|
|
1056
|
-
return withSession(io, options, {}, async ({ ctx }) => (await import("./chunks/files-
|
|
1056
|
+
return withSession(io, options, {}, async ({ ctx }) => (await import("./chunks/files-SMLUpCPs.mjs")).fileUsage(ctx));
|
|
1057
1057
|
default:
|
|
1058
1058
|
usage(`Unknown files action "${action ?? ""}".`, "Use list, upload, get, delete or usage.");
|
|
1059
1059
|
}
|
|
@@ -1066,7 +1066,7 @@ async function recordImageAction(io, options, args) {
|
|
|
1066
1066
|
if (!remove && !path) usage("records image needs an image path (or --remove).");
|
|
1067
1067
|
const local = remove ? null : readLocalFile(path);
|
|
1068
1068
|
return withSession(io, options, { lock: true }, async ({ ctx }) => {
|
|
1069
|
-
const { setRecordImage, clearRecordImage } = await import("./chunks/files-
|
|
1069
|
+
const { setRecordImage, clearRecordImage } = await import("./chunks/files-SMLUpCPs.mjs");
|
|
1070
1070
|
const field = strOpt(options, "field");
|
|
1071
1071
|
if (!local) {
|
|
1072
1072
|
const r = await clearRecordImage(ctx, recordId, field);
|
|
@@ -2164,7 +2164,7 @@ async function check({ io, options, positionals }) {
|
|
|
2164
2164
|
const kind = strOpt(options, "kind");
|
|
2165
2165
|
if (kind && kind !== "module" && kind !== "theme") usage("--kind is module or theme.");
|
|
2166
2166
|
const { readRawPackage } = await import("./chunks/extPackage-DuZ6GZhp.mjs");
|
|
2167
|
-
const { checkExtension } = await import("./chunks/extCheck-
|
|
2167
|
+
const { checkExtension } = await import("./chunks/extCheck-Bu8C87OV.mjs");
|
|
2168
2168
|
const raw = await readRawPackage(target);
|
|
2169
2169
|
const report = await checkExtension(raw, { kind, callTools: !boolOpt(options, "no-call") });
|
|
2170
2170
|
printResult(io, report, () => {
|
|
@@ -2211,7 +2211,7 @@ async function install({ io, options, positionals }) {
|
|
|
2211
2211
|
const apply = options.yes === true;
|
|
2212
2212
|
const disabled = boolOpt(options, "disabled");
|
|
2213
2213
|
if (!boolOpt(options, "force")) {
|
|
2214
|
-
const { checkExtension } = await import("./chunks/extCheck-
|
|
2214
|
+
const { checkExtension } = await import("./chunks/extCheck-Bu8C87OV.mjs");
|
|
2215
2215
|
const report = await checkExtension(raw, { callTools: false });
|
|
2216
2216
|
if (!report.valid) {
|
|
2217
2217
|
throw new CliError(
|
|
@@ -2247,7 +2247,7 @@ async function install({ io, options, positionals }) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
const result = await ext.installExtension(s.ctx, pkg2, disabled ? { enabled: false } : {});
|
|
2249
2249
|
const report = await s.extensions.sync();
|
|
2250
|
-
const { getLoadedExtension } = await import("./chunks/registry-
|
|
2250
|
+
const { getLoadedExtension } = await import("./chunks/registry-Bg8kGteS.mjs");
|
|
2251
2251
|
const loaded = getLoadedExtension(m.id);
|
|
2252
2252
|
const failure = report?.failed.find((f) => f.id === m.id || f.id === "*");
|
|
2253
2253
|
if (failure && !loaded) return { ...result, author: m.author ?? null, load: { status: "error", error: failure.error } };
|
|
@@ -2309,7 +2309,7 @@ const extCommand = {
|
|
|
2309
2309
|
if (kind && kind !== "module" && kind !== "theme") usage("--kind is module or theme.");
|
|
2310
2310
|
return withSession(io, options, {}, async (s) => {
|
|
2311
2311
|
const { listExtensions } = await import("./chunks/extensions-Bp72uZ9a.mjs");
|
|
2312
|
-
const { getLoadedExtension } = await import("./chunks/registry-
|
|
2312
|
+
const { getLoadedExtension } = await import("./chunks/registry-Bg8kGteS.mjs");
|
|
2313
2313
|
return listExtensions(s.ctx, kind ? { kind } : {}).map((e) => ({ ...e, load: s.extensions.safeMode ? "skipped" : getLoadedExtension(e.id)?.status ?? (e.enabled ? "not loaded" : "disabled"), ...getLoadedExtension(e.id)?.error ? { loadError: getLoadedExtension(e.id)?.error } : {} }));
|
|
2314
2314
|
}, (rows) => table(rows.map((r) => ({ ...r, enabled: r.enabled ? "yes" : "no" })), ["id", "kind", "name", "version", "enabled", "load", "author"]));
|
|
2315
2315
|
}
|
|
@@ -2597,7 +2597,7 @@ const compactCommand = {
|
|
|
2597
2597
|
async run({ io, options }) {
|
|
2598
2598
|
const apply = options.yes === true;
|
|
2599
2599
|
return withSession(io, options, { lock: apply }, async ({ ctx }) => {
|
|
2600
|
-
const { compactData } = await import("./chunks/compact-
|
|
2600
|
+
const { compactData } = await import("./chunks/compact-BqTG5cvC.mjs");
|
|
2601
2601
|
const report = await compactData(ctx, { olderThanDays: numOpt(options, "older-than"), keepRuns: numOpt(options, "keep-runs"), dryRun: !apply });
|
|
2602
2602
|
return apply ? report : { needsConfirmation: true, plan: report };
|
|
2603
2603
|
}, (r) => "plan" in r ? `Would purge ${r.plan.purgedRecords.length} record(s), ${r.plan.purgedActivities} activit(ies), ${r.plan.purgedRuns} run(s), ${r.plan.purgedFiles} file(s). Re-run with --yes once the user agrees.` : `Purged ${r.purgedRecords.length} record(s), ${r.purgedFiles} file(s); storage compacted: ${r.storageCompacted}`);
|
|
@@ -3515,13 +3515,13 @@ const objectsCommand = {
|
|
|
3515
3515
|
switch (action) {
|
|
3516
3516
|
case "list":
|
|
3517
3517
|
return withSession(io, options, {}, async ({ ctx, store }) => {
|
|
3518
|
-
const { listObjects } = await import("./chunks/schema-
|
|
3518
|
+
const { listObjects } = await import("./chunks/schema-Cwi7iFp2.mjs");
|
|
3519
3519
|
const { recordsOf } = await import("./chunks/store-5gqRSKXg.mjs");
|
|
3520
3520
|
return listObjects(ctx).map((o) => ({ id: o.id, labelSingular: o.labelSingular, labelPlural: o.labelPlural, standard: o.standard, labelField: o.labelField, fields: o.fields.length, records: recordsOf(store, o.id).length }));
|
|
3521
3521
|
}, (rows) => table(rows, ["id", "labelPlural", "fields", "records", "standard"]));
|
|
3522
3522
|
case "get": {
|
|
3523
3523
|
const objectId = positional(positionals, 1, "object id", "objects get <id>");
|
|
3524
|
-
return withSession(io, options, {}, async ({ ctx }) => (await import("./chunks/schema-
|
|
3524
|
+
return withSession(io, options, {}, async ({ ctx }) => (await import("./chunks/schema-Cwi7iFp2.mjs")).describeSchema(ctx, objectId)[0]);
|
|
3525
3525
|
}
|
|
3526
3526
|
case "create": {
|
|
3527
3527
|
const data = jsonObjectOpt(options, "data") ?? {};
|
|
@@ -3534,7 +3534,7 @@ const objectsCommand = {
|
|
|
3534
3534
|
...strOpt(options, "color") ? { color: strOpt(options, "color") } : {}
|
|
3535
3535
|
};
|
|
3536
3536
|
if (!input.labelSingular || !input.labelPlural) usage("objects create needs --singular and --plural (or --data).");
|
|
3537
|
-
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-
|
|
3537
|
+
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-Cwi7iFp2.mjs")).createObject(ctx, input));
|
|
3538
3538
|
}
|
|
3539
3539
|
case "update": {
|
|
3540
3540
|
const objectId = positional(positionals, 1, "object id", "objects update <id> …");
|
|
@@ -3546,12 +3546,12 @@ const objectsCommand = {
|
|
|
3546
3546
|
...strOpt(options, "label-field") ? { labelField: strOpt(options, "label-field") } : {}
|
|
3547
3547
|
};
|
|
3548
3548
|
if (!Object.keys(patch).length) usage("objects update needs --singular, --plural, --icon, --color or --label-field.");
|
|
3549
|
-
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-
|
|
3549
|
+
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-Cwi7iFp2.mjs")).updateObject(ctx, objectId, patch));
|
|
3550
3550
|
}
|
|
3551
3551
|
case "delete": {
|
|
3552
3552
|
if (!id) usage("objects delete needs an object id.");
|
|
3553
3553
|
return withSession(io, options, { lock: options.yes === true }, async ({ ctx, store }) => {
|
|
3554
|
-
const { getObject, deleteObject } = await import("./chunks/schema-
|
|
3554
|
+
const { getObject, deleteObject } = await import("./chunks/schema-Cwi7iFp2.mjs");
|
|
3555
3555
|
const { recordsOf } = await import("./chunks/store-5gqRSKXg.mjs");
|
|
3556
3556
|
const o = getObject(ctx, id);
|
|
3557
3557
|
const plan = { object: o.id, label: o.labelPlural, standard: o.standard, recordsDeleted: recordsOf(store, o.id, { includeDeleted: true }).length };
|
|
@@ -3609,7 +3609,7 @@ const fieldsCommand = {
|
|
|
3609
3609
|
...boolOpt(options, "unique") ? { unique: true } : {},
|
|
3610
3610
|
...strOpt(options, "description") ? { description: strOpt(options, "description") } : {}
|
|
3611
3611
|
};
|
|
3612
|
-
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-
|
|
3612
|
+
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-Cwi7iFp2.mjs")).createField(ctx, objectId, input));
|
|
3613
3613
|
}
|
|
3614
3614
|
case "update": {
|
|
3615
3615
|
if (!fieldId) usage("fields update needs a field id.");
|
|
@@ -3626,12 +3626,12 @@ const fieldsCommand = {
|
|
|
3626
3626
|
...strOpt(options, "description") !== void 0 ? { description: strOpt(options, "description") } : {}
|
|
3627
3627
|
};
|
|
3628
3628
|
if (!Object.keys(patch).length) usage("fields update needs at least one change.");
|
|
3629
|
-
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-
|
|
3629
|
+
return withSession(io, options, { lock: true }, async ({ ctx }) => (await import("./chunks/schema-Cwi7iFp2.mjs")).updateField(ctx, objectId, fieldId, patch));
|
|
3630
3630
|
}
|
|
3631
3631
|
case "delete": {
|
|
3632
3632
|
if (!fieldId) usage("fields delete needs a field id.");
|
|
3633
3633
|
return withSession(io, options, { lock: options.yes === true }, async ({ ctx, store }) => {
|
|
3634
|
-
const { getObject, deleteField } = await import("./chunks/schema-
|
|
3634
|
+
const { getObject, deleteField } = await import("./chunks/schema-Cwi7iFp2.mjs");
|
|
3635
3635
|
const { recordsOf } = await import("./chunks/store-5gqRSKXg.mjs");
|
|
3636
3636
|
const field = getObject(ctx, objectId).fields.find((f) => f.id === fieldId);
|
|
3637
3637
|
if (!field) usage(`No field "${fieldId}" on ${objectId}.`, `\`agentcrm objects get ${objectId}\` lists them.`);
|
|
@@ -3664,7 +3664,7 @@ const schemaCommand = {
|
|
|
3664
3664
|
usage(`The schema is not valid JSON: ${err.message}`);
|
|
3665
3665
|
}
|
|
3666
3666
|
const apply = options.yes === true;
|
|
3667
|
-
const { applySchema, parseSchemaSpec } = await import("./chunks/schemaApply-
|
|
3667
|
+
const { applySchema, parseSchemaSpec } = await import("./chunks/schemaApply-tEIr5lFK.mjs");
|
|
3668
3668
|
const spec = parseSchemaSpec(raw);
|
|
3669
3669
|
return withSession(
|
|
3670
3670
|
io,
|
|
@@ -3982,7 +3982,7 @@ const toolsCommand = {
|
|
|
3982
3982
|
async run({ io, options, positionals }) {
|
|
3983
3983
|
const [action = "list"] = positionals;
|
|
3984
3984
|
if (action === "list") {
|
|
3985
|
-
const { listAiTools, AI_TOOLS } = await import("./chunks/tools-
|
|
3985
|
+
const { listAiTools, AI_TOOLS } = await import("./chunks/tools-BR3X1Uvm.mjs");
|
|
3986
3986
|
const builtin = new Set(AI_TOOLS.map((t) => t.name));
|
|
3987
3987
|
const shape = () => listAiTools().map((t) => ({ name: t.name, description: t.description, mutating: t.mutating, source: builtin.has(t.name) ? "builtin" : "extension", inputSchema: t.inputSchema }));
|
|
3988
3988
|
const human = (r) => table(r.tools, ["name", "mutating", "source", "description"]);
|
|
@@ -4002,7 +4002,7 @@ const toolsCommand = {
|
|
|
4002
4002
|
}
|
|
4003
4003
|
if (action === "call") {
|
|
4004
4004
|
const name2 = positional(positionals, 1, "tool name", "tools call <name> --input <json>");
|
|
4005
|
-
const { findTool, callTool, listAiTools } = await import("./chunks/tools-
|
|
4005
|
+
const { findTool, callTool, listAiTools } = await import("./chunks/tools-BR3X1Uvm.mjs");
|
|
4006
4006
|
const input = jsonObjectOpt(options, "input") ?? {};
|
|
4007
4007
|
const builtin = findTool(name2);
|
|
4008
4008
|
return withSession(io, options, { lock: builtin ? builtin.mutating : true }, async ({ ctx }) => {
|
|
@@ -4024,8 +4024,8 @@ const mcpCommand = {
|
|
|
4024
4024
|
const log = (msg) => process.stderr.write(`${msg}
|
|
4025
4025
|
`);
|
|
4026
4026
|
for (const w of session2.warnings) log(`[agentcrm mcp] note: ${w}`);
|
|
4027
|
-
const { listAiTools } = await import("./chunks/tools-
|
|
4028
|
-
const { createMcpServer, serveStdio } = await import("./chunks/server-
|
|
4027
|
+
const { listAiTools } = await import("./chunks/tools-BR3X1Uvm.mjs");
|
|
4028
|
+
const { createMcpServer, serveStdio } = await import("./chunks/server-3awvGTvL.mjs");
|
|
4029
4029
|
let lastRefresh = Date.now();
|
|
4030
4030
|
const server = createMcpServer({
|
|
4031
4031
|
readOnly,
|
|
@@ -6,7 +6,7 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { assertCan } from "./context-CxFfqS4D.mjs";
|
|
8
8
|
import { b as fileCleanupMutations } from "./relations-bmUKPT0G.mjs";
|
|
9
|
-
import { purgeFiles } from "./files-
|
|
9
|
+
import { purgeFiles } from "./files-SMLUpCPs.mjs";
|
|
10
10
|
import { hardDeleteMutations } from "./records-BJLSmv0O.mjs";
|
|
11
11
|
import { recordsOf, activitiesOf, automationRunsOf } from "./store-5gqRSKXg.mjs";
|
|
12
12
|
import "./pluginRegistry-DyHtlkcr.mjs";
|
|
@@ -95,9 +95,9 @@ async function loadInSandbox(report, manifest, files, opts) {
|
|
|
95
95
|
import("./pluginRegistry-DyHtlkcr.mjs"),
|
|
96
96
|
import("./seed-Bb26Zsni.mjs"),
|
|
97
97
|
import("./store-5gqRSKXg.mjs"),
|
|
98
|
-
import("./loader-
|
|
99
|
-
import("./registry-
|
|
100
|
-
import("./tools-
|
|
98
|
+
import("./loader-CGIek5YG.mjs"),
|
|
99
|
+
import("./registry-Bg8kGteS.mjs"),
|
|
100
|
+
import("./tools-BR3X1Uvm.mjs"),
|
|
101
101
|
import("./extensionActions-D2HtpQz4.mjs"),
|
|
102
102
|
import("./featureRegistry-DSsZbhrh.mjs"),
|
|
103
103
|
import("./themes-DPZFv3yc.mjs"),
|
|
@@ -345,7 +345,10 @@ async function retireImage(ctx, fileId, recordId) {
|
|
|
345
345
|
function recordImageId(ctx, record) {
|
|
346
346
|
const object = objectOf(ctx.store, record.object);
|
|
347
347
|
const id = object?.imageField ? record.fields[object.imageField] : void 0;
|
|
348
|
-
return typeof id === "string" && id ? id : void 0;
|
|
348
|
+
return typeof id === "string" && id && !isImageUrl(id) ? id : void 0;
|
|
349
|
+
}
|
|
350
|
+
function isImageUrl(value) {
|
|
351
|
+
return /^https:\/\//i.test(value);
|
|
349
352
|
}
|
|
350
353
|
export {
|
|
351
354
|
ORPHAN_GRACE_MS,
|
|
@@ -356,6 +359,7 @@ export {
|
|
|
356
359
|
fileUsage,
|
|
357
360
|
getFile,
|
|
358
361
|
getFileBytes,
|
|
362
|
+
isImageUrl,
|
|
359
363
|
listFiles,
|
|
360
364
|
maxUploadBytes,
|
|
361
365
|
purgeFiles,
|
|
@@ -6,7 +6,7 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { j as RUNTIME_DIR, h as RUNTIME_MODULES, i as isCompatibleApiVersion, k as RUNTIME_GLOBAL } from "./api-Cz0Ubj-B.mjs";
|
|
8
8
|
import { rewriteRuntimeImports, fingerprint, bundleImports } from "./package-B7mI6HGi.mjs";
|
|
9
|
-
import { listLoadedExtensions, deactivateExtension, getLoadedExtension, setExtensionStatus, activateExtension } from "./registry-
|
|
9
|
+
import { listLoadedExtensions, deactivateExtension, getLoadedExtension, setExtensionStatus, activateExtension } from "./registry-Bg8kGteS.mjs";
|
|
10
10
|
import "./index-w03ReRs4.mjs";
|
|
11
11
|
import "./_commonjsHelpers-ClciMIcB.mjs";
|
|
12
12
|
import "stream";
|
|
@@ -22,7 +22,7 @@ import "./pluginRegistry-DyHtlkcr.mjs";
|
|
|
22
22
|
import "./settings-Di8nzNEL.mjs";
|
|
23
23
|
import "./store-5gqRSKXg.mjs";
|
|
24
24
|
import "./runtimeConfig-CCOFg1RM.mjs";
|
|
25
|
-
import "./tools-
|
|
25
|
+
import "./tools-BR3X1Uvm.mjs";
|
|
26
26
|
import "./fields-B0bitgmr.mjs";
|
|
27
27
|
import "./query-C5nJB_3C.mjs";
|
|
28
28
|
import "../agentcrm.mjs";
|
|
@@ -45,7 +45,7 @@ import "./records-BJLSmv0O.mjs";
|
|
|
45
45
|
import "./standardObjects-vrmqIVLH.mjs";
|
|
46
46
|
import "./pipelines-G-c23x-s.mjs";
|
|
47
47
|
import "./reports-ogUa41jr.mjs";
|
|
48
|
-
import "./schema-
|
|
48
|
+
import "./schema-Cwi7iFp2.mjs";
|
|
49
49
|
import "./automations-gCDYNS88.mjs";
|
|
50
50
|
import "./extensionActions-D2HtpQz4.mjs";
|
|
51
51
|
import "./forms-Bb0zztBM.mjs";
|
|
@@ -54,7 +54,7 @@ import "./appearance-BloHbiLA.mjs";
|
|
|
54
54
|
import "./themes-DPZFv3yc.mjs";
|
|
55
55
|
import "./extensions-Bp72uZ9a.mjs";
|
|
56
56
|
import "./files-CjsPJSR6.mjs";
|
|
57
|
-
import "./files-
|
|
57
|
+
import "./files-SMLUpCPs.mjs";
|
|
58
58
|
import "./index-RCmo-uld.mjs";
|
|
59
59
|
import "./http-Bk9ICb7I.mjs";
|
|
60
60
|
async function prepareRuntime(specifiers) {
|
|
@@ -6,7 +6,7 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { i as isCompatibleApiVersion } from "./api-Cz0Ubj-B.mjs";
|
|
8
8
|
import { registerExternalFeature } from "./featureRegistry-DSsZbhrh.mjs";
|
|
9
|
-
import { registerAiTool } from "./tools-
|
|
9
|
+
import { registerAiTool } from "./tools-BR3X1Uvm.mjs";
|
|
10
10
|
import { registerAutomationAction } from "./extensionActions-D2HtpQz4.mjs";
|
|
11
11
|
import { plugins } from "./pluginRegistry-DyHtlkcr.mjs";
|
|
12
12
|
import { registerExternalTheme } from "./themes-DPZFv3yc.mjs";
|
|
@@ -41,7 +41,7 @@ import "./records-BJLSmv0O.mjs";
|
|
|
41
41
|
import "./standardObjects-vrmqIVLH.mjs";
|
|
42
42
|
import "./pipelines-G-c23x-s.mjs";
|
|
43
43
|
import "./reports-ogUa41jr.mjs";
|
|
44
|
-
import "./schema-
|
|
44
|
+
import "./schema-Cwi7iFp2.mjs";
|
|
45
45
|
import "./automations-gCDYNS88.mjs";
|
|
46
46
|
import "./forms-Bb0zztBM.mjs";
|
|
47
47
|
import "./schema-DnLj8dUO.mjs";
|
|
@@ -53,7 +53,7 @@ import "events";
|
|
|
53
53
|
import "buffer";
|
|
54
54
|
import "util";
|
|
55
55
|
import "./files-CjsPJSR6.mjs";
|
|
56
|
-
import "./files-
|
|
56
|
+
import "./files-SMLUpCPs.mjs";
|
|
57
57
|
import "./index-RCmo-uld.mjs";
|
|
58
58
|
import "./http-Bk9ICb7I.mjs";
|
|
59
59
|
const entries = /* @__PURE__ */ new Map();
|
|
@@ -12,7 +12,7 @@ import { bulkDelete, bulkUpdate, createRecord, deleteRecord, getRecord, getRecor
|
|
|
12
12
|
import { j as expandRelations, b as fileCleanupMutations, g as fileFieldIds, h as fileIdsIn, d as fileMergeMutations, f as fileTargetPatch, i as inverseRelations, l as labelOf, k as linkRecords, e as referencedFileIds, m as relatedRecords, r as relationFields, a as relationIds, c as rewriteReferences, s as sameTarget, t as toRef, u as unlinkRecords, v as validateRelationValue } from "./relations-bmUKPT0G.mjs";
|
|
13
13
|
import { addActivity, addNote, completeTask, createTask, deleteActivity, getActivity, lastActivityAt, listActivities, listTasks, timelineScope, updateActivity } from "./activities-be260oPg.mjs";
|
|
14
14
|
import { createPipeline, deletePipeline, forecast, getPipeline, listPipelines, moveStage, pipelineOfRecord, syncPipelineOptions, updatePipeline } from "./pipelines-G-c23x-s.mjs";
|
|
15
|
-
import { addOption, changeFieldType, createField, createObject, deleteField, deleteObject, describeSchema, getObject, listObjects, removeOption, reorderFields, updateField, updateObject, updateOption } from "./schema-
|
|
15
|
+
import { addOption, changeFieldType, createField, createObject, deleteField, deleteObject, describeSchema, getObject, listObjects, removeOption, reorderFields, updateField, updateObject, updateOption } from "./schema-Cwi7iFp2.mjs";
|
|
16
16
|
import { createView, deleteView, duplicateView, getView, listViews, runView, updateView } from "./views-zRdsphZl.mjs";
|
|
17
17
|
import { createUser, deleteUser, findUserByEmail, getUser, listUsers, setUserRole, updateUser } from "./users-DI1BvS0f.mjs";
|
|
18
18
|
import { DEFAULT_SETTINGS, SETTINGS_KEYS, assertNoSecrets, getConfigDoc, getSettings, setConfigDoc, updateSettings } from "./settings-Di8nzNEL.mjs";
|
|
@@ -22,13 +22,13 @@ import { findDuplicates, mergeRecords } from "./dedupe-isAmKHQV.mjs";
|
|
|
22
22
|
import { REPORTS, activityByUser, conversion, leadSources, pipelineByStage, runReport, staleDeals, wonLost } from "./reports-ogUa41jr.mjs";
|
|
23
23
|
import { getStats } from "./stats-bInarNLK.mjs";
|
|
24
24
|
import { DEFAULT_ADMIN_ID, seedCrm, seedDemoData } from "./seed-Bb26Zsni.mjs";
|
|
25
|
-
import { compactData } from "./compact-
|
|
25
|
+
import { compactData } from "./compact-BqTG5cvC.mjs";
|
|
26
26
|
import { ACTION_TYPES, AUTOMATION_TEMPLATES, EVENT_TRIGGERS, MAX_AUTOMATION_DEPTH, MAX_AUTOMATION_RUNS, SCHEDULED_TRIGGERS, TRIGGER_TYPES, automationAssignees, clearAutomationRuns, createAutomation, createAutomationFromTemplate, deleteAutomation, duplicateAutomation, findAutomationTemplate, getAutomation, installAutomations, lastTouchedAt, listAutomationRuns, listAutomations, pruneAutomationRuns, renderTemplate, runAutomationEvent, runScheduled, scheduledCandidates, setAutomationEnabled, setAutomationFetch, templatePlaceholders, testAutomation, triggerMatches, updateAutomation, validateAutomation } from "./automations-gCDYNS88.mjs";
|
|
27
27
|
import { DEFAULT_FIREBASE_INBOX, DEFAULT_FORM_TEXTS, DEFAULT_INBOX_PREFIX, FORM_FIELD_TYPES, FREE_MAIL_DOMAINS, HONEYPOT_NAME, INBOX_KINDS, MIN_FILL_MS, buildFormArtifacts, buildFormHtml, companyDomainOfEmail, connectorInboxSource, createForm, defaultFormPath, deleteForm, escapeHtml, firestoreInboxSource, getForm, ingestInbox, ingestSubmissions, isFormFieldType, listForms, listInbox, memoryInboxSource, parseSubmission, publishForm, resolveInboxSource, setInboxSourceResolver, suggestFormFields, updateForm, validateForm } from "./forms-Bb0zztBM.mjs";
|
|
28
28
|
import { disabledObjectIds, getModule, getModuleConfig, isModuleEnabled, listModules, moduleStates, setModuleConfig, setModuleEnabled } from "./modules-clWdE-K2.mjs";
|
|
29
29
|
import { getExtension, getExtensionPackage, installExtension, listExtensions, setExtensionEnabled, summarizeExtension, uninstallExtension } from "./extensions-Bp72uZ9a.mjs";
|
|
30
30
|
import { applyPreset, getAppearance, getAppearanceDoc, listPresets, resetAppearance, setAppearance, setLogo } from "./appearance-BloHbiLA.mjs";
|
|
31
|
-
import { ORPHAN_GRACE_MS, attachFile, clearRecordImage, deleteFile, detachFile, fileUsage, getFile, getFileBytes, listFiles, maxUploadBytes, purgeFiles, recordImageId, renameFile, restoreFile, setRecordImage, uploadFile } from "./files-
|
|
31
|
+
import { ORPHAN_GRACE_MS, attachFile, clearRecordImage, deleteFile, detachFile, fileUsage, getFile, getFileBytes, isImageUrl, listFiles, maxUploadBytes, purgeFiles, recordImageId, renameFile, restoreFile, setRecordImage, uploadFile } from "./files-SMLUpCPs.mjs";
|
|
32
32
|
import { S as SCHEMA_MIGRATIONS, m as migrateSchema, s as schemaMigrationMutations } from "./migrate-Cc_8MHZv.mjs";
|
|
33
33
|
import { BACKUP_DATA_FILE, BACKUP_FILES_DIR, exportBackupZip, importBackupZip, planBackupZip, readBackupZipInfo } from "./backup-DDqTRbuW.mjs";
|
|
34
34
|
import { getAutomationAction, listAutomationActions, registerAutomationAction, subscribeAutomationActions } from "./extensionActions-D2HtpQz4.mjs";
|
|
@@ -41,7 +41,7 @@ import { isEmptyFieldValue, formatFieldValue, formatAddress, dateValueToMs, form
|
|
|
41
41
|
import { fileKind, isPreviewable, formatBytes } from "./files-CjsPJSR6.mjs";
|
|
42
42
|
import { plugins } from "./pluginRegistry-DyHtlkcr.mjs";
|
|
43
43
|
import { n as newId } from "./ids-CvnmrMJX.mjs";
|
|
44
|
-
import { registerAiTool } from "./tools-
|
|
44
|
+
import { registerAiTool } from "./tools-BR3X1Uvm.mjs";
|
|
45
45
|
import { a as DEFAULT_APPEARANCE } from "./schema-DnLj8dUO.mjs";
|
|
46
46
|
import { b as EXTENSION_MIN_API_VERSION, E as EXTENSION_API_VERSION, k as RUNTIME_GLOBAL } from "./api-Cz0Ubj-B.mjs";
|
|
47
47
|
import "./query-C5nJB_3C.mjs";
|
|
@@ -8496,6 +8496,7 @@ const opsModule = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
8496
8496
|
installExtension,
|
|
8497
8497
|
inverseRelations,
|
|
8498
8498
|
isFormFieldType,
|
|
8499
|
+
isImageUrl,
|
|
8499
8500
|
isModuleEnabled,
|
|
8500
8501
|
labelOf,
|
|
8501
8502
|
lastActivityAt,
|
|
@@ -10088,7 +10089,8 @@ function hash(s2) {
|
|
|
10088
10089
|
function Avatar({ name, src, size = "md", square, className }) {
|
|
10089
10090
|
const dims = { xs: "h-4 w-4 text-[8px]", sm: "h-5 w-5 text-[10px]", md: "h-6 w-6 text-[11px]", lg: "h-9 w-9 text-sm" }[size];
|
|
10090
10091
|
const shape = square ? "rounded" : "rounded-full";
|
|
10091
|
-
|
|
10092
|
+
const [failed, setFailed] = reactExports.useState(null);
|
|
10093
|
+
if (src && failed !== src) return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src, alt: name, onError: () => setFailed(src), className: cn("shrink-0 object-cover", dims, shape, className) });
|
|
10092
10094
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: cn("inline-flex shrink-0 select-none items-center justify-center font-semibold text-white", dims, shape, AVATAR_COLORS[hash(name || "?") % AVATAR_COLORS.length], className), "aria-hidden": "true", children: initials(name) });
|
|
10093
10095
|
}
|
|
10094
10096
|
function Tooltip({ content, children, side = "top" }) {
|
|
@@ -10608,8 +10610,9 @@ function FileFieldInput({ field, value, onChange, onCommit, disabled, className
|
|
|
10608
10610
|
] });
|
|
10609
10611
|
}
|
|
10610
10612
|
function FileAvatar({ fileId, name, size = "md", square, className }) {
|
|
10611
|
-
const
|
|
10612
|
-
|
|
10613
|
+
const remote = fileId && /^https:\/\//i.test(fileId) ? fileId : null;
|
|
10614
|
+
const { url } = useFileUrl(remote ? null : fileId ?? null, { thumb: true });
|
|
10615
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Avatar, { name, src: remote ?? url ?? void 0, size, square, className });
|
|
10613
10616
|
}
|
|
10614
10617
|
function RecordAvatar({ recordId, name, size = "md", square, className, imageId }) {
|
|
10615
10618
|
const ctx = useFieldContext();
|
|
@@ -109,7 +109,7 @@ async function updateObject(ctx, id, patch) {
|
|
|
109
109
|
if (patch.imageField === null || patch.imageField === "") delete object.imageField;
|
|
110
110
|
else {
|
|
111
111
|
const f = object.fields.find((x) => x.id === patch.imageField);
|
|
112
|
-
if (!f || f.type !== "image") throw new OpsError("validation", `"${patch.imageField}" can't be the image field (needs an image field).`);
|
|
112
|
+
if (!f || f.type !== "image" && f.type !== "url") throw new OpsError("validation", `"${patch.imageField}" can't be the image field (needs an image or URL field).`);
|
|
113
113
|
object.imageField = patch.imageField;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -272,7 +272,7 @@ async function updateField(ctx, objectId, fieldId, patch) {
|
|
|
272
272
|
}
|
|
273
273
|
const fields = object.fields.map((f) => f.id === fieldId ? field : f);
|
|
274
274
|
const nextObject = { ...object, fields };
|
|
275
|
-
if (object.imageField === fieldId && field.type !== "image") delete nextObject.imageField;
|
|
275
|
+
if (object.imageField === fieldId && field.type !== "image" && field.type !== "url") delete nextObject.imageField;
|
|
276
276
|
mutations.unshift(saveObject(ctx, nextObject));
|
|
277
277
|
await ctx.store.write(mutations, { message: `Update field ${field.label}` });
|
|
278
278
|
return { field: requireField(requireObject(ctx.store, objectId), fieldId), ...converted !== void 0 ? { converted, cleared } : {} };
|
|
@@ -6,7 +6,7 @@ const __filename = __acrmPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __acrmDirname(__filename);
|
|
7
7
|
import { OpsError, assertCan } from "./context-CxFfqS4D.mjs";
|
|
8
8
|
import { listPipelines, createPipeline, updatePipeline } from "./pipelines-G-c23x-s.mjs";
|
|
9
|
-
import { listObjects, createObject, updateObject, createField, updateField } from "./schema-
|
|
9
|
+
import { listObjects, createObject, updateObject, createField, updateField } from "./schema-Cwi7iFp2.mjs";
|
|
10
10
|
import { listViews, createView, updateView } from "./views-zRdsphZl.mjs";
|
|
11
11
|
import "./pluginRegistry-DyHtlkcr.mjs";
|
|
12
12
|
import "./fields-B0bitgmr.mjs";
|
|
@@ -113,6 +113,10 @@ async function applySchema(ctx, spec) {
|
|
|
113
113
|
await updateObject(ctx, o.id, { labelField: o.labelField });
|
|
114
114
|
report.changes.push({ kind: "object", action: "update", target: o.id, changes: ["labelField"] });
|
|
115
115
|
}
|
|
116
|
+
if (o.imageField && o.imageField !== listObjects(ctx).find((x) => x.id === o.id).imageField) {
|
|
117
|
+
await updateObject(ctx, o.id, { imageField: o.imageField });
|
|
118
|
+
report.changes.push({ kind: "object", action: "update", target: o.id, changes: ["imageField"] });
|
|
119
|
+
}
|
|
116
120
|
const listed = new Set((o.fields ?? []).map((f) => f.id));
|
|
117
121
|
for (const f of current.fields) if (!f.standard && !f.system && !listed.has(f.id)) report.extraFields.push(`${o.id}.${f.id}`);
|
|
118
122
|
}
|
|
@@ -97,7 +97,7 @@ function createMcpServer(opts) {
|
|
|
97
97
|
try {
|
|
98
98
|
const run = async () => {
|
|
99
99
|
const ctx = await opts.backend.context();
|
|
100
|
-
const { callTool: call } = await import("./tools-
|
|
100
|
+
const { callTool: call } = await import("./tools-BR3X1Uvm.mjs");
|
|
101
101
|
return call(ctx, name, args);
|
|
102
102
|
};
|
|
103
103
|
const result = tool.mutating ? await opts.backend.withWrite(run) : await run();
|
|
@@ -112,7 +112,7 @@ function createMcpServer(opts) {
|
|
|
112
112
|
async function readResource(id, uri) {
|
|
113
113
|
const ctx = await opts.backend.context();
|
|
114
114
|
let value;
|
|
115
|
-
if (uri === "agentcrm://schema") value = (await import("./schema-
|
|
115
|
+
if (uri === "agentcrm://schema") value = (await import("./schema-Cwi7iFp2.mjs")).describeSchema(ctx);
|
|
116
116
|
else if (uri === "agentcrm://pipelines") {
|
|
117
117
|
const { listPipelines, forecast } = await import("./pipelines-G-c23x-s.mjs");
|
|
118
118
|
value = listPipelines(ctx).map((p) => ({ ...p, forecast: forecast(ctx, { pipelineId: p.id }) }));
|
|
@@ -14,7 +14,7 @@ import { importCsv } from "./importCsv-BuSYG4ja.mjs";
|
|
|
14
14
|
import { moveStage, forecast, listPipelines } from "./pipelines-G-c23x-s.mjs";
|
|
15
15
|
import { getRecord, searchRecords, listRecords, getRecordDetails, createRecord, updateRecord, deleteRecord, queryContext } from "./records-BJLSmv0O.mjs";
|
|
16
16
|
import { runReport, REPORTS } from "./reports-ogUa41jr.mjs";
|
|
17
|
-
import { describeSchema, createField } from "./schema-
|
|
17
|
+
import { describeSchema, createField } from "./schema-Cwi7iFp2.mjs";
|
|
18
18
|
import { objectOf, recordOf, userOf, activitiesOf, fileOf } from "./store-5gqRSKXg.mjs";
|
|
19
19
|
import { ACTION_TYPES, TRIGGER_TYPES, listAutomationRuns, AUTOMATION_TEMPLATES, listAutomations, createAutomationFromTemplate, createAutomation, setAutomationEnabled, testAutomation, runScheduled } from "./automations-gCDYNS88.mjs";
|
|
20
20
|
import { listForms, ingestInbox } from "./forms-Bb0zztBM.mjs";
|
|
@@ -23,7 +23,7 @@ import { listPresets, getAppearance, setAppearance, applyPreset } from "./appear
|
|
|
23
23
|
import { listExtensions, setExtensionEnabled } from "./extensions-Bp72uZ9a.mjs";
|
|
24
24
|
import { listModules, setModuleEnabled } from "./modules-clWdE-K2.mjs";
|
|
25
25
|
import { inlineFileIds, formatBytes, fileKind } from "./files-CjsPJSR6.mjs";
|
|
26
|
-
import { listFiles, fileUsage } from "./files-
|
|
26
|
+
import { listFiles, fileUsage } from "./files-SMLUpCPs.mjs";
|
|
27
27
|
import { l as labelOf } from "./relations-bmUKPT0G.mjs";
|
|
28
28
|
import "node:util";
|
|
29
29
|
import "node:fs";
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleox-agent-crm/agentcrm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The static CRM your AI agent can run: a Twenty / HubSpot-style CRM that runs entirely in the browser or headless through the agentcrm CLI, with data on storage you own.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentcrm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Skills to install AgentCRM (the static CRM your AI agent can run), manage its sites, run and customise the CRM (modules, appearance, extensions), drive sales workflows and build extension modules and themes.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "fleox"
|