@thecorporation/cli 26.3.48 → 26.3.50

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 CHANGED
@@ -571,7 +571,7 @@ import {
571
571
  isEntityScopedKind,
572
572
  extractId
573
573
  } from "@thecorporation/corp-tools";
574
- var NodeReferenceStorage, ReferenceResolver;
574
+ var NodeReferenceStorage, GLOBAL_KEY, ReferenceResolver;
575
575
  var init_references = __esm({
576
576
  "src/references.ts"() {
577
577
  "use strict";
@@ -590,39 +590,178 @@ var init_references = __esm({
590
590
  return getActiveEntityId(this.cfg);
591
591
  }
592
592
  };
593
+ GLOBAL_KEY = "__global__";
593
594
  ReferenceResolver = class {
594
595
  client;
595
596
  cfg;
596
597
  tracker;
597
- entityCache;
598
- contactsCache = /* @__PURE__ */ new Map();
599
- shareTransfersCache = /* @__PURE__ */ new Map();
600
- invoicesCache = /* @__PURE__ */ new Map();
601
- bankAccountsCache = /* @__PURE__ */ new Map();
602
- paymentsCache = /* @__PURE__ */ new Map();
603
- payrollRunsCache = /* @__PURE__ */ new Map();
604
- distributionsCache = /* @__PURE__ */ new Map();
605
- reconciliationsCache = /* @__PURE__ */ new Map();
606
- taxFilingsCache = /* @__PURE__ */ new Map();
607
- deadlinesCache = /* @__PURE__ */ new Map();
608
- classificationsCache = /* @__PURE__ */ new Map();
609
- bodiesCache = /* @__PURE__ */ new Map();
610
- meetingsCache = /* @__PURE__ */ new Map();
611
- seatsCache = /* @__PURE__ */ new Map();
612
- agendaCache = /* @__PURE__ */ new Map();
613
- resolutionsCache = /* @__PURE__ */ new Map();
614
- documentsCache = /* @__PURE__ */ new Map();
615
- workItemsCache = /* @__PURE__ */ new Map();
616
- valuationsCache = /* @__PURE__ */ new Map();
617
- safeNotesCache = /* @__PURE__ */ new Map();
618
- roundsCache = /* @__PURE__ */ new Map();
619
- serviceRequestsCache = /* @__PURE__ */ new Map();
598
+ // Single unified cache: ResourceKind → (cacheKey → records)
599
+ recordsCache = /* @__PURE__ */ new Map();
600
+ // Cap table is fetched as a single object; instruments/share_classes are
601
+ // derived from it, so we keep its own dedicated cache.
620
602
  capTableCache = /* @__PURE__ */ new Map();
621
- agentsCache;
603
+ // Dispatch table: ResourceKind → fetcher that receives the scope and
604
+ // returns the raw (uncached) records for that kind.
605
+ fetchers;
622
606
  constructor(client, cfg) {
623
607
  this.client = client;
624
608
  this.cfg = cfg;
625
609
  this.tracker = new ReferenceTracker(new NodeReferenceStorage(cfg));
610
+ this.fetchers = /* @__PURE__ */ new Map([
611
+ ["entity", async (_scope) => ({
612
+ key: GLOBAL_KEY,
613
+ records: await this.client.listEntities()
614
+ })],
615
+ ["agent", async (_scope) => ({
616
+ key: GLOBAL_KEY,
617
+ records: await this.client.listAgents()
618
+ })],
619
+ ["contact", async ({ entityId }) => {
620
+ if (!entityId) throw new Error("An entity context is required to resolve contacts.");
621
+ return { key: entityId, records: await this.client.listContacts(entityId) };
622
+ }],
623
+ ["share_transfer", async ({ entityId }) => {
624
+ if (!entityId) throw new Error("An entity context is required to resolve share transfers.");
625
+ return { key: entityId, records: await this.client.listShareTransfers(entityId) };
626
+ }],
627
+ ["invoice", async ({ entityId }) => {
628
+ if (!entityId) throw new Error("An entity context is required to resolve invoices.");
629
+ return { key: entityId, records: await this.client.listInvoices(entityId) };
630
+ }],
631
+ ["bank_account", async ({ entityId }) => {
632
+ if (!entityId) throw new Error("An entity context is required to resolve bank accounts.");
633
+ return { key: entityId, records: await this.client.listBankAccounts(entityId) };
634
+ }],
635
+ ["payment", async ({ entityId }) => {
636
+ if (!entityId) throw new Error("An entity context is required to resolve payments.");
637
+ return { key: entityId, records: await this.client.listPayments(entityId) };
638
+ }],
639
+ ["payroll_run", async ({ entityId }) => {
640
+ if (!entityId) throw new Error("An entity context is required to resolve payroll runs.");
641
+ return { key: entityId, records: await this.client.listPayrollRuns(entityId) };
642
+ }],
643
+ ["distribution", async ({ entityId }) => {
644
+ if (!entityId) throw new Error("An entity context is required to resolve distributions.");
645
+ return { key: entityId, records: await this.client.listDistributions(entityId) };
646
+ }],
647
+ ["reconciliation", async ({ entityId }) => {
648
+ if (!entityId) throw new Error("An entity context is required to resolve reconciliations.");
649
+ return { key: entityId, records: await this.client.listReconciliations(entityId) };
650
+ }],
651
+ ["tax_filing", async ({ entityId }) => {
652
+ if (!entityId) throw new Error("An entity context is required to resolve tax filings.");
653
+ return { key: entityId, records: await this.client.listTaxFilings(entityId) };
654
+ }],
655
+ ["deadline", async ({ entityId }) => {
656
+ if (!entityId) throw new Error("An entity context is required to resolve deadlines.");
657
+ return { key: entityId, records: await this.client.listDeadlines(entityId) };
658
+ }],
659
+ ["classification", async ({ entityId }) => {
660
+ if (!entityId) throw new Error("An entity context is required to resolve contractor classifications.");
661
+ return { key: entityId, records: await this.client.listContractorClassifications(entityId) };
662
+ }],
663
+ ["body", async ({ entityId }) => {
664
+ if (!entityId) throw new Error("An entity context is required to resolve governance bodies.");
665
+ return { key: entityId, records: await this.client.listGovernanceBodies(entityId) };
666
+ }],
667
+ ["meeting", async ({ entityId, bodyId }) => {
668
+ if (!entityId) throw new Error("An entity context is required to resolve meetings.");
669
+ const cacheKey = `${entityId}:${bodyId ?? "*"}`;
670
+ const meetings = [];
671
+ if (bodyId) {
672
+ meetings.push(...await this.client.listMeetings(bodyId, entityId));
673
+ } else {
674
+ const bodies = await this.getCachedRecords("body", { entityId });
675
+ for (const body of bodies) {
676
+ const resolvedBodyId = extractId(body, ["body_id", "id"]);
677
+ if (!resolvedBodyId) continue;
678
+ meetings.push(...await this.client.listMeetings(resolvedBodyId, entityId));
679
+ }
680
+ }
681
+ return { key: cacheKey, records: meetings };
682
+ }],
683
+ ["seat", async ({ entityId, bodyId }) => {
684
+ if (!entityId) throw new Error("An entity context is required to resolve seats.");
685
+ const cacheKey = `${entityId}:${bodyId ?? "*"}`;
686
+ const seats = [];
687
+ if (bodyId) {
688
+ seats.push(...await this.client.getGovernanceSeats(bodyId, entityId));
689
+ } else {
690
+ const bodies = await this.getCachedRecords("body", { entityId });
691
+ for (const body of bodies) {
692
+ const resolvedBodyId = extractId(body, ["body_id", "id"]);
693
+ if (!resolvedBodyId) continue;
694
+ seats.push(...await this.client.getGovernanceSeats(resolvedBodyId, entityId));
695
+ }
696
+ }
697
+ return { key: cacheKey, records: seats };
698
+ }],
699
+ ["agenda_item", async ({ entityId, meetingId }) => {
700
+ if (!entityId || !meetingId) {
701
+ throw new Error("Entity and meeting context are required to resolve agenda items.");
702
+ }
703
+ return {
704
+ key: `${entityId}:${meetingId}`,
705
+ records: await this.client.listAgendaItems(meetingId, entityId)
706
+ };
707
+ }],
708
+ ["resolution", async ({ entityId, meetingId }) => {
709
+ if (!entityId) throw new Error("An entity context is required to resolve resolutions.");
710
+ const cacheKey = `${entityId}:${meetingId ?? "*"}`;
711
+ const resolutions = [];
712
+ if (meetingId) {
713
+ resolutions.push(...await this.client.getMeetingResolutions(meetingId, entityId));
714
+ } else {
715
+ const meetings = await this.getCachedRecords("meeting", { entityId });
716
+ for (const meeting of meetings) {
717
+ const resolvedMeetingId = extractId(meeting, ["meeting_id", "id"]);
718
+ if (!resolvedMeetingId) continue;
719
+ resolutions.push(...await this.client.getMeetingResolutions(resolvedMeetingId, entityId));
720
+ }
721
+ }
722
+ return { key: cacheKey, records: resolutions };
723
+ }],
724
+ ["document", async ({ entityId }) => {
725
+ if (!entityId) throw new Error("An entity context is required to resolve documents.");
726
+ return { key: entityId, records: await this.client.getEntityDocuments(entityId) };
727
+ }],
728
+ ["work_item", async ({ entityId }) => {
729
+ if (!entityId) throw new Error("An entity context is required to resolve work items.");
730
+ return { key: entityId, records: await this.client.listWorkItems(entityId) };
731
+ }],
732
+ ["valuation", async ({ entityId }) => {
733
+ if (!entityId) throw new Error("An entity context is required to resolve valuations.");
734
+ return { key: entityId, records: await this.client.getValuations(entityId) };
735
+ }],
736
+ ["safe_note", async ({ entityId }) => {
737
+ if (!entityId) throw new Error("An entity context is required to resolve SAFE notes.");
738
+ return { key: entityId, records: await this.client.getSafeNotes(entityId) };
739
+ }],
740
+ ["instrument", async ({ entityId }) => {
741
+ if (!entityId) throw new Error("An entity context is required to resolve cap table resources.");
742
+ const capTable = await this.getCapTable(entityId);
743
+ return {
744
+ key: entityId,
745
+ records: Array.isArray(capTable.instruments) ? capTable.instruments : []
746
+ };
747
+ }],
748
+ ["share_class", async ({ entityId }) => {
749
+ if (!entityId) throw new Error("An entity context is required to resolve cap table resources.");
750
+ const capTable = await this.getCapTable(entityId);
751
+ return {
752
+ key: entityId,
753
+ records: Array.isArray(capTable.share_classes) ? capTable.share_classes : []
754
+ };
755
+ }],
756
+ ["round", async ({ entityId }) => {
757
+ if (!entityId) throw new Error("An entity context is required to resolve rounds.");
758
+ return { key: entityId, records: await this.client.listEquityRounds(entityId) };
759
+ }],
760
+ ["service_request", async ({ entityId }) => {
761
+ if (!entityId) throw new Error("An entity context is required to resolve service requests.");
762
+ return { key: entityId, records: await this.client.listServiceRequests(entityId) };
763
+ }]
764
+ ]);
626
765
  }
627
766
  /**
628
767
  * Public generic resolver for any resource kind.
@@ -846,64 +985,63 @@ var init_references = __esm({
846
985
  return `Ambiguous ${kindLabel(kind)} reference "${ref}". Matches: ${previews}. Try: corp find ${kind} ${JSON.stringify(ref)}`;
847
986
  }
848
987
  async listRecords(kind, scope) {
849
- const records = await (async () => {
850
- switch (kind) {
851
- case "entity":
852
- return this.listEntities();
853
- case "contact":
854
- return this.listContacts(scope.entityId);
855
- case "share_transfer":
856
- return this.listShareTransfers(scope.entityId);
857
- case "invoice":
858
- return this.listInvoices(scope.entityId);
859
- case "bank_account":
860
- return this.listBankAccounts(scope.entityId);
861
- case "payment":
862
- return this.listPayments(scope.entityId);
863
- case "payroll_run":
864
- return this.listPayrollRuns(scope.entityId);
865
- case "distribution":
866
- return this.listDistributions(scope.entityId);
867
- case "reconciliation":
868
- return this.listReconciliations(scope.entityId);
869
- case "tax_filing":
870
- return this.listTaxFilings(scope.entityId);
871
- case "deadline":
872
- return this.listDeadlines(scope.entityId);
873
- case "classification":
874
- return this.listClassifications(scope.entityId);
875
- case "body":
876
- return this.listBodies(scope.entityId);
877
- case "meeting":
878
- return this.listMeetings(scope.entityId, scope.bodyId);
879
- case "seat":
880
- return this.listSeats(scope.entityId, scope.bodyId);
881
- case "agenda_item":
882
- return this.listAgendaItems(scope.entityId, scope.meetingId);
883
- case "resolution":
884
- return this.listResolutions(scope.entityId, scope.meetingId);
885
- case "document":
886
- return this.listDocuments(scope.entityId);
887
- case "work_item":
888
- return this.listWorkItems(scope.entityId);
889
- case "agent":
890
- return this.listAgents();
891
- case "valuation":
892
- return this.listValuations(scope.entityId);
893
- case "safe_note":
894
- return this.listSafeNotes(scope.entityId);
895
- case "instrument":
896
- return this.listInstruments(scope.entityId);
897
- case "share_class":
898
- return this.listShareClasses(scope.entityId);
899
- case "round":
900
- return this.listRounds(scope.entityId);
901
- case "service_request":
902
- return this.listServiceRequestRecords(scope.entityId);
903
- }
904
- })();
988
+ const records = await this.getCachedRecords(kind, scope);
905
989
  return this.attachStableHandles(kind, records, scope.entityId);
906
990
  }
991
+ /**
992
+ * Returns the cached records for a given kind and scope, invoking the
993
+ * fetcher on a cache miss. Does NOT attach stable handles — use
994
+ * `listRecords` for that.
995
+ */
996
+ async getCachedRecords(kind, scope) {
997
+ const fetcher = this.fetchers.get(kind);
998
+ if (!fetcher) {
999
+ throw new Error(`No fetcher registered for resource kind "${kind}".`);
1000
+ }
1001
+ let kindCache = this.recordsCache.get(kind);
1002
+ if (!kindCache) {
1003
+ kindCache = /* @__PURE__ */ new Map();
1004
+ this.recordsCache.set(kind, kindCache);
1005
+ }
1006
+ const probeKey = this.probeKey(kind, scope);
1007
+ if (probeKey !== void 0) {
1008
+ const hit2 = kindCache.get(probeKey);
1009
+ if (hit2) return hit2;
1010
+ const { key: key2, records: records2 } = await fetcher(scope);
1011
+ kindCache.set(key2, records2);
1012
+ return records2;
1013
+ }
1014
+ const { key, records } = await fetcher(scope);
1015
+ const hit = kindCache.get(key);
1016
+ if (hit) return hit;
1017
+ kindCache.set(key, records);
1018
+ return records;
1019
+ }
1020
+ /**
1021
+ * Returns the expected cache key for a given kind and scope without
1022
+ * invoking the fetcher. Returns `undefined` if the key cannot be
1023
+ * determined without fetching (e.g., composite-key kinds that need to
1024
+ * enumerate sub-resources first).
1025
+ */
1026
+ probeKey(kind, scope) {
1027
+ switch (kind) {
1028
+ case "entity":
1029
+ case "agent":
1030
+ return GLOBAL_KEY;
1031
+ case "meeting":
1032
+ case "seat":
1033
+ if (!scope.entityId) return GLOBAL_KEY;
1034
+ return `${scope.entityId}:${scope.bodyId ?? "*"}`;
1035
+ case "agenda_item":
1036
+ if (!scope.entityId || !scope.meetingId) return GLOBAL_KEY;
1037
+ return `${scope.entityId}:${scope.meetingId}`;
1038
+ case "resolution":
1039
+ if (!scope.entityId) return GLOBAL_KEY;
1040
+ return `${scope.entityId}:${scope.meetingId ?? "*"}`;
1041
+ default:
1042
+ return scope.entityId ?? GLOBAL_KEY;
1043
+ }
1044
+ }
907
1045
  async attachStableHandles(kind, records, entityId) {
908
1046
  const missing = records.map((record) => ({ record, described: describeReferenceRecord2(kind, record) })).filter(
909
1047
  (entry) => entry.described !== null && !(typeof entry.record.handle === "string" && entry.record.handle.trim().length > 0)
@@ -938,221 +1076,6 @@ var init_references = __esm({
938
1076
  }
939
1077
  return records;
940
1078
  }
941
- async listEntities() {
942
- if (!this.entityCache) {
943
- this.entityCache = await this.client.listEntities();
944
- }
945
- return this.entityCache;
946
- }
947
- async listContacts(entityId) {
948
- if (!entityId) throw new Error("An entity context is required to resolve contacts.");
949
- const cached = this.contactsCache.get(entityId);
950
- if (cached) return cached;
951
- const contacts = await this.client.listContacts(entityId);
952
- this.contactsCache.set(entityId, contacts);
953
- return contacts;
954
- }
955
- async listShareTransfers(entityId) {
956
- if (!entityId) throw new Error("An entity context is required to resolve share transfers.");
957
- const cached = this.shareTransfersCache.get(entityId);
958
- if (cached) return cached;
959
- const transfers = await this.client.listShareTransfers(entityId);
960
- this.shareTransfersCache.set(entityId, transfers);
961
- return transfers;
962
- }
963
- async listInvoices(entityId) {
964
- if (!entityId) throw new Error("An entity context is required to resolve invoices.");
965
- const cached = this.invoicesCache.get(entityId);
966
- if (cached) return cached;
967
- const invoices = await this.client.listInvoices(entityId);
968
- this.invoicesCache.set(entityId, invoices);
969
- return invoices;
970
- }
971
- async listBankAccounts(entityId) {
972
- if (!entityId) throw new Error("An entity context is required to resolve bank accounts.");
973
- const cached = this.bankAccountsCache.get(entityId);
974
- if (cached) return cached;
975
- const bankAccounts = await this.client.listBankAccounts(entityId);
976
- this.bankAccountsCache.set(entityId, bankAccounts);
977
- return bankAccounts;
978
- }
979
- async listPayments(entityId) {
980
- if (!entityId) throw new Error("An entity context is required to resolve payments.");
981
- const cached = this.paymentsCache.get(entityId);
982
- if (cached) return cached;
983
- const payments = await this.client.listPayments(entityId);
984
- this.paymentsCache.set(entityId, payments);
985
- return payments;
986
- }
987
- async listPayrollRuns(entityId) {
988
- if (!entityId) throw new Error("An entity context is required to resolve payroll runs.");
989
- const cached = this.payrollRunsCache.get(entityId);
990
- if (cached) return cached;
991
- const payrollRuns = await this.client.listPayrollRuns(entityId);
992
- this.payrollRunsCache.set(entityId, payrollRuns);
993
- return payrollRuns;
994
- }
995
- async listDistributions(entityId) {
996
- if (!entityId) throw new Error("An entity context is required to resolve distributions.");
997
- const cached = this.distributionsCache.get(entityId);
998
- if (cached) return cached;
999
- const distributions = await this.client.listDistributions(entityId);
1000
- this.distributionsCache.set(entityId, distributions);
1001
- return distributions;
1002
- }
1003
- async listReconciliations(entityId) {
1004
- if (!entityId) throw new Error("An entity context is required to resolve reconciliations.");
1005
- const cached = this.reconciliationsCache.get(entityId);
1006
- if (cached) return cached;
1007
- const reconciliations = await this.client.listReconciliations(entityId);
1008
- this.reconciliationsCache.set(entityId, reconciliations);
1009
- return reconciliations;
1010
- }
1011
- async listTaxFilings(entityId) {
1012
- if (!entityId) throw new Error("An entity context is required to resolve tax filings.");
1013
- const cached = this.taxFilingsCache.get(entityId);
1014
- if (cached) return cached;
1015
- const filings = await this.client.listTaxFilings(entityId);
1016
- this.taxFilingsCache.set(entityId, filings);
1017
- return filings;
1018
- }
1019
- async listDeadlines(entityId) {
1020
- if (!entityId) throw new Error("An entity context is required to resolve deadlines.");
1021
- const cached = this.deadlinesCache.get(entityId);
1022
- if (cached) return cached;
1023
- const deadlines = await this.client.listDeadlines(entityId);
1024
- this.deadlinesCache.set(entityId, deadlines);
1025
- return deadlines;
1026
- }
1027
- async listClassifications(entityId) {
1028
- if (!entityId) throw new Error("An entity context is required to resolve contractor classifications.");
1029
- const cached = this.classificationsCache.get(entityId);
1030
- if (cached) return cached;
1031
- const classifications = await this.client.listContractorClassifications(entityId);
1032
- this.classificationsCache.set(entityId, classifications);
1033
- return classifications;
1034
- }
1035
- async listBodies(entityId) {
1036
- if (!entityId) throw new Error("An entity context is required to resolve governance bodies.");
1037
- const cached = this.bodiesCache.get(entityId);
1038
- if (cached) return cached;
1039
- const bodies = await this.client.listGovernanceBodies(entityId);
1040
- this.bodiesCache.set(entityId, bodies);
1041
- return bodies;
1042
- }
1043
- async listMeetings(entityId, bodyId) {
1044
- if (!entityId) throw new Error("An entity context is required to resolve meetings.");
1045
- const cacheKey = `${entityId}:${bodyId ?? "*"}`;
1046
- const cached = this.meetingsCache.get(cacheKey);
1047
- if (cached) return cached;
1048
- const meetings = [];
1049
- if (bodyId) {
1050
- meetings.push(...await this.client.listMeetings(bodyId, entityId));
1051
- } else {
1052
- const bodies = await this.listBodies(entityId);
1053
- for (const body of bodies) {
1054
- const resolvedBodyId = extractId(body, ["body_id", "id"]);
1055
- if (!resolvedBodyId) continue;
1056
- meetings.push(...await this.client.listMeetings(resolvedBodyId, entityId));
1057
- }
1058
- }
1059
- this.meetingsCache.set(cacheKey, meetings);
1060
- return meetings;
1061
- }
1062
- async listSeats(entityId, bodyId) {
1063
- if (!entityId) throw new Error("An entity context is required to resolve seats.");
1064
- const cacheKey = `${entityId}:${bodyId ?? "*"}`;
1065
- const cached = this.seatsCache.get(cacheKey);
1066
- if (cached) return cached;
1067
- const seats = [];
1068
- if (bodyId) {
1069
- seats.push(...await this.client.getGovernanceSeats(bodyId, entityId));
1070
- } else {
1071
- const bodies = await this.listBodies(entityId);
1072
- for (const body of bodies) {
1073
- const resolvedBodyId = extractId(body, ["body_id", "id"]);
1074
- if (!resolvedBodyId) continue;
1075
- seats.push(...await this.client.getGovernanceSeats(resolvedBodyId, entityId));
1076
- }
1077
- }
1078
- this.seatsCache.set(cacheKey, seats);
1079
- return seats;
1080
- }
1081
- async listAgendaItems(entityId, meetingId) {
1082
- if (!entityId || !meetingId) {
1083
- throw new Error("Entity and meeting context are required to resolve agenda items.");
1084
- }
1085
- const cached = this.agendaCache.get(`${entityId}:${meetingId}`);
1086
- if (cached) return cached;
1087
- const items = await this.client.listAgendaItems(meetingId, entityId);
1088
- this.agendaCache.set(`${entityId}:${meetingId}`, items);
1089
- return items;
1090
- }
1091
- async listResolutions(entityId, meetingId) {
1092
- if (!entityId) throw new Error("An entity context is required to resolve resolutions.");
1093
- const cacheKey = `${entityId}:${meetingId ?? "*"}`;
1094
- const cached = this.resolutionsCache.get(cacheKey);
1095
- if (cached) return cached;
1096
- const resolutions = [];
1097
- if (meetingId) {
1098
- resolutions.push(...await this.client.getMeetingResolutions(meetingId, entityId));
1099
- } else {
1100
- const meetings = await this.listMeetings(entityId);
1101
- for (const meeting of meetings) {
1102
- const resolvedMeetingId = extractId(meeting, ["meeting_id", "id"]);
1103
- if (!resolvedMeetingId) continue;
1104
- resolutions.push(...await this.client.getMeetingResolutions(resolvedMeetingId, entityId));
1105
- }
1106
- }
1107
- this.resolutionsCache.set(cacheKey, resolutions);
1108
- return resolutions;
1109
- }
1110
- async listDocuments(entityId) {
1111
- if (!entityId) throw new Error("An entity context is required to resolve documents.");
1112
- const cached = this.documentsCache.get(entityId);
1113
- if (cached) return cached;
1114
- const docs = await this.client.getEntityDocuments(entityId);
1115
- this.documentsCache.set(entityId, docs);
1116
- return docs;
1117
- }
1118
- async listWorkItems(entityId) {
1119
- if (!entityId) throw new Error("An entity context is required to resolve work items.");
1120
- const cached = this.workItemsCache.get(entityId);
1121
- if (cached) return cached;
1122
- const items = await this.client.listWorkItems(entityId);
1123
- this.workItemsCache.set(entityId, items);
1124
- return items;
1125
- }
1126
- async listAgents() {
1127
- if (!this.agentsCache) {
1128
- this.agentsCache = await this.client.listAgents();
1129
- }
1130
- return this.agentsCache;
1131
- }
1132
- async listValuations(entityId) {
1133
- if (!entityId) throw new Error("An entity context is required to resolve valuations.");
1134
- const cached = this.valuationsCache.get(entityId);
1135
- if (cached) return cached;
1136
- const valuations = await this.client.getValuations(entityId);
1137
- this.valuationsCache.set(entityId, valuations);
1138
- return valuations;
1139
- }
1140
- async listSafeNotes(entityId) {
1141
- if (!entityId) throw new Error("An entity context is required to resolve SAFE notes.");
1142
- const cached = this.safeNotesCache.get(entityId);
1143
- if (cached) return cached;
1144
- const safeNotes = await this.client.getSafeNotes(entityId);
1145
- this.safeNotesCache.set(entityId, safeNotes);
1146
- return safeNotes;
1147
- }
1148
- async listRounds(entityId) {
1149
- if (!entityId) throw new Error("An entity context is required to resolve rounds.");
1150
- const cached = this.roundsCache.get(entityId);
1151
- if (cached) return cached;
1152
- const rounds = await this.client.listEquityRounds(entityId);
1153
- this.roundsCache.set(entityId, rounds);
1154
- return rounds;
1155
- }
1156
1079
  async getCapTable(entityId) {
1157
1080
  if (!entityId) throw new Error("An entity context is required to resolve cap table resources.");
1158
1081
  const cached = this.capTableCache.get(entityId);
@@ -1161,22 +1084,6 @@ var init_references = __esm({
1161
1084
  this.capTableCache.set(entityId, capTable);
1162
1085
  return capTable;
1163
1086
  }
1164
- async listInstruments(entityId) {
1165
- const capTable = await this.getCapTable(entityId);
1166
- return Array.isArray(capTable.instruments) ? capTable.instruments : [];
1167
- }
1168
- async listShareClasses(entityId) {
1169
- const capTable = await this.getCapTable(entityId);
1170
- return Array.isArray(capTable.share_classes) ? capTable.share_classes : [];
1171
- }
1172
- async listServiceRequestRecords(entityId) {
1173
- if (!entityId) throw new Error("An entity context is required to resolve service requests.");
1174
- const cached = this.serviceRequestsCache.get(entityId);
1175
- if (cached) return cached;
1176
- const requests = await this.client.listServiceRequests(entityId);
1177
- this.serviceRequestsCache.set(entityId, requests);
1178
- return requests;
1179
- }
1180
1087
  };
1181
1088
  }
1182
1089
  });
@@ -2279,7 +2186,7 @@ var init_workspace = __esm({
2279
2186
  throw new Error(`Failed to resolve entity: ${err}`);
2280
2187
  }
2281
2188
  },
2282
- examples: ["corp use", "corp use --json"]
2189
+ examples: ["corp use acme", "corp use ent_abc123"]
2283
2190
  },
2284
2191
  // --- next ---
2285
2192
  {
@@ -2376,7 +2283,7 @@ var init_workspace = __esm({
2376
2283
  // --- obligations (pure read) ---
2377
2284
  {
2378
2285
  name: "obligations",
2379
- description: "List obligations with urgency tiers",
2286
+ description: "List compliance obligations with urgency tiers",
2380
2287
  route: { method: "GET", path: "/v1/obligations/summary" },
2381
2288
  display: {
2382
2289
  title: "Obligations",
@@ -2390,13 +2297,13 @@ var init_workspace = __esm({
2390
2297
  ]
2391
2298
  },
2392
2299
  optQP: ["tier"],
2393
- options: [{ flags: "--tier <tier>", description: "Filter by urgency tier" }],
2394
- examples: ["corp obligations"]
2300
+ options: [{ flags: "--tier <tier>", description: "Filter by urgency tier", choices: ["critical", "high", "medium", "low"] }],
2301
+ examples: ["corp obligations", "corp obligations --tier critical --json"]
2395
2302
  },
2396
2303
  // --- digest ---
2397
2304
  {
2398
2305
  name: "digest",
2399
- description: "View or trigger daily digests",
2306
+ description: "View digest history or trigger a new digest",
2400
2307
  route: { method: "GET", path: "/v1/digests" },
2401
2308
  display: { title: "Digests" },
2402
2309
  options: [
@@ -2413,15 +2320,23 @@ var init_workspace = __esm({
2413
2320
  const value = result.message;
2414
2321
  return typeof value === "string" && value.trim() ? value : null;
2415
2322
  })();
2416
- if (!opts.json) {
2417
- ctx.writer.success(result.digest_count > 0 ? "Digest triggered." : "Digest trigger accepted.");
2323
+ if (opts.json) {
2324
+ ctx.writer.json(result);
2325
+ return;
2418
2326
  }
2419
- if (message && !opts.json) {
2327
+ ctx.writer.success(result.digest_count > 0 ? "Digest triggered." : "Digest trigger accepted.");
2328
+ if (message) {
2420
2329
  ctx.writer.warning(message);
2421
2330
  }
2422
- ctx.writer.json(result);
2331
+ if (result.digest_count != null) {
2332
+ ctx.writer.writeln(` Digest count: ${result.digest_count}`);
2333
+ }
2423
2334
  } else if (opts.key) {
2424
2335
  const result = await ctx.client.getDigest(opts.key);
2336
+ if (opts.json) {
2337
+ ctx.writer.json(result);
2338
+ return;
2339
+ }
2425
2340
  ctx.writer.json(result);
2426
2341
  } else {
2427
2342
  const digests = await ctx.client.listDigests();
@@ -2432,6 +2347,10 @@ var init_workspace = __esm({
2432
2347
  ctx.writer.writeln("No digest history found.");
2433
2348
  }
2434
2349
  } else {
2350
+ if (opts.json) {
2351
+ ctx.writer.json(digests);
2352
+ return;
2353
+ }
2435
2354
  ctx.writer.json(digests);
2436
2355
  }
2437
2356
  }
@@ -2439,7 +2358,7 @@ var init_workspace = __esm({
2439
2358
  throw new Error(`Failed: ${err}`);
2440
2359
  }
2441
2360
  },
2442
- examples: ["corp digest"]
2361
+ examples: ["corp digest", "corp digest --trigger", "corp digest --key daily_2026-03-22 --json"]
2443
2362
  },
2444
2363
  // --- billing ---
2445
2364
  {
@@ -2511,7 +2430,7 @@ var init_workspace = __esm({
2511
2430
  throw new Error(`Failed to create checkout session: ${err}`);
2512
2431
  }
2513
2432
  },
2514
- examples: ["corp billing upgrade"]
2433
+ examples: ["corp billing upgrade", "corp billing upgrade --plan pro", "corp billing upgrade --plan enterprise --json"]
2515
2434
  },
2516
2435
  // ── Auto-generated from OpenAPI ──────────────────────────────
2517
2436
  {
@@ -2767,10 +2686,10 @@ var init_entities = __esm({
2767
2686
  },
2768
2687
  {
2769
2688
  name: "entities show",
2770
- description: "Show entity detail",
2771
- args: [{ name: "entity-ref", required: true }],
2689
+ description: "Show detail for a specific entity",
2690
+ args: [{ name: "entity-ref", required: true, description: "Entity name, short ID, or reference" }],
2772
2691
  handler: entitiesShowHandler,
2773
- examples: ["corp entities show"]
2692
+ examples: ["corp entities show acme", "corp entities show ent_abc123 --json"]
2774
2693
  },
2775
2694
  {
2776
2695
  name: "entities convert",
@@ -2778,11 +2697,11 @@ var init_entities = __esm({
2778
2697
  route: { method: "POST", path: "/v1/entities/{pos}/convert" },
2779
2698
  args: [{ name: "entity-ref", required: true }],
2780
2699
  options: [
2781
- { flags: "--to <type>", description: "Target entity type (llc, c_corp)", required: true },
2782
- { flags: "--jurisdiction <jurisdiction>", description: "New jurisdiction" }
2700
+ { flags: "--to <type>", description: "Target entity type", required: true, choices: ["llc", "c_corp"] },
2701
+ { flags: "--jurisdiction <jurisdiction>", description: "New jurisdiction (e.g. DE, CA)" }
2783
2702
  ],
2784
2703
  handler: entitiesConvertHandler,
2785
- examples: ["corp entities convert <entity-ref> --to 'type'", "corp entities convert --json"]
2704
+ examples: ["corp entities convert acme --to c_corp", "corp entities convert ent_abc123 --to llc --jurisdiction DE --json"]
2786
2705
  },
2787
2706
  {
2788
2707
  name: "entities dissolve",
@@ -2795,7 +2714,10 @@ var init_entities = __esm({
2795
2714
  { flags: "--yes -y", description: "Skip confirmation prompt" }
2796
2715
  ],
2797
2716
  handler: entitiesDissolveHandler,
2798
- examples: ["corp entities dissolve <entity-ref> --reason 'reason'", "corp entities dissolve --json"]
2717
+ examples: [
2718
+ "corp entities dissolve acme --reason 'Business wind-down'",
2719
+ "corp entities dissolve ent_abc123 --reason 'Voluntary dissolution' --effective-date 2026-06-01 --yes"
2720
+ ]
2799
2721
  },
2800
2722
  // ── contacts ──
2801
2723
  {
@@ -2818,7 +2740,7 @@ var init_entities = __esm({
2818
2740
  display: { title: "Contact Profile" },
2819
2741
  args: [{ name: "contact-ref", required: true }],
2820
2742
  handler: contactsShowHandler,
2821
- examples: ["corp contacts show", "corp contacts show --json"]
2743
+ examples: ["corp contacts show alice", "corp contacts show con_abc123 --json"]
2822
2744
  },
2823
2745
  {
2824
2746
  name: "contacts add",
@@ -2828,9 +2750,9 @@ var init_entities = __esm({
2828
2750
  options: [
2829
2751
  { flags: "--name <name>", description: "Contact name", required: true },
2830
2752
  { flags: "--email <email>", description: "Contact email", required: true },
2831
- { flags: "--type <type>", description: "Contact type (individual, organization)", default: "individual" },
2832
- { flags: "--category <category>", description: "Category (employee, contractor, board_member, investor, law_firm, valuation_firm, accounting_firm, officer, founder, member, other)" },
2833
- { flags: "--cap-table-access <level>", description: "Cap table access (none, summary, detailed)" },
2753
+ { flags: "--type <type>", description: "Contact type", default: "individual", choices: ["individual", "organization"] },
2754
+ { flags: "--category <category>", description: "Contact role category", choices: ["employee", "contractor", "board_member", "investor", "law_firm", "valuation_firm", "accounting_firm", "officer", "founder", "member", "other"] },
2755
+ { flags: "--cap-table-access <level>", description: "Cap table visibility level", choices: ["none", "summary", "detailed"] },
2834
2756
  { flags: "--address <address>", description: "Mailing address" },
2835
2757
  { flags: "--mailing-address <address>", description: "Alias for --address" },
2836
2758
  { flags: "--phone <phone>", description: "Phone number" },
@@ -2839,7 +2761,10 @@ var init_entities = __esm({
2839
2761
  handler: contactsAddHandler,
2840
2762
  produces: { kind: "contact" },
2841
2763
  successTemplate: "Contact created: {name}",
2842
- examples: ["corp contacts add --name 'name' --email 'email'", "corp contacts add --json"]
2764
+ examples: [
2765
+ "corp contacts add --name 'Alice Smith' --email alice@example.com --category founder",
2766
+ "corp contacts add --name 'Bob Jones' --email bob@example.com --category employee --type individual --json"
2767
+ ]
2843
2768
  },
2844
2769
  {
2845
2770
  name: "contacts edit",
@@ -2850,15 +2775,18 @@ var init_entities = __esm({
2850
2775
  options: [
2851
2776
  { flags: "--name <name>", description: "Contact name" },
2852
2777
  { flags: "--email <email>", description: "Contact email" },
2853
- { flags: "--category <category>", description: "Contact category" },
2854
- { flags: "--cap-table-access <level>", description: "Cap table access (none, summary, detailed)" },
2778
+ { flags: "--category <category>", description: "Contact role category", choices: ["employee", "contractor", "board_member", "investor", "law_firm", "valuation_firm", "accounting_firm", "officer", "founder", "member", "other"] },
2779
+ { flags: "--cap-table-access <level>", description: "Cap table visibility level", choices: ["none", "summary", "detailed"] },
2855
2780
  { flags: "--address <address>", description: "Mailing address" },
2856
2781
  { flags: "--mailing-address <address>", description: "Alias for --address" },
2857
2782
  { flags: "--phone <phone>", description: "Phone number" },
2858
2783
  { flags: "--notes <notes>", description: "Additional notes" }
2859
2784
  ],
2860
2785
  handler: contactsEditHandler,
2861
- examples: ["corp contacts edit <contact-ref>", "corp contacts edit --json"]
2786
+ examples: [
2787
+ "corp contacts edit alice --email newemail@example.com",
2788
+ "corp contacts edit con_abc123 --category board_member --cap-table-access detailed --json"
2789
+ ]
2862
2790
  },
2863
2791
  // ── Auto-generated from OpenAPI ──────────────────────────────
2864
2792
  {
@@ -2866,21 +2794,24 @@ var init_entities = __esm({
2866
2794
  description: "View notification preferences for a contact",
2867
2795
  route: { method: "GET", path: "/v1/contacts/{pos}/notification-prefs" },
2868
2796
  args: [{ name: "contact-id", required: true, description: "Contact ID", posKind: "contact" }],
2869
- display: { title: "Contacts Notification Prefs", cols: ["#contact_id>ID", "email_enabled>Email Enabled", "sms_enabled>Sms Enabled", "@updated_at>Updated At", "webhook_enabled>Webhook Enabled"] },
2870
- examples: ["corp contacts notification-prefs"]
2797
+ display: { title: "Contact Notification Preferences", cols: ["#contact_id>Contact ID", "email_enabled>Email", "sms_enabled>SMS", "webhook_enabled>Webhook", "@updated_at>Updated"] },
2798
+ examples: ["corp contacts notification-prefs con_abc123", "corp contacts notification-prefs con_abc123 --json"]
2871
2799
  },
2872
2800
  {
2873
2801
  name: "contacts update-notification-prefs",
2874
- description: "View notification preferences for a contact",
2802
+ description: "Update notification preferences for a contact",
2875
2803
  route: { method: "PATCH", path: "/v1/contacts/{pos}/notification-prefs" },
2876
2804
  args: [{ name: "contact-id", required: true, description: "Contact ID", posKind: "contact" }],
2877
2805
  options: [
2878
- { flags: "--email-enabled <email-enabled>", description: "Email Enabled" },
2879
- { flags: "--sms-enabled <sms-enabled>", description: "Sms Enabled" },
2880
- { flags: "--webhook-enabled <webhook-enabled>", description: "Webhook Enabled" }
2806
+ { flags: "--email-enabled <email-enabled>", description: "Enable email notifications (true/false)" },
2807
+ { flags: "--sms-enabled <sms-enabled>", description: "Enable SMS notifications (true/false)" },
2808
+ { flags: "--webhook-enabled <webhook-enabled>", description: "Enable webhook notifications (true/false)" }
2809
+ ],
2810
+ examples: [
2811
+ "corp contacts update-notification-prefs con_abc123 --email-enabled true",
2812
+ "corp contacts update-notification-prefs con_abc123 --sms-enabled false --webhook-enabled true --json"
2881
2813
  ],
2882
- examples: ["corp contacts update-notification-prefs <contact-id>", "corp contacts update-notification-prefs --json"],
2883
- successTemplate: "Notification Prefs updated"
2814
+ successTemplate: "Notification preferences updated"
2884
2815
  }
2885
2816
  ];
2886
2817
  }
@@ -4268,8 +4199,8 @@ var init_formation = __esm({
4268
4199
  produces: { kind: "entity", trackEntity: true },
4269
4200
  successTemplate: "Pending entity created: {legal_name}",
4270
4201
  examples: [
4271
- 'corp form create --type c_corp --name "Acme Inc" --jurisdiction US-DE --address "123 Main,City,ST,12345"',
4272
- 'corp form create --type llc --name "My LLC" --jurisdiction US-WY --principal-name "Carlos"'
4202
+ 'corp form create --type c_corp --name "Acme Inc" --jurisdiction US-DE --address "123 Main St,Wilmington,DE,19801"',
4203
+ 'corp form create --type llc --name "My LLC" --jurisdiction US-WY'
4273
4204
  ]
4274
4205
  },
4275
4206
  {
@@ -4343,16 +4274,19 @@ var init_formation = __esm({
4343
4274
  // ── Auto-generated from OpenAPI ──────────────────────────────
4344
4275
  {
4345
4276
  name: "contracts",
4346
- description: "Generate a contract document",
4277
+ description: "Create a contract document for the active entity",
4347
4278
  route: { method: "POST", path: "/v1/contracts" },
4348
4279
  options: [
4349
- { flags: "--counterparty-name <counterparty-name>", description: "Counterparty Name", required: true },
4350
- { flags: "--effective-date <effective-date>", description: "Effective Date", required: true },
4351
- { flags: "--parameters <parameters>", description: "Parameters" },
4352
- { flags: "--template-type <template-type>", description: "Template type for generated contracts.", required: true, choices: ["consulting_agreement", "employment_offer", "contractor_agreement", "nda", "safe_agreement", "custom"] }
4280
+ { flags: "--counterparty-name <counterparty-name>", description: "Full legal name of the counterparty", required: true },
4281
+ { flags: "--effective-date <effective-date>", description: "Contract effective date (YYYY-MM-DD)", required: true },
4282
+ { flags: "--parameters <parameters>", description: "Additional contract parameters as a JSON object" },
4283
+ { flags: "--template-type <template-type>", description: "Contract template to use", required: true, choices: ["consulting_agreement", "employment_offer", "contractor_agreement", "nda", "safe_agreement", "custom"] }
4284
+ ],
4285
+ examples: [
4286
+ 'corp contracts --template-type consulting_agreement --counterparty-name "Acme Consulting LLC" --effective-date 2026-04-01',
4287
+ 'corp contracts --template-type nda --counterparty-name "Partner Corp" --effective-date 2026-04-01 --json'
4353
4288
  ],
4354
- examples: ["corp contracts --counterparty-name 'counterparty-name' --effective-date 'effective-date' --template-type consulting_agreement", "corp contracts --json"],
4355
- successTemplate: "Contracts created"
4289
+ successTemplate: "Contract created: {contract_id}"
4356
4290
  },
4357
4291
  {
4358
4292
  name: "documents show",
@@ -4361,7 +4295,7 @@ var init_formation = __esm({
4361
4295
  entity: true,
4362
4296
  args: [{ name: "document-id", required: true, description: "Document ID", posKind: "document" }],
4363
4297
  display: { title: "Document", cols: ["document_type>Type", "status>Status", "title>Title", "signature_count>Signatures", "@created_at>Created", "#document_id>ID"] },
4364
- examples: ["corp documents show <document-id>", "corp documents show <document-id> --json"]
4298
+ examples: ["corp documents show @last", "corp documents show doc-abc123 --json"]
4365
4299
  },
4366
4300
  {
4367
4301
  name: "documents amendment-history",
@@ -4370,26 +4304,29 @@ var init_formation = __esm({
4370
4304
  entity: true,
4371
4305
  args: [{ name: "document-id", required: true, description: "Document ID", posKind: "document" }],
4372
4306
  display: { title: "Documents Amendment History", cols: ["amended_at>Amended At", "description>Description", "version>Version"] },
4373
- examples: ["corp documents amendment-history", "corp documents amendment-history --json"]
4307
+ examples: ["corp documents amendment-history @last", "corp documents amendment-history doc-abc123 --json"]
4374
4308
  },
4375
4309
  {
4376
4310
  name: "documents pdf",
4377
4311
  description: "Download a document as PDF",
4378
4312
  route: { method: "GET", path: "/v1/documents/{pos}/pdf" },
4379
4313
  entity: true,
4380
- args: [{ name: "document-id", required: true, description: "Document ID", posKind: "document" }],
4381
- examples: ["corp documents pdf", "corp documents pdf --json"]
4314
+ args: [{ name: "document-id", required: true, description: "Document ID or @last reference", posKind: "document" }],
4315
+ examples: ["corp documents pdf @last", "corp documents pdf doc-abc123"]
4382
4316
  },
4383
4317
  {
4384
4318
  name: "documents request-copy",
4385
4319
  description: "Request a certified copy of a document",
4386
4320
  route: { method: "POST", path: "/v1/documents/{pos}/request-copy" },
4387
- args: [{ name: "document-id", required: true, description: "Document ID", posKind: "document" }],
4321
+ args: [{ name: "document-id", required: true, description: "Document ID or @last reference", posKind: "document" }],
4388
4322
  options: [
4389
- { flags: "--recipient-email <recipient-email>", description: "Recipient Email" }
4323
+ { flags: "--recipient-email <recipient-email>", description: "Email address to send the certified copy to" }
4390
4324
  ],
4391
- examples: ["corp documents request-copy <document-id>", "corp documents request-copy --json"],
4392
- successTemplate: "Request Copy created"
4325
+ examples: [
4326
+ "corp documents request-copy @last",
4327
+ "corp documents request-copy doc-abc123 --recipient-email alice@acme.com"
4328
+ ],
4329
+ successTemplate: "Certified copy requested for document {document_id}"
4393
4330
  },
4394
4331
  {
4395
4332
  name: "entities list",
@@ -4416,69 +4353,78 @@ var init_formation = __esm({
4416
4353
  },
4417
4354
  {
4418
4355
  name: "formations create",
4419
- description: "View formation status for an entity",
4356
+ description: "Create a new formation with founders and cap table in one step",
4420
4357
  route: { method: "POST", path: "/v1/formations" },
4421
4358
  options: [
4422
- { flags: "--authorized-shares <authorized-shares>", description: "Number of authorized shares" },
4423
- { flags: "--company-address <company-address>", description: "Company mailing address" },
4424
- { flags: "--entity-type <entity-type>", description: "The legal structure of a business entity.", required: true, choices: ["c_corp", "llc"] },
4425
- { flags: "--fiscal-year-end <fiscal-year-end>", description: 'Fiscal year end, e.g. "12-31". Defaults to "12-31".' },
4426
- { flags: "--formation-date <formation-date>", description: "Optional formation date for importing pre-formed entities." },
4427
- { flags: "--jurisdiction <jurisdiction>", description: "Jurisdiction (e.g. Delaware, US-DE)", required: true },
4359
+ { flags: "--authorized-shares <authorized-shares>", description: "Number of authorized shares (e.g. 10000000)" },
4360
+ { flags: "--company-address <company-address>", description: "Company mailing address as 'street,city,state,zip'" },
4361
+ { flags: "--entity-type <entity-type>", description: "Legal structure of the entity", required: true, choices: ["c_corp", "llc"] },
4362
+ { flags: "--fiscal-year-end <fiscal-year-end>", description: "Fiscal year end (MM-DD, e.g. 12-31). Defaults to 12-31." },
4363
+ { flags: "--formation-date <formation-date>", description: "Formation date for importing a pre-formed entity (ISO 8601)" },
4364
+ { flags: "--jurisdiction <jurisdiction>", description: "Incorporation jurisdiction (e.g. US-DE, US-WY)", required: true },
4428
4365
  { flags: "--legal-name <legal-name>", description: "Legal name of the entity", required: true },
4429
- { flags: "--members <members>", description: "LLC member entries", required: true, type: "array" },
4430
- { flags: "--par-value <par-value>", description: "Par value per share" },
4366
+ { flags: "--members <members>", description: "Member/founder entries (repeatable)", required: true, type: "array" },
4367
+ { flags: "--par-value <par-value>", description: "Par value per share (e.g. 0.0001)" },
4431
4368
  { flags: "--registered-agent-address <registered-agent-address>", description: "Registered agent mailing address" },
4432
- { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent name" },
4433
- { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include right of first refusal in bylaws (corp). Default true." },
4434
- { flags: "--s-corp-election <s-corp-election>", description: "Whether the company will elect S-Corp tax treatment." },
4435
- { flags: "--transfer-restrictions <transfer-restrictions>", description: "Include transfer restrictions in bylaws (corp). Default true." }
4369
+ { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent legal name" },
4370
+ { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include right of first refusal in bylaws (true/false, corp only, default true)" },
4371
+ { flags: "--s-corp-election <s-corp-election>", description: "Elect S-Corp tax treatment (true/false)" },
4372
+ { flags: "--transfer-restrictions <transfer-restrictions>", description: "Include transfer restrictions in bylaws (true/false, corp only, default true)" }
4436
4373
  ],
4437
- examples: ["corp formations --entity-type c_corp --jurisdiction 'jurisdiction' --legal-name 'legal-name' --members 'members'", "corp formations --json"],
4438
- successTemplate: "Formations created"
4374
+ examples: [
4375
+ `corp formations create --entity-type c_corp --jurisdiction US-DE --legal-name "Acme Inc" --members '{"name":"Alice","email":"alice@acme.com","role":"director","ownership_pct":100}'`,
4376
+ `corp formations create --entity-type llc --jurisdiction US-WY --legal-name "My LLC" --members '{"name":"Bob","email":"bob@co.com","role":"member","ownership_pct":100}' --json`
4377
+ ],
4378
+ successTemplate: "Formation created: {entity_id}"
4439
4379
  },
4440
4380
  {
4441
4381
  name: "formations pending",
4442
- description: "Create a pending formation",
4382
+ description: "Create a pending (draft) formation record without founders",
4443
4383
  route: { method: "POST", path: "/v1/formations/pending" },
4444
4384
  options: [
4445
- { flags: "--company-address <company-address>", description: "Company mailing address" },
4446
- { flags: "--entity-type <entity-type>", description: "The legal structure of a business entity.", required: true, choices: ["c_corp", "llc"] },
4447
- { flags: "--fiscal-year-end <fiscal-year-end>", description: "Fiscal year end (e.g. 12-31)" },
4448
- { flags: "--formation-date <formation-date>", description: "Date of formation (ISO 8601)" },
4449
- { flags: "--jurisdiction <jurisdiction>", description: "Jurisdiction (e.g. Delaware, US-DE)" },
4385
+ { flags: "--company-address <company-address>", description: "Company mailing address as 'street,city,state,zip'" },
4386
+ { flags: "--entity-type <entity-type>", description: "Legal structure of the entity", required: true, choices: ["c_corp", "llc"] },
4387
+ { flags: "--fiscal-year-end <fiscal-year-end>", description: "Fiscal year end (MM-DD, e.g. 12-31)" },
4388
+ { flags: "--formation-date <formation-date>", description: "Formation date for pre-formed entity import (ISO 8601)" },
4389
+ { flags: "--jurisdiction <jurisdiction>", description: "Incorporation jurisdiction (e.g. US-DE, US-WY)" },
4450
4390
  { flags: "--legal-name <legal-name>", description: "Legal name of the entity", required: true },
4451
4391
  { flags: "--registered-agent-address <registered-agent-address>", description: "Registered agent mailing address" },
4452
- { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent name" },
4453
- { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include ROFR in bylaws (true/false)" },
4454
- { flags: "--s-corp-election <s-corp-election>", description: "S Corp Election" },
4455
- { flags: "--transfer-restrictions <transfer-restrictions>", description: "Transfer Restrictions" }
4392
+ { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent legal name" },
4393
+ { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include ROFR in bylaws (true/false, corp only)" },
4394
+ { flags: "--s-corp-election <s-corp-election>", description: "Elect S-Corp tax treatment (true/false)" },
4395
+ { flags: "--transfer-restrictions <transfer-restrictions>", description: "Include transfer restrictions in bylaws (true/false, corp only)" }
4396
+ ],
4397
+ examples: [
4398
+ 'corp formations pending --entity-type c_corp --legal-name "Acme Inc" --jurisdiction US-DE',
4399
+ 'corp formations pending --entity-type llc --legal-name "My LLC" --jurisdiction US-WY --json'
4456
4400
  ],
4457
- examples: ["corp formations pending --entity-type c_corp --legal-name 'legal-name'", "corp formations pending --json"],
4458
- successTemplate: "Pending formation created"
4401
+ successTemplate: "Pending formation created: {entity_id}"
4459
4402
  },
4460
4403
  {
4461
4404
  name: "formations with-cap-table",
4462
- description: "Create entity with formation and initial cap table",
4405
+ description: "Create a formation together with an initial cap table in one request",
4463
4406
  route: { method: "POST", path: "/v1/formations/with-cap-table" },
4464
4407
  options: [
4465
- { flags: "--authorized-shares <authorized-shares>", description: "Number of authorized shares" },
4466
- { flags: "--company-address <company-address>", description: "Company mailing address" },
4467
- { flags: "--entity-type <entity-type>", description: "The legal structure of a business entity.", required: true, choices: ["c_corp", "llc"] },
4468
- { flags: "--fiscal-year-end <fiscal-year-end>", description: 'Fiscal year end, e.g. "12-31". Defaults to "12-31".' },
4469
- { flags: "--formation-date <formation-date>", description: "Optional formation date for importing pre-formed entities." },
4470
- { flags: "--jurisdiction <jurisdiction>", description: "Jurisdiction (e.g. Delaware, US-DE)", required: true },
4408
+ { flags: "--authorized-shares <authorized-shares>", description: "Number of authorized shares (e.g. 10000000)" },
4409
+ { flags: "--company-address <company-address>", description: "Company mailing address as 'street,city,state,zip'" },
4410
+ { flags: "--entity-type <entity-type>", description: "Legal structure of the entity", required: true, choices: ["c_corp", "llc"] },
4411
+ { flags: "--fiscal-year-end <fiscal-year-end>", description: "Fiscal year end (MM-DD, e.g. 12-31). Defaults to 12-31." },
4412
+ { flags: "--formation-date <formation-date>", description: "Formation date for pre-formed entity import (ISO 8601)" },
4413
+ { flags: "--jurisdiction <jurisdiction>", description: "Incorporation jurisdiction (e.g. US-DE, US-WY)", required: true },
4471
4414
  { flags: "--legal-name <legal-name>", description: "Legal name of the entity", required: true },
4472
- { flags: "--members <members>", description: "LLC member entries", required: true, type: "array" },
4473
- { flags: "--par-value <par-value>", description: "Par value per share" },
4415
+ { flags: "--members <members>", description: "Member/founder entries (repeatable)", required: true, type: "array" },
4416
+ { flags: "--par-value <par-value>", description: "Par value per share (e.g. 0.0001)" },
4474
4417
  { flags: "--registered-agent-address <registered-agent-address>", description: "Registered agent mailing address" },
4475
- { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent name" },
4476
- { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include right of first refusal in bylaws (corp). Default true." },
4477
- { flags: "--s-corp-election <s-corp-election>", description: "Whether the company will elect S-Corp tax treatment." },
4478
- { flags: "--transfer-restrictions <transfer-restrictions>", description: "Include transfer restrictions in bylaws (corp). Default true." }
4418
+ { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent legal name" },
4419
+ { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include right of first refusal in bylaws (true/false, corp only, default true)" },
4420
+ { flags: "--s-corp-election <s-corp-election>", description: "Elect S-Corp tax treatment (true/false)" },
4421
+ { flags: "--transfer-restrictions <transfer-restrictions>", description: "Include transfer restrictions in bylaws (true/false, corp only, default true)" }
4479
4422
  ],
4480
- examples: ["corp formations with-cap-table --entity-type c_corp --jurisdiction 'jurisdiction' --legal-name 'legal-name' --members 'members'", "corp formations with-cap-table --json"],
4481
- successTemplate: "With Cap Table created"
4423
+ examples: [
4424
+ `corp formations with-cap-table --entity-type c_corp --jurisdiction US-DE --legal-name "Acme Inc" --members '{"name":"Alice","email":"alice@acme.com","role":"director","ownership_pct":100}' --authorized-shares 10000000`,
4425
+ `corp formations with-cap-table --entity-type llc --jurisdiction US-WY --legal-name "My LLC" --members '{"name":"Bob","email":"bob@co.com","role":"member","ownership_pct":100}' --json`
4426
+ ],
4427
+ successTemplate: "Formation with cap table created: {entity_id}"
4482
4428
  },
4483
4429
  {
4484
4430
  name: "formations",
@@ -4493,87 +4439,99 @@ var init_formation = __esm({
4493
4439
  description: "Submit EIN application",
4494
4440
  route: { method: "POST", path: "/v1/formations/{eid}/apply-ein" },
4495
4441
  entity: true,
4496
- examples: ["corp formations apply-ein"],
4497
- successTemplate: "Apply Ein created"
4442
+ examples: ["corp formations apply-ein", "corp formations apply-ein --json"],
4443
+ successTemplate: "EIN application submitted for {entity_id}"
4498
4444
  },
4499
4445
  {
4500
4446
  name: "formations ein-confirmation",
4501
- description: "Confirm EIN received from IRS",
4447
+ description: "Confirm the EIN received from the IRS for the active entity",
4502
4448
  route: { method: "POST", path: "/v1/formations/{eid}/ein-confirmation" },
4503
4449
  entity: true,
4504
4450
  options: [
4505
- { flags: "--ein <ein>", description: "Employer Identification Number", required: true }
4451
+ { flags: "--ein <ein>", description: "Employer Identification Number issued by the IRS (e.g. 84-1234567)", required: true }
4506
4452
  ],
4507
- examples: ["corp formations ein-confirmation --ein 'ein'"],
4508
- successTemplate: "Ein Confirmation created"
4453
+ examples: ["corp formations ein-confirmation --ein 84-1234567", "corp formations ein-confirmation --ein 84-1234567 --json"],
4454
+ successTemplate: "EIN confirmed: {ein}"
4509
4455
  },
4510
4456
  {
4511
4457
  name: "formations filing-attestation",
4512
- description: "Attest to filing accuracy",
4458
+ description: "Record a filing accuracy attestation signed by an authorized person",
4513
4459
  route: { method: "POST", path: "/v1/formations/{eid}/filing-attestation" },
4514
4460
  entity: true,
4515
4461
  options: [
4516
- { flags: "--consent-text <consent-text>", description: "Consent Text" },
4517
- { flags: "--notes <notes>", description: "Additional notes" },
4518
- { flags: "--signer-email <signer-email>", description: "Signer Email", required: true },
4519
- { flags: "--signer-name <signer-name>", description: "Signer Name", required: true },
4520
- { flags: "--signer-role <signer-role>", description: "Signer Role", required: true }
4462
+ { flags: "--consent-text <consent-text>", description: "Custom consent statement text (uses default if omitted)" },
4463
+ { flags: "--notes <notes>", description: "Additional notes to attach to the attestation record" },
4464
+ { flags: "--signer-email <signer-email>", description: "Email address of the person attesting", required: true },
4465
+ { flags: "--signer-name <signer-name>", description: "Full legal name of the person attesting", required: true },
4466
+ { flags: "--signer-role <signer-role>", description: "Role of the signer (e.g. CEO, Incorporator)", required: true }
4521
4467
  ],
4522
- examples: ["corp formations filing-attestation --signer-email 'signer-email' --signer-name 'signer-name' --signer-role 'signer-role'", "corp formations filing-attestation --json"],
4523
- successTemplate: "Filing Attestation created"
4468
+ examples: [
4469
+ 'corp formations filing-attestation --signer-email alice@acme.com --signer-name "Alice Smith" --signer-role Incorporator',
4470
+ 'corp formations filing-attestation --signer-email alice@acme.com --signer-name "Alice Smith" --signer-role CEO --json'
4471
+ ],
4472
+ successTemplate: "Filing attestation recorded for {entity_id}"
4524
4473
  },
4525
4474
  {
4526
4475
  name: "formations filing-confirmation",
4527
- description: "Confirm state filing received",
4476
+ description: "Record confirmation that the state filing has been received and processed",
4528
4477
  route: { method: "POST", path: "/v1/formations/{eid}/filing-confirmation" },
4529
4478
  entity: true,
4530
4479
  options: [
4531
- { flags: "--external-filing-id <external-filing-id>", description: "External Filing Id", required: true },
4532
- { flags: "--receipt-reference <receipt-reference>", description: "Receipt Reference" }
4480
+ { flags: "--external-filing-id <external-filing-id>", description: "State-issued filing identifier (e.g. DE-2026-0042)", required: true },
4481
+ { flags: "--receipt-reference <receipt-reference>", description: "Payment or receipt reference number for the filing fee" }
4482
+ ],
4483
+ examples: [
4484
+ "corp formations filing-confirmation --external-filing-id DE-2026-0042",
4485
+ "corp formations filing-confirmation --external-filing-id DE-2026-0042 --receipt-reference RECEIPT-001 --json"
4533
4486
  ],
4534
- examples: ["corp formations filing-confirmation --external-filing-id 'external-filing-id'", "corp formations filing-confirmation --json"],
4535
- successTemplate: "Filing Confirmation created"
4487
+ successTemplate: "Filing confirmation recorded: {external_filing_id}"
4536
4488
  },
4537
4489
  {
4538
4490
  name: "formations finalize",
4539
- description: "Finalize a formation (lock documents)",
4491
+ description: "Finalize a formation, locking documents and generating the cap table",
4540
4492
  route: { method: "POST", path: "/v1/formations/{eid}/finalize" },
4541
4493
  entity: true,
4542
4494
  options: [
4543
- { flags: "--authorized-shares <authorized-shares>", description: "Number of authorized shares" },
4544
- { flags: "--board-size <board-size>", description: "Board Size" },
4545
- { flags: "--company-address <company-address>", description: "Company mailing address" },
4546
- { flags: "--fiscal-year-end <fiscal-year-end>", description: "Fiscal year end (e.g. 12-31)" },
4547
- { flags: "--formation-date <formation-date>", description: "Date of formation (ISO 8601)" },
4548
- { flags: "--incorporator-address <incorporator-address>", description: "Incorporator Address" },
4549
- { flags: "--incorporator-name <incorporator-name>", description: "Incorporator Name" },
4550
- { flags: "--par-value <par-value>", description: "Par value per share" },
4551
- { flags: "--principal-name <principal-name>", description: "Principal Name" },
4495
+ { flags: "--authorized-shares <authorized-shares>", description: "Number of authorized shares (e.g. 10000000)" },
4496
+ { flags: "--board-size <board-size>", description: "Number of board seats (corporations only)" },
4497
+ { flags: "--company-address <company-address>", description: "Company mailing address as 'street,city,state,zip'" },
4498
+ { flags: "--fiscal-year-end <fiscal-year-end>", description: "Fiscal year end (MM-DD, e.g. 12-31)" },
4499
+ { flags: "--formation-date <formation-date>", description: "Formation date for pre-formed entity import (ISO 8601)" },
4500
+ { flags: "--incorporator-address <incorporator-address>", description: "Incorporator mailing address (overrides founder address)" },
4501
+ { flags: "--incorporator-name <incorporator-name>", description: "Incorporator full legal name (overrides founder name)" },
4502
+ { flags: "--par-value <par-value>", description: "Par value per share (e.g. 0.0001)" },
4503
+ { flags: "--principal-name <principal-name>", description: "Principal or managing member name for LLCs" },
4552
4504
  { flags: "--registered-agent-address <registered-agent-address>", description: "Registered agent mailing address" },
4553
- { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent name" },
4554
- { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include ROFR in bylaws (true/false)" },
4555
- { flags: "--s-corp-election <s-corp-election>", description: "S Corp Election" },
4556
- { flags: "--transfer-restrictions <transfer-restrictions>", description: "Transfer Restrictions" }
4505
+ { flags: "--registered-agent-name <registered-agent-name>", description: "Registered agent legal name" },
4506
+ { flags: "--right-of-first-refusal <right-of-first-refusal>", description: "Include ROFR in bylaws (true/false, corp only)" },
4507
+ { flags: "--s-corp-election <s-corp-election>", description: "Elect S-Corp tax treatment (true/false)" },
4508
+ { flags: "--transfer-restrictions <transfer-restrictions>", description: "Include transfer restrictions in bylaws (true/false, corp only)" }
4509
+ ],
4510
+ examples: [
4511
+ "corp formations finalize",
4512
+ "corp formations finalize --authorized-shares 10000000 --par-value 0.0001 --json"
4557
4513
  ],
4558
- examples: ["corp formations finalize", "corp formations finalize --json"],
4559
- successTemplate: "Finalize created"
4514
+ successTemplate: "Formation finalized: {entity_id}"
4560
4515
  },
4561
4516
  {
4562
4517
  name: "formations founders",
4563
- description: "Add founders to a formation",
4518
+ description: "Add a founder to an existing formation record",
4564
4519
  route: { method: "POST", path: "/v1/formations/{eid}/founders" },
4565
4520
  entity: true,
4566
4521
  options: [
4567
- { flags: "--address <address>", description: "Address" },
4568
- { flags: "--email <email>", description: "Email" },
4569
- { flags: "--is-incorporator <is-incorporator>", description: "Is Incorporator" },
4570
- { flags: "--name <name>", description: "Display name", required: true },
4571
- { flags: "--officer-title <officer-title>", description: "Officer Title", choices: ["ceo", "cfo", "cto", "coo", "secretary", "treasurer", "president", "vp", "other"] },
4572
- { flags: "--ownership-pct <ownership-pct>", description: "Ownership Pct" },
4573
- { flags: "--role <role>", description: "Role", choices: ["director", "officer", "manager", "member", "chair"] }
4522
+ { flags: "--address <address>", description: "Founder mailing address as 'street,city,state,zip'" },
4523
+ { flags: "--email <email>", description: "Founder email address" },
4524
+ { flags: "--is-incorporator <is-incorporator>", description: "Mark as the sole incorporator (true/false, corporations only)" },
4525
+ { flags: "--name <name>", description: "Founder full legal name", required: true },
4526
+ { flags: "--officer-title <officer-title>", description: "Officer title for the founder (corporations only)", choices: ["ceo", "cfo", "cto", "coo", "secretary", "treasurer", "president", "vp", "other"] },
4527
+ { flags: "--ownership-pct <ownership-pct>", description: "Ownership percentage (e.g. 60 for 60%)" },
4528
+ { flags: "--role <role>", description: "Founder role in the entity", choices: ["director", "officer", "manager", "member", "chair"] }
4529
+ ],
4530
+ examples: [
4531
+ 'corp formations founders --name "Alice Smith" --email alice@acme.com --role director --ownership-pct 60 --officer-title ceo --is-incorporator true',
4532
+ 'corp formations founders --name "Bob Jones" --email bob@acme.com --role director --ownership-pct 40 --json'
4574
4533
  ],
4575
- examples: ["corp formations founders --name ceo", "corp formations founders --json"],
4576
- successTemplate: "Founders created"
4534
+ successTemplate: "Founder added to {entity_id}"
4577
4535
  },
4578
4536
  {
4579
4537
  name: "formations gates",
@@ -4588,42 +4546,48 @@ var init_formation = __esm({
4588
4546
  description: "Mark formation documents as signed",
4589
4547
  route: { method: "POST", path: "/v1/formations/{eid}/mark-documents-signed" },
4590
4548
  entity: true,
4591
- examples: ["corp formations mark-documents-signed"],
4592
- successTemplate: "Mark Documents Signed created"
4549
+ examples: ["corp formations mark-documents-signed", "corp formations mark-documents-signed --json"],
4550
+ successTemplate: "Formation documents marked as signed for {entity_id}"
4593
4551
  },
4594
4552
  {
4595
4553
  name: "formations registered-agent-consent-evidence",
4596
- description: "Provide registered agent consent evidence",
4554
+ description: "Record registered agent consent evidence for the active formation",
4597
4555
  route: { method: "POST", path: "/v1/formations/{eid}/registered-agent-consent-evidence" },
4598
4556
  entity: true,
4599
4557
  options: [
4600
- { flags: "--evidence-type <evidence-type>", description: "Evidence Type" },
4601
- { flags: "--evidence-uri <evidence-uri>", description: "Evidence Uri", required: true },
4602
- { flags: "--notes <notes>", description: "Additional notes" }
4558
+ { flags: "--evidence-type <evidence-type>", description: "Type of consent evidence (e.g. generated, signed_pdf)" },
4559
+ { flags: "--evidence-uri <evidence-uri>", description: "URI or path to the consent evidence document", required: true },
4560
+ { flags: "--notes <notes>", description: "Additional notes about the consent evidence" }
4561
+ ],
4562
+ examples: [
4563
+ "corp formations registered-agent-consent-evidence --evidence-uri https://files.example.com/consent.pdf",
4564
+ "corp formations registered-agent-consent-evidence --evidence-uri https://files.example.com/consent.pdf --evidence-type signed_pdf --json"
4603
4565
  ],
4604
- examples: ["corp formations registered-agent-consent-evidence --evidence-uri 'evidence-uri'", "corp formations registered-agent-consent-evidence --json"],
4605
- successTemplate: "Registered Agent Consent Evidence created"
4566
+ successTemplate: "Registered agent consent evidence recorded for {entity_id}"
4606
4567
  },
4607
4568
  {
4608
4569
  name: "formations service-agreement-execute",
4609
- description: "Execute the service agreement",
4570
+ description: "Mark the formation service agreement as executed",
4610
4571
  route: { method: "POST", path: "/v1/formations/{eid}/service-agreement/execute" },
4611
4572
  entity: true,
4612
4573
  options: [
4613
- { flags: "--contract-id <contract-id>", description: "Contract Id" },
4614
- { flags: "--document-id <document-id>", description: "Document ID" },
4615
- { flags: "--notes <notes>", description: "Additional notes" }
4574
+ { flags: "--contract-id <contract-id>", description: "Contract ID of the service agreement to execute" },
4575
+ { flags: "--document-id <document-id>", description: "Document ID of the executed service agreement" },
4576
+ { flags: "--notes <notes>", description: "Additional notes about the execution" }
4577
+ ],
4578
+ examples: [
4579
+ "corp formations service-agreement-execute",
4580
+ "corp formations service-agreement-execute --contract-id contract-abc123 --json"
4616
4581
  ],
4617
- examples: ["corp formations service-agreement-execute", "corp formations service-agreement-execute --json"],
4618
- successTemplate: "Service Agreement Execute created"
4582
+ successTemplate: "Service agreement executed for {entity_id}"
4619
4583
  },
4620
4584
  {
4621
4585
  name: "formations submit-filing",
4622
4586
  description: "Submit state filing for a formation",
4623
4587
  route: { method: "POST", path: "/v1/formations/{eid}/submit-filing" },
4624
4588
  entity: true,
4625
- examples: ["corp formations submit-filing"],
4626
- successTemplate: "Submit Filing created"
4589
+ examples: ["corp formations submit-filing", "corp formations submit-filing --json"],
4590
+ successTemplate: "State filing submitted for {entity_id}"
4627
4591
  },
4628
4592
  {
4629
4593
  name: "governance catalog",
@@ -4638,7 +4602,7 @@ var init_formation = __esm({
4638
4602
  route: { method: "GET", path: "/v1/governance/catalog/{pos}/markdown" },
4639
4603
  args: [{ name: "document-id", required: true, description: "Document ID" }],
4640
4604
  display: { title: "Governance Catalog Markdown", cols: ["category>Category", "entity_scope>Entity Scope", "id>Id", "markdown>Markdown", "title>Title", "variants>Variants"] },
4641
- examples: ["corp governance catalog-markdown"]
4605
+ examples: ["corp governance catalog-markdown bylaws", "corp governance catalog-markdown articles_of_incorporation"]
4642
4606
  }
4643
4607
  ];
4644
4608
  }
@@ -4746,7 +4710,7 @@ var init_cap_table = __esm({
4746
4710
  // --- cap-table transfers ---
4747
4711
  {
4748
4712
  name: "cap-table transfers",
4749
- description: "Share transfers",
4713
+ description: "List share transfers for this entity",
4750
4714
  route: { method: "GET", path: "/v1/entities/{eid}/share-transfers" },
4751
4715
  entity: true,
4752
4716
  display: {
@@ -4772,7 +4736,7 @@ var init_cap_table = __esm({
4772
4736
  // --- cap-table instruments ---
4773
4737
  {
4774
4738
  name: "cap-table instruments",
4775
- description: "Cap table instruments",
4739
+ description: "List equity instruments (share classes, option pools, SAFEs) on the cap table",
4776
4740
  route: { method: "GET", path: "/v1/entities/{eid}/cap-table" },
4777
4741
  entity: true,
4778
4742
  display: {
@@ -4828,7 +4792,7 @@ var init_cap_table = __esm({
4828
4792
  // --- cap-table rounds ---
4829
4793
  {
4830
4794
  name: "cap-table rounds",
4831
- description: "Staged equity rounds",
4795
+ description: "List equity rounds (staged and closed) for this entity",
4832
4796
  route: { method: "GET", path: "/v1/entities/{eid}/equity-rounds" },
4833
4797
  entity: true,
4834
4798
  display: {
@@ -4854,7 +4818,7 @@ var init_cap_table = __esm({
4854
4818
  // --- cap-table valuations ---
4855
4819
  {
4856
4820
  name: "cap-table valuations",
4857
- description: "Valuations history",
4821
+ description: "List valuation history (409A, FMV, and other valuations)",
4858
4822
  route: { method: "GET", path: "/v1/entities/{eid}/valuations" },
4859
4823
  entity: true,
4860
4824
  display: {
@@ -4994,7 +4958,10 @@ var init_cap_table = __esm({
4994
4958
  }
4995
4959
  ctx.writer.json(result);
4996
4960
  },
4997
- examples: ["corp cap-table dilution", "corp cap-table dilution --json"]
4961
+ examples: [
4962
+ "corp cap-table dilution --round-id @last:round",
4963
+ "corp cap-table dilution --round-id a1b2c3d4 --json"
4964
+ ]
4998
4965
  },
4999
4966
  // --- cap-table create-instrument ---
5000
4967
  {
@@ -5004,7 +4971,7 @@ var init_cap_table = __esm({
5004
4971
  entity: true,
5005
4972
  dryRun: true,
5006
4973
  options: [
5007
- { flags: "--kind <kind>", description: "Instrument kind (common_equity, preferred_equity, membership_unit, option_grant, safe)", required: true },
4974
+ { flags: "--kind <kind>", description: "Instrument kind", required: true, choices: ["common_equity", "preferred_equity", "membership_unit", "option_grant", "safe", "convertible_note", "warrant"] },
5008
4975
  { flags: "--symbol <symbol>", description: "Instrument symbol", required: true },
5009
4976
  { flags: "--issuer-legal-entity-id <ref>", description: "Issuer legal entity reference (ID, short ID, @last, or unique name)" },
5010
4977
  { flags: "--authorized-units <n>", description: "Authorized units", type: "int" },
@@ -5048,7 +5015,10 @@ var init_cap_table = __esm({
5048
5015
  },
5049
5016
  produces: { kind: "instrument" },
5050
5017
  successTemplate: "Instrument created: {symbol}",
5051
- examples: ["corp cap-table create-instrument --kind 'kind' --symbol 'symbol'", "corp cap-table create-instrument --json"]
5018
+ examples: [
5019
+ "corp cap-table create-instrument --kind common_equity --symbol COMMON",
5020
+ "corp cap-table create-instrument --kind option_grant --symbol OPTIONS --authorized-units 10000000"
5021
+ ]
5052
5022
  },
5053
5023
  // --- cap-table issue-equity ---
5054
5024
  {
@@ -5128,10 +5098,11 @@ var init_cap_table = __esm({
5128
5098
  }
5129
5099
  },
5130
5100
  produces: { kind: "round" },
5131
- successTemplate: "Equity issued: {round_name}",
5101
+ successTemplate: "Equity issued to {recipient_name}",
5132
5102
  examples: [
5133
- 'corp cap-table issue-equity --grant-type common --shares 50000 --recipient "Alice Smith"',
5134
- 'corp cap-table issue-equity --grant-type iso --shares 10000 --recipient "Bob" --email "bob@co.com"'
5103
+ 'corp cap-table issue-equity --grant-type common --shares 1000000 --recipient "Alice Smith"',
5104
+ 'corp cap-table issue-equity --grant-type iso --shares 50000 --recipient "Bob Jones" --email "bob@acme.com"',
5105
+ 'corp cap-table issue-equity --grant-type preferred --shares 500000 --recipient "Acme Ventures" --meeting-id @last:meeting --resolution-id @last:resolution'
5135
5106
  ]
5136
5107
  },
5137
5108
  // --- cap-table issue-safe ---
@@ -5215,10 +5186,11 @@ var init_cap_table = __esm({
5215
5186
  printReferenceSummary("safe_note", result.data, { showReuseHint: true });
5216
5187
  },
5217
5188
  produces: { kind: "safe_note" },
5218
- successTemplate: "SAFE created: {investor_name}",
5189
+ successTemplate: "SAFE issued to {investor_name}",
5219
5190
  examples: [
5220
- 'corp cap-table issue-safe --investor "Seed Fund" --amount-dollars 500000 --valuation-cap-dollars 10000000',
5221
- 'corp cap-table issue-safe --investor "Angel" --amount-cents 50000000 --valuation-cap-cents 1000000000'
5191
+ 'corp cap-table issue-safe --investor "Sequoia Capital" --amount-dollars 500000 --valuation-cap-dollars 10000000',
5192
+ 'corp cap-table issue-safe --investor "Angel Investor" --amount-dollars 250000 --valuation-cap-dollars 8000000 --safe-type pre_money',
5193
+ 'corp cap-table issue-safe --investor "YC" --amount-cents 12500000 --valuation-cap-cents 1500000000 --meeting-id @last:meeting --resolution-id @last:resolution'
5222
5194
  ]
5223
5195
  },
5224
5196
  // --- cap-table transfer ---
@@ -5233,10 +5205,10 @@ var init_cap_table = __esm({
5233
5205
  { flags: "--to <ref>", description: "Destination contact reference (to_contact_id)", required: true },
5234
5206
  { flags: "--shares <n>", description: "Number of shares to transfer", required: true, type: "int" },
5235
5207
  { flags: "--share-class-id <ref>", description: "Share class reference (auto-resolved if only one exists)" },
5236
- { flags: "--governing-doc-type <type>", description: "Governing doc type (bylaws, operating_agreement, shareholder_agreement, other)", default: "bylaws" },
5237
- { flags: "--transferee-rights <rights>", description: "Transferee rights (full_member, economic_only, limited)", default: "full_member" },
5208
+ { flags: "--governing-doc-type <type>", description: "Governing document that authorizes this transfer", default: "bylaws", choices: ["bylaws", "operating_agreement", "shareholder_agreement", "other"] },
5209
+ { flags: "--transferee-rights <rights>", description: "Rights granted to the transferee", default: "full_member", choices: ["full_member", "economic_only", "limited"] },
5238
5210
  { flags: "--prepare-intent-id <id>", description: "Prepare intent ID (auto-created if omitted)" },
5239
- { flags: "--type <type>", description: "Transfer type (gift, trust_transfer, secondary_sale, estate, other)", default: "secondary_sale" },
5211
+ { flags: "--type <type>", description: "Type of transfer", default: "secondary_sale", choices: ["gift", "trust_transfer", "secondary_sale", "estate", "other"] },
5240
5212
  { flags: "--price-per-share-cents <n>", description: "Price per share in cents", type: "int" },
5241
5213
  { flags: "--relationship <rel>", description: "Relationship to holder" }
5242
5214
  ],
@@ -5321,8 +5293,11 @@ var init_cap_table = __esm({
5321
5293
  printReferenceSummary("share_transfer", result, { label: "Transfer Ref:", showReuseHint: true });
5322
5294
  },
5323
5295
  produces: { kind: "share_transfer" },
5324
- successTemplate: "Transfer created",
5325
- examples: ["corp cap-table transfer --from 'ref' --to 'ref' --shares 'n' --share-class-id 'ref' --governing-doc-type 'type' --transferee-rights 'rights'", "corp cap-table transfer --json"]
5296
+ successTemplate: "Share transfer created: {transfer_workflow_id}",
5297
+ examples: [
5298
+ "corp cap-table transfer --from alice-johnson --to bob-smith --shares 50000 --type secondary_sale",
5299
+ "corp cap-table transfer --from a1b2c3d4 --to e5f6a7b8 --shares 10000 --share-class-id COMMON --type gift --transferee-rights full_member"
5300
+ ]
5326
5301
  },
5327
5302
  // --- cap-table distribute ---
5328
5303
  {
@@ -5334,7 +5309,7 @@ var init_cap_table = __esm({
5334
5309
  options: [
5335
5310
  { flags: "--amount-cents <n>", description: "Total distribution amount in cents (e.g. 100000 = $1,000.00)", required: true, type: "int" },
5336
5311
  { flags: "--amount-dollars <n>", description: "Total distribution amount in dollars (e.g. 1000 = $1,000.00)", type: "int" },
5337
- { flags: "--type <type>", description: "Distribution type (dividend, return, liquidation)", default: "dividend" },
5312
+ { flags: "--type <type>", description: "Distribution type", default: "dividend", choices: ["dividend", "return", "liquidation"] },
5338
5313
  { flags: "--description <desc>", description: "Distribution description", required: true }
5339
5314
  ],
5340
5315
  handler: async (ctx) => {
@@ -5368,7 +5343,10 @@ var init_cap_table = __esm({
5368
5343
  ctx.writer.success(`Distribution calculated: ${result.distribution_id ?? "OK"}`);
5369
5344
  printReferenceSummary("distribution", result, { showReuseHint: true });
5370
5345
  },
5371
- examples: ["corp cap-table distribute --amount-cents 'n' --description 'desc'", "corp cap-table distribute --json"]
5346
+ examples: [
5347
+ 'corp cap-table distribute --amount-dollars 250000 --description "Q1 2026 dividend distribution"',
5348
+ 'corp cap-table distribute --amount-cents 50000000 --type liquidation --description "Liquidation proceeds distribution"'
5349
+ ]
5372
5350
  },
5373
5351
  // --- cap-table start-round ---
5374
5352
  {
@@ -5412,8 +5390,11 @@ var init_cap_table = __esm({
5412
5390
  printReferenceSummary("round", result, { showReuseHint: true });
5413
5391
  },
5414
5392
  produces: { kind: "round" },
5415
- successTemplate: "Round started: {round_name}",
5416
- examples: ["corp cap-table start-round --name 'name' --issuer-legal-entity-id 'ref'"]
5393
+ successTemplate: "Round started: {name}",
5394
+ examples: [
5395
+ 'corp cap-table start-round --name "Series A"',
5396
+ 'corp cap-table start-round --name "Seed Round" --issuer-legal-entity-id a1b2c3d4e5f6'
5397
+ ]
5417
5398
  },
5418
5399
  // --- cap-table add-security ---
5419
5400
  {
@@ -5430,7 +5411,7 @@ var init_cap_table = __esm({
5430
5411
  { flags: "--holder-id <ref>", description: "Existing holder reference" },
5431
5412
  { flags: "--email <email>", description: "Recipient email (to find or create holder)" },
5432
5413
  { flags: "--principal-cents <n>", description: "Principal amount in cents", type: "int" },
5433
- { flags: "--grant-type <type>", description: "Grant type" }
5414
+ { flags: "--grant-type <type>", description: "Grant type (common, preferred, iso, nso, rsa, membership_unit)", choices: ["common", "common_stock", "preferred", "preferred_stock", "membership_unit", "stock_option", "iso", "nso", "rsa", "svu"] }
5434
5415
  ],
5435
5416
  handler: async (ctx) => {
5436
5417
  const eid = await ctx.resolver.resolveEntity(ctx.opts.entityId);
@@ -5457,7 +5438,10 @@ var init_cap_table = __esm({
5457
5438
  }
5458
5439
  ctx.writer.success(`Security added for ${ctx.opts.recipientName}`);
5459
5440
  },
5460
- examples: ["corp cap-table add-security --round-id 'ref' --instrument-id 'ref' --quantity 'n' --recipient-name 'name'", "corp cap-table add-security --json"]
5441
+ examples: [
5442
+ 'corp cap-table add-security --round-id @last:round --instrument-id @last:instrument --quantity 500000 --recipient-name "Alice Smith"',
5443
+ 'corp cap-table add-security --round-id a1b2c3d4 --instrument-id COMMON --quantity 1000000 --recipient-name "Acme Ventures" --email "invest@acme.com" --grant-type preferred'
5444
+ ]
5461
5445
  },
5462
5446
  // --- cap-table issue-round ---
5463
5447
  {
@@ -5506,7 +5490,10 @@ var init_cap_table = __esm({
5506
5490
  printReferenceSummary("round", roundMatch.raw, { showReuseHint: true });
5507
5491
  }
5508
5492
  },
5509
- examples: ["corp cap-table issue-round --round-id 'ref'", "corp cap-table issue-round --json"]
5493
+ examples: [
5494
+ "corp cap-table issue-round --round-id @last:round",
5495
+ "corp cap-table issue-round --round-id a1b2c3d4 --meeting-id @last:meeting --resolution-id @last:resolution"
5496
+ ]
5510
5497
  },
5511
5498
  // --- cap-table create-valuation ---
5512
5499
  {
@@ -5516,7 +5503,7 @@ var init_cap_table = __esm({
5516
5503
  entity: true,
5517
5504
  dryRun: true,
5518
5505
  options: [
5519
- { flags: "--type <type>", description: "Valuation type (four_oh_nine_a, fair_market_value, etc.)", required: true },
5506
+ { flags: "--type <type>", description: "Valuation type", required: true, choices: ["four_oh_nine_a", "llc_profits_interest", "fair_market_value", "gift", "estate", "other"] },
5520
5507
  { flags: "--date <date>", description: "Effective date (ISO 8601)", required: true },
5521
5508
  { flags: "--methodology <method>", description: "Methodology", required: true, choices: ["income", "market", "asset", "backsolve", "hybrid", "other"] },
5522
5509
  { flags: "--fmv <cents>", description: "FMV per share in cents", type: "int" },
@@ -5567,8 +5554,11 @@ var init_cap_table = __esm({
5567
5554
  printReferenceSummary("valuation", result, { showReuseHint: true });
5568
5555
  },
5569
5556
  produces: { kind: "valuation" },
5570
- successTemplate: "Valuation created",
5571
- examples: ["corp cap-table create-valuation --type 'type' --date 'date' --methodology 'method'", "corp cap-table create-valuation --json"]
5557
+ successTemplate: "Valuation created: {valuation_id}",
5558
+ examples: [
5559
+ "corp cap-table create-valuation --type four_oh_nine_a --date 2026-01-01 --methodology backsolve",
5560
+ "corp cap-table create-valuation --type four_oh_nine_a --date 2026-01-01 --methodology market --fmv 125 --enterprise-value 50000000 --auto-approve"
5561
+ ]
5572
5562
  },
5573
5563
  // --- cap-table submit-valuation <valuation-ref> ---
5574
5564
  {
@@ -5626,7 +5616,10 @@ var init_cap_table = __esm({
5626
5616
  }
5627
5617
  }
5628
5618
  },
5629
- examples: ["corp cap-table submit-valuation <valuation-ref>"]
5619
+ examples: [
5620
+ "corp cap-table submit-valuation @last:valuation",
5621
+ "corp cap-table submit-valuation a1b2c3d4 --json"
5622
+ ]
5630
5623
  },
5631
5624
  // --- cap-table approve-valuation <valuation-ref> ---
5632
5625
  {
@@ -5670,7 +5663,11 @@ var init_cap_table = __esm({
5670
5663
  }
5671
5664
  }
5672
5665
  },
5673
- examples: ["corp cap-table approve-valuation <valuation-ref>", "corp cap-table approve-valuation --json"]
5666
+ successTemplate: "Valuation approved: {valuation_id}",
5667
+ examples: [
5668
+ "corp cap-table approve-valuation @last:valuation",
5669
+ "corp cap-table approve-valuation a1b2c3d4 --resolution-id @last:resolution"
5670
+ ]
5674
5671
  },
5675
5672
  // --- cap-table preview-conversion ---
5676
5673
  {
@@ -5700,7 +5697,10 @@ var init_cap_table = __esm({
5700
5697
  if (result.ownership_pct) console.log(` Post-conversion ownership: ${result.ownership_pct}%`);
5701
5698
  ctx.writer.json(result);
5702
5699
  },
5703
- examples: ["corp cap-table preview-conversion", "corp cap-table preview-conversion --json"]
5700
+ examples: [
5701
+ "corp cap-table preview-conversion --safe-id @last:safe_note --price-per-share-cents 125",
5702
+ "corp cap-table preview-conversion --safe-id a1b2c3d4 --price-per-share-cents 200 --json"
5703
+ ]
5704
5704
  },
5705
5705
  // --- cap-table convert ---
5706
5706
  {
@@ -5734,7 +5734,10 @@ var init_cap_table = __esm({
5734
5734
  }
5735
5735
  ctx.writer.success(`Conversion executed for SAFE ${safeId}`);
5736
5736
  },
5737
- examples: ["corp cap-table convert --safe-id 'ref' --price-per-share-cents 'n'"]
5737
+ examples: [
5738
+ "corp cap-table convert --safe-id @last:safe_note --price-per-share-cents 125",
5739
+ "corp cap-table convert --safe-id a1b2c3d4 --price-per-share-cents 200 --dry-run"
5740
+ ]
5738
5741
  },
5739
5742
  // ── Auto-generated from OpenAPI ──────────────────────────────
5740
5743
  {
@@ -5749,8 +5752,11 @@ var init_cap_table = __esm({
5749
5752
  { flags: "--parent-legal-entity-id <parent-legal-entity-id>", description: "Parent entity in the control relationship", required: true },
5750
5753
  { flags: "--voting-power-bps <voting-power-bps>", description: "Voting power in basis points (0-10000)" }
5751
5754
  ],
5752
- examples: ["corp equity control-links --child-legal-entity-id voting --control-type voting --parent-legal-entity-id 'parent-legal-entity-id'", "corp equity control-links --json"],
5753
- successTemplate: "Control Links created"
5755
+ examples: [
5756
+ "corp equity control-links --child-legal-entity-id a1b2c3d4 --control-type voting --parent-legal-entity-id e5f6a7b8",
5757
+ "corp equity control-links --child-legal-entity-id a1b2c3d4 --control-type board --parent-legal-entity-id e5f6a7b8 --voting-power-bps 5100"
5758
+ ],
5759
+ successTemplate: "Control link created"
5754
5760
  },
5755
5761
  {
5756
5762
  name: "equity control-map",
@@ -5769,8 +5775,11 @@ var init_cap_table = __esm({
5769
5775
  { flags: "--round-id <round-id>", description: "Equity round ID", required: true },
5770
5776
  { flags: "--source-reference <source-reference>", description: "Source reference for the conversion" }
5771
5777
  ],
5772
- examples: ["corp equity conversions-execute --intent-id 'intent-id' --round-id 'round-id'", "corp equity conversions-execute --json"],
5773
- successTemplate: "Conversions Execute created"
5778
+ examples: [
5779
+ "corp equity conversions-execute --intent-id a1b2c3d4 --round-id e5f6a7b8",
5780
+ "corp equity conversions-execute --intent-id a1b2c3d4 --round-id e5f6a7b8 --source-reference safe-note:f9g0h1i2"
5781
+ ],
5782
+ successTemplate: "Conversion executed"
5774
5783
  },
5775
5784
  {
5776
5785
  name: "equity conversions-preview",
@@ -5781,8 +5790,11 @@ var init_cap_table = __esm({
5781
5790
  { flags: "--round-id <round-id>", description: "Equity round ID", required: true },
5782
5791
  { flags: "--source-reference <source-reference>", description: "Source reference for the conversion" }
5783
5792
  ],
5784
- examples: ["corp equity conversions-preview --round-id 'round-id'", "corp equity conversions-preview --json"],
5785
- successTemplate: "Conversions Preview created"
5793
+ examples: [
5794
+ "corp equity conversions-preview --round-id a1b2c3d4",
5795
+ "corp equity conversions-preview --round-id a1b2c3d4 --source-reference safe-note:b2c3d4e5 --json"
5796
+ ],
5797
+ successTemplate: "Conversion preview calculated"
5786
5798
  },
5787
5799
  {
5788
5800
  name: "equity dilution-preview",
@@ -5802,8 +5814,11 @@ var init_cap_table = __esm({
5802
5814
  { flags: "--name <name>", description: "Display name", required: true },
5803
5815
  { flags: "--role <role>", description: "Role this legal entity plays in the ownership/control graph.", required: true, choices: ["operating", "control", "investment", "nonprofit", "spv", "other"] }
5804
5816
  ],
5805
- examples: ["corp equity entities --name 'name' --role operating", "corp equity entities --json"],
5806
- successTemplate: "Entities created"
5817
+ examples: [
5818
+ 'corp equity entities --name "Acme Corp" --role operating',
5819
+ 'corp equity entities --name "Acme Holdings LLC" --role control --linked-entity-id a1b2c3d4'
5820
+ ],
5821
+ successTemplate: "Legal entity registered"
5807
5822
  },
5808
5823
  {
5809
5824
  name: "equity create-fundraising-workflow",
@@ -5819,8 +5834,11 @@ var init_cap_table = __esm({
5819
5834
  { flags: "--round-price-cents <round-price-cents>", description: "Round share price in cents" },
5820
5835
  { flags: "--target-raise-cents <target-raise-cents>", description: "Target fundraising amount in cents" }
5821
5836
  ],
5822
- examples: ["corp equity fundraising-workflows --issuer-legal-entity-id 'issuer-legal-entity-id' --name 'name' --prepare-intent-id 'prepare-intent-id'", "corp equity fundraising-workflows --json"],
5823
- successTemplate: "Fundraising Workflows created"
5837
+ examples: [
5838
+ 'corp equity create-fundraising-workflow --name "Series A" --issuer-legal-entity-id a1b2c3d4 --prepare-intent-id e5f6a7b8',
5839
+ 'corp equity create-fundraising-workflow --name "Seed Round" --issuer-legal-entity-id a1b2c3d4 --prepare-intent-id e5f6a7b8 --target-raise-cents 200000000'
5840
+ ],
5841
+ successTemplate: "Fundraising workflow created"
5824
5842
  },
5825
5843
  {
5826
5844
  name: "equity fundraising-workflows",
@@ -5829,7 +5847,7 @@ var init_cap_table = __esm({
5829
5847
  entity: true,
5830
5848
  args: [{ name: "workflow-id", required: true, description: "Workflow ID" }],
5831
5849
  display: { title: "Equity Fundraising Workflows", cols: ["board_packet_documents>Board Packet Documents", "closing_packet_documents>Closing Packet Documents", "@created_at>Created At", "#accept_intent_id>ID"] },
5832
- examples: ["corp equity fundraising-workflows", "corp equity fundraising-workflows --json"]
5850
+ examples: ["corp equity fundraising-workflows a1b2c3d4", "corp equity fundraising-workflows a1b2c3d4 --json"]
5833
5851
  },
5834
5852
  {
5835
5853
  name: "equity fundraising-workflows-apply-terms",
@@ -5841,8 +5859,11 @@ var init_cap_table = __esm({
5841
5859
  { flags: "--conversion-precedence <conversion-precedence>", description: "Conversion priority ordering", type: "array" },
5842
5860
  { flags: "--protective-provisions <protective-provisions>", description: "Protective provision terms" }
5843
5861
  ],
5844
- examples: ["corp equity fundraising-workflows-apply-terms <workflow-id> --anti-dilution-method none", "corp equity fundraising-workflows-apply-terms --json"],
5845
- successTemplate: "Fundraising Workflows Apply Terms created"
5862
+ examples: [
5863
+ "corp equity fundraising-workflows-apply-terms a1b2c3d4 --anti-dilution-method broad_based_weighted_average",
5864
+ "corp equity fundraising-workflows-apply-terms a1b2c3d4 --anti-dilution-method none --protective-provisions 'standard Series A provisions'"
5865
+ ],
5866
+ successTemplate: "Term sheet applied to fundraising workflow"
5846
5867
  },
5847
5868
  {
5848
5869
  name: "equity fundraising-workflows-compile-packet",
@@ -5853,8 +5874,11 @@ var init_cap_table = __esm({
5853
5874
  { flags: "--phase <phase>", description: "Workflow phase" },
5854
5875
  { flags: "--required-signers <required-signers>", description: "List of required signers", type: "array" }
5855
5876
  ],
5856
- examples: ["corp equity fundraising-workflows-compile-packet <workflow-id>", "corp equity fundraising-workflows-compile-packet --json"],
5857
- successTemplate: "Fundraising Workflows Compile Packet created"
5877
+ examples: [
5878
+ "corp equity fundraising-workflows-compile-packet a1b2c3d4",
5879
+ "corp equity fundraising-workflows-compile-packet a1b2c3d4 --phase closing"
5880
+ ],
5881
+ successTemplate: "Document packet compiled"
5858
5882
  },
5859
5883
  {
5860
5884
  name: "equity fundraising-workflows-finalize",
@@ -5864,8 +5888,11 @@ var init_cap_table = __esm({
5864
5888
  options: [
5865
5889
  { flags: "--phase <phase>", description: "Workflow phase" }
5866
5890
  ],
5867
- examples: ["corp equity fundraising-workflows-finalize <workflow-id>", "corp equity fundraising-workflows-finalize --json"],
5868
- successTemplate: "Fundraising Workflows Finalize created"
5891
+ examples: [
5892
+ "corp equity fundraising-workflows-finalize a1b2c3d4",
5893
+ "corp equity fundraising-workflows-finalize a1b2c3d4 --json"
5894
+ ],
5895
+ successTemplate: "Fundraising workflow finalized"
5869
5896
  },
5870
5897
  {
5871
5898
  name: "equity fundraising-workflows-generate-board-packet",
@@ -5875,8 +5902,11 @@ var init_cap_table = __esm({
5875
5902
  options: [
5876
5903
  { flags: "--documents <documents>", description: "Document references or content", type: "array" }
5877
5904
  ],
5878
- examples: ["corp equity fundraising-workflows-generate-board-packet <workflow-id>", "corp equity fundraising-workflows-generate-board-packet --json"],
5879
- successTemplate: "Fundraising Workflows Generate Board Packet created"
5905
+ examples: [
5906
+ "corp equity fundraising-workflows-generate-board-packet a1b2c3d4",
5907
+ "corp equity fundraising-workflows-generate-board-packet a1b2c3d4 --json"
5908
+ ],
5909
+ successTemplate: "Board approval packet generated"
5880
5910
  },
5881
5911
  {
5882
5912
  name: "equity fundraising-workflows-generate-closing-packet",
@@ -5886,8 +5916,11 @@ var init_cap_table = __esm({
5886
5916
  options: [
5887
5917
  { flags: "--documents <documents>", description: "Document references or content", type: "array" }
5888
5918
  ],
5889
- examples: ["corp equity fundraising-workflows-generate-closing-packet <workflow-id>", "corp equity fundraising-workflows-generate-closing-packet --json"],
5890
- successTemplate: "Fundraising Workflows Generate Closing Packet created"
5919
+ examples: [
5920
+ "corp equity fundraising-workflows-generate-closing-packet a1b2c3d4",
5921
+ "corp equity fundraising-workflows-generate-closing-packet a1b2c3d4 --json"
5922
+ ],
5923
+ successTemplate: "Closing packet generated"
5891
5924
  },
5892
5925
  {
5893
5926
  name: "equity fundraising-workflows-prepare-execution",
@@ -5900,8 +5933,11 @@ var init_cap_table = __esm({
5900
5933
  { flags: "--intent-id <intent-id>", description: "Execution intent ID", required: true },
5901
5934
  { flags: "--phase <phase>", description: "Workflow phase" }
5902
5935
  ],
5903
- examples: ["corp equity fundraising-workflows-prepare-execution <workflow-id> --approval-artifact-id 'approval-artifact-id' --intent-id 'intent-id'", "corp equity fundraising-workflows-prepare-execution --json"],
5904
- successTemplate: "Fundraising Workflows Prepare Execution created"
5936
+ examples: [
5937
+ "corp equity fundraising-workflows-prepare-execution a1b2c3d4 --approval-artifact-id b2c3d4e5 --intent-id f6g7h8i9",
5938
+ "corp equity fundraising-workflows-prepare-execution a1b2c3d4 --approval-artifact-id b2c3d4e5 --intent-id f6g7h8i9 --json"
5939
+ ],
5940
+ successTemplate: "Fundraising workflow prepared for execution"
5905
5941
  },
5906
5942
  {
5907
5943
  name: "equity fundraising-workflows-record-board-approval",
@@ -5912,8 +5948,11 @@ var init_cap_table = __esm({
5912
5948
  { flags: "--meeting-id <meeting-id>", description: "Meeting ID", required: true },
5913
5949
  { flags: "--resolution-id <resolution-id>", description: "Resolution ID", required: true }
5914
5950
  ],
5915
- examples: ["corp equity fundraising-workflows-record-board-approval <workflow-id> --meeting-id 'meeting-id' --resolution-id 'resolution-id'"],
5916
- successTemplate: "Fundraising Workflows Record Board Approval created"
5951
+ examples: [
5952
+ "corp equity fundraising-workflows-record-board-approval a1b2c3d4 --meeting-id @last:meeting --resolution-id @last:resolution",
5953
+ "corp equity fundraising-workflows-record-board-approval a1b2c3d4 --meeting-id b2c3d4e5 --resolution-id f6g7h8i9"
5954
+ ],
5955
+ successTemplate: "Board approval recorded"
5917
5956
  },
5918
5957
  {
5919
5958
  name: "equity fundraising-workflows-record-close",
@@ -5923,8 +5962,10 @@ var init_cap_table = __esm({
5923
5962
  options: [
5924
5963
  { flags: "--intent-id <intent-id>", description: "Execution intent ID", required: true }
5925
5964
  ],
5926
- examples: ["corp equity fundraising-workflows-record-close <workflow-id> --intent-id 'intent-id'"],
5927
- successTemplate: "Fundraising Workflows Record Close created"
5965
+ examples: [
5966
+ "corp equity fundraising-workflows-record-close a1b2c3d4 --intent-id b2c3d4e5"
5967
+ ],
5968
+ successTemplate: "Fundraising round closed"
5928
5969
  },
5929
5970
  {
5930
5971
  name: "equity fundraising-workflows-record-investor-acceptance",
@@ -5935,8 +5976,11 @@ var init_cap_table = __esm({
5935
5976
  { flags: "--accepted-by-contact-id <accepted-by-contact-id>", description: "Contact ID of the accepting party" },
5936
5977
  { flags: "--intent-id <intent-id>", description: "Execution intent ID", required: true }
5937
5978
  ],
5938
- examples: ["corp equity fundraising-workflows-record-investor-acceptance <workflow-id> --intent-id 'intent-id'", "corp equity fundraising-workflows-record-investor-acceptance --json"],
5939
- successTemplate: "Fundraising Workflows Record Investor Acceptance created"
5979
+ examples: [
5980
+ "corp equity fundraising-workflows-record-investor-acceptance a1b2c3d4 --intent-id b2c3d4e5",
5981
+ "corp equity fundraising-workflows-record-investor-acceptance a1b2c3d4 --intent-id b2c3d4e5 --accepted-by-contact-id c3d4e5f6"
5982
+ ],
5983
+ successTemplate: "Investor acceptance recorded"
5940
5984
  },
5941
5985
  {
5942
5986
  name: "equity fundraising-workflows-record-signature",
@@ -5947,16 +5991,21 @@ var init_cap_table = __esm({
5947
5991
  { flags: "--channel <channel>", description: "Approval channel (board_vote, written_consent, etc.)" },
5948
5992
  { flags: "--signer-identity <signer-identity>", description: "Identity of the signer", required: true }
5949
5993
  ],
5950
- examples: ["corp equity fundraising-workflows-record-signature <workflow-id> --signer-identity 'signer-identity'", "corp equity fundraising-workflows-record-signature --json"],
5951
- successTemplate: "Fundraising Workflows Record Signature created"
5994
+ examples: [
5995
+ 'corp equity fundraising-workflows-record-signature a1b2c3d4 --signer-identity "alice@acme.com"',
5996
+ 'corp equity fundraising-workflows-record-signature a1b2c3d4 --signer-identity "alice@acme.com" --channel written_consent'
5997
+ ],
5998
+ successTemplate: "Signature recorded"
5952
5999
  },
5953
6000
  {
5954
6001
  name: "equity fundraising-workflows-start-signatures",
5955
6002
  description: "Start the signature collection process",
5956
6003
  route: { method: "POST", path: "/v1/equity/fundraising-workflows/{pos}/start-signatures" },
5957
6004
  args: [{ name: "workflow-id", required: true, description: "Workflow ID" }],
5958
- examples: ["corp equity fundraising-workflows-start-signatures <workflow-id>"],
5959
- successTemplate: "Fundraising Workflows Start Signatures created"
6005
+ examples: [
6006
+ "corp equity fundraising-workflows-start-signatures a1b2c3d4"
6007
+ ],
6008
+ successTemplate: "Signature collection started"
5960
6009
  },
5961
6010
  {
5962
6011
  name: "equity grants",
@@ -5968,8 +6017,11 @@ var init_cap_table = __esm({
5968
6017
  { flags: "--recipient-name <recipient-name>", description: "Payment recipient name", required: true },
5969
6018
  { flags: "--shares <shares>", description: "Shares", required: true, type: "int" }
5970
6019
  ],
5971
- examples: ["corp equity grants --grant-type common_stock --recipient-name 'recipient-name' --shares 'shares'"],
5972
- successTemplate: "Grants created"
6020
+ examples: [
6021
+ 'corp equity grants --grant-type common_stock --recipient-name "Alice Smith" --shares 500000',
6022
+ 'corp equity grants --grant-type iso --recipient-name "Bob Jones" --shares 25000'
6023
+ ],
6024
+ successTemplate: "Equity grant issued"
5973
6025
  },
5974
6026
  {
5975
6027
  name: "equity holders",
@@ -5983,8 +6035,11 @@ var init_cap_table = __esm({
5983
6035
  { flags: "--linked-entity-id <linked-entity-id>", description: "ID of the entity to link" },
5984
6036
  { flags: "--name <name>", description: "Display name", required: true }
5985
6037
  ],
5986
- examples: ["corp equity holders --contact-id 'contact-id' --holder-type individual --name 'name'", "corp equity holders --json"],
5987
- successTemplate: "Holders created"
6038
+ examples: [
6039
+ 'corp equity holders --contact-id a1b2c3d4 --holder-type individual --name "Alice Smith"',
6040
+ 'corp equity holders --contact-id e5f6a7b8 --holder-type fund --name "Acme Ventures Fund I"'
6041
+ ],
6042
+ successTemplate: "Equity holder registered"
5988
6043
  },
5989
6044
  {
5990
6045
  name: "equity instruments",
@@ -5999,8 +6054,11 @@ var init_cap_table = __esm({
5999
6054
  { flags: "--symbol <symbol>", description: "Symbol", required: true },
6000
6055
  { flags: "--terms <terms>", description: "Terms" }
6001
6056
  ],
6002
- examples: ["corp equity instruments --issuer-legal-entity-id 'issuer-legal-entity-id' --kind common_equity --symbol 'symbol'", "corp equity instruments --json"],
6003
- successTemplate: "Instruments created"
6057
+ examples: [
6058
+ "corp equity instruments --issuer-legal-entity-id a1b2c3d4 --kind common_equity --symbol COMMON",
6059
+ "corp equity instruments --issuer-legal-entity-id a1b2c3d4 --kind option_grant --symbol OPTIONS --authorized-units 10000000"
6060
+ ],
6061
+ successTemplate: "Instrument created"
6004
6062
  },
6005
6063
  {
6006
6064
  name: "equity positions-adjust",
@@ -6015,8 +6073,11 @@ var init_cap_table = __esm({
6015
6073
  { flags: "--quantity-delta <quantity-delta>", description: "Quantity Delta", required: true, type: "int" },
6016
6074
  { flags: "--source-reference <source-reference>", description: "Source reference for the conversion" }
6017
6075
  ],
6018
- examples: ["corp equity positions-adjust --holder-id 'holder-id' --instrument-id 'instrument-id' --issuer-legal-entity-id 'issuer-legal-entity-id' --quantity-delta 'quantity-delta'", "corp equity positions-adjust --json"],
6019
- successTemplate: "Positions Adjust created"
6076
+ examples: [
6077
+ "corp equity positions-adjust --holder-id a1b2c3d4 --instrument-id b2c3d4e5 --issuer-legal-entity-id c3d4e5f6 --quantity-delta 10000",
6078
+ "corp equity positions-adjust --holder-id a1b2c3d4 --instrument-id b2c3d4e5 --issuer-legal-entity-id c3d4e5f6 --quantity-delta -5000 --source-reference correction:2026-01"
6079
+ ],
6080
+ successTemplate: "Equity position adjusted"
6020
6081
  },
6021
6082
  {
6022
6083
  name: "equity rounds",
@@ -6032,8 +6093,11 @@ var init_cap_table = __esm({
6032
6093
  { flags: "--round-price-cents <round-price-cents>", description: "Round share price in cents" },
6033
6094
  { flags: "--target-raise-cents <target-raise-cents>", description: "Target fundraising amount in cents" }
6034
6095
  ],
6035
- examples: ["corp equity rounds --issuer-legal-entity-id 'issuer-legal-entity-id' --name 'name'", "corp equity rounds --json"],
6036
- successTemplate: "Rounds created"
6096
+ examples: [
6097
+ 'corp equity rounds --issuer-legal-entity-id a1b2c3d4 --name "Series A"',
6098
+ 'corp equity rounds --issuer-legal-entity-id a1b2c3d4 --name "Seed Round" --target-raise-cents 150000000 --pre-money-cents 800000000'
6099
+ ],
6100
+ successTemplate: "Equity round created"
6037
6101
  },
6038
6102
  {
6039
6103
  name: "equity rounds-staged",
@@ -6048,8 +6112,11 @@ var init_cap_table = __esm({
6048
6112
  { flags: "--round-price-cents <round-price-cents>", description: "Round share price in cents" },
6049
6113
  { flags: "--target-raise-cents <target-raise-cents>", description: "Target fundraising amount in cents" }
6050
6114
  ],
6051
- examples: ["corp equity rounds-staged --issuer-legal-entity-id 'issuer-legal-entity-id' --name 'name'", "corp equity rounds-staged --json"],
6052
- successTemplate: "Rounds Staged created"
6115
+ examples: [
6116
+ 'corp equity rounds-staged --issuer-legal-entity-id a1b2c3d4 --name "Series A"',
6117
+ 'corp equity rounds-staged --issuer-legal-entity-id a1b2c3d4 --name "Seed Round" --target-raise-cents 150000000'
6118
+ ],
6119
+ successTemplate: "Staged equity round created"
6053
6120
  },
6054
6121
  {
6055
6122
  name: "equity rounds-accept",
@@ -6061,8 +6128,11 @@ var init_cap_table = __esm({
6061
6128
  { flags: "--accepted-by-contact-id <accepted-by-contact-id>", description: "Contact ID of the accepting party" },
6062
6129
  { flags: "--intent-id <intent-id>", description: "Execution intent ID", required: true }
6063
6130
  ],
6064
- examples: ["corp equity rounds-accept <round-id> --intent-id 'intent-id'", "corp equity rounds-accept --json"],
6065
- successTemplate: "Rounds Accept created"
6131
+ examples: [
6132
+ "corp equity rounds-accept a1b2c3d4 --intent-id b2c3d4e5",
6133
+ "corp equity rounds-accept a1b2c3d4 --intent-id b2c3d4e5 --accepted-by-contact-id c3d4e5f6"
6134
+ ],
6135
+ successTemplate: "Round terms accepted"
6066
6136
  },
6067
6137
  {
6068
6138
  name: "equity rounds-apply-terms",
@@ -6075,8 +6145,11 @@ var init_cap_table = __esm({
6075
6145
  { flags: "--conversion-precedence <conversion-precedence>", description: "Conversion priority ordering", type: "array" },
6076
6146
  { flags: "--protective-provisions <protective-provisions>", description: "Protective provision terms" }
6077
6147
  ],
6078
- examples: ["corp equity rounds-apply-terms <round-id> --anti-dilution-method none", "corp equity rounds-apply-terms --json"],
6079
- successTemplate: "Rounds Apply Terms created"
6148
+ examples: [
6149
+ "corp equity rounds-apply-terms a1b2c3d4 --anti-dilution-method broad_based_weighted_average",
6150
+ "corp equity rounds-apply-terms a1b2c3d4 --anti-dilution-method none --protective-provisions 'standard Series A'"
6151
+ ],
6152
+ successTemplate: "Term sheet applied to round"
6080
6153
  },
6081
6154
  {
6082
6155
  name: "equity rounds-board-approve",
@@ -6088,8 +6161,11 @@ var init_cap_table = __esm({
6088
6161
  { flags: "--meeting-id <meeting-id>", description: "Meeting ID", required: true },
6089
6162
  { flags: "--resolution-id <resolution-id>", description: "Resolution ID", required: true }
6090
6163
  ],
6091
- examples: ["corp equity rounds-board-approve <round-id> --meeting-id 'meeting-id' --resolution-id 'resolution-id'"],
6092
- successTemplate: "Rounds Board Approve created"
6164
+ examples: [
6165
+ "corp equity rounds-board-approve a1b2c3d4 --meeting-id @last:meeting --resolution-id @last:resolution",
6166
+ "corp equity rounds-board-approve a1b2c3d4 --meeting-id b2c3d4e5 --resolution-id f6g7h8i9"
6167
+ ],
6168
+ successTemplate: "Board approval recorded for round"
6093
6169
  },
6094
6170
  {
6095
6171
  name: "equity rounds-issue",
@@ -6101,8 +6177,11 @@ var init_cap_table = __esm({
6101
6177
  { flags: "--meeting-id <meeting-id>", description: "Meeting ID" },
6102
6178
  { flags: "--resolution-id <resolution-id>", description: "Resolution ID" }
6103
6179
  ],
6104
- examples: ["corp equity rounds-issue <round-id>", "corp equity rounds-issue --json"],
6105
- successTemplate: "Rounds Issue created"
6180
+ examples: [
6181
+ "corp equity rounds-issue a1b2c3d4",
6182
+ "corp equity rounds-issue a1b2c3d4 --meeting-id @last:meeting --resolution-id @last:resolution"
6183
+ ],
6184
+ successTemplate: "Round issued"
6106
6185
  },
6107
6186
  {
6108
6187
  name: "equity rounds-securities",
@@ -6119,8 +6198,11 @@ var init_cap_table = __esm({
6119
6198
  { flags: "--quantity <quantity>", description: "Quantity", required: true, type: "int" },
6120
6199
  { flags: "--recipient-name <recipient-name>", description: "Payment recipient name", required: true }
6121
6200
  ],
6122
- examples: ["corp equity rounds-securities <round-id> --instrument-id 'instrument-id' --quantity 'quantity' --recipient-name 'recipient-name'", "corp equity rounds-securities --json"],
6123
- successTemplate: "Rounds Securities created"
6201
+ examples: [
6202
+ 'corp equity rounds-securities a1b2c3d4 --instrument-id COMMON --quantity 500000 --recipient-name "Alice Smith"',
6203
+ 'corp equity rounds-securities a1b2c3d4 --instrument-id SERIES-A --quantity 1000000 --recipient-name "Acme Ventures" --email "invest@acme.com"'
6204
+ ],
6205
+ successTemplate: "Security added to round"
6124
6206
  },
6125
6207
  {
6126
6208
  name: "equity create-transfer-workflow",
@@ -6138,8 +6220,11 @@ var init_cap_table = __esm({
6138
6220
  { flags: "--transfer-type <transfer-type>", description: "Type of share transfer.", required: true, choices: ["gift", "trust_transfer", "secondary_sale", "estate", "other"] },
6139
6221
  { flags: "--transferee-rights <transferee-rights>", description: "Rights granted to the transferee.", required: true, choices: ["full_member", "economic_only", "limited"] }
6140
6222
  ],
6141
- examples: ["corp equity transfer-workflows --from-contact-id 'from-contact-id' --governing-doc-type bylaws --prepare-intent-id 'prepare-intent-id' --share-class-id 'share-class-id' --share-count 'share-count' --to-contact-id gift --transfer-type gift --transferee-rights full_member", "corp equity transfer-workflows --json"],
6142
- successTemplate: "Transfer Workflows created"
6223
+ examples: [
6224
+ "corp equity create-transfer-workflow --from-contact-id a1b2c3d4 --to-contact-id e5f6a7b8 --share-class-id COMMON --share-count 10000 --transfer-type secondary_sale --governing-doc-type bylaws --transferee-rights full_member --prepare-intent-id f9g0h1i2",
6225
+ "corp equity create-transfer-workflow --from-contact-id a1b2c3d4 --to-contact-id e5f6a7b8 --share-class-id COMMON --share-count 5000 --transfer-type gift --governing-doc-type bylaws --transferee-rights full_member --prepare-intent-id f9g0h1i2"
6226
+ ],
6227
+ successTemplate: "Transfer workflow created"
6143
6228
  },
6144
6229
  {
6145
6230
  name: "equity transfer-workflows",
@@ -6148,7 +6233,7 @@ var init_cap_table = __esm({
6148
6233
  entity: true,
6149
6234
  args: [{ name: "workflow-id", required: true, description: "Workflow ID" }],
6150
6235
  display: { title: "Equity Transfer Workflows", cols: ["execution_status>Execution Status", "generated_documents>Generated Documents", "last_packet_hash>Last Packet Hash", "@created_at>Created At", "#active_packet_id>ID"] },
6151
- examples: ["corp equity transfer-workflows", "corp equity transfer-workflows --json"]
6236
+ examples: ["corp equity transfer-workflows a1b2c3d4", "corp equity transfer-workflows a1b2c3d4 --json"]
6152
6237
  },
6153
6238
  {
6154
6239
  name: "equity transfer-workflows-compile-packet",
@@ -6159,8 +6244,11 @@ var init_cap_table = __esm({
6159
6244
  { flags: "--phase <phase>", description: "Workflow phase" },
6160
6245
  { flags: "--required-signers <required-signers>", description: "List of required signers", type: "array" }
6161
6246
  ],
6162
- examples: ["corp equity transfer-workflows-compile-packet <workflow-id>", "corp equity transfer-workflows-compile-packet --json"],
6163
- successTemplate: "Transfer Workflows Compile Packet created"
6247
+ examples: [
6248
+ "corp equity transfer-workflows-compile-packet a1b2c3d4",
6249
+ "corp equity transfer-workflows-compile-packet a1b2c3d4 --phase execution"
6250
+ ],
6251
+ successTemplate: "Transfer document packet compiled"
6164
6252
  },
6165
6253
  {
6166
6254
  name: "equity transfer-workflows-finalize",
@@ -6170,8 +6258,11 @@ var init_cap_table = __esm({
6170
6258
  options: [
6171
6259
  { flags: "--phase <phase>", description: "Workflow phase" }
6172
6260
  ],
6173
- examples: ["corp equity transfer-workflows-finalize <workflow-id>", "corp equity transfer-workflows-finalize --json"],
6174
- successTemplate: "Transfer Workflows Finalize created"
6261
+ examples: [
6262
+ "corp equity transfer-workflows-finalize a1b2c3d4",
6263
+ "corp equity transfer-workflows-finalize a1b2c3d4 --json"
6264
+ ],
6265
+ successTemplate: "Transfer workflow finalized"
6175
6266
  },
6176
6267
  {
6177
6268
  name: "equity transfer-workflows-generate-docs",
@@ -6181,8 +6272,11 @@ var init_cap_table = __esm({
6181
6272
  options: [
6182
6273
  { flags: "--documents <documents>", description: "Document references or content", type: "array" }
6183
6274
  ],
6184
- examples: ["corp equity transfer-workflows-generate-docs <workflow-id>", "corp equity transfer-workflows-generate-docs --json"],
6185
- successTemplate: "Transfer Workflows Generate Docs created"
6275
+ examples: [
6276
+ "corp equity transfer-workflows-generate-docs a1b2c3d4",
6277
+ "corp equity transfer-workflows-generate-docs a1b2c3d4 --json"
6278
+ ],
6279
+ successTemplate: "Transfer documents generated"
6186
6280
  },
6187
6281
  {
6188
6282
  name: "equity transfer-workflows-prepare-execution",
@@ -6195,8 +6289,11 @@ var init_cap_table = __esm({
6195
6289
  { flags: "--intent-id <intent-id>", description: "Execution intent ID", required: true },
6196
6290
  { flags: "--phase <phase>", description: "Workflow phase" }
6197
6291
  ],
6198
- examples: ["corp equity transfer-workflows-prepare-execution <workflow-id> --approval-artifact-id 'approval-artifact-id' --intent-id 'intent-id'", "corp equity transfer-workflows-prepare-execution --json"],
6199
- successTemplate: "Transfer Workflows Prepare Execution created"
6292
+ examples: [
6293
+ "corp equity transfer-workflows-prepare-execution a1b2c3d4 --approval-artifact-id b2c3d4e5 --intent-id f6g7h8i9",
6294
+ "corp equity transfer-workflows-prepare-execution a1b2c3d4 --approval-artifact-id b2c3d4e5 --intent-id f6g7h8i9 --json"
6295
+ ],
6296
+ successTemplate: "Transfer workflow prepared for execution"
6200
6297
  },
6201
6298
  {
6202
6299
  name: "equity transfer-workflows-record-board-approval",
@@ -6207,8 +6304,11 @@ var init_cap_table = __esm({
6207
6304
  { flags: "--meeting-id <meeting-id>", description: "Meeting ID", required: true },
6208
6305
  { flags: "--resolution-id <resolution-id>", description: "Resolution ID", required: true }
6209
6306
  ],
6210
- examples: ["corp equity transfer-workflows-record-board-approval <workflow-id> --meeting-id 'meeting-id' --resolution-id 'resolution-id'"],
6211
- successTemplate: "Transfer Workflows Record Board Approval created"
6307
+ examples: [
6308
+ "corp equity transfer-workflows-record-board-approval a1b2c3d4 --meeting-id @last:meeting --resolution-id @last:resolution",
6309
+ "corp equity transfer-workflows-record-board-approval a1b2c3d4 --meeting-id b2c3d4e5 --resolution-id f6g7h8i9"
6310
+ ],
6311
+ successTemplate: "Board approval recorded for transfer"
6212
6312
  },
6213
6313
  {
6214
6314
  name: "equity transfer-workflows-record-execution",
@@ -6218,8 +6318,10 @@ var init_cap_table = __esm({
6218
6318
  options: [
6219
6319
  { flags: "--intent-id <intent-id>", description: "Execution intent ID", required: true }
6220
6320
  ],
6221
- examples: ["corp equity transfer-workflows-record-execution <workflow-id> --intent-id 'intent-id'"],
6222
- successTemplate: "Transfer Workflows Record Execution created"
6321
+ examples: [
6322
+ "corp equity transfer-workflows-record-execution a1b2c3d4 --intent-id b2c3d4e5"
6323
+ ],
6324
+ successTemplate: "Transfer execution recorded"
6223
6325
  },
6224
6326
  {
6225
6327
  name: "equity transfer-workflows-record-review",
@@ -6231,8 +6333,11 @@ var init_cap_table = __esm({
6231
6333
  { flags: "--notes <notes>", description: "Additional notes", required: true },
6232
6334
  { flags: "--reviewer <reviewer>", description: "Reviewer", required: true }
6233
6335
  ],
6234
- examples: ["corp equity transfer-workflows-record-review <workflow-id> --approved --notes 'notes' --reviewer 'reviewer'"],
6235
- successTemplate: "Transfer Workflows Record Review created"
6336
+ examples: [
6337
+ 'corp equity transfer-workflows-record-review a1b2c3d4 --approved --notes "Transfer complies with ROFR provisions" --reviewer alice-johnson',
6338
+ 'corp equity transfer-workflows-record-review a1b2c3d4 --notes "Missing consent form" --reviewer alice-johnson'
6339
+ ],
6340
+ successTemplate: "Transfer review recorded"
6236
6341
  },
6237
6342
  {
6238
6343
  name: "equity transfer-workflows-record-rofr",
@@ -6243,8 +6348,11 @@ var init_cap_table = __esm({
6243
6348
  { flags: "--offered", description: "Offered", required: true },
6244
6349
  { flags: "--waived", description: "Waived", required: true }
6245
6350
  ],
6246
- examples: ["corp equity transfer-workflows-record-rofr <workflow-id> --offered --waived"],
6247
- successTemplate: "Transfer Workflows Record Rofr created"
6351
+ examples: [
6352
+ "corp equity transfer-workflows-record-rofr a1b2c3d4 --offered --waived",
6353
+ "corp equity transfer-workflows-record-rofr a1b2c3d4 --offered"
6354
+ ],
6355
+ successTemplate: "ROFR recorded"
6248
6356
  },
6249
6357
  {
6250
6358
  name: "equity transfer-workflows-record-signature",
@@ -6255,24 +6363,31 @@ var init_cap_table = __esm({
6255
6363
  { flags: "--channel <channel>", description: "Approval channel (board_vote, written_consent, etc.)" },
6256
6364
  { flags: "--signer-identity <signer-identity>", description: "Identity of the signer", required: true }
6257
6365
  ],
6258
- examples: ["corp equity transfer-workflows-record-signature <workflow-id> --signer-identity 'signer-identity'", "corp equity transfer-workflows-record-signature --json"],
6259
- successTemplate: "Transfer Workflows Record Signature created"
6366
+ examples: [
6367
+ 'corp equity transfer-workflows-record-signature a1b2c3d4 --signer-identity "alice@acme.com"',
6368
+ 'corp equity transfer-workflows-record-signature a1b2c3d4 --signer-identity "bob@acme.com" --channel written_consent'
6369
+ ],
6370
+ successTemplate: "Signature recorded on transfer"
6260
6371
  },
6261
6372
  {
6262
6373
  name: "equity transfer-workflows-start-signatures",
6263
6374
  description: "Start signature collection for transfer",
6264
6375
  route: { method: "POST", path: "/v1/equity/transfer-workflows/{pos}/start-signatures" },
6265
6376
  args: [{ name: "workflow-id", required: true, description: "Workflow ID" }],
6266
- examples: ["corp equity transfer-workflows-start-signatures <workflow-id>"],
6267
- successTemplate: "Transfer Workflows Start Signatures created"
6377
+ examples: [
6378
+ "corp equity transfer-workflows-start-signatures a1b2c3d4"
6379
+ ],
6380
+ successTemplate: "Transfer signature collection started"
6268
6381
  },
6269
6382
  {
6270
6383
  name: "equity transfer-workflows-submit-review",
6271
6384
  description: "Submit a share transfer for review",
6272
6385
  route: { method: "POST", path: "/v1/equity/transfer-workflows/{pos}/submit-review" },
6273
6386
  args: [{ name: "workflow-id", required: true, description: "Workflow ID" }],
6274
- examples: ["corp equity transfer-workflows-submit-review <workflow-id>"],
6275
- successTemplate: "Transfer Workflows Submit Review created"
6387
+ examples: [
6388
+ "corp equity transfer-workflows-submit-review a1b2c3d4"
6389
+ ],
6390
+ successTemplate: "Transfer submitted for review"
6276
6391
  },
6277
6392
  {
6278
6393
  name: "equity workflows-status",
@@ -6281,7 +6396,10 @@ var init_cap_table = __esm({
6281
6396
  entity: true,
6282
6397
  args: [{ name: "workflow-type", required: true, description: "Workflow Type" }, { name: "workflow-id", required: true, description: "Workflow ID" }],
6283
6398
  display: { title: "Equity Workflows Status", cols: ["execution_status>Execution Status", "fundraising_workflow>Fundraising Workflow", "packet>Packet", "transfer_workflow>Transfer Workflow", "#active_packet_id>ID"] },
6284
- examples: ["corp equity workflows-status", "corp equity workflows-status --json"]
6399
+ examples: [
6400
+ "corp equity workflows-status transfer a1b2c3d4",
6401
+ "corp equity workflows-status fundraising a1b2c3d4 --json"
6402
+ ]
6285
6403
  },
6286
6404
  {
6287
6405
  name: "safe-notes",
@@ -6301,8 +6419,11 @@ var init_cap_table = __esm({
6301
6419
  { flags: "--safe-type <safe-type>", description: "Safe Type", choices: ["post_money", "pre_money", "mfn"] },
6302
6420
  { flags: "--valuation-cap-cents <valuation-cap-cents>", description: "Valuation Cap Cents" }
6303
6421
  ],
6304
- examples: ["corp safe-notes --investor-name 'investor-name' --principal-amount-cents 'principal-amount-cents'", "corp safe-notes --json"],
6305
- successTemplate: "Safe Notes created"
6422
+ examples: [
6423
+ 'corp safe-notes --investor-name "Sequoia Capital" --principal-amount-cents 50000000 --valuation-cap-cents 1000000000',
6424
+ 'corp safe-notes --investor-name "Angel Investor" --principal-amount-cents 25000000 --safe-type pre_money --discount-rate 20'
6425
+ ],
6426
+ successTemplate: "SAFE note issued"
6306
6427
  },
6307
6428
  {
6308
6429
  name: "share-transfers",
@@ -6317,8 +6438,11 @@ var init_cap_table = __esm({
6317
6438
  { flags: "--transfer-type <transfer-type>", description: "Type of share transfer.", required: true, choices: ["gift", "trust_transfer", "secondary_sale", "estate", "other"] },
6318
6439
  { flags: "--transferee-rights <transferee-rights>", description: "Transferee Rights", choices: ["full_member", "economic_only", "limited"] }
6319
6440
  ],
6320
- examples: ["corp share-transfers --from-holder bylaws --share-class-id 'share-class-id' --shares 'shares' --to-holder gift --transfer-type gift", "corp share-transfers --json"],
6321
- successTemplate: "Share Transfers created"
6441
+ examples: [
6442
+ "corp share-transfers --from-holder a1b2c3d4 --to-holder e5f6a7b8 --share-class-id COMMON --shares 10000 --transfer-type secondary_sale",
6443
+ "corp share-transfers --from-holder a1b2c3d4 --to-holder e5f6a7b8 --share-class-id COMMON --shares 5000 --transfer-type gift --governing-doc-type bylaws --transferee-rights full_member"
6444
+ ],
6445
+ successTemplate: "Share transfer recorded"
6322
6446
  },
6323
6447
  {
6324
6448
  name: "valuations",
@@ -6336,16 +6460,21 @@ var init_cap_table = __esm({
6336
6460
  { flags: "--report-document-id <report-document-id>", description: "Report Document Id" },
6337
6461
  { flags: "--valuation-type <valuation-type>", description: "Type of 409A or equivalent valuation.", required: true, choices: ["four_oh_nine_a", "llc_profits_interest", "fair_market_value", "gift", "estate", "other"] }
6338
6462
  ],
6339
- examples: ["corp valuations --effective-date 'effective-date' --methodology income --valuation-type four_oh_nine_a", "corp valuations --json"],
6340
- successTemplate: "Valuations created"
6463
+ examples: [
6464
+ "corp valuations --effective-date 2026-01-01 --methodology backsolve --valuation-type four_oh_nine_a",
6465
+ "corp valuations --effective-date 2026-01-01 --methodology market --valuation-type fair_market_value --fmv-per-share-cents 125 --enterprise-value-cents 50000000"
6466
+ ],
6467
+ successTemplate: "Valuation created"
6341
6468
  },
6342
6469
  {
6343
6470
  name: "valuations submit-for-approval",
6344
6471
  description: "Submit a valuation for board approval",
6345
6472
  route: { method: "POST", path: "/v1/valuations/{pos}/submit-for-approval" },
6346
6473
  args: [{ name: "valuation-id", required: true, description: "Valuation ID" }],
6347
- examples: ["corp valuations submit-for-approval <valuation-id>"],
6348
- successTemplate: "Submit For Approval created"
6474
+ examples: [
6475
+ "corp valuations submit-for-approval a1b2c3d4"
6476
+ ],
6477
+ successTemplate: "Valuation submitted for approval"
6349
6478
  }
6350
6479
  ];
6351
6480
  }
@@ -6999,7 +7128,10 @@ var init_governance = __esm({
6999
7128
  }
7000
7129
  printSeatsTable(seats);
7001
7130
  },
7002
- examples: ["corp governance seats <body-ref>", "corp governance seats <body-ref> --json"]
7131
+ examples: [
7132
+ "corp governance seats @last:body",
7133
+ "corp governance seats a1b2c3d4 --json"
7134
+ ]
7003
7135
  },
7004
7136
  // --- governance meetings <body-ref> ---
7005
7137
  {
@@ -7031,7 +7163,10 @@ var init_governance = __esm({
7031
7163
  }
7032
7164
  printMeetingsTable(meetings);
7033
7165
  },
7034
- examples: ["corp governance meetings <body-ref>", "corp governance meetings <body-ref> --json"]
7166
+ examples: [
7167
+ "corp governance meetings @last:body",
7168
+ "corp governance meetings a1b2c3d4 --json"
7169
+ ]
7035
7170
  },
7036
7171
  // --- governance resolutions <meeting-ref> ---
7037
7172
  {
@@ -7063,7 +7198,10 @@ var init_governance = __esm({
7063
7198
  }
7064
7199
  printResolutionsTable(resolutions);
7065
7200
  },
7066
- examples: ["corp governance resolutions <meeting-ref>", "corp governance resolutions <meeting-ref> --json"]
7201
+ examples: [
7202
+ "corp governance resolutions @last:meeting",
7203
+ "corp governance resolutions a1b2c3d4 --json"
7204
+ ]
7067
7205
  },
7068
7206
  // --- governance agenda-items <meeting-ref> ---
7069
7207
  {
@@ -7095,12 +7233,15 @@ var init_governance = __esm({
7095
7233
  }
7096
7234
  printAgendaItemsTable(items);
7097
7235
  },
7098
- examples: ["corp governance agenda-items <meeting-ref>", "corp governance agenda-items <meeting-ref> --json"]
7236
+ examples: [
7237
+ "corp governance agenda-items @last:meeting",
7238
+ "corp governance agenda-items a1b2c3d4 --json"
7239
+ ]
7099
7240
  },
7100
7241
  // --- governance incidents ---
7101
7242
  {
7102
7243
  name: "governance incidents",
7103
- description: "Report a governance incident",
7244
+ description: "List governance incidents for this entity",
7104
7245
  route: { method: "GET", path: "/v1/entities/{eid}/governance/incidents" },
7105
7246
  entity: true,
7106
7247
  display: { title: "Governance Incidents" },
@@ -7183,7 +7324,11 @@ var init_governance = __esm({
7183
7324
  if (result.reason) console.log(` ${chalk8.bold("Reason:")} ${result.reason}`);
7184
7325
  }
7185
7326
  },
7186
- examples: ["corp governance mode", "corp governance mode --json"]
7327
+ examples: [
7328
+ "corp governance mode",
7329
+ "corp governance mode --set board",
7330
+ "corp governance mode --set founder"
7331
+ ]
7187
7332
  },
7188
7333
  // --- governance create-body ---
7189
7334
  {
@@ -7227,7 +7372,10 @@ var init_governance = __esm({
7227
7372
  },
7228
7373
  produces: { kind: "body" },
7229
7374
  successTemplate: "Governance body created: {name}",
7230
- examples: ["corp governance create-body --name 'name' --body-type 'type'", "corp governance create-body --json"]
7375
+ examples: [
7376
+ 'corp governance create-body --name "Board of Directors" --body-type board_of_directors',
7377
+ 'corp governance create-body --name "Member Vote" --body-type llc_member_vote --quorum unanimous --voting per_unit'
7378
+ ]
7231
7379
  },
7232
7380
  // --- governance add-seat <body-ref> ---
7233
7381
  {
@@ -7239,7 +7387,7 @@ var init_governance = __esm({
7239
7387
  args: [{ name: "body-ref", required: true, description: "Governance body reference" }],
7240
7388
  options: [
7241
7389
  { flags: "--holder <contact-ref>", description: "Contact reference for the seat holder", required: true },
7242
- { flags: "--role <role>", description: "Seat role (chair, member, officer, observer)", default: "member" }
7390
+ { flags: "--role <role>", description: "Seat role", default: "member", choices: ["chair", "member", "officer", "observer"] }
7243
7391
  ],
7244
7392
  handler: async (ctx) => {
7245
7393
  const bodyRef = ctx.positional[0];
@@ -7262,8 +7410,11 @@ var init_governance = __esm({
7262
7410
  printReferenceSummary("seat", result, { showReuseHint: true });
7263
7411
  },
7264
7412
  produces: { kind: "seat" },
7265
- successTemplate: "Seat added to {body_id}",
7266
- examples: ["corp governance add-seat <body-ref> --holder 'contact-ref'", "corp governance add-seat --json"]
7413
+ successTemplate: "Seat added: {seat_id}",
7414
+ examples: [
7415
+ "corp governance add-seat @last:body --holder alice-johnson",
7416
+ "corp governance add-seat @last:body --holder bob-smith --role chair"
7417
+ ]
7267
7418
  },
7268
7419
  // --- governance convene ---
7269
7420
  {
@@ -7274,7 +7425,7 @@ var init_governance = __esm({
7274
7425
  dryRun: true,
7275
7426
  options: [
7276
7427
  { flags: "--body <ref>", description: "Governance body reference", required: true },
7277
- { flags: "--type <type>", description: "Meeting type (board_meeting, shareholder_meeting, member_meeting, written_consent)", required: true },
7428
+ { flags: "--type <type>", description: "Meeting type", required: true, choices: ["board_meeting", "shareholder_meeting", "member_meeting", "written_consent"] },
7278
7429
  { flags: "--title <title>", description: "Meeting title", required: true },
7279
7430
  { flags: "--date <date>", description: "Meeting date (ISO 8601)" },
7280
7431
  { flags: "--agenda <item>", description: "Agenda item (repeatable)", type: "array" }
@@ -7311,7 +7462,10 @@ var init_governance = __esm({
7311
7462
  },
7312
7463
  produces: { kind: "meeting" },
7313
7464
  successTemplate: "Meeting scheduled: {title}",
7314
- examples: ["corp governance convene --body 'ref' --type 'type' --title 'title'", "corp governance convene --json"]
7465
+ examples: [
7466
+ 'corp governance convene --body @last:body --type board_meeting --title "Q1 2026 Board Meeting" --date 2026-03-31',
7467
+ 'corp governance convene --body @last:body --type board_meeting --title "Special Meeting" --agenda "Approve option plan" --agenda "Approve SAFE issuance"'
7468
+ ]
7315
7469
  },
7316
7470
  // --- governance open <meeting-ref> ---
7317
7471
  {
@@ -7353,7 +7507,10 @@ var init_governance = __esm({
7353
7507
  }
7354
7508
  ctx.writer.success(`Meeting opened: ${resolvedMeetingId}`);
7355
7509
  },
7356
- examples: ["corp governance open <meeting-ref> --present-seat 'ref'"]
7510
+ examples: [
7511
+ "corp governance open @last:meeting --present-seat @last:seat",
7512
+ "corp governance open a1b2c3d4 --present-seat seat-alice --present-seat seat-bob"
7513
+ ]
7357
7514
  },
7358
7515
  // --- governance vote <meeting-ref> <item-ref> ---
7359
7516
  {
@@ -7407,7 +7564,11 @@ var init_governance = __esm({
7407
7564
  }
7408
7565
  }
7409
7566
  },
7410
- examples: ["corp governance vote <meeting-ref> <item-ref> --voter <contact-ref> --vote for"]
7567
+ successTemplate: "Vote recorded: {vote_id}",
7568
+ examples: [
7569
+ "corp governance vote @last:meeting @last:agenda_item --voter alice-johnson --vote for",
7570
+ "corp governance vote a1b2c3d4 b2c3d4e5 --voter bob-smith --vote against"
7571
+ ]
7411
7572
  },
7412
7573
  // --- governance notice <meeting-ref> ---
7413
7574
  {
@@ -7432,7 +7593,11 @@ var init_governance = __esm({
7432
7593
  }
7433
7594
  ctx.writer.success(`Notice sent for meeting ${resolvedMeetingId}`);
7434
7595
  },
7435
- examples: ["corp governance notice <meeting-ref>"]
7596
+ successTemplate: "Meeting notice sent",
7597
+ examples: [
7598
+ "corp governance notice @last:meeting",
7599
+ "corp governance notice a1b2c3d4"
7600
+ ]
7436
7601
  },
7437
7602
  // --- governance adjourn <meeting-ref> ---
7438
7603
  {
@@ -7457,7 +7622,11 @@ var init_governance = __esm({
7457
7622
  }
7458
7623
  ctx.writer.success(`Meeting ${resolvedMeetingId} adjourned`);
7459
7624
  },
7460
- examples: ["corp governance adjourn <meeting-ref>"]
7625
+ successTemplate: "Meeting adjourned",
7626
+ examples: [
7627
+ "corp governance adjourn @last:meeting",
7628
+ "corp governance adjourn a1b2c3d4"
7629
+ ]
7461
7630
  },
7462
7631
  // --- governance reopen <meeting-ref> ---
7463
7632
  {
@@ -7482,7 +7651,11 @@ var init_governance = __esm({
7482
7651
  }
7483
7652
  ctx.writer.success(`Meeting ${resolvedMeetingId} re-opened`);
7484
7653
  },
7485
- examples: ["corp governance reopen <meeting-ref>"]
7654
+ successTemplate: "Meeting re-opened",
7655
+ examples: [
7656
+ "corp governance reopen @last:meeting",
7657
+ "corp governance reopen a1b2c3d4"
7658
+ ]
7486
7659
  },
7487
7660
  // --- governance cancel <meeting-ref> ---
7488
7661
  {
@@ -7520,7 +7693,11 @@ var init_governance = __esm({
7520
7693
  }
7521
7694
  ctx.writer.success(`Meeting ${resolvedMeetingId} cancelled`);
7522
7695
  },
7523
- examples: ["corp governance cancel <meeting-ref>", "corp governance cancel --json"]
7696
+ successTemplate: "Meeting cancelled",
7697
+ examples: [
7698
+ "corp governance cancel @last:meeting",
7699
+ "corp governance cancel a1b2c3d4 --yes"
7700
+ ]
7524
7701
  },
7525
7702
  // --- governance finalize-item <meeting-ref> <item-ref> ---
7526
7703
  {
@@ -7559,7 +7736,11 @@ var init_governance = __esm({
7559
7736
  }
7560
7737
  ctx.writer.success(`Agenda item ${resolvedItemId} finalized as ${ctx.opts.status}`);
7561
7738
  },
7562
- examples: ["corp governance finalize-item <meeting-ref> <item-ref>"]
7739
+ successTemplate: "Agenda item finalized",
7740
+ examples: [
7741
+ "corp governance finalize-item @last:meeting @last:agenda_item --status voted",
7742
+ "corp governance finalize-item a1b2c3d4 b2c3d4e5 --status tabled"
7743
+ ]
7563
7744
  },
7564
7745
  // --- governance resolve <meeting-ref> <item-ref> ---
7565
7746
  {
@@ -7602,8 +7783,11 @@ var init_governance = __esm({
7602
7783
  printReferenceSummary("resolution", result, { showReuseHint: true });
7603
7784
  },
7604
7785
  produces: { kind: "resolution" },
7605
- successTemplate: "Resolution computed",
7606
- examples: ["corp governance resolve <meeting-ref> <item-ref> --text 'resolution_text'"]
7786
+ successTemplate: "Resolution computed: {resolution_id}",
7787
+ examples: [
7788
+ 'corp governance resolve @last:meeting @last:agenda_item --text "RESOLVED: The board approves the 2026 option plan."',
7789
+ 'corp governance resolve a1b2c3d4 b2c3d4e5 --text "RESOLVED: The board authorizes issuance of Series A preferred stock."'
7790
+ ]
7607
7791
  },
7608
7792
  // --- governance written-consent ---
7609
7793
  {
@@ -7655,7 +7839,10 @@ var init_governance = __esm({
7655
7839
  },
7656
7840
  produces: { kind: "meeting" },
7657
7841
  successTemplate: "Written consent created: {title}",
7658
- examples: ["corp governance written-consent --body 'ref' --title 'title' --description 'desc'"]
7842
+ examples: [
7843
+ 'corp governance written-consent --body @last:body --title "Approve 2026 Option Plan" --description "The board approves adoption of the 2026 Equity Incentive Plan."',
7844
+ 'corp governance written-consent --body @last:body --title "Authorize SAFE Issuance" --description "The board authorizes issuance of a SAFE to Sequoia Capital for $500,000."'
7845
+ ]
7659
7846
  },
7660
7847
  // --- governance quick-approve ---
7661
7848
  {
@@ -7770,6 +7957,10 @@ var init_governance = __esm({
7770
7957
  const seatRef = ctx.positional[0];
7771
7958
  const eid = await ctx.resolver.resolveEntity(ctx.opts.entityId);
7772
7959
  const seatId = await ctx.resolver.resolveSeat(eid, seatRef, ctx.opts.bodyId);
7960
+ if (ctx.dryRun) {
7961
+ ctx.writer.dryRun("governance.resign_seat", { entity_id: eid, seat_id: seatId });
7962
+ return;
7963
+ }
7773
7964
  const result = await ctx.client.resignSeat(seatId, eid);
7774
7965
  if (ctx.opts.json) {
7775
7966
  ctx.writer.json(result);
@@ -7777,7 +7968,11 @@ var init_governance = __esm({
7777
7968
  }
7778
7969
  ctx.writer.success(`Seat ${seatId} resigned.`);
7779
7970
  },
7780
- examples: ["corp governance resign <seat-ref>", "corp governance resign --json"]
7971
+ successTemplate: "Seat resigned",
7972
+ examples: [
7973
+ "corp governance resign @last:seat",
7974
+ "corp governance resign a1b2c3d4"
7975
+ ]
7781
7976
  },
7782
7977
  // ── Auto-generated from OpenAPI ──────────────────────────────
7783
7978
  {
@@ -7828,17 +8023,20 @@ var init_governance = __esm({
7828
8023
  options: [
7829
8024
  { flags: "--template-version <template-version>", description: "Template Version" }
7830
8025
  ],
7831
- examples: ["corp entities governance-doc-bundles-generate", "corp entities governance-doc-bundles-generate --json"],
7832
- successTemplate: "Governance Doc Bundles Generate created"
8026
+ examples: [
8027
+ "corp entities governance-doc-bundles-generate",
8028
+ "corp entities governance-doc-bundles-generate --template-version v2 --json"
8029
+ ],
8030
+ successTemplate: "Governance document bundle generated"
7833
8031
  },
7834
8032
  {
7835
8033
  name: "entities governance-doc-bundle",
7836
- description: "List governance document bundles",
8034
+ description: "View a specific governance document bundle by ID",
7837
8035
  route: { method: "GET", path: "/v1/entities/{eid}/governance/doc-bundles/{pos}" },
7838
8036
  entity: true,
7839
8037
  args: [{ name: "bundle-id", required: true, description: "Document bundle ID" }],
7840
8038
  display: { title: "Entities Governance Doc Bundles", cols: ["documents>Documents", "entity_type>Entity Type", "generated_at>Generated At", "profile_version>Profile Version", "#bundle_id>ID"] },
7841
- examples: ["corp entities governance-doc-bundles", "corp entities governance-doc-bundles --json"]
8039
+ examples: ["corp entities governance-doc-bundle a1b2c3d4", "corp entities governance-doc-bundle a1b2c3d4 --json"]
7842
8040
  },
7843
8041
  {
7844
8042
  name: "entities governance-mode-history",
@@ -7874,7 +8072,10 @@ var init_governance = __esm({
7874
8072
  { flags: "--quorum-rule <quorum-rule>", description: "The threshold required for a vote to pass.", required: true, choices: ["majority", "supermajority", "unanimous"] },
7875
8073
  { flags: "--voting-method <voting-method>", description: "How votes are counted.", required: true, choices: ["per_capita", "per_unit"] }
7876
8074
  ],
7877
- examples: ["corp governance-bodies --body-type board_of_directors --name majority --quorum-rule majority --voting-method per_capita"],
8075
+ examples: [
8076
+ 'corp governance-bodies create --name "Board of Directors" --body-type board_of_directors --quorum-rule majority --voting-method per_capita',
8077
+ 'corp governance-bodies create --name "LLC Member Vote" --body-type llc_member_vote --quorum-rule unanimous --voting-method per_unit'
8078
+ ],
7878
8079
  successTemplate: "Governance body created"
7879
8080
  },
7880
8081
  {
@@ -7882,8 +8083,10 @@ var init_governance = __esm({
7882
8083
  description: "Scan for and flag expired governance seats",
7883
8084
  route: { method: "POST", path: "/v1/governance-seats/scan-expired" },
7884
8085
  entity: true,
7885
- examples: ["corp governance-seats scan-expired"],
7886
- successTemplate: "Expired seats scanned"
8086
+ examples: [
8087
+ "corp governance-seats scan-expired"
8088
+ ],
8089
+ successTemplate: "Expired seats scanned and flagged"
7887
8090
  },
7888
8091
  {
7889
8092
  name: "governance-seats resign",
@@ -7891,7 +8094,9 @@ var init_governance = __esm({
7891
8094
  route: { method: "POST", path: "/v1/governance-seats/{pos}/resign" },
7892
8095
  entity: true,
7893
8096
  args: [{ name: "seat-id", required: true, description: "Governance seat ID" }],
7894
- examples: ["corp governance-seats resign <seat-id>"],
8097
+ examples: [
8098
+ "corp governance-seats resign a1b2c3d4"
8099
+ ],
7895
8100
  successTemplate: "Seat resigned"
7896
8101
  },
7897
8102
  {
@@ -7900,7 +8105,7 @@ var init_governance = __esm({
7900
8105
  route: { method: "POST", path: "/v1/governance/audit/checkpoints" },
7901
8106
  entity: true,
7902
8107
  examples: ["corp governance audit-checkpoints"],
7903
- successTemplate: "Audit Checkpoints created"
8108
+ successTemplate: "Audit checkpoint created"
7904
8109
  },
7905
8110
  {
7906
8111
  name: "governance audit-events",
@@ -7917,8 +8122,11 @@ var init_governance = __esm({
7917
8122
  { flags: "--linked-mode-event-id <linked-mode-event-id>", description: "Linked Mode Event Id" },
7918
8123
  { flags: "--linked-trigger-id <linked-trigger-id>", description: "Linked Trigger Id" }
7919
8124
  ],
7920
- examples: ["corp governance audit-events --action 'action' --event-type mode_changed", "corp governance audit-events --json"],
7921
- successTemplate: "Audit Events created"
8125
+ examples: [
8126
+ 'corp governance audit-events --action "Mode changed to board" --event-type mode_changed',
8127
+ 'corp governance audit-events --action "Manual review completed" --event-type manual_event --details "Reviewed by legal team"'
8128
+ ],
8129
+ successTemplate: "Audit event recorded"
7922
8130
  },
7923
8131
  {
7924
8132
  name: "governance audit-verify",
@@ -7926,7 +8134,7 @@ var init_governance = __esm({
7926
8134
  route: { method: "POST", path: "/v1/governance/audit/verify" },
7927
8135
  entity: true,
7928
8136
  examples: ["corp governance audit-verify"],
7929
- successTemplate: "Audit Verify created"
8137
+ successTemplate: "Governance audit verified"
7930
8138
  },
7931
8139
  {
7932
8140
  name: "governance delegation-schedule",
@@ -7949,8 +8157,11 @@ var init_governance = __esm({
7949
8157
  { flags: "--rationale <rationale>", description: "Rationale" },
7950
8158
  { flags: "--tier1-max-amount-cents <tier1-max-amount-cents>", description: "Tier1 Max Amount Cents" }
7951
8159
  ],
7952
- examples: ["corp governance delegation-schedule-amend", "corp governance delegation-schedule-amend --json"],
7953
- successTemplate: "Delegation Schedule Amend created"
8160
+ examples: [
8161
+ 'corp governance delegation-schedule-amend --rationale "Expanding Tier 1 authority for routine operations"',
8162
+ "corp governance delegation-schedule-amend --meeting-id @last:meeting --adopted-resolution-id @last:resolution --tier1-max-amount-cents 500000"
8163
+ ],
8164
+ successTemplate: "Delegation schedule amended"
7954
8165
  },
7955
8166
  {
7956
8167
  name: "governance delegation-schedule-history",
@@ -7970,8 +8181,11 @@ var init_governance = __esm({
7970
8181
  { flags: "--meeting-id <meeting-id>", description: "Meeting ID", required: true },
7971
8182
  { flags: "--rationale <rationale>", description: "Rationale" }
7972
8183
  ],
7973
- examples: ["corp governance delegation-schedule-reauthorize --adopted-resolution-id 'adopted-resolution-id' --meeting-id 'meeting-id'", "corp governance delegation-schedule-reauthorize --json"],
7974
- successTemplate: "Delegation Schedule Reauthorize created"
8184
+ examples: [
8185
+ "corp governance delegation-schedule-reauthorize --adopted-resolution-id @last:resolution --meeting-id @last:meeting",
8186
+ 'corp governance delegation-schedule-reauthorize --adopted-resolution-id a1b2c3d4 --meeting-id b2c3d4e5 --rationale "Annual reauthorization of delegation schedule"'
8187
+ ],
8188
+ successTemplate: "Delegation schedule reauthorized"
7975
8189
  },
7976
8190
  {
7977
8191
  name: "governance evaluate",
@@ -7982,8 +8196,11 @@ var init_governance = __esm({
7982
8196
  { flags: "--intent-type <intent-type>", description: "Type of intent", required: true },
7983
8197
  { flags: "--metadata <metadata>", description: "Additional metadata (JSON)" }
7984
8198
  ],
7985
- examples: ["corp governance evaluate --intent-type 'intent-type'", "corp governance evaluate --json"],
7986
- successTemplate: "Governance evaluated"
8199
+ examples: [
8200
+ "corp governance evaluate --intent-type equity.issuance.execute",
8201
+ `corp governance evaluate --intent-type equity.transfer.prepare --metadata '{"amount_cents": 50000000}'`
8202
+ ],
8203
+ successTemplate: "Governance evaluation complete"
7987
8204
  },
7988
8205
  {
7989
8206
  name: "governance report-incident",
@@ -7995,8 +8212,11 @@ var init_governance = __esm({
7995
8212
  { flags: "--severity <severity>", description: "Severity level", required: true, choices: ["low", "medium", "high", "critical"] },
7996
8213
  { flags: "--title <title>", description: "Title", required: true }
7997
8214
  ],
7998
- examples: ["corp governance incidents --description low --severity low --title 'title'"],
7999
- successTemplate: "Incidents created"
8215
+ examples: [
8216
+ 'corp governance report-incident --title "Unauthorized access attempt" --description "Board portal accessed from unknown IP" --severity medium',
8217
+ 'corp governance report-incident --title "Quorum breach" --description "Meeting held without required quorum" --severity high'
8218
+ ],
8219
+ successTemplate: "Incident reported"
8000
8220
  },
8001
8221
  {
8002
8222
  name: "governance incidents-resolve",
@@ -8004,8 +8224,10 @@ var init_governance = __esm({
8004
8224
  route: { method: "POST", path: "/v1/governance/incidents/{pos}/resolve" },
8005
8225
  entity: true,
8006
8226
  args: [{ name: "incident-id", required: true, description: "Incident ID" }],
8007
- examples: ["corp governance incidents-resolve <incident-id>"],
8008
- successTemplate: "Incidents Resolve created"
8227
+ examples: [
8228
+ "corp governance incidents-resolve a1b2c3d4"
8229
+ ],
8230
+ successTemplate: "Incident resolved"
8009
8231
  },
8010
8232
  {
8011
8233
  name: "meetings written-consent",
@@ -8016,8 +8238,11 @@ var init_governance = __esm({
8016
8238
  { flags: "--description <description>", description: "Description text", required: true },
8017
8239
  { flags: "--title <title>", description: "Title", required: true }
8018
8240
  ],
8019
- examples: ["corp meetings written-consent --body-id 'body-id' --description 'description' --title 'title'"],
8020
- successTemplate: "Written Consent created"
8241
+ examples: [
8242
+ 'corp meetings written-consent --body-id a1b2c3d4 --title "Approve Budget" --description "The board approves the 2026 operating budget."',
8243
+ 'corp meetings written-consent --body-id a1b2c3d4 --title "Authorize Officer" --description "The board authorizes Alice Smith as CFO."'
8244
+ ],
8245
+ successTemplate: "Written consent created"
8021
8246
  },
8022
8247
  {
8023
8248
  name: "meetings agenda-items-vote",
@@ -8029,8 +8254,11 @@ var init_governance = __esm({
8029
8254
  { flags: "--vote-value <vote-value>", description: "How a participant voted.", required: true, choices: ["for", "against", "abstain", "recusal"] },
8030
8255
  { flags: "--voter-id <voter-id>", description: "Voter Id", required: true }
8031
8256
  ],
8032
- examples: ["corp meetings agenda-items-vote <meeting-id> <item-id> --vote-value for --voter-id 'voter-id'"],
8033
- successTemplate: "Agenda Items Vote created"
8257
+ examples: [
8258
+ "corp meetings agenda-items-vote a1b2c3d4 b2c3d4e5 --vote-value for --voter-id c3d4e5f6",
8259
+ "corp meetings agenda-items-vote a1b2c3d4 b2c3d4e5 --vote-value abstain --voter-id c3d4e5f6"
8260
+ ],
8261
+ successTemplate: "Vote recorded"
8034
8262
  },
8035
8263
  {
8036
8264
  name: "meetings convene",
@@ -8041,8 +8269,10 @@ var init_governance = __esm({
8041
8269
  options: [
8042
8270
  { flags: "--present-seat-ids <present-seat-ids>", description: "Present Seat Ids", required: true, type: "array" }
8043
8271
  ],
8044
- examples: ["corp meetings convene <meeting-id> --present-seat-ids 'present-seat-ids'"],
8045
- successTemplate: "Convene created"
8272
+ examples: [
8273
+ "corp meetings convene a1b2c3d4 --present-seat-ids seat-alice seat-bob"
8274
+ ],
8275
+ successTemplate: "Meeting convened"
8046
8276
  },
8047
8277
  {
8048
8278
  name: "meetings resolutions-attach-document",
@@ -8052,8 +8282,10 @@ var init_governance = __esm({
8052
8282
  options: [
8053
8283
  { flags: "--document-id <document-id>", description: "Document ID", required: true }
8054
8284
  ],
8055
- examples: ["corp meetings resolutions-attach-document <meeting-id> <resolution-id> --document-id 'document-id'"],
8056
- successTemplate: "Resolutions Attach Document created"
8285
+ examples: [
8286
+ "corp meetings resolutions-attach-document a1b2c3d4 b2c3d4e5 --document-id c3d4e5f6"
8287
+ ],
8288
+ successTemplate: "Document attached to resolution"
8057
8289
  }
8058
8290
  ];
8059
8291
  }
@@ -8149,7 +8381,7 @@ var init_documents = __esm({
8149
8381
  }
8150
8382
  console.log(shareUrl);
8151
8383
  },
8152
- examples: ["corp documents signing-link", "corp documents signing-link --json"]
8384
+ examples: ["corp documents signing-link @last", "corp documents signing-link doc-abc123"]
8153
8385
  },
8154
8386
  // --- documents sign <doc-ref> ---
8155
8387
  {
@@ -8203,7 +8435,10 @@ var init_documents = __esm({
8203
8435
  printReferenceSummary("document", result.document, { showReuseHint: true });
8204
8436
  printJson(result.document);
8205
8437
  },
8206
- examples: ["corp documents sign <doc-ref>", "corp documents sign --json"]
8438
+ examples: [
8439
+ "corp documents sign @last",
8440
+ 'corp documents sign doc-abc123 --signer-name "Alice Smith" --signer-role CEO --signer-email alice@acme.com'
8441
+ ]
8207
8442
  },
8208
8443
  // --- documents sign-all ---
8209
8444
  {
@@ -8228,7 +8463,7 @@ var init_documents = __esm({
8228
8463
  signatures: Array.isArray(document.signatures) ? document.signatures.length : document.signatures
8229
8464
  })));
8230
8465
  },
8231
- examples: ["corp documents sign-all"]
8466
+ examples: ["corp documents sign-all", "corp documents sign-all --json"]
8232
8467
  },
8233
8468
  // --- documents generate ---
8234
8469
  {
@@ -8237,7 +8472,7 @@ var init_documents = __esm({
8237
8472
  route: { method: "POST", path: "/v1/contracts/generate" },
8238
8473
  entity: true,
8239
8474
  options: [
8240
- { flags: "--template <type>", description: "Template type (consulting_agreement, employment_offer, contractor_agreement, nda, custom)", required: true },
8475
+ { flags: "--template <type>", description: "Contract template type", required: true, choices: ["consulting_agreement", "employment_offer", "contractor_agreement", "nda", "safe_agreement", "custom"] },
8241
8476
  { flags: "--counterparty <name>", description: "Counterparty name", required: true },
8242
8477
  { flags: "--effective-date <date>", description: "Effective date (ISO 8601, defaults to today)" },
8243
8478
  { flags: "--base-salary <amount>", description: "Employment offer base salary (for employment_offer)" },
@@ -8306,8 +8541,13 @@ var init_documents = __esm({
8306
8541
  }
8307
8542
  },
8308
8543
  produces: { kind: "document" },
8309
- successTemplate: "Document generated: {title}",
8310
- examples: ["corp documents generate --template 'type' --counterparty 'name'", "corp documents generate --json"]
8544
+ successTemplate: "Contract generated: {document_id} \u2014 {title}",
8545
+ examples: [
8546
+ 'corp documents generate --template consulting_agreement --counterparty "Acme Consulting LLC"',
8547
+ 'corp documents generate --template employment_offer --counterparty "Jane Doe" --base-salary 150000',
8548
+ 'corp documents generate --template nda --counterparty "Partner Corp" --effective-date 2026-04-01',
8549
+ 'corp documents generate --template safe_agreement --counterparty "Seed Investor" --param purchase_amount=500000 --param valuation_cap=10000000'
8550
+ ]
8311
8551
  },
8312
8552
  // --- documents preview-pdf ---
8313
8553
  {
@@ -8330,7 +8570,10 @@ var init_documents = __esm({
8330
8570
  ctx.writer.success(`Preview PDF URL: ${url}`);
8331
8571
  console.log("The document definition was validated successfully. Use your API key to download the PDF.");
8332
8572
  },
8333
- examples: ["corp documents preview-pdf", "corp documents preview-pdf --json"]
8573
+ examples: [
8574
+ "corp documents preview-pdf --definition-id bylaws",
8575
+ "corp documents preview-pdf --definition-id articles_of_incorporation"
8576
+ ]
8334
8577
  }
8335
8578
  ];
8336
8579
  }
@@ -8548,42 +8791,42 @@ var init_compliance = __esm({
8548
8791
  },
8549
8792
  {
8550
8793
  name: "compliance escalations-resolve-with-evidence",
8551
- description: "Resolve a compliance escalation with evidence",
8794
+ description: "Resolve a compliance escalation by submitting supporting evidence",
8552
8795
  route: { method: "POST", path: "/v1/compliance/escalations/{pos}/resolve-with-evidence" },
8553
8796
  args: [{ name: "escalation-id", required: true, description: "Escalation ID" }],
8554
8797
  options: [
8555
- { flags: "--evidence-type <evidence-type>", description: "Evidence Type" },
8556
- { flags: "--filing-reference <filing-reference>", description: "Filing Reference" },
8557
- { flags: "--notes <notes>", description: "Additional notes" },
8558
- { flags: "--packet-id <packet-id>", description: "Document packet ID" },
8559
- { flags: "--resolve-incident", description: "Resolve Incident" },
8560
- { flags: "--resolve-obligation", description: "Resolve Obligation" }
8798
+ { flags: "--evidence-type <evidence-type>", description: "Type of evidence provided", choices: ["filing", "payment", "document", "correspondence", "other"] },
8799
+ { flags: "--filing-reference <filing-reference>", description: "Reference number or identifier of the associated filing" },
8800
+ { flags: "--notes <notes>", description: "Additional notes about the resolution" },
8801
+ { flags: "--packet-id <packet-id>", description: "Document packet ID containing evidence" },
8802
+ { flags: "--resolve-incident", description: "Also mark the associated incident as resolved" },
8803
+ { flags: "--resolve-obligation", description: "Also mark the associated obligation as resolved" }
8561
8804
  ],
8562
8805
  examples: [
8563
8806
  "corp compliance escalations-resolve-with-evidence esc_01hx9k3n2p4q7r8s9t0uvwxyz --evidence-type filing --filing-reference DE-2026-0042",
8564
8807
  'corp compliance escalations-resolve-with-evidence esc_01hx9k3n2p4q7r8s9t0uvwxyz --resolve-incident --notes "Filed on time"'
8565
8808
  ],
8566
- successTemplate: "Escalations Resolve With Evidence created"
8809
+ successTemplate: "Escalation resolved with evidence"
8567
8810
  },
8568
8811
  {
8569
8812
  name: "contractors classify",
8570
- description: "Classify a worker as employee or contractor",
8813
+ description: "Classify a worker as an employee or independent contractor",
8571
8814
  route: { method: "POST", path: "/v1/contractors/classify" },
8572
8815
  entity: true,
8573
8816
  options: [
8574
- { flags: "--contractor-name <contractor-name>", description: "Contractor Name", required: true },
8575
- { flags: "--duration-months <duration-months>", description: "Duration Months" },
8576
- { flags: "--exclusive-client <exclusive-client>", description: "Exclusive Client" },
8577
- { flags: "--factors <factors>", description: "Factors" },
8578
- { flags: "--hours-per-week <hours-per-week>", description: "Hours Per Week" },
8579
- { flags: "--provides-tools <provides-tools>", description: "Provides Tools" },
8580
- { flags: "--state <state>", description: "State" }
8817
+ { flags: "--contractor-name <contractor-name>", description: "Full name or company name of the worker", required: true },
8818
+ { flags: "--duration-months <duration-months>", description: "Expected or actual engagement duration in months" },
8819
+ { flags: "--exclusive-client <exclusive-client>", description: "Whether the worker works exclusively for this entity (true/false)" },
8820
+ { flags: "--factors <factors>", description: "Additional classification factors (JSON)" },
8821
+ { flags: "--hours-per-week <hours-per-week>", description: "Average hours worked per week" },
8822
+ { flags: "--provides-tools <provides-tools>", description: "Whether the worker provides their own tools and equipment (true/false)" },
8823
+ { flags: "--state <state>", description: "State whose labor law governs the classification (e.g. CA, DE)" }
8581
8824
  ],
8582
8825
  examples: [
8583
8826
  'corp contractors classify --contractor-name "Jane Doe" --state CA --hours-per-week 20',
8584
- 'corp contractors classify --contractor-name "Acme Services LLC" --duration-months 6 --exclusive-client false'
8827
+ 'corp contractors classify --contractor-name "Acme Services LLC" --duration-months 6 --exclusive-client false --provides-tools true'
8585
8828
  ],
8586
- successTemplate: "Classify created"
8829
+ successTemplate: "Worker classification complete"
8587
8830
  },
8588
8831
  {
8589
8832
  name: "deadlines",
@@ -8600,7 +8843,7 @@ var init_compliance = __esm({
8600
8843
  'corp deadlines --deadline-type annual_report --description "Delaware annual report" --due-date 2026-03-31 --recurrence annual',
8601
8844
  'corp deadlines --deadline-type tax_filing --description "Q1 estimated taxes" --due-date 2026-04-15 --severity high'
8602
8845
  ],
8603
- successTemplate: "Deadlines created"
8846
+ successTemplate: "Deadline tracked"
8604
8847
  },
8605
8848
  {
8606
8849
  name: "entities compliance-escalations",
@@ -8616,14 +8859,14 @@ var init_compliance = __esm({
8616
8859
  route: { method: "POST", path: "/v1/tax/filings" },
8617
8860
  entity: true,
8618
8861
  options: [
8619
- { flags: "--document-type <document-type>", description: "Type of document required", required: true },
8620
- { flags: "--tax-year <tax-year>", description: "Tax Year", required: true, type: "int" }
8862
+ { flags: "--document-type <document-type>", description: "Type of tax document to file", required: true, choices: ["1120", "1120s", "1065", "franchise_tax", "annual_report", "83b", "1099_nec", "k1", "941", "w2"] },
8863
+ { flags: "--tax-year <tax-year>", description: "Tax year the filing covers (e.g. 2025)", required: true, type: "int" }
8621
8864
  ],
8622
8865
  examples: [
8623
8866
  "corp tax create-filing --document-type 1120 --tax-year 2025",
8624
- "corp tax create-filing --document-type 1065 --tax-year 2025 --json"
8867
+ "corp tax create-filing --document-type 1065 --tax-year 2025"
8625
8868
  ],
8626
- successTemplate: "Filings created"
8869
+ successTemplate: "Tax filing created"
8627
8870
  }
8628
8871
  ];
8629
8872
  }
@@ -9139,7 +9382,10 @@ var init_work_items = __esm({
9139
9382
  console.log(` ${chalk10.bold("Created at:")} ${w.created_at ?? "N/A"}`);
9140
9383
  console.log(chalk10.cyan("\u2500".repeat(40)));
9141
9384
  },
9142
- examples: ["corp work-items show", "corp work-items show --json"]
9385
+ examples: [
9386
+ "corp work-items show wi_01hx9k3n2p4q7r8s9t0uvwxyz",
9387
+ "corp work-items show @last:work_item --json"
9388
+ ]
9143
9389
  },
9144
9390
  // --- work-items create ---
9145
9391
  {
@@ -9177,7 +9423,10 @@ var init_work_items = __esm({
9177
9423
  },
9178
9424
  produces: { kind: "work_item" },
9179
9425
  successTemplate: "Work item created: {title}",
9180
- examples: ["corp work-items create --title 'title'", "corp work-items create --json"]
9426
+ examples: [
9427
+ 'corp work-items create --title "File Q1 taxes" --category compliance --deadline 2026-04-15',
9428
+ 'corp work-items create --title "Renew Delaware registered agent" --category legal --asap'
9429
+ ]
9181
9430
  },
9182
9431
  // --- work-items claim <item-ref> ---
9183
9432
  {
@@ -9206,7 +9455,10 @@ var init_work_items = __esm({
9206
9455
  const result = await ctx.client.claimWorkItem(eid, resolvedWorkItemId, data);
9207
9456
  ctx.writer.writeResult(result, `Work item ${resolvedWorkItemId} claimed by ${claimedBy}.`, { jsonOnly: ctx.opts.json });
9208
9457
  },
9209
- examples: ["corp work-items claim <item-ref>", "corp work-items claim --json"]
9458
+ examples: [
9459
+ "corp work-items claim wi_01hx9k3n2p4q7r8s9t0uvwxyz --by bookkeeper-agent",
9460
+ "corp work-items claim @last:work_item --by ops-agent --ttl 3600"
9461
+ ]
9210
9462
  },
9211
9463
  // --- work-items complete <item-ref> ---
9212
9464
  {
@@ -9237,7 +9489,10 @@ var init_work_items = __esm({
9237
9489
  const result = await ctx.client.completeWorkItem(eid, resolvedWorkItemId, data);
9238
9490
  ctx.writer.writeResult(result, `Work item ${resolvedWorkItemId} completed.`, { jsonOnly: ctx.opts.json });
9239
9491
  },
9240
- examples: ["corp work-items complete <item-ref>", "corp work-items complete --json"]
9492
+ examples: [
9493
+ 'corp work-items complete wi_01hx9k3n2p4q7r8s9t0uvwxyz --by bookkeeper-agent --result "Filed 1120 for Q1 2025"',
9494
+ 'corp work-items complete @last:work_item --by ops-agent --result "Completed and verified"'
9495
+ ]
9241
9496
  },
9242
9497
  // --- work-items release <item-ref> ---
9243
9498
  {
@@ -9253,7 +9508,10 @@ var init_work_items = __esm({
9253
9508
  const result = await ctx.client.releaseWorkItem(eid, resolvedWorkItemId);
9254
9509
  ctx.writer.writeResult(result, `Work item ${resolvedWorkItemId} claim released.`, { jsonOnly: ctx.opts.json });
9255
9510
  },
9256
- examples: ["corp work-items release <item-ref>"]
9511
+ examples: [
9512
+ "corp work-items release wi_01hx9k3n2p4q7r8s9t0uvwxyz",
9513
+ "corp work-items release @last:work_item"
9514
+ ]
9257
9515
  },
9258
9516
  // --- work-items cancel <item-ref> ---
9259
9517
  {
@@ -9282,7 +9540,10 @@ var init_work_items = __esm({
9282
9540
  const result = await ctx.client.cancelWorkItem(eid, resolvedWorkItemId);
9283
9541
  ctx.writer.writeResult(result, `Work item ${resolvedWorkItemId} cancelled.`, { jsonOnly: ctx.opts.json });
9284
9542
  },
9285
- examples: ["corp work-items cancel <item-ref>", "corp work-items cancel --json"]
9543
+ examples: [
9544
+ "corp work-items cancel wi_01hx9k3n2p4q7r8s9t0uvwxyz",
9545
+ "corp work-items cancel @last:work_item --yes"
9546
+ ]
9286
9547
  }
9287
9548
  ];
9288
9549
  }
@@ -9360,7 +9621,7 @@ var init_services = __esm({
9360
9621
  printReferenceSummary("service_request", result);
9361
9622
  printJson(result);
9362
9623
  },
9363
- examples: ["corp services show", "corp services show --json"]
9624
+ examples: ["corp services show req_abc123", "corp services show @last --json"]
9364
9625
  },
9365
9626
  // --- services buy <slug> ---
9366
9627
  {
@@ -9406,7 +9667,7 @@ var init_services = __esm({
9406
9667
  },
9407
9668
  produces: { kind: "service_request" },
9408
9669
  successTemplate: "Service request created",
9409
- examples: ["corp services buy <slug>"]
9670
+ examples: ["corp services buy registered-agent", "corp services buy annual-report --entity-id ent_abc123"]
9410
9671
  },
9411
9672
  // --- services fulfill <ref> ---
9412
9673
  {
@@ -9436,7 +9697,7 @@ var init_services = __esm({
9436
9697
  printReferenceSummary("service_request", result, { showReuseHint: true });
9437
9698
  printJson(result);
9438
9699
  },
9439
- examples: ["corp services fulfill <ref>", "corp services fulfill --json"]
9700
+ examples: ["corp services fulfill req_abc123", "corp services fulfill req_abc123 --note 'Filed with state' --json"]
9440
9701
  },
9441
9702
  // --- services cancel <ref> ---
9442
9703
  {
@@ -9462,55 +9723,58 @@ var init_services = __esm({
9462
9723
  printReferenceSummary("service_request", result, { showReuseHint: true });
9463
9724
  printJson(result);
9464
9725
  },
9465
- examples: ["corp services cancel <ref>"]
9726
+ examples: ["corp services cancel req_abc123", "corp services cancel @last --json"]
9466
9727
  },
9467
9728
  // ── Auto-generated from OpenAPI ──────────────────────────────
9468
9729
  {
9469
9730
  name: "services create-request",
9470
- description: "Submit a new service request",
9731
+ description: "Submit a new service request by slug",
9471
9732
  route: { method: "POST", path: "/v1/services/requests" },
9472
9733
  options: [
9473
- { flags: "--obligation-id <obligation-id>", description: "Obligation ID" },
9474
- { flags: "--service-slug <service-slug>", description: "Service Slug", required: true }
9734
+ { flags: "--obligation-id <obligation-id>", description: "Obligation ID to attach this request to" },
9735
+ { flags: "--service-slug <service-slug>", description: "Service catalog slug", required: true }
9736
+ ],
9737
+ examples: [
9738
+ "corp services create-request --service-slug registered-agent",
9739
+ "corp services create-request --service-slug annual-report --obligation-id obl_abc123 --json"
9475
9740
  ],
9476
- examples: ["corp services requests --service-slug 'service-slug'", "corp services requests --json"],
9477
- successTemplate: "Requests created"
9741
+ successTemplate: "Service request created"
9478
9742
  },
9479
9743
  {
9480
9744
  name: "services requests",
9481
9745
  description: "View a service request by ID",
9482
9746
  route: { method: "GET", path: "/v1/services/requests/{pos}" },
9483
9747
  entity: true,
9484
- args: [{ name: "request-id", required: true, description: "Document request ID", posKind: "service_request" }],
9485
- display: { title: "Services Requests", cols: ["amount_cents>Amount Cents", "checkout_url>Checkout Url", "failed_at>Failed At", "fulfilled_at>Fulfilled At", "@created_at>Created At", "#entity_id>ID"] },
9486
- examples: ["corp services requests", "corp services requests --json"]
9748
+ args: [{ name: "request-id", required: true, description: "Service request ID", posKind: "service_request" }],
9749
+ display: { title: "Service Request", cols: ["amount_cents>Amount", "checkout_url>Checkout URL", "failed_at>Failed At", "fulfilled_at>Fulfilled At", "@created_at>Created", "#entity_id>Entity ID"] },
9750
+ examples: ["corp services requests req_abc123", "corp services requests req_abc123 --json"]
9487
9751
  },
9488
9752
  {
9489
9753
  name: "services requests-cancel",
9490
- description: "Cancel a service request",
9754
+ description: "Cancel a pending service request",
9491
9755
  route: { method: "POST", path: "/v1/services/requests/{pos}/cancel" },
9492
- args: [{ name: "request-id", required: true, description: "Document request ID", posKind: "service_request" }],
9493
- examples: ["corp services requests-cancel <request-id>"],
9494
- successTemplate: "Request cancelled"
9756
+ args: [{ name: "request-id", required: true, description: "Service request ID", posKind: "service_request" }],
9757
+ examples: ["corp services requests-cancel req_abc123"],
9758
+ successTemplate: "Service request cancelled"
9495
9759
  },
9496
9760
  {
9497
9761
  name: "services requests-checkout",
9498
- description: "Start checkout for a service request",
9762
+ description: "Start Stripe checkout for a service request",
9499
9763
  route: { method: "POST", path: "/v1/services/requests/{pos}/checkout" },
9500
- args: [{ name: "request-id", required: true, description: "Document request ID", posKind: "service_request" }],
9501
- examples: ["corp services requests-checkout <request-id>"],
9502
- successTemplate: "Checkout started"
9764
+ args: [{ name: "request-id", required: true, description: "Service request ID", posKind: "service_request" }],
9765
+ examples: ["corp services requests-checkout req_abc123", "corp services requests-checkout req_abc123 --json"],
9766
+ successTemplate: "Checkout session created"
9503
9767
  },
9504
9768
  {
9505
9769
  name: "services requests-fulfill",
9506
- description: "Fulfill a service request",
9770
+ description: "Mark a service request as fulfilled (operator only)",
9507
9771
  route: { method: "POST", path: "/v1/services/requests/{pos}/fulfill" },
9508
- args: [{ name: "request-id", required: true, description: "Document request ID", posKind: "service_request" }],
9772
+ args: [{ name: "request-id", required: true, description: "Service request ID", posKind: "service_request" }],
9509
9773
  options: [
9510
- { flags: "--note <note>", description: "Note" }
9774
+ { flags: "--note <note>", description: "Fulfillment note visible to the customer" }
9511
9775
  ],
9512
- examples: ["corp services requests-fulfill <request-id>", "corp services requests-fulfill --json"],
9513
- successTemplate: "Requests Fulfill created"
9776
+ examples: ["corp services requests-fulfill req_abc123", "corp services requests-fulfill req_abc123 --note 'Filed with Delaware' --json"],
9777
+ successTemplate: "Service request fulfilled"
9514
9778
  }
9515
9779
  ];
9516
9780
  }
@@ -10653,7 +10917,8 @@ var init_resource_kinds = __esm({
10653
10917
  "safe_note",
10654
10918
  "instrument",
10655
10919
  "share_class",
10656
- "round"
10920
+ "round",
10921
+ "service_request"
10657
10922
  ]);
10658
10923
  ENTITY_SCOPED_KINDS = /* @__PURE__ */ new Set([
10659
10924
  "contact",
@@ -10678,7 +10943,8 @@ var init_resource_kinds = __esm({
10678
10943
  "safe_note",
10679
10944
  "instrument",
10680
10945
  "share_class",
10681
- "round"
10946
+ "round",
10947
+ "service_request"
10682
10948
  ]);
10683
10949
  }
10684
10950
  });
@@ -10691,8 +10957,7 @@ __export(resolve_exports, {
10691
10957
  async function resolveCommand(kind, ref, opts) {
10692
10958
  const normalizedKind = kind.trim().toLowerCase();
10693
10959
  if (!KINDS.has(normalizedKind)) {
10694
- printError(`Unsupported resolve kind: ${kind}`);
10695
- process.exit(1);
10960
+ throw new Error(`Unsupported resolve kind: ${kind}. Supported: ${[...KINDS].join(", ")}`);
10696
10961
  }
10697
10962
  const cfg = requireConfig("api_url", "api_key", "workspace_id");
10698
10963
  const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
@@ -10795,8 +11060,7 @@ async function resolveCommand(kind, ref, opts) {
10795
11060
  ...meetingId ? { meeting_id: meetingId } : {}
10796
11061
  });
10797
11062
  } catch (err) {
10798
- printError(`Failed to resolve reference: ${err}`);
10799
- process.exit(1);
11063
+ throw new Error(`Failed to resolve reference: ${err}`);
10800
11064
  }
10801
11065
  }
10802
11066
  function requiredEntity(entityId, kind) {
@@ -10832,8 +11096,7 @@ import Table5 from "cli-table3";
10832
11096
  async function findCommand(kind, query, opts) {
10833
11097
  const normalizedKind = kind.trim().toLowerCase();
10834
11098
  if (!KINDS.has(normalizedKind)) {
10835
- printError(`Unsupported find kind: ${kind}`);
10836
- process.exit(1);
11099
+ throw new Error(`Unsupported find kind: ${kind}. Supported: ${[...KINDS].join(", ")}`);
10837
11100
  }
10838
11101
  const cfg = requireConfig("api_url", "api_key", "workspace_id");
10839
11102
  const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
@@ -10882,8 +11145,7 @@ async function findCommand(kind, query, opts) {
10882
11145
  }
10883
11146
  console.log(table.toString());
10884
11147
  } catch (err) {
10885
- printError(`Failed to find references: ${err}`);
10886
- process.exit(1);
11148
+ throw new Error(`Failed to find references: ${err}`);
10887
11149
  }
10888
11150
  }
10889
11151
  var init_find = __esm({
@@ -10940,7 +11202,7 @@ var init_admin = __esm({
10940
11202
  { force: ctx.opts.force }
10941
11203
  );
10942
11204
  },
10943
- examples: ["corp config set"]
11205
+ examples: ["corp config set api_url https://api.thecorporation.com", "corp config set workspace_id ws_abc123"]
10944
11206
  },
10945
11207
  {
10946
11208
  name: "config get",
@@ -10953,7 +11215,7 @@ var init_admin = __esm({
10953
11215
  const { configGetCommand: configGetCommand2 } = await Promise.resolve().then(() => (init_config2(), config_exports));
10954
11216
  configGetCommand2(ctx.positional[0]);
10955
11217
  },
10956
- examples: ["corp config get"]
11218
+ examples: ["corp config get api_url", "corp config get workspace_id"]
10957
11219
  },
10958
11220
  {
10959
11221
  name: "config list",
@@ -11023,7 +11285,7 @@ var init_admin = __esm({
11023
11285
  local: true,
11024
11286
  options: [
11025
11287
  { flags: "--name <name>", description: "Corporation name", required: true },
11026
- { flags: "--scenario <scenario>", description: "Scenario to create (startup, llc, restaurant)", default: "startup" },
11288
+ { flags: "--scenario <scenario>", description: "Demo scenario to create", default: "startup", choices: ["startup", "llc", "restaurant"] },
11027
11289
  { flags: "--minimal", description: "Use the minimal server-side demo seed instead of the full CLI workflow" },
11028
11290
  { flags: "--json", description: "Output as JSON" }
11029
11291
  ],
@@ -11036,7 +11298,7 @@ var init_admin = __esm({
11036
11298
  json: ctx.opts.json
11037
11299
  });
11038
11300
  },
11039
- examples: ["corp demo"]
11301
+ examples: ["corp demo --name 'Acme Corp'", "corp demo --name 'Taco LLC' --scenario restaurant"]
11040
11302
  },
11041
11303
  // ── chat (local, interactive) ───────────────────────────────────────
11042
11304
  {
@@ -11083,7 +11345,7 @@ var init_admin = __esm({
11083
11345
  },
11084
11346
  produces: { kind: "api_key" },
11085
11347
  successTemplate: "API key created",
11086
- examples: ["corp api-keys create --name 'name'", "corp api-keys create --json"]
11348
+ examples: ["corp api-keys create --name 'CI Deploy Key'", "corp api-keys create --name 'Webhook Key' --scopes read:entities --json"]
11087
11349
  },
11088
11350
  {
11089
11351
  name: "api-keys revoke",
@@ -11103,7 +11365,7 @@ var init_admin = __esm({
11103
11365
  json: ctx.opts.json
11104
11366
  });
11105
11367
  },
11106
- examples: ["corp api-keys revoke <key-id>", "corp api-keys revoke --json"]
11368
+ examples: ["corp api-keys revoke key_abc123", "corp api-keys revoke key_abc123 --yes"]
11107
11369
  },
11108
11370
  {
11109
11371
  name: "api-keys rotate",
@@ -11123,7 +11385,7 @@ var init_admin = __esm({
11123
11385
  },
11124
11386
  produces: { kind: "api_key" },
11125
11387
  successTemplate: "API key rotated",
11126
- examples: ["corp api-keys rotate <key-id>", "corp api-keys rotate --json"]
11388
+ examples: ["corp api-keys rotate key_abc123", "corp api-keys rotate key_abc123 --json"]
11127
11389
  },
11128
11390
  // ── link (API, write) ───────────────────────────────────────────────
11129
11391
  {
@@ -11141,7 +11403,7 @@ var init_admin = __esm({
11141
11403
  provider: ctx.opts.provider
11142
11404
  });
11143
11405
  },
11144
- examples: ["corp link --external-id 'id' --provider 'provider'"]
11406
+ examples: ["corp link --external-id cus_abc123 --provider stripe", "corp link --external-id org_xyz --provider github"]
11145
11407
  },
11146
11408
  // ── claim (API, write) ──────────────────────────────────────────────
11147
11409
  {
@@ -11156,7 +11418,7 @@ var init_admin = __esm({
11156
11418
  await claimCommand2(ctx.positional[0]);
11157
11419
  },
11158
11420
  produces: { kind: "entity", trackEntity: true },
11159
- examples: ["corp claim <code>"]
11421
+ examples: ["corp claim CLAIM-ABC123", "corp claim ws_invite_xyz789"]
11160
11422
  },
11161
11423
  // ── feedback (API, write) ───────────────────────────────────────────
11162
11424
  {
@@ -11167,7 +11429,7 @@ var init_admin = __esm({
11167
11429
  { name: "message", required: true, description: "Feedback message" }
11168
11430
  ],
11169
11431
  options: [
11170
- { flags: "--category <category>", description: "Category (e.g. bug, feature, general)", default: "general" },
11432
+ { flags: "--category <category>", description: "Feedback category", default: "general", choices: ["bug", "feature", "general"] },
11171
11433
  { flags: "--email <email>", description: "Your email address (to receive a copy)" }
11172
11434
  ],
11173
11435
  handler: async (ctx) => {
@@ -11178,7 +11440,10 @@ var init_admin = __esm({
11178
11440
  json: ctx.opts.json
11179
11441
  });
11180
11442
  },
11181
- examples: ["corp feedback <message>", "corp feedback --json"]
11443
+ examples: [
11444
+ "corp feedback 'The cap table export is missing share classes'",
11445
+ "corp feedback 'PDF generation fails on long names' --category bug --email me@example.com"
11446
+ ]
11182
11447
  },
11183
11448
  // ── resolve (API, read) ─────────────────────────────────────────────
11184
11449
  {
@@ -11201,7 +11466,7 @@ var init_admin = __esm({
11201
11466
  meetingId: ctx.opts.meetingId
11202
11467
  });
11203
11468
  },
11204
- examples: ["corp resolve"]
11469
+ examples: ["corp resolve entity acme", "corp resolve contact alice --entity-id ent_abc123"]
11205
11470
  },
11206
11471
  // ── find (API, read) ────────────────────────────────────────────────
11207
11472
  {
@@ -11226,7 +11491,7 @@ var init_admin = __esm({
11226
11491
  json: ctx.opts.json
11227
11492
  });
11228
11493
  },
11229
- examples: ["corp find"]
11494
+ examples: ["corp find entity acme", "corp find contact alice --entity-id ent_abc123 --json"]
11230
11495
  },
11231
11496
  // ── approvals (informational) ───────────────────────────────────────
11232
11497
  {
@@ -11289,26 +11554,26 @@ var init_admin = __esm({
11289
11554
  description: "Seed a demo workspace with sample data",
11290
11555
  route: { method: "POST", path: "/v1/demo/seed" },
11291
11556
  options: [
11292
- { flags: "--name <name>", description: "Display name" },
11293
- { flags: "--scenario <scenario>", description: "Demo scenario to use" }
11557
+ { flags: "--name <name>", description: "Corporation display name" },
11558
+ { flags: "--scenario <scenario>", description: "Demo scenario to seed", choices: ["startup", "llc", "restaurant"] }
11294
11559
  ],
11295
- examples: ["corp demo seed", "corp demo seed --json"],
11296
- successTemplate: "Seed created"
11560
+ examples: ["corp demo seed --name 'Acme Corp'", "corp demo seed --name 'Taco LLC' --scenario restaurant --json"],
11561
+ successTemplate: "Demo workspace seeded"
11297
11562
  },
11298
11563
  {
11299
11564
  name: "digests trigger",
11300
- description: "Trigger digest generation now",
11565
+ description: "Trigger digest generation immediately",
11301
11566
  route: { method: "POST", path: "/v1/digests/trigger" },
11302
11567
  examples: ["corp digests trigger"],
11303
- successTemplate: "Trigger created"
11568
+ successTemplate: "Digest triggered"
11304
11569
  },
11305
11570
  {
11306
11571
  name: "digests",
11307
11572
  description: "View a specific digest by key",
11308
11573
  route: { method: "GET", path: "/v1/digests/{pos}" },
11309
- args: [{ name: "digest-key", required: true, description: "Digest key" }],
11574
+ args: [{ name: "digest-key", required: true, description: "Digest key (e.g. daily_2026-03-22)" }],
11310
11575
  display: { title: "Digest" },
11311
- examples: ["corp digests"]
11576
+ examples: ["corp digests daily_2026-03-22", "corp digests weekly_2026-03-22 --json"]
11312
11577
  },
11313
11578
  {
11314
11579
  name: "service-token",
@@ -11338,14 +11603,14 @@ var init_admin = __esm({
11338
11603
  options: [
11339
11604
  { flags: "--claim-token <claim-token>", description: "Workspace claim token", required: true }
11340
11605
  ],
11341
- examples: ["corp workspaces claim --claim-token 'claim-token'"],
11342
- successTemplate: "Claim created"
11606
+ examples: ["corp workspaces claim --claim-token tok_abc123xyz"],
11607
+ successTemplate: "Workspace claimed"
11343
11608
  },
11344
11609
  {
11345
11610
  name: "workspaces contacts",
11346
11611
  description: "List contacts across the workspace",
11347
11612
  route: { method: "GET", path: "/v1/workspaces/{workspace_id}/contacts" },
11348
- display: { title: "Workspaces Contacts", cols: ["#contact_id>ID", "#entity_id>ID"] },
11613
+ display: { title: "Workspaces Contacts", cols: ["#contact_id>Contact ID", "#entity_id>Entity ID"] },
11349
11614
  examples: ["corp workspaces contacts"]
11350
11615
  },
11351
11616
  {
@@ -11364,7 +11629,7 @@ var init_admin = __esm({
11364
11629
  { flags: "--api-key <api-key>", description: "API key (starts with sk_)", required: true },
11365
11630
  { flags: "--ttl-seconds <ttl-seconds>", description: "Token TTL in seconds (60-86400)", type: "int" }
11366
11631
  ],
11367
- examples: ["corp auth token-exchange --api-key 'api-key'", "corp auth token-exchange --json"],
11632
+ examples: ["corp auth token-exchange --api-key sk_live_abc123", "corp auth token-exchange --api-key sk_live_abc123 --ttl-seconds 3600 --json"],
11368
11633
  successTemplate: "Token exchanged"
11369
11634
  },
11370
11635
  {
@@ -11393,7 +11658,7 @@ var init_admin = __esm({
11393
11658
  description: "Revoke an SSH public key",
11394
11659
  route: { method: "DELETE", path: "/v1/ssh-keys/{pos}" },
11395
11660
  args: [{ name: "key-id", required: true, description: "SSH key ID to revoke" }],
11396
- examples: ["corp ssh-keys revoke <key-id>"],
11661
+ examples: ["corp ssh-keys revoke key_abc123"],
11397
11662
  successTemplate: "SSH key revoked"
11398
11663
  },
11399
11664
  {
@@ -11404,8 +11669,8 @@ var init_admin = __esm({
11404
11669
  { flags: "--name <name>", description: "Display name", required: true },
11405
11670
  { flags: "--owner-email <owner-email>", description: "Workspace owner email address" }
11406
11671
  ],
11407
- examples: ["corp workspaces provision --name 'name'", "corp workspaces provision --json"],
11408
- successTemplate: "Provision created"
11672
+ examples: ["corp workspaces provision --name 'Acme Corp'", "corp workspaces provision --name 'Taco LLC' --owner-email founder@taco.com --json"],
11673
+ successTemplate: "Workspace provisioned"
11409
11674
  },
11410
11675
  // ── Auto-generated from OpenAPI ──────────────────────────────
11411
11676
  {
@@ -11416,7 +11681,10 @@ var init_admin = __esm({
11416
11681
  { flags: "--items <items>", description: "Items to sync (JSON array)", required: true, type: "array" },
11417
11682
  { flags: "--kind <kind>", description: "Resource kind", required: true, choices: ["entity", "contact", "share_transfer", "invoice", "bank_account", "payment", "payroll_run", "distribution", "reconciliation", "tax_filing", "deadline", "classification", "body", "meeting", "seat", "agenda_item", "resolution", "document", "work_item", "agent", "valuation", "safe_note", "instrument", "share_class", "round"] }
11418
11683
  ],
11419
- examples: ["corp references sync --items 'items' --kind 'kind'"],
11684
+ examples: [
11685
+ `corp references sync --kind entity --items '[{"id":"ent_abc123","name":"Acme"}]'`,
11686
+ `corp references sync --kind contact --items '[{"id":"con_xyz","name":"Alice"}]' --json`
11687
+ ],
11420
11688
  successTemplate: "References synced"
11421
11689
  },
11422
11690
  // ── Auto-generated from OpenAPI ──────────────────────────────
@@ -11428,26 +11696,29 @@ var init_admin = __esm({
11428
11696
  { flags: "--execution-id <execution-id>", description: "Agent execution ID", required: true },
11429
11697
  { flags: "--template <template>", description: "Template string with {{secret}} placeholders", required: true }
11430
11698
  ],
11431
- examples: ["corp secrets interpolate --execution-id 'execution-id' --template 'template'"],
11432
- successTemplate: "Interpolate created"
11699
+ examples: [
11700
+ "corp secrets interpolate --execution-id exec_abc123 --template 'Bearer {{MY_API_KEY}}'",
11701
+ "corp secrets interpolate --execution-id exec_abc123 --template '{{DB_HOST}}:5432' --json"
11702
+ ],
11703
+ successTemplate: "Template interpolated"
11433
11704
  },
11434
11705
  {
11435
11706
  name: "secrets resolve",
11436
- description: "Resolve a secrets token to its values",
11707
+ description: "Resolve a secrets access token to its plaintext values",
11437
11708
  route: { method: "POST", path: "/v1/secrets/resolve" },
11438
11709
  options: [
11439
11710
  { flags: "--token <token>", description: "Secrets access token", required: true }
11440
11711
  ],
11441
- examples: ["corp secrets resolve --token 'token'"],
11442
- successTemplate: "Resolve created"
11712
+ examples: ["corp secrets resolve --token stok_abc123xyz", "corp secrets resolve --token stok_abc123xyz --json"],
11713
+ successTemplate: "Secrets resolved"
11443
11714
  },
11444
11715
  {
11445
11716
  name: "documents validate-preview",
11446
- description: "Validate a document preview without generating PDF",
11717
+ description: "Validate the document preview AST without generating a PDF",
11447
11718
  route: { method: "GET", path: "/v1/documents/preview/pdf/validate" },
11448
11719
  entity: true,
11449
11720
  display: { title: "Document Preview Validation" },
11450
- examples: ["corp documents validate-preview", "corp documents validate-preview --json"]
11721
+ examples: ["corp documents validate-preview --entity-id ent_abc123", "corp documents validate-preview --entity-id ent_abc123 --json"]
11451
11722
  }
11452
11723
  ];
11453
11724
  }
@@ -11465,8 +11736,8 @@ var init_execution = __esm({
11465
11736
  route: { method: "PATCH", path: "/v1/document-requests/{pos}/fulfill" },
11466
11737
  entity: true,
11467
11738
  args: [{ name: "request-id", required: true, description: "Document request ID" }],
11468
- examples: ["corp document-requests fulfill <request-id>"],
11469
- successTemplate: "Fulfill updated"
11739
+ examples: ["corp document-requests fulfill req_01hx9k3n2p4q7r8s9t0uvwxyz"],
11740
+ successTemplate: "Document request fulfilled"
11470
11741
  },
11471
11742
  {
11472
11743
  name: "document-requests not-applicable",
@@ -11474,8 +11745,8 @@ var init_execution = __esm({
11474
11745
  route: { method: "PATCH", path: "/v1/document-requests/{pos}/not-applicable" },
11475
11746
  entity: true,
11476
11747
  args: [{ name: "request-id", required: true, description: "Document request ID" }],
11477
- examples: ["corp document-requests not-applicable <request-id>"],
11478
- successTemplate: "Not Applicable updated"
11748
+ examples: ["corp document-requests not-applicable req_01hx9k3n2p4q7r8s9t0uvwxyz"],
11749
+ successTemplate: "Document request marked not applicable"
11479
11750
  },
11480
11751
  {
11481
11752
  name: "entities approval-artifacts",
@@ -11544,7 +11815,7 @@ var init_execution = __esm({
11544
11815
  'corp execution approval-artifacts --approver-identity "alice@acme.com" --channel board_vote --intent-type equity_grant --scope entity',
11545
11816
  'corp execution approval-artifacts --approver-identity "alice@acme.com" --channel written_consent --intent-type equity_grant --scope entity --approved-at 2026-03-01T00:00:00Z'
11546
11817
  ],
11547
- successTemplate: "Approval Artifacts created"
11818
+ successTemplate: "Approval artifact recorded"
11548
11819
  },
11549
11820
  {
11550
11821
  name: "execution intents",
@@ -11561,7 +11832,7 @@ var init_execution = __esm({
11561
11832
  'corp execution intents --description "Issue 10,000 options to Alice" --intent-type equity_grant --authority-tier tier_2',
11562
11833
  'corp execution intents --description "Wire $50,000 to vendor" --intent-type payment --authority-tier tier_1'
11563
11834
  ],
11564
- successTemplate: "Intents created"
11835
+ successTemplate: "Execution intent created"
11565
11836
  },
11566
11837
  {
11567
11838
  name: "execution obligations",
@@ -11580,7 +11851,7 @@ var init_execution = __esm({
11580
11851
  'corp execution obligations --assignee-type human --description "Sign equity grant agreement" --obligation-type signature',
11581
11852
  'corp execution obligations --assignee-type internal --description "File 83(b) election" --obligation-type document --due-date 2026-04-15'
11582
11853
  ],
11583
- successTemplate: "Obligations created"
11854
+ successTemplate: "Obligation created"
11584
11855
  },
11585
11856
  {
11586
11857
  name: "execution packets",
@@ -11600,7 +11871,10 @@ var init_execution = __esm({
11600
11871
  route: { method: "POST", path: "/v1/intents/{pos}/authorize" },
11601
11872
  entity: true,
11602
11873
  args: [{ name: "intent-id", required: true, description: "Execution intent ID" }],
11603
- examples: ["corp intents authorize <intent-id>"],
11874
+ examples: [
11875
+ "corp intents authorize int_01hx9k3n2p4q7r8s9t0uvwxyz",
11876
+ "corp intents authorize @last:intent"
11877
+ ],
11604
11878
  successTemplate: "Intent authorized"
11605
11879
  },
11606
11880
  {
@@ -11614,7 +11888,7 @@ var init_execution = __esm({
11614
11888
  examples: [
11615
11889
  "corp intents bind-approval-artifact @last:intent --approval-artifact-id art_01hx9k3n2p4q7r8s9t0uvwxyz"
11616
11890
  ],
11617
- successTemplate: "Bind Approval Artifact created"
11891
+ successTemplate: "Approval artifact bound to intent"
11618
11892
  },
11619
11893
  {
11620
11894
  name: "intents bind-document-request",
@@ -11627,7 +11901,7 @@ var init_execution = __esm({
11627
11901
  examples: [
11628
11902
  "corp intents bind-document-request @last:intent --request-id req_01hx9k3n2p4q7r8s9t0uvwxyz"
11629
11903
  ],
11630
- successTemplate: "Bind Document Request created"
11904
+ successTemplate: "Document request bound to intent"
11631
11905
  },
11632
11906
  {
11633
11907
  name: "intents cancel",
@@ -11635,7 +11909,10 @@ var init_execution = __esm({
11635
11909
  route: { method: "POST", path: "/v1/intents/{pos}/cancel" },
11636
11910
  entity: true,
11637
11911
  args: [{ name: "intent-id", required: true, description: "Execution intent ID" }],
11638
- examples: ["corp intents cancel <intent-id>"],
11912
+ examples: [
11913
+ "corp intents cancel int_01hx9k3n2p4q7r8s9t0uvwxyz",
11914
+ "corp intents cancel @last:intent"
11915
+ ],
11639
11916
  successTemplate: "Intent cancelled"
11640
11917
  },
11641
11918
  {
@@ -11644,7 +11921,10 @@ var init_execution = __esm({
11644
11921
  route: { method: "POST", path: "/v1/intents/{pos}/evaluate" },
11645
11922
  entity: true,
11646
11923
  args: [{ name: "intent-id", required: true, description: "Execution intent ID" }],
11647
- examples: ["corp intents evaluate <intent-id>"],
11924
+ examples: [
11925
+ "corp intents evaluate int_01hx9k3n2p4q7r8s9t0uvwxyz",
11926
+ "corp intents evaluate @last:intent"
11927
+ ],
11648
11928
  successTemplate: "Intent evaluated"
11649
11929
  },
11650
11930
  {
@@ -11653,7 +11933,10 @@ var init_execution = __esm({
11653
11933
  route: { method: "POST", path: "/v1/intents/{pos}/execute" },
11654
11934
  entity: true,
11655
11935
  args: [{ name: "intent-id", required: true, description: "Execution intent ID" }],
11656
- examples: ["corp intents execute <intent-id>"],
11936
+ examples: [
11937
+ "corp intents execute int_01hx9k3n2p4q7r8s9t0uvwxyz",
11938
+ "corp intents execute @last:intent"
11939
+ ],
11657
11940
  successTemplate: "Intent executed"
11658
11941
  },
11659
11942
  {
@@ -11680,7 +11963,7 @@ var init_execution = __esm({
11680
11963
  examples: [
11681
11964
  "corp obligations assign obl_01hx9k3n2p4q7r8s9t0uvwxyz --assignee-id usr_01hx9k3n2p4q7r8s9t0uvwxyz"
11682
11965
  ],
11683
- successTemplate: "Assign created"
11966
+ successTemplate: "Obligation assigned"
11684
11967
  },
11685
11968
  {
11686
11969
  name: "obligations document-requests",
@@ -11707,7 +11990,7 @@ var init_execution = __esm({
11707
11990
  examples: [
11708
11991
  'corp obligations create-document-request obl_01hx9k3n2p4q7r8s9t0uvwxyz --description "Signed equity grant agreement" --document-type equity_grant'
11709
11992
  ],
11710
- successTemplate: "Document Requests created"
11993
+ successTemplate: "Document request created"
11711
11994
  },
11712
11995
  {
11713
11996
  name: "obligations expire",
@@ -11715,7 +11998,10 @@ var init_execution = __esm({
11715
11998
  route: { method: "POST", path: "/v1/obligations/{pos}/expire" },
11716
11999
  entity: true,
11717
12000
  args: [{ name: "obligation-id", required: true, description: "Obligation ID" }],
11718
- examples: ["corp obligations expire <obligation-id>"],
12001
+ examples: [
12002
+ "corp obligations expire obl_01hx9k3n2p4q7r8s9t0uvwxyz",
12003
+ "corp obligations expire @last:obligation"
12004
+ ],
11719
12005
  successTemplate: "Obligation expired"
11720
12006
  },
11721
12007
  {
@@ -11724,7 +12010,10 @@ var init_execution = __esm({
11724
12010
  route: { method: "POST", path: "/v1/obligations/{pos}/fulfill" },
11725
12011
  entity: true,
11726
12012
  args: [{ name: "obligation-id", required: true, description: "Obligation ID" }],
11727
- examples: ["corp obligations fulfill <obligation-id>"],
12013
+ examples: [
12014
+ "corp obligations fulfill obl_01hx9k3n2p4q7r8s9t0uvwxyz",
12015
+ "corp obligations fulfill @last:obligation"
12016
+ ],
11728
12017
  successTemplate: "Obligation fulfilled"
11729
12018
  },
11730
12019
  {
@@ -11733,7 +12022,10 @@ var init_execution = __esm({
11733
12022
  route: { method: "POST", path: "/v1/obligations/{pos}/waive" },
11734
12023
  entity: true,
11735
12024
  args: [{ name: "obligation-id", required: true, description: "Obligation ID" }],
11736
- examples: ["corp obligations waive <obligation-id>"],
12025
+ examples: [
12026
+ "corp obligations waive obl_01hx9k3n2p4q7r8s9t0uvwxyz",
12027
+ "corp obligations waive @last:obligation"
12028
+ ],
11737
12029
  successTemplate: "Obligation waived"
11738
12030
  },
11739
12031
  {
@@ -11765,7 +12057,10 @@ var init_execution = __esm({
11765
12057
  route: { method: "POST", path: "/v1/human-obligations/{pos}/fulfill" },
11766
12058
  args: [{ name: "obligation-id", required: true, description: "Obligation ID" }],
11767
12059
  successTemplate: "Obligation fulfilled",
11768
- examples: ["corp human-obligations fulfill <obligation-id>"]
12060
+ examples: [
12061
+ "corp human-obligations fulfill obl_01hx9k3n2p4q7r8s9t0uvwxyz",
12062
+ "corp human-obligations fulfill @last:obligation"
12063
+ ]
11769
12064
  },
11770
12065
  {
11771
12066
  name: "human-obligations signer-token",
@@ -11773,7 +12068,10 @@ var init_execution = __esm({
11773
12068
  route: { method: "POST", path: "/v1/human-obligations/{pos}/signer-token" },
11774
12069
  args: [{ name: "obligation-id", required: true, description: "Obligation ID" }],
11775
12070
  successTemplate: "Signer token issued",
11776
- examples: ["corp human-obligations signer-token <obligation-id>"]
12071
+ examples: [
12072
+ "corp human-obligations signer-token obl_01hx9k3n2p4q7r8s9t0uvwxyz",
12073
+ "corp human-obligations signer-token @last:obligation"
12074
+ ]
11777
12075
  }
11778
12076
  ];
11779
12077
  }
@@ -11805,7 +12103,10 @@ var init_secret_proxies = __esm({
11805
12103
  { flags: "--description <desc>", description: "Description text" }
11806
12104
  ],
11807
12105
  successTemplate: "Secret proxy {name} created",
11808
- examples: ["corp secret-proxies create --name 'name' --url 'url'", "corp secret-proxies create --json"]
12106
+ examples: [
12107
+ "corp secret-proxies create --name stripe-keys --url https://secrets.example.com/proxy",
12108
+ "corp secret-proxies create --name local-secrets --url self --description 'Locally encrypted secrets' --json"
12109
+ ]
11809
12110
  },
11810
12111
  {
11811
12112
  name: "secret-proxies show",
@@ -11816,7 +12117,7 @@ var init_secret_proxies = __esm({
11816
12117
  title: "Secret Proxy",
11817
12118
  cols: ["name>Name", "url>URL", "description>Description", "secret_count>Secrets", "@created_at>Created"]
11818
12119
  },
11819
- examples: ["corp secret-proxies show"]
12120
+ examples: ["corp secret-proxies show my-proxy", "corp secret-proxies show my-proxy --json"]
11820
12121
  },
11821
12122
  {
11822
12123
  name: "secret-proxies secrets",
@@ -11827,7 +12128,7 @@ var init_secret_proxies = __esm({
11827
12128
  title: "Secrets",
11828
12129
  cols: ["names>Secret Names", "proxy_name>Proxy"]
11829
12130
  },
11830
- examples: ["corp secret-proxies secrets"]
12131
+ examples: ["corp secret-proxies secrets my-proxy", "corp secret-proxies secrets my-proxy --json"]
11831
12132
  },
11832
12133
  {
11833
12134
  name: "secret-proxies set-secrets",
@@ -11838,7 +12139,10 @@ var init_secret_proxies = __esm({
11838
12139
  { flags: "--secrets <json>", description: "JSON object of key-value secret pairs", required: true }
11839
12140
  ],
11840
12141
  successTemplate: "Secrets updated for {proxy_name}",
11841
- examples: ["corp secret-proxies set-secrets <proxy-name> --secrets 'json'"]
12142
+ examples: [
12143
+ `corp secret-proxies set-secrets my-proxy --secrets '{"API_KEY":"sk-live-abc","DB_PASS":"hunter2"}'`,
12144
+ `corp secret-proxies set-secrets my-proxy --secrets '{"STRIPE_KEY":"sk_live_xyz"}' --json`
12145
+ ]
11842
12146
  }
11843
12147
  ];
11844
12148
  }
@@ -11856,20 +12160,23 @@ var init_treasury = __esm({
11856
12160
  route: { method: "POST", path: "/v1/bank-accounts/{pos}/close" },
11857
12161
  entity: true,
11858
12162
  args: [{ name: "bank-account-id", required: true, description: "Bank account ID", posKind: "bank_account" }],
11859
- examples: ["corp bank-accounts close <bank-account-id>"],
11860
- successTemplate: "Account closed"
12163
+ examples: ["corp bank-accounts close ba_01hx9k3n2p4q7r8s9t0uvwxyz"],
12164
+ successTemplate: "Bank account closed"
11861
12165
  },
11862
12166
  {
11863
12167
  name: "distributions",
11864
- description: "Record a distribution (dividend, member draw)",
12168
+ description: "Record a distribution (dividend, member draw, or liquidation)",
11865
12169
  route: { method: "POST", path: "/v1/distributions" },
11866
12170
  options: [
11867
12171
  { flags: "--description <description>", description: "Description text", required: true },
11868
- { flags: "--distribution-type <distribution-type>", description: "Type of distribution.", choices: ["dividend", "return", "liquidation"] },
11869
- { flags: "--total-amount-cents <total-amount-cents>", description: "Total Amount Cents", required: true, type: "int" }
12172
+ { flags: "--distribution-type <distribution-type>", description: "Type of distribution", choices: ["dividend", "return", "liquidation"] },
12173
+ { flags: "--total-amount-cents <total-amount-cents>", description: "Total amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" }
12174
+ ],
12175
+ examples: [
12176
+ 'corp distributions --description "Q1 dividend" --distribution-type dividend --total-amount-cents 500000',
12177
+ 'corp distributions --description "Founder draw" --distribution-type return --total-amount-cents 1000000'
11870
12178
  ],
11871
- examples: ["corp distributions --description dividend --total-amount-cents 'total-amount-cents'", "corp distributions --json"],
11872
- successTemplate: "Distributions created"
12179
+ successTemplate: "Distribution recorded"
11873
12180
  },
11874
12181
  {
11875
12182
  name: "entities accounts",
@@ -11897,7 +12204,7 @@ var init_treasury = __esm({
11897
12204
  },
11898
12205
  {
11899
12206
  name: "entities stripe-account",
11900
- description: "View Stripe account for an entity",
12207
+ description: "View Stripe account details for an entity",
11901
12208
  route: { method: "GET", path: "/v1/entities/{eid}/stripe-account" },
11902
12209
  entity: true,
11903
12210
  display: { title: "Entities Stripe Account", cols: ["@created_at>Created At", "#entity_id>ID", "status>Status", "#stripe_account_id>ID"] },
@@ -11909,13 +12216,15 @@ var init_treasury = __esm({
11909
12216
  route: { method: "POST", path: "/v1/invoices/from-agent-request" },
11910
12217
  entity: true,
11911
12218
  options: [
11912
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12219
+ { flags: "--amount-cents <amount-cents>", description: "Invoice amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
11913
12220
  { flags: "--customer-name <customer-name>", description: "Customer name for the invoice", required: true },
11914
- { flags: "--description <description>", description: "Description text", required: true },
11915
- { flags: "--due-date <due-date>", description: "Due date (ISO 8601, e.g. 2026-06-30)", required: true }
12221
+ { flags: "--description <description>", description: "Description of the services or goods invoiced", required: true },
12222
+ { flags: "--due-date <due-date>", description: "Payment due date (ISO 8601, e.g. 2026-06-30)", required: true }
12223
+ ],
12224
+ examples: [
12225
+ 'corp invoices from-agent-request --amount-cents 500000 --customer-name "Acme Corp" --description "Consulting services Q1" --due-date 2026-06-30'
11916
12226
  ],
11917
- examples: ["corp invoices from-agent-request --amount-cents 'amount-cents' --customer-name 'customer-name' --description 'description' --due-date 'due-date'"],
11918
- successTemplate: "From Agent Request created"
12227
+ successTemplate: "Invoice created from agent request"
11919
12228
  },
11920
12229
  {
11921
12230
  name: "invoices",
@@ -11924,7 +12233,10 @@ var init_treasury = __esm({
11924
12233
  entity: true,
11925
12234
  args: [{ name: "invoice-id", required: true, description: "Invoice ID", posKind: "invoice" }],
11926
12235
  display: { title: "Invoices", cols: ["amount_cents>Amount Cents", "customer_name>Customer Name", "description>Description", "status>Status", "@created_at>Created At", "#entity_id>ID"] },
11927
- examples: ["corp invoices", "corp invoices --json"]
12236
+ examples: [
12237
+ "corp invoices inv_01hx9k3n2p4q7r8s9t0uvwxyz",
12238
+ "corp invoices inv_01hx9k3n2p4q7r8s9t0uvwxyz --json"
12239
+ ]
11928
12240
  },
11929
12241
  {
11930
12242
  name: "invoices mark-paid",
@@ -11932,7 +12244,7 @@ var init_treasury = __esm({
11932
12244
  route: { method: "POST", path: "/v1/invoices/{pos}/mark-paid" },
11933
12245
  entity: true,
11934
12246
  args: [{ name: "invoice-id", required: true, description: "Invoice ID", posKind: "invoice" }],
11935
- examples: ["corp invoices mark-paid <invoice-id>"],
12247
+ examples: ["corp invoices mark-paid inv_01hx9k3n2p4q7r8s9t0uvwxyz"],
11936
12248
  successTemplate: "Invoice marked as paid"
11937
12249
  },
11938
12250
  {
@@ -11942,7 +12254,10 @@ var init_treasury = __esm({
11942
12254
  entity: true,
11943
12255
  args: [{ name: "invoice-id", required: true, description: "Invoice ID", posKind: "invoice" }],
11944
12256
  display: { title: "Invoices Pay Instructions", cols: ["amount_cents>Amount Cents", "currency>Currency", "instructions>Instructions", "#invoice_id>ID", "payment_method>Payment Method"] },
11945
- examples: ["corp invoices pay-instructions", "corp invoices pay-instructions --json"]
12257
+ examples: [
12258
+ "corp invoices pay-instructions inv_01hx9k3n2p4q7r8s9t0uvwxyz",
12259
+ "corp invoices pay-instructions inv_01hx9k3n2p4q7r8s9t0uvwxyz --json"
12260
+ ]
11946
12261
  },
11947
12262
  {
11948
12263
  name: "invoices send",
@@ -11950,17 +12265,20 @@ var init_treasury = __esm({
11950
12265
  route: { method: "POST", path: "/v1/invoices/{pos}/send" },
11951
12266
  entity: true,
11952
12267
  args: [{ name: "invoice-id", required: true, description: "Invoice ID", posKind: "invoice" }],
11953
- examples: ["corp invoices send <invoice-id>"],
12268
+ examples: ["corp invoices send inv_01hx9k3n2p4q7r8s9t0uvwxyz"],
11954
12269
  successTemplate: "Invoice sent"
11955
12270
  },
11956
12271
  {
11957
12272
  name: "invoices status",
11958
- description: "Check invoice payment status",
12273
+ description: "Check payment status of an invoice",
11959
12274
  route: { method: "GET", path: "/v1/invoices/{pos}/status" },
11960
12275
  entity: true,
11961
12276
  args: [{ name: "invoice-id", required: true, description: "Invoice ID", posKind: "invoice" }],
11962
12277
  display: { title: "Invoices Status", cols: ["amount_cents>Amount Cents", "customer_name>Customer Name", "description>Description", "status>Status", "@created_at>Created At", "#entity_id>ID"] },
11963
- examples: ["corp invoices status", "corp invoices status --json"]
12278
+ examples: [
12279
+ "corp invoices status inv_01hx9k3n2p4q7r8s9t0uvwxyz",
12280
+ "corp invoices status inv_01hx9k3n2p4q7r8s9t0uvwxyz --json"
12281
+ ]
11964
12282
  },
11965
12283
  {
11966
12284
  name: "journal-entries post",
@@ -11968,7 +12286,7 @@ var init_treasury = __esm({
11968
12286
  route: { method: "POST", path: "/v1/journal-entries/{pos}/post" },
11969
12287
  entity: true,
11970
12288
  args: [{ name: "entry-id", required: true, description: "Journal entry ID" }],
11971
- examples: ["corp journal-entries post <entry-id>"],
12289
+ examples: ["corp journal-entries post jrn_01hx9k3n2p4q7r8s9t0uvwxyz"],
11972
12290
  successTemplate: "Journal entry posted"
11973
12291
  },
11974
12292
  {
@@ -11977,21 +12295,24 @@ var init_treasury = __esm({
11977
12295
  route: { method: "POST", path: "/v1/journal-entries/{pos}/void" },
11978
12296
  entity: true,
11979
12297
  args: [{ name: "entry-id", required: true, description: "Journal entry ID" }],
11980
- examples: ["corp journal-entries void <entry-id>"],
12298
+ examples: ["corp journal-entries void jrn_01hx9k3n2p4q7r8s9t0uvwxyz"],
11981
12299
  successTemplate: "Journal entry voided"
11982
12300
  },
11983
12301
  {
11984
12302
  name: "ledger reconcile",
11985
- description: "Reconcile the ledger",
12303
+ description: "Run a ledger reconciliation for an entity",
11986
12304
  route: { method: "POST", path: "/v1/ledger/reconcile" },
11987
12305
  entity: true,
11988
12306
  options: [
11989
- { flags: "--as-of-date <as-of-date>", description: "As Of Date" },
11990
- { flags: "--end-date <end-date>", description: "End Date" },
11991
- { flags: "--start-date <start-date>", description: "Start Date" }
12307
+ { flags: "--as-of-date <as-of-date>", description: "Reconcile as of this date (ISO 8601, e.g. 2026-03-31)" },
12308
+ { flags: "--end-date <end-date>", description: "End of reconciliation period (ISO 8601)" },
12309
+ { flags: "--start-date <start-date>", description: "Start of reconciliation period (ISO 8601)" }
12310
+ ],
12311
+ examples: [
12312
+ "corp ledger reconcile --as-of-date 2026-03-31",
12313
+ "corp ledger reconcile --start-date 2026-01-01 --end-date 2026-03-31"
11992
12314
  ],
11993
- examples: ["corp ledger reconcile", "corp ledger reconcile --json"],
11994
- successTemplate: "Reconcile created"
12315
+ successTemplate: "Ledger reconciliation complete"
11995
12316
  },
11996
12317
  {
11997
12318
  name: "payments",
@@ -11999,79 +12320,95 @@ var init_treasury = __esm({
11999
12320
  route: { method: "POST", path: "/v1/payments" },
12000
12321
  entity: true,
12001
12322
  options: [
12002
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12003
- { flags: "--description <description>", description: "Description text", required: true },
12004
- { flags: "--payment-method <payment-method>", description: "How a payment is made or received.", choices: ["bank_transfer", "card", "check", "wire", "ach"] },
12005
- { flags: "--recipient <recipient>", description: "Recipient", required: true }
12323
+ { flags: "--amount-cents <amount-cents>", description: "Payment amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
12324
+ { flags: "--description <description>", description: "Description of the payment", required: true },
12325
+ { flags: "--payment-method <payment-method>", description: "How the payment is made or received", choices: ["bank_transfer", "card", "check", "wire", "ach"] },
12326
+ { flags: "--recipient <recipient>", description: "Recipient name or ID", required: true }
12006
12327
  ],
12007
- examples: ["corp payments --amount-cents 'amount-cents' --description bank_transfer --recipient 'recipient'", "corp payments --json"],
12008
- successTemplate: "Payments created"
12328
+ examples: [
12329
+ 'corp payments --amount-cents 250000 --description "Software subscription" --payment-method ach --recipient "Acme Vendors LLC"',
12330
+ 'corp payments --amount-cents 1000000 --description "Consulting invoice #42" --payment-method wire --recipient "Jane Doe"'
12331
+ ],
12332
+ successTemplate: "Payment recorded"
12009
12333
  },
12010
12334
  {
12011
12335
  name: "payments execute",
12012
- description: "Execute a pending payment",
12336
+ description: "Execute a pending payment immediately",
12013
12337
  route: { method: "POST", path: "/v1/payments/execute" },
12014
12338
  entity: true,
12015
12339
  options: [
12016
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12017
- { flags: "--description <description>", description: "Description text", required: true },
12018
- { flags: "--payment-method <payment-method>", description: "How a payment is made or received.", choices: ["bank_transfer", "card", "check", "wire", "ach"] },
12019
- { flags: "--recipient <recipient>", description: "Recipient", required: true }
12340
+ { flags: "--amount-cents <amount-cents>", description: "Payment amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
12341
+ { flags: "--description <description>", description: "Description of the payment", required: true },
12342
+ { flags: "--payment-method <payment-method>", description: "How the payment is made or received", choices: ["bank_transfer", "card", "check", "wire", "ach"] },
12343
+ { flags: "--recipient <recipient>", description: "Recipient name or ID", required: true }
12344
+ ],
12345
+ examples: [
12346
+ 'corp payments execute --amount-cents 250000 --description "Vendor invoice" --payment-method wire --recipient "Acme Vendors LLC"'
12020
12347
  ],
12021
- examples: ["corp payments execute --amount-cents 'amount-cents' --description bank_transfer --recipient 'recipient'", "corp payments execute --json"],
12022
12348
  successTemplate: "Payment executed"
12023
12349
  },
12024
12350
  {
12025
12351
  name: "payroll runs",
12026
- description: "Create a payroll run",
12352
+ description: "Create a payroll run for a pay period",
12027
12353
  route: { method: "POST", path: "/v1/payroll/runs" },
12028
12354
  entity: true,
12029
12355
  options: [
12030
- { flags: "--pay-period-end <pay-period-end>", description: "Pay Period End", required: true },
12031
- { flags: "--pay-period-start <pay-period-start>", description: "Pay Period Start", required: true }
12356
+ { flags: "--pay-period-end <pay-period-end>", description: "Last day of the pay period (ISO 8601, e.g. 2026-03-31)", required: true },
12357
+ { flags: "--pay-period-start <pay-period-start>", description: "First day of the pay period (ISO 8601, e.g. 2026-03-01)", required: true }
12358
+ ],
12359
+ examples: [
12360
+ "corp payroll runs --pay-period-start 2026-03-01 --pay-period-end 2026-03-31"
12032
12361
  ],
12033
- examples: ["corp payroll runs --pay-period-end 'pay-period-end' --pay-period-start 'pay-period-start'"],
12034
12362
  successTemplate: "Payroll run created"
12035
12363
  },
12036
12364
  {
12037
12365
  name: "spending-limits",
12038
- description: "Set a spending limit",
12366
+ description: "Set a spending limit for a category and period",
12039
12367
  route: { method: "POST", path: "/v1/spending-limits" },
12040
12368
  entity: true,
12041
12369
  options: [
12042
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12043
- { flags: "--category <category>", description: "Category", required: true },
12044
- { flags: "--period <period>", description: "Period", required: true }
12370
+ { flags: "--amount-cents <amount-cents>", description: "Limit amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
12371
+ { flags: "--category <category>", description: "Spending category (e.g. software, travel, marketing)", required: true },
12372
+ { flags: "--period <period>", description: "Limit period (e.g. monthly, quarterly, annual)", required: true }
12045
12373
  ],
12046
- examples: ["corp spending-limits --amount-cents 'amount-cents' --category 'category' --period 'period'"],
12047
- successTemplate: "Spending Limits created"
12374
+ examples: [
12375
+ "corp spending-limits --amount-cents 500000 --category software --period monthly",
12376
+ "corp spending-limits --amount-cents 2000000 --category travel --period quarterly"
12377
+ ],
12378
+ successTemplate: "Spending limit set"
12048
12379
  },
12049
12380
  {
12050
12381
  name: "treasury accounts",
12051
- description: "Create a new ledger account",
12382
+ description: "Create a new ledger account for an entity",
12052
12383
  route: { method: "POST", path: "/v1/treasury/accounts" },
12053
12384
  entity: true,
12054
12385
  options: [
12055
- { flags: "--account-code <account-code>", description: "Standard GL account codes with integer discriminants matching the code number.", required: true, choices: ["Cash", "AccountsReceivable", "AccountsPayable", "AccruedExpenses", "FounderCapital", "Revenue", "OperatingExpenses", "Cogs"] }
12386
+ { flags: "--account-code <account-code>", description: "Standard GL account code to create", required: true, choices: ["Cash", "AccountsReceivable", "AccountsPayable", "AccruedExpenses", "FounderCapital", "Revenue", "OperatingExpenses", "Cogs"] }
12387
+ ],
12388
+ examples: [
12389
+ "corp treasury accounts --account-code Cash",
12390
+ "corp treasury accounts --account-code Revenue"
12056
12391
  ],
12057
- examples: ["corp treasury accounts --account-code Cash"],
12058
- successTemplate: "Accounts created"
12392
+ successTemplate: "Ledger account created"
12059
12393
  },
12060
12394
  {
12061
12395
  name: "treasury bank-accounts",
12062
- description: "Register a new bank account",
12396
+ description: "Register a new bank account for an entity",
12063
12397
  route: { method: "POST", path: "/v1/treasury/bank-accounts" },
12064
12398
  entity: true,
12065
12399
  options: [
12066
- { flags: "--account-type <account-type>", description: "Account type (checking, savings)", choices: ["checking", "savings"] },
12067
- { flags: "--bank-name <bank-name>", description: "Bank name", required: true }
12400
+ { flags: "--account-type <account-type>", description: "Type of bank account", choices: ["checking", "savings"] },
12401
+ { flags: "--bank-name <bank-name>", description: "Name of the bank (e.g. Mercury, Chase)", required: true }
12068
12402
  ],
12069
- examples: ["corp treasury bank-accounts --bank-name 'bank-name'", "corp treasury bank-accounts --json"],
12070
- successTemplate: "Bank Accounts created"
12403
+ examples: [
12404
+ "corp treasury bank-accounts --bank-name Mercury --account-type checking",
12405
+ "corp treasury bank-accounts --bank-name Chase --account-type savings"
12406
+ ],
12407
+ successTemplate: "Bank account registered"
12071
12408
  },
12072
12409
  {
12073
12410
  name: "treasury chart-of-accounts",
12074
- description: "View chart of accounts for an entity",
12411
+ description: "View the chart of accounts for an entity",
12075
12412
  route: { method: "GET", path: "/v1/treasury/chart-of-accounts/{eid}" },
12076
12413
  entity: true,
12077
12414
  display: { title: "Treasury Chart Of Accounts", cols: ["accounts>Accounts", "#entity_id>ID"] },
@@ -12083,13 +12420,15 @@ var init_treasury = __esm({
12083
12420
  route: { method: "POST", path: "/v1/treasury/invoices" },
12084
12421
  entity: true,
12085
12422
  options: [
12086
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12423
+ { flags: "--amount-cents <amount-cents>", description: "Invoice amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
12087
12424
  { flags: "--customer-name <customer-name>", description: "Customer name for the invoice", required: true },
12088
- { flags: "--description <description>", description: "Description text", required: true },
12089
- { flags: "--due-date <due-date>", description: "Due date (ISO 8601, e.g. 2026-06-30)", required: true }
12425
+ { flags: "--description <description>", description: "Description of services or goods invoiced", required: true },
12426
+ { flags: "--due-date <due-date>", description: "Payment due date (ISO 8601, e.g. 2026-06-30)", required: true }
12090
12427
  ],
12091
- examples: ["corp treasury invoices --amount-cents 'amount-cents' --customer-name 'customer-name' --description 'description' --due-date 'due-date'"],
12092
- successTemplate: "Invoices created"
12428
+ examples: [
12429
+ 'corp treasury invoices --amount-cents 500000 --customer-name "Acme Corp" --description "Consulting services Q1" --due-date 2026-06-30'
12430
+ ],
12431
+ successTemplate: "Invoice created"
12093
12432
  },
12094
12433
  {
12095
12434
  name: "treasury journal-entries",
@@ -12097,12 +12436,14 @@ var init_treasury = __esm({
12097
12436
  route: { method: "POST", path: "/v1/treasury/journal-entries" },
12098
12437
  entity: true,
12099
12438
  options: [
12100
- { flags: "--description <description>", description: "Description text", required: true },
12101
- { flags: "--effective-date <effective-date>", description: "Effective Date", required: true },
12102
- { flags: "--lines <lines>", description: "Lines", required: true, type: "array" }
12439
+ { flags: "--description <description>", description: "Description of the journal entry", required: true },
12440
+ { flags: "--effective-date <effective-date>", description: "Date the entry takes effect (ISO 8601, e.g. 2026-03-31)", required: true },
12441
+ { flags: "--lines <lines>", description: "JSON array of debit/credit line items", required: true, type: "array" }
12442
+ ],
12443
+ examples: [
12444
+ `corp treasury journal-entries --description "Prepaid software expense" --effective-date 2026-03-31 --lines '[{"account_code":"OperatingExpenses","amount_cents":50000,"type":"debit"},{"account_code":"Cash","amount_cents":50000,"type":"credit"}]'`
12103
12445
  ],
12104
- examples: ["corp treasury journal-entries --description 'description' --effective-date 'effective-date' --lines 'lines'"],
12105
- successTemplate: "Journal Entries created"
12446
+ successTemplate: "Journal entry created"
12106
12447
  },
12107
12448
  {
12108
12449
  name: "treasury payment-intents",
@@ -12110,44 +12451,51 @@ var init_treasury = __esm({
12110
12451
  route: { method: "POST", path: "/v1/treasury/payment-intents" },
12111
12452
  entity: true,
12112
12453
  options: [
12113
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12114
- { flags: "--currency <currency>", description: "Currency code (e.g. USD)" },
12115
- { flags: "--description <description>", description: "Description text" }
12454
+ { flags: "--amount-cents <amount-cents>", description: "Payment amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
12455
+ { flags: "--currency <currency>", description: "ISO 4217 currency code (e.g. USD)" },
12456
+ { flags: "--description <description>", description: "Description of the payment" }
12116
12457
  ],
12117
- examples: ["corp treasury payment-intents --amount-cents 'amount-cents'", "corp treasury payment-intents --json"],
12118
- successTemplate: "Payment Intents created"
12458
+ examples: [
12459
+ 'corp treasury payment-intents --amount-cents 500000 --currency USD --description "Vendor payment"'
12460
+ ],
12461
+ successTemplate: "Payment intent created"
12119
12462
  },
12120
12463
  {
12121
12464
  name: "treasury payouts",
12122
- description: "Create a payout",
12465
+ description: "Create a payout to a destination",
12123
12466
  route: { method: "POST", path: "/v1/treasury/payouts" },
12124
12467
  entity: true,
12125
12468
  options: [
12126
- { flags: "--amount-cents <amount-cents>", description: "Amount in cents", required: true, type: "int" },
12127
- { flags: "--description <description>", description: "Description text" },
12128
- { flags: "--destination <destination>", description: "Destination", required: true }
12469
+ { flags: "--amount-cents <amount-cents>", description: "Payout amount in cents (e.g. 500000 for $5,000)", required: true, type: "int" },
12470
+ { flags: "--description <description>", description: "Description of the payout" },
12471
+ { flags: "--destination <destination>", description: "Destination account or recipient ID", required: true }
12472
+ ],
12473
+ examples: [
12474
+ 'corp treasury payouts --amount-cents 500000 --destination ba_01hx9k3n2p4q7r8s9t0uvwxyz --description "Founder distribution"'
12129
12475
  ],
12130
- examples: ["corp treasury payouts --amount-cents 'amount-cents' --destination 'destination'", "corp treasury payouts --json"],
12131
- successTemplate: "Payouts created"
12476
+ successTemplate: "Payout created"
12132
12477
  },
12133
12478
  {
12134
12479
  name: "treasury seed-chart-of-accounts",
12135
- description: "Initialize chart of accounts for an entity",
12480
+ description: "Initialize the chart of accounts for an entity from a template",
12136
12481
  route: { method: "POST", path: "/v1/treasury/seed-chart-of-accounts" },
12137
12482
  entity: true,
12138
12483
  options: [
12139
- { flags: "--template <template>", description: "Chart of accounts template name to seed from" }
12484
+ { flags: "--template <template>", description: "Chart of accounts template to seed from (e.g. standard, startup)" }
12485
+ ],
12486
+ examples: [
12487
+ "corp treasury seed-chart-of-accounts",
12488
+ "corp treasury seed-chart-of-accounts --template startup"
12140
12489
  ],
12141
- examples: ["corp treasury seed-chart-of-accounts", "corp treasury seed-chart-of-accounts --json"],
12142
- successTemplate: "Seed Chart Of Accounts created"
12490
+ successTemplate: "Chart of accounts initialized"
12143
12491
  },
12144
12492
  {
12145
12493
  name: "treasury stripe-accounts",
12146
- description: "Register a Stripe account",
12494
+ description: "Register a Stripe account for an entity",
12147
12495
  route: { method: "POST", path: "/v1/treasury/stripe-accounts" },
12148
12496
  entity: true,
12149
12497
  examples: ["corp treasury stripe-accounts"],
12150
- successTemplate: "Stripe Accounts created"
12498
+ successTemplate: "Stripe account registered"
12151
12499
  }
12152
12500
  ];
12153
12501
  }
@@ -12180,7 +12528,7 @@ var init_branches = __esm({
12180
12528
  { flags: "--from <branch>", description: "Base branch (default: main)", default: "main" }
12181
12529
  ],
12182
12530
  successTemplate: "Branch {branch} created at {base_commit}",
12183
- examples: ["corp branches create --name 'name'", "corp branches create --json"]
12531
+ examples: ["corp branches create --name feature/my-change", "corp branches create --name hotfix/fix-ein --from main --json"]
12184
12532
  },
12185
12533
  {
12186
12534
  name: "branches merge",
@@ -12193,7 +12541,7 @@ var init_branches = __esm({
12193
12541
  { flags: "--squash", description: "Squash merge (default: true)" }
12194
12542
  ],
12195
12543
  successTemplate: "Merge {strategy}: {commit}",
12196
- examples: ["corp branches merge <branch>", "corp branches merge --json"]
12544
+ examples: ["corp branches merge feature/my-change", "corp branches merge feature/my-change --into main --squash --json"]
12197
12545
  },
12198
12546
  {
12199
12547
  name: "branches delete",
@@ -12202,7 +12550,7 @@ var init_branches = __esm({
12202
12550
  entity: "query",
12203
12551
  args: [{ name: "branch", required: true, description: "Branch to delete" }],
12204
12552
  successTemplate: "Branch deleted",
12205
- examples: ["corp branches delete <branch>"]
12553
+ examples: ["corp branches delete feature/my-change"]
12206
12554
  },
12207
12555
  {
12208
12556
  name: "branches prune",
@@ -12211,7 +12559,7 @@ var init_branches = __esm({
12211
12559
  entity: "query",
12212
12560
  args: [{ name: "branch", required: true, description: "Branch to prune" }],
12213
12561
  successTemplate: "Branch pruned",
12214
- examples: ["corp branches prune <branch>"]
12562
+ examples: ["corp branches prune feature/my-change"]
12215
12563
  }
12216
12564
  ];
12217
12565
  }