@fairmint/captable-ai 0.1.30 → 0.1.31
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/index.js +23 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15728,13 +15728,18 @@ var draftOperationDependencyIssueSchema = external_exports.object({
|
|
|
15728
15728
|
expectedType: external_exports.string().describe("Expected OCF object category for the reference.")
|
|
15729
15729
|
});
|
|
15730
15730
|
var draftOperationPlanIssueSchema = external_exports.object({
|
|
15731
|
-
code: external_exports.enum(["NO_DRAFTS", "REVERT_LIMIT_EXCEEDED"]).describe("Plan-level validation code."),
|
|
15731
|
+
code: external_exports.enum(["NO_DRAFTS", "REVERT_LIMIT_EXCEEDED", "ISSUER_REQUIRED", "ISSUER_INCOMPLETE"]).describe("Plan-level validation code."),
|
|
15732
15732
|
message: external_exports.string().describe("Human-readable plan validation message.")
|
|
15733
15733
|
});
|
|
15734
15734
|
var draftOperationPreviewInputSchema = external_exports.object({
|
|
15735
15735
|
operation: draftOperationSchema.describe("Draft operation to preview."),
|
|
15736
15736
|
objectIds: external_exports.array(external_exports.string().trim().min(1, "objectIds must contain only non-empty strings.")).min(1, "objectIds must contain at least one ID when provided.").optional().describe("Optional draft OCF object IDs. Omit to preview all pending drafts.")
|
|
15737
15737
|
});
|
|
15738
|
+
var draftOperationEmailIssueSchema = external_exports.object({
|
|
15739
|
+
id: external_exports.string().describe("Stakeholder ID."),
|
|
15740
|
+
name: external_exports.string().nullable().describe("Stakeholder legal name, when known."),
|
|
15741
|
+
problem: external_exports.enum(["missing", "invalid"]).describe("No email address, or one that is not *@*.*.")
|
|
15742
|
+
});
|
|
15738
15743
|
var draftOperationPreviewSchema = external_exports.object({
|
|
15739
15744
|
operation: draftOperationSchema,
|
|
15740
15745
|
dependencyValid: external_exports.boolean().describe("True when object IDs are valid and dependency validation passes."),
|
|
@@ -15747,7 +15752,9 @@ var draftOperationPreviewSchema = external_exports.object({
|
|
|
15747
15752
|
missingDependencies: external_exports.array(draftOperationDependencyIssueSchema).describe("Remaining dependency blockers reported by backend preflight validation."),
|
|
15748
15753
|
planIssues: external_exports.array(draftOperationPlanIssueSchema).describe("Plan-level blockers."),
|
|
15749
15754
|
objects: external_exports.array(ocfObjectSchema).describe("Versioned draft objects in finalIds order."),
|
|
15750
|
-
draftCount: external_exports.number().int().nonnegative().describe("Total latest draft objects considered by this preview.")
|
|
15755
|
+
draftCount: external_exports.number().int().nonnegative().describe("Total latest draft objects considered by this preview."),
|
|
15756
|
+
emailIssues: external_exports.array(draftOperationEmailIssueSchema).optional().describe("Commit only: stakeholders whose email would make the commit refuse (or warn)."),
|
|
15757
|
+
emailOverride: external_exports.boolean().optional().describe("True when only missing emails remain and the caller is a super-admin.")
|
|
15751
15758
|
});
|
|
15752
15759
|
function normalizeDraftOperationObjectIds(objectIds) {
|
|
15753
15760
|
if (!objectIds)
|
|
@@ -19547,6 +19554,20 @@ function printPreviewWarnings(data) {
|
|
|
19547
19554
|
`${data.missingDependencies.length} dependency blocker(s) remain. Use --json for details.`
|
|
19548
19555
|
);
|
|
19549
19556
|
}
|
|
19557
|
+
const emailIssues = data.emailIssues ?? [];
|
|
19558
|
+
const kinds = [
|
|
19559
|
+
["missing", "missing an email address"],
|
|
19560
|
+
["invalid", "with an invalid email address"]
|
|
19561
|
+
];
|
|
19562
|
+
for (const [problem, text] of kinds) {
|
|
19563
|
+
const names = emailIssues.filter((issue2) => issue2.problem === problem).map((i) => i.name || i.id);
|
|
19564
|
+
if (names.length > 0) {
|
|
19565
|
+
const override = problem === "missing" && data.emailOverride === true;
|
|
19566
|
+
printWarning(
|
|
19567
|
+
`${names.length} stakeholder(s) ${text}: ${names.join(", ")}.${override ? " Super-admin override: a missing email will not block the commit." : ""}`
|
|
19568
|
+
);
|
|
19569
|
+
}
|
|
19570
|
+
}
|
|
19550
19571
|
}
|
|
19551
19572
|
function previewRows(data) {
|
|
19552
19573
|
const objectsById = new Map(data.objects.map((object2) => [object2.id, object2]));
|
package/package.json
CHANGED