@thecorporation/cli 26.3.3 → 26.3.5
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 +79 -45
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -819,19 +819,13 @@ var link_exports = {};
|
|
|
819
819
|
__export(link_exports, {
|
|
820
820
|
linkCommand: () => linkCommand
|
|
821
821
|
});
|
|
822
|
-
async function linkCommand() {
|
|
822
|
+
async function linkCommand(opts) {
|
|
823
823
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
824
824
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
825
825
|
try {
|
|
826
|
-
const data = await client.createLink();
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
console.log();
|
|
830
|
-
console.log(` ${code}`);
|
|
831
|
-
console.log();
|
|
832
|
-
console.log(`Run this on the other device (expires in ${Math.floor(expires / 60)} minutes):`);
|
|
833
|
-
console.log(` corp claim ${code}`);
|
|
834
|
-
console.log();
|
|
826
|
+
const data = await client.createLink(opts.externalId, opts.provider);
|
|
827
|
+
printSuccess(`Workspace linked to ${opts.provider} (external ID: ${opts.externalId})`);
|
|
828
|
+
if (data.workspace_id) console.log(` Workspace: ${data.workspace_id}`);
|
|
835
829
|
} catch (err) {
|
|
836
830
|
printError(`${err}`);
|
|
837
831
|
process.exit(1);
|
|
@@ -1297,7 +1291,12 @@ async function entitiesDissolveCommand(entityId, opts) {
|
|
|
1297
1291
|
printSuccess(`Dissolution initiated: ${result.dissolution_id ?? "OK"}`);
|
|
1298
1292
|
printJson(result);
|
|
1299
1293
|
} catch (err) {
|
|
1300
|
-
|
|
1294
|
+
const msg = String(err);
|
|
1295
|
+
if (msg.includes("InvalidTransition") || msg.includes("422")) {
|
|
1296
|
+
printError(`Cannot dissolve entity: only entities with 'active' status can be dissolved. Check the entity's current status with: corp entities show ${entityId}`);
|
|
1297
|
+
} else {
|
|
1298
|
+
printError(`Failed to dissolve entity: ${err}`);
|
|
1299
|
+
}
|
|
1301
1300
|
process.exit(1);
|
|
1302
1301
|
}
|
|
1303
1302
|
}
|
|
@@ -1336,9 +1335,10 @@ async function contactsListCommand(opts) {
|
|
|
1336
1335
|
}
|
|
1337
1336
|
async function contactsShowCommand(contactId, opts) {
|
|
1338
1337
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
1338
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1339
1339
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1340
1340
|
try {
|
|
1341
|
-
const profile = await client.getContactProfile(contactId);
|
|
1341
|
+
const profile = await client.getContactProfile(contactId, eid);
|
|
1342
1342
|
if (opts.json) {
|
|
1343
1343
|
printJson(profile);
|
|
1344
1344
|
} else {
|
|
@@ -1390,9 +1390,10 @@ async function contactsAddCommand(opts) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
async function contactsEditCommand(contactId, opts) {
|
|
1392
1392
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
1393
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1393
1394
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1394
1395
|
try {
|
|
1395
|
-
const data = {};
|
|
1396
|
+
const data = { entity_id: eid };
|
|
1396
1397
|
if (opts.name != null) data.name = opts.name;
|
|
1397
1398
|
if (opts.email != null) data.email = opts.email;
|
|
1398
1399
|
if (opts.category != null) data.category = opts.category;
|
|
@@ -1515,7 +1516,12 @@ async function fourOhNineACommand(opts) {
|
|
|
1515
1516
|
else if (!data || Object.keys(data).length === 0) console.log("No 409A valuation found.");
|
|
1516
1517
|
else print409a(data);
|
|
1517
1518
|
} catch (err) {
|
|
1518
|
-
|
|
1519
|
+
const msg = String(err);
|
|
1520
|
+
if (msg.includes("404")) {
|
|
1521
|
+
console.log("No 409A valuation found for this entity. Create one with:\n corp cap-table create-valuation --type four_oh_nine_a --date YYYY-MM-DD --methodology <method>");
|
|
1522
|
+
} else {
|
|
1523
|
+
printError(`Failed to fetch 409A valuation: ${err}`);
|
|
1524
|
+
}
|
|
1519
1525
|
process.exit(1);
|
|
1520
1526
|
}
|
|
1521
1527
|
}
|
|
@@ -1618,13 +1624,20 @@ async function transferSharesCommand(opts) {
|
|
|
1618
1624
|
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1619
1625
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1620
1626
|
try {
|
|
1621
|
-
const
|
|
1627
|
+
const body = {
|
|
1622
1628
|
entity_id: eid,
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
transfer_type: opts.type
|
|
1627
|
-
|
|
1629
|
+
share_class_id: opts.shareClassId,
|
|
1630
|
+
from_contact_id: opts.from,
|
|
1631
|
+
to_contact_id: opts.to,
|
|
1632
|
+
transfer_type: opts.type,
|
|
1633
|
+
share_count: opts.shares,
|
|
1634
|
+
governing_doc_type: opts.governingDocType,
|
|
1635
|
+
transferee_rights: opts.transfereeRights,
|
|
1636
|
+
prepare_intent_id: opts.prepareIntentId
|
|
1637
|
+
};
|
|
1638
|
+
if (opts.pricePerShareCents != null) body.price_per_share_cents = opts.pricePerShareCents;
|
|
1639
|
+
if (opts.relationship) body.relationship_to_holder = opts.relationship;
|
|
1640
|
+
const result = await client.transferShares(body);
|
|
1628
1641
|
printSuccess(`Transfer workflow created: ${result.workflow_id ?? "OK"}`);
|
|
1629
1642
|
printJson(result);
|
|
1630
1643
|
} catch (err) {
|
|
@@ -1735,7 +1748,12 @@ async function submitValuationCommand(opts) {
|
|
|
1735
1748
|
if (result.agenda_item_id) console.log(` Agenda Item: ${result.agenda_item_id}`);
|
|
1736
1749
|
printJson(result);
|
|
1737
1750
|
} catch (err) {
|
|
1738
|
-
|
|
1751
|
+
const msg = String(err);
|
|
1752
|
+
if (msg.includes("404")) {
|
|
1753
|
+
printError(`Valuation not found. List valuations with: corp cap-table valuations`);
|
|
1754
|
+
} else {
|
|
1755
|
+
printError(`Failed to submit valuation: ${err}`);
|
|
1756
|
+
}
|
|
1739
1757
|
process.exit(1);
|
|
1740
1758
|
}
|
|
1741
1759
|
}
|
|
@@ -1748,7 +1766,12 @@ async function approveValuationCommand(opts) {
|
|
|
1748
1766
|
printSuccess(`Valuation approved: ${result.valuation_id ?? "OK"}`);
|
|
1749
1767
|
printJson(result);
|
|
1750
1768
|
} catch (err) {
|
|
1751
|
-
|
|
1769
|
+
const msg = String(err);
|
|
1770
|
+
if (msg.includes("400")) {
|
|
1771
|
+
printError(`Bad request \u2014 a --resolution-id from a board vote may be required. Submit for approval first: corp cap-table submit-valuation <id>`);
|
|
1772
|
+
} else {
|
|
1773
|
+
printError(`Failed to approve valuation: ${err}`);
|
|
1774
|
+
}
|
|
1752
1775
|
process.exit(1);
|
|
1753
1776
|
}
|
|
1754
1777
|
}
|
|
@@ -1937,8 +1960,7 @@ async function governanceAddSeatCommand(bodyId, opts) {
|
|
|
1937
1960
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
1938
1961
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1939
1962
|
try {
|
|
1940
|
-
const data = { holder_id: opts.holder };
|
|
1941
|
-
if (opts.title) data.title = opts.title;
|
|
1963
|
+
const data = { holder_id: opts.holder, role: opts.role ?? "member" };
|
|
1942
1964
|
const result = await client.createGovernanceSeat(bodyId, data);
|
|
1943
1965
|
printSuccess(`Seat added: ${result.seat_id ?? "OK"}`);
|
|
1944
1966
|
printJson(result);
|
|
@@ -1963,9 +1985,10 @@ async function governanceListCommand(opts) {
|
|
|
1963
1985
|
}
|
|
1964
1986
|
async function governanceSeatsCommand(bodyId, opts) {
|
|
1965
1987
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
1988
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1966
1989
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1967
1990
|
try {
|
|
1968
|
-
const seats = await client.getGovernanceSeats(bodyId);
|
|
1991
|
+
const seats = await client.getGovernanceSeats(bodyId, eid);
|
|
1969
1992
|
if (opts.json) printJson(seats);
|
|
1970
1993
|
else if (seats.length === 0) console.log("No seats found.");
|
|
1971
1994
|
else printSeatsTable(seats);
|
|
@@ -1976,9 +1999,10 @@ async function governanceSeatsCommand(bodyId, opts) {
|
|
|
1976
1999
|
}
|
|
1977
2000
|
async function governanceMeetingsCommand(bodyId, opts) {
|
|
1978
2001
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
2002
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1979
2003
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1980
2004
|
try {
|
|
1981
|
-
const meetings = await client.listMeetings(bodyId);
|
|
2005
|
+
const meetings = await client.listMeetings(bodyId, eid);
|
|
1982
2006
|
if (opts.json) printJson(meetings);
|
|
1983
2007
|
else if (meetings.length === 0) console.log("No meetings found.");
|
|
1984
2008
|
else printMeetingsTable(meetings);
|
|
@@ -1989,9 +2013,10 @@ async function governanceMeetingsCommand(bodyId, opts) {
|
|
|
1989
2013
|
}
|
|
1990
2014
|
async function governanceResolutionsCommand(meetingId, opts) {
|
|
1991
2015
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
2016
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
1992
2017
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
1993
2018
|
try {
|
|
1994
|
-
const resolutions = await client.getMeetingResolutions(meetingId);
|
|
2019
|
+
const resolutions = await client.getMeetingResolutions(meetingId, eid);
|
|
1995
2020
|
if (opts.json) printJson(resolutions);
|
|
1996
2021
|
else if (resolutions.length === 0) console.log("No resolutions found.");
|
|
1997
2022
|
else printResolutionsTable(resolutions);
|
|
@@ -2169,13 +2194,18 @@ async function documentsListCommand(opts) {
|
|
|
2169
2194
|
process.exit(1);
|
|
2170
2195
|
}
|
|
2171
2196
|
}
|
|
2172
|
-
async function documentsSigningLinkCommand(docId) {
|
|
2197
|
+
async function documentsSigningLinkCommand(docId, opts) {
|
|
2173
2198
|
const cfg = requireConfig("api_url", "api_key", "workspace_id");
|
|
2199
|
+
const eid = resolveEntityId(cfg, opts.entityId);
|
|
2174
2200
|
const client = new CorpAPIClient(cfg.api_url, cfg.api_key, cfg.workspace_id);
|
|
2175
2201
|
try {
|
|
2176
|
-
const result = client.getSigningLink(docId);
|
|
2202
|
+
const result = await client.getSigningLink(docId, eid);
|
|
2177
2203
|
printSuccess(`Signing link: ${result.signing_url}`);
|
|
2178
|
-
|
|
2204
|
+
if (result.token) {
|
|
2205
|
+
console.log(` Token: ${result.token}`);
|
|
2206
|
+
console.log(` Share this URL with the signer:`);
|
|
2207
|
+
console.log(` https://humans.thecorporation.ai/sign/${docId}?token=${result.token}`);
|
|
2208
|
+
}
|
|
2179
2209
|
} catch (err) {
|
|
2180
2210
|
printError(`Failed to get signing link: ${err}`);
|
|
2181
2211
|
process.exit(1);
|
|
@@ -3112,9 +3142,9 @@ program.command("digest").description("View or trigger daily digests").option("-
|
|
|
3112
3142
|
const { digestCommand: digestCommand2 } = await Promise.resolve().then(() => (init_digest(), digest_exports));
|
|
3113
3143
|
await digestCommand2(opts);
|
|
3114
3144
|
});
|
|
3115
|
-
program.command("link").description("
|
|
3145
|
+
program.command("link").description("Link workspace to an external provider").requiredOption("--external-id <id>", "External ID to link").requiredOption("--provider <provider>", "Provider name (e.g. stripe, github)").action(async (opts) => {
|
|
3116
3146
|
const { linkCommand: linkCommand2 } = await Promise.resolve().then(() => (init_link(), link_exports));
|
|
3117
|
-
await linkCommand2();
|
|
3147
|
+
await linkCommand2(opts);
|
|
3118
3148
|
});
|
|
3119
3149
|
program.command("claim <code>").description("Redeem a claim code to join a workspace").action(async (code) => {
|
|
3120
3150
|
const { claimCommand: claimCommand2 } = await Promise.resolve().then(() => (init_claim(), claim_exports));
|
|
@@ -3144,18 +3174,20 @@ var contactsCmd = program.command("contacts").description("Contact management").
|
|
|
3144
3174
|
const { contactsListCommand: contactsListCommand2 } = await Promise.resolve().then(() => (init_contacts(), contacts_exports));
|
|
3145
3175
|
await contactsListCommand2(opts);
|
|
3146
3176
|
});
|
|
3147
|
-
contactsCmd.command("show <contact-id>").option("--json", "Output as JSON").description("Show contact detail/profile").action(async (contactId, opts) => {
|
|
3177
|
+
contactsCmd.command("show <contact-id>").option("--json", "Output as JSON").description("Show contact detail/profile").action(async (contactId, opts, cmd) => {
|
|
3178
|
+
const parent = cmd.parent.opts();
|
|
3148
3179
|
const { contactsShowCommand: contactsShowCommand2 } = await Promise.resolve().then(() => (init_contacts(), contacts_exports));
|
|
3149
|
-
await contactsShowCommand2(contactId, opts);
|
|
3180
|
+
await contactsShowCommand2(contactId, { ...opts, entityId: parent.entityId });
|
|
3150
3181
|
});
|
|
3151
|
-
contactsCmd.command("add").requiredOption("--name <name>", "Contact name").requiredOption("--email <email>", "Contact email").option("--type <type>", "Contact type (individual, organization)", "individual").option("--category <category>", "Category (employee, contractor, board_member, investor, law_firm, valuation_firm, accounting_firm, officer,
|
|
3182
|
+
contactsCmd.command("add").requiredOption("--name <name>", "Contact name").requiredOption("--email <email>", "Contact email").option("--type <type>", "Contact type (individual, organization)", "individual").option("--category <category>", "Category (employee, contractor, board_member, investor, law_firm, valuation_firm, accounting_firm, officer, founder, member, other)").option("--phone <phone>", "Phone number").option("--notes <notes>", "Notes").description("Add a new contact").action(async (opts, cmd) => {
|
|
3152
3183
|
const parent = cmd.parent.opts();
|
|
3153
3184
|
const { contactsAddCommand: contactsAddCommand2 } = await Promise.resolve().then(() => (init_contacts(), contacts_exports));
|
|
3154
3185
|
await contactsAddCommand2({ ...opts, entityId: parent.entityId });
|
|
3155
3186
|
});
|
|
3156
|
-
contactsCmd.command("edit <contact-id>").option("--name <name>", "Contact name").option("--email <email>", "Contact email").option("--category <category>", "Contact category").option("--phone <phone>", "Phone number").option("--notes <notes>", "Notes").description("Edit an existing contact").action(async (contactId, opts) => {
|
|
3187
|
+
contactsCmd.command("edit <contact-id>").option("--name <name>", "Contact name").option("--email <email>", "Contact email").option("--category <category>", "Contact category").option("--phone <phone>", "Phone number").option("--notes <notes>", "Notes").description("Edit an existing contact").action(async (contactId, opts, cmd) => {
|
|
3188
|
+
const parent = cmd.parent.opts();
|
|
3157
3189
|
const { contactsEditCommand: contactsEditCommand2 } = await Promise.resolve().then(() => (init_contacts(), contacts_exports));
|
|
3158
|
-
await contactsEditCommand2(contactId, opts);
|
|
3190
|
+
await contactsEditCommand2(contactId, { ...opts, entityId: parent.entityId });
|
|
3159
3191
|
});
|
|
3160
3192
|
var capTableCmd = program.command("cap-table").description("Cap table, equity grants, SAFEs, transfers, and valuations").option("--entity-id <id>", "Entity ID (overrides active entity)").option("--json", "Output as JSON").action(async (opts) => {
|
|
3161
3193
|
const { capTableCommand: capTableCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
@@ -3181,7 +3213,7 @@ capTableCmd.command("409a").description("Current 409A valuation").action(async (
|
|
|
3181
3213
|
const { fourOhNineACommand: fourOhNineACommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3182
3214
|
await fourOhNineACommand2(parent);
|
|
3183
3215
|
});
|
|
3184
|
-
capTableCmd.command("issue-equity").requiredOption("--grant-type <type>", "Grant type (
|
|
3216
|
+
capTableCmd.command("issue-equity").requiredOption("--grant-type <type>", "Grant type (common, preferred, membership_unit, stock_option, iso, nso, rsa)").requiredOption("--shares <n>", "Number of shares", parseInt).requiredOption("--recipient <name>", "Recipient name").option("--email <email>", "Recipient email (auto-creates contact if needed)").option("--instrument-id <id>", "Instrument ID (auto-detected from cap table if omitted)").description("Issue an equity grant (creates a round, adds security, and issues it)").action(async (opts, cmd) => {
|
|
3185
3217
|
const parent = cmd.parent.opts();
|
|
3186
3218
|
const { issueEquityCommand: issueEquityCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3187
3219
|
await issueEquityCommand2({ ...opts, entityId: parent.entityId });
|
|
@@ -3191,7 +3223,7 @@ capTableCmd.command("issue-safe").requiredOption("--investor <name>", "Investor
|
|
|
3191
3223
|
const { issueSafeCommand: issueSafeCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3192
3224
|
await issueSafeCommand2({ ...opts, entityId: parent.entityId });
|
|
3193
3225
|
});
|
|
3194
|
-
capTableCmd.command("transfer").requiredOption("--from
|
|
3226
|
+
capTableCmd.command("transfer").requiredOption("--from <id>", "Source contact ID (from_contact_id)").requiredOption("--to <id>", "Destination contact ID (to_contact_id)").requiredOption("--shares <n>", "Number of shares to transfer", parseInt).requiredOption("--share-class-id <id>", "Share class ID").requiredOption("--governing-doc-type <type>", "Governing document type").requiredOption("--transferee-rights <rights>", "Transferee rights").requiredOption("--prepare-intent-id <id>", "Prepare intent ID").option("--type <type>", "Transfer type", "sale").option("--price-per-share-cents <n>", "Price per share in cents", parseInt).option("--relationship <rel>", "Relationship to holder").description("Create a share transfer workflow").action(async (opts, cmd) => {
|
|
3195
3227
|
const parent = cmd.parent.opts();
|
|
3196
3228
|
const { transferSharesCommand: transferSharesCommand2 } = await Promise.resolve().then(() => (init_cap_table(), cap_table_exports));
|
|
3197
3229
|
await transferSharesCommand2({ ...opts, entityId: parent.entityId });
|
|
@@ -3271,7 +3303,7 @@ governanceCmd.command("create-body").requiredOption("--name <name>", "Body name
|
|
|
3271
3303
|
const { governanceCreateBodyCommand: governanceCreateBodyCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3272
3304
|
await governanceCreateBodyCommand2({ ...opts, entityId: parent.entityId });
|
|
3273
3305
|
});
|
|
3274
|
-
governanceCmd.command("add-seat <body-id>").requiredOption("--holder <contact-id>", "Contact ID for the seat holder").option("--
|
|
3306
|
+
governanceCmd.command("add-seat <body-id>").requiredOption("--holder <contact-id>", "Contact ID for the seat holder").option("--role <role>", "Seat role (chair, member, officer, observer)", "member").description("Add a seat to a governance body").action(async (bodyId, opts) => {
|
|
3275
3307
|
const { governanceAddSeatCommand: governanceAddSeatCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3276
3308
|
await governanceAddSeatCommand2(bodyId, opts);
|
|
3277
3309
|
});
|
|
@@ -3295,7 +3327,7 @@ governanceCmd.command("convene").requiredOption("--body <id>", "Governance body
|
|
|
3295
3327
|
const { governanceConveneCommand: governanceConveneCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3296
3328
|
await governanceConveneCommand2({ ...opts, meetingType: opts.type, entityId: parent.entityId });
|
|
3297
3329
|
});
|
|
3298
|
-
governanceCmd.command("vote <meeting-id> <item-id>").requiredOption("--voter <
|
|
3330
|
+
governanceCmd.command("vote <meeting-id> <item-id>").requiredOption("--voter <id>", "Voter contact UUID").requiredOption("--vote <value>", "Vote (for, against, abstain, recusal)").description("Cast a vote on an agenda item").action(async (meetingId, itemId, opts) => {
|
|
3299
3331
|
const { governanceVoteCommand: governanceVoteCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3300
3332
|
await governanceVoteCommand2(meetingId, itemId, opts);
|
|
3301
3333
|
});
|
|
@@ -3319,7 +3351,7 @@ governanceCmd.command("agenda-items <meeting-id>").description("List agenda item
|
|
|
3319
3351
|
const { listAgendaItemsCommand: listAgendaItemsCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3320
3352
|
await listAgendaItemsCommand2(meetingId, { entityId: parent.entityId, json: parent.json });
|
|
3321
3353
|
});
|
|
3322
|
-
governanceCmd.command("finalize-item <meeting-id> <item-id>").requiredOption("--status <status>", "Status:
|
|
3354
|
+
governanceCmd.command("finalize-item <meeting-id> <item-id>").requiredOption("--status <status>", "Status: voted, discussed, tabled, or withdrawn").description("Finalize an agenda item").action(async (meetingId, itemId, opts, cmd) => {
|
|
3323
3355
|
const parent = cmd.parent.opts();
|
|
3324
3356
|
const { finalizeAgendaItemCommand: finalizeAgendaItemCommand2 } = await Promise.resolve().then(() => (init_governance(), governance_exports));
|
|
3325
3357
|
await finalizeAgendaItemCommand2(meetingId, itemId, { ...opts, entityId: parent.entityId });
|
|
@@ -3338,9 +3370,10 @@ var documentsCmd = program.command("documents").description("Documents and signi
|
|
|
3338
3370
|
const { documentsListCommand: documentsListCommand2 } = await Promise.resolve().then(() => (init_documents(), documents_exports));
|
|
3339
3371
|
await documentsListCommand2(opts);
|
|
3340
3372
|
});
|
|
3341
|
-
documentsCmd.command("signing-link <doc-id>").description("Get a signing link for a document").action(async (docId) => {
|
|
3373
|
+
documentsCmd.command("signing-link <doc-id>").description("Get a signing link for a document").action(async (docId, _opts, cmd) => {
|
|
3374
|
+
const parent = cmd.parent.opts();
|
|
3342
3375
|
const { documentsSigningLinkCommand: documentsSigningLinkCommand2 } = await Promise.resolve().then(() => (init_documents(), documents_exports));
|
|
3343
|
-
await documentsSigningLinkCommand2(docId);
|
|
3376
|
+
await documentsSigningLinkCommand2(docId, { entityId: parent.entityId });
|
|
3344
3377
|
});
|
|
3345
3378
|
documentsCmd.command("generate").requiredOption("--template <type>", "Template type (consulting_agreement, employment_offer, contractor_agreement, nda, custom)").requiredOption("--counterparty <name>", "Counterparty name").option("--effective-date <date>", "Effective date (ISO 8601, defaults to today)").description("Generate a contract from a template").action(async (opts, cmd) => {
|
|
3346
3379
|
const parent = cmd.parent.opts();
|
|
@@ -3417,8 +3450,9 @@ program.command("approvals").description("Approvals are managed through governan
|
|
|
3417
3450
|
"Approvals are managed through governance meetings.\n Use: corp governance convene ... to schedule a board meeting\n Use: corp governance vote <meeting-id> <item-id> ... to cast votes"
|
|
3418
3451
|
);
|
|
3419
3452
|
});
|
|
3420
|
-
var formCmd = program.command("form").description("Form a new entity with founders and cap table (Cooley-style)").option("--entity-type <type>", "Entity type (llc, c_corp)").option("--name <name>", "Legal name").option("--jurisdiction <jurisdiction>", "Jurisdiction (e.g. US-DE, US-WY)").option("--member <member>", "Member as 'name,email,role[,pct]' \u2014 role: director|officer|manager|member|chair (repeatable)", (v, a) => [...a, v], []).option("--address <address>", "Company address as 'street,city,state,zip'").option("--fiscal-year-end <date>", "Fiscal year end (MM-DD)", "12-31").option("--s-corp", "Elect S-Corp status").option("--transfer-restrictions", "Enable transfer restrictions").option("--rofr", "Enable right of first refusal").action(async (opts) => {
|
|
3453
|
+
var formCmd = program.command("form").description("Form a new entity with founders and cap table (Cooley-style)").option("--entity-type <type>", "Entity type (llc, c_corp)").option("--legal-name <name>", "Legal name").option("--jurisdiction <jurisdiction>", "Jurisdiction (e.g. US-DE, US-WY)").option("--member <member>", "Member as 'name,email,role[,pct]' \u2014 role: director|officer|manager|member|chair (repeatable)", (v, a) => [...a, v], []).option("--address <address>", "Company address as 'street,city,state,zip'").option("--fiscal-year-end <date>", "Fiscal year end (MM-DD)", "12-31").option("--s-corp", "Elect S-Corp status").option("--transfer-restrictions", "Enable transfer restrictions").option("--rofr", "Enable right of first refusal").action(async (opts) => {
|
|
3421
3454
|
if (opts.entityType && !opts.type) opts.type = opts.entityType;
|
|
3455
|
+
if (opts.legalName && !opts.name) opts.name = opts.legalName;
|
|
3422
3456
|
const { formCommand: formCommand2 } = await Promise.resolve().then(() => (init_form(), form_exports));
|
|
3423
3457
|
await formCommand2(opts);
|
|
3424
3458
|
});
|