@usenaive-sdk/cli 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/client.js +1 -1
  2. package/dist/client.js.map +1 -1
  3. package/dist/commands/agent-profiles.d.ts +11 -0
  4. package/dist/commands/agent-profiles.js +120 -0
  5. package/dist/commands/agent-profiles.js.map +1 -0
  6. package/dist/commands/approvals.js +1 -1
  7. package/dist/commands/billing-client.d.ts +2 -0
  8. package/dist/commands/billing-client.js +271 -0
  9. package/dist/commands/billing-client.js.map +1 -0
  10. package/dist/commands/crm-app.d.ts +2 -0
  11. package/dist/commands/crm-app.js +306 -0
  12. package/dist/commands/crm-app.js.map +1 -0
  13. package/dist/commands/crm.d.ts +2 -0
  14. package/dist/commands/crm.js +319 -0
  15. package/dist/commands/crm.js.map +1 -0
  16. package/dist/commands/env.d.ts +7 -0
  17. package/dist/commands/env.js +48 -0
  18. package/dist/commands/env.js.map +1 -0
  19. package/dist/commands/init.d.ts +2 -0
  20. package/dist/commands/init.js +67 -0
  21. package/dist/commands/init.js.map +1 -0
  22. package/dist/commands/integrations.d.ts +2 -0
  23. package/dist/commands/integrations.js +199 -0
  24. package/dist/commands/integrations.js.map +1 -0
  25. package/dist/commands/logs.js +1 -1
  26. package/dist/commands/logs.js.map +1 -1
  27. package/dist/commands/module.d.ts +8 -0
  28. package/dist/commands/module.js +48 -0
  29. package/dist/commands/module.js.map +1 -0
  30. package/dist/commands/operators.d.ts +11 -0
  31. package/dist/commands/operators.js +120 -0
  32. package/dist/commands/operators.js.map +1 -0
  33. package/dist/commands/report.d.ts +17 -0
  34. package/dist/commands/report.js +109 -0
  35. package/dist/commands/report.js.map +1 -0
  36. package/dist/commands/up.d.ts +3 -0
  37. package/dist/commands/up.js +251 -0
  38. package/dist/commands/up.js.map +1 -0
  39. package/dist/index.js +40 -14
  40. package/dist/index.js.map +1 -1
  41. package/dist/output.js +11 -0
  42. package/dist/output.js.map +1 -1
  43. package/dist/version.d.ts +2 -0
  44. package/dist/version.js +14 -0
  45. package/dist/version.js.map +1 -0
  46. package/package.json +10 -10
package/dist/client.js CHANGED
@@ -100,7 +100,7 @@ export function handlePendingApproval(action, resp) {
100
100
  next_steps: [
101
101
  {
102
102
  command: `naive approvals approve ${d.approval_id ?? "<approval_id>"}`,
103
- description: "Approve & execute this action (operator/owner)",
103
+ description: "Approve & execute this action (agentProfile/owner)",
104
104
  },
105
105
  {
106
106
  command: `naive approvals get ${d.approval_id ?? "<approval_id>"}`,
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1D,8EAA8E;AAC9E,0EAA0E;AAC1E,IAAI,aAAiC,CAAC;AACtC,MAAM,UAAU,qBAAqB,CAAC,MAAe;IACnD,aAAa,GAAG,MAAM,CAAC;AACzB,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,YAAY;IAC1B,OAAO,aAAa,IAAI,UAAU,EAAE,CAAC,cAAc,CAAC;AACtD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AAElJ,SAAS,eAAe,CAAC,IAAY,EAAE,OAA2B;IAChE,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC,CAAC,mDAAmD;IAC9E,IAAI,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,sBAAsB;IACtE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CA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I,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;QACvB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAc,EACd,IAAuC;IAEvC,MAAM,CAAC,GAAG,IAAI,CAAC,IAMd,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,MAAM,KAAK,kBAAkB,EAAE,CAAC;QAC5D,WAAW,CAAC;YACV,MAAM;YACN,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,UAAU,EAAE;gBACV;oBACE,OAAO,EAAE,2BAA2B,CAAC,CAAC,WAAW,IAAI,eAAe,EAAE;oBACtE,WAAW,EAAE,oDAAoD;iBAClE;gBACD;oBACE,OAAO,EAAE,uBAAuB,CAAC,CAAC,WAAW,IAAI,eAAe,EAAE;oBAClE,WAAW,EAAE,sCAAsC;iBACpD;aACF;YACD,KAAK,EAAE;gBACL,CAAC,CAAC,OAAO,IAAI,yDAAyD;gBACtE,qDAAqD;aACtD;SACF,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Command } from "commander";
2
+ /**
3
+ * Agent profiles — the per-tenant governed real-world bundle (identity, money, comms,
4
+ * runtime), governed on every action and instantly revocable.
5
+ */
6
+ export declare const agentProfilesCmd: Command;
7
+ /**
8
+ * Top-level `naive revoke` sugar — revoke an agent profile (or, with --tenant, the
9
+ * agent profile for that tenant).
10
+ */
11
+ export declare const revokeCmd: Command;
@@ -0,0 +1,120 @@
1
+ import { Command } from "commander";
2
+ import { apiRequest, handleApiError, activeUserId } from "../client.js";
3
+ import { agentOutput } from "../output.js";
4
+ /**
5
+ * Agent profiles — the per-tenant governed real-world bundle (identity, money, comms,
6
+ * runtime), governed on every action and instantly revocable.
7
+ */
8
+ export const agentProfilesCmd = new Command("agent-profiles")
9
+ .alias("agent-profile")
10
+ .description("Provision & govern a real-world agent profile per tenant (identity, card, comms, runtime)");
11
+ agentProfilesCmd
12
+ .command("provision")
13
+ .description("Provision a governed agent profile for a tenant from a template")
14
+ .argument("<template>", "Template name (registered via naive.config.ts / naive up)")
15
+ .option("--user <id>", "Tenant id to provision the agent profile for (defaults to the active/default user)")
16
+ .option("--idempotency-key <key>", "Idempotency key — a retried provision resumes the same agent profile")
17
+ .option("--overrides <json>", "JSON overrides applied on top of the template (legalName, domain, …)")
18
+ .action(async (template, opts) => {
19
+ const user = opts.user ?? activeUserId() ?? "default";
20
+ let overrides;
21
+ if (opts.overrides) {
22
+ try {
23
+ overrides = JSON.parse(opts.overrides);
24
+ }
25
+ catch {
26
+ agentOutput({
27
+ action: "agentProfiles.provision",
28
+ result: { error: "invalid --overrides JSON" },
29
+ next_steps: [{ command: "naive agent-profiles provision <template> --overrides '{\"identity\":{\"legalName\":\"Acme\"}}'", description: "Valid JSON" }],
30
+ });
31
+ return;
32
+ }
33
+ }
34
+ const resp = await apiRequest("POST", `/v1/users/${user}/agent-profiles`, {
35
+ template,
36
+ idempotency_key: opts.idempotencyKey,
37
+ overrides,
38
+ });
39
+ handleApiError("agentProfiles.provision", resp);
40
+ const op = resp.data;
41
+ agentOutput({
42
+ action: "agentProfiles.provision",
43
+ result: resp.data,
44
+ next_steps: [
45
+ { command: `naive agent-profiles get ${op.id ?? "<id>"}`, description: "Check provisioning status" },
46
+ { command: `naive agent-profiles revoke ${op.id ?? "<id>"}`, description: "Absolute revoke (freeze card, halt sends)" },
47
+ ],
48
+ hints: [
49
+ "Pull the agent profile's governed tools with @usenaive-sdk/server: const tools = await op.tools().",
50
+ "Run the agent on your own runtime (Eve / AgentCore / LangGraph) — governance is constant.",
51
+ ],
52
+ });
53
+ });
54
+ agentProfilesCmd
55
+ .command("list")
56
+ .description("List provisioned agent profiles")
57
+ .action(async () => {
58
+ const resp = await apiRequest("GET", `/v1/agent-profiles`);
59
+ handleApiError("agentProfiles.list", resp);
60
+ agentOutput({
61
+ action: "agentProfiles.list",
62
+ result: resp.data,
63
+ next_steps: [{ command: "naive agent-profiles get <id>", description: "Inspect one agent profile" }],
64
+ });
65
+ });
66
+ agentProfilesCmd
67
+ .command("get")
68
+ .description("Get an agent profile's status")
69
+ .argument("<id>", "Agent profile id")
70
+ .action(async (id) => {
71
+ const resp = await apiRequest("GET", `/v1/agent-profiles/${id}`);
72
+ handleApiError("agentProfiles.get", resp);
73
+ agentOutput({
74
+ action: "agentProfiles.get",
75
+ result: resp.data,
76
+ next_steps: [{ command: `naive agent-profiles revoke ${id}`, description: "Absolute revoke" }],
77
+ });
78
+ });
79
+ agentProfilesCmd
80
+ .command("revoke")
81
+ .description("Absolute revoke — freeze the card, halt sends, tear down runtime")
82
+ .argument("<id>", "Agent profile id")
83
+ .action(async (id) => {
84
+ const resp = await apiRequest("POST", `/v1/agent-profiles/${id}/revoke`);
85
+ handleApiError("agentProfiles.revoke", resp);
86
+ agentOutput({
87
+ action: "agentProfiles.revoke",
88
+ result: resp.data,
89
+ next_steps: [{ command: "naive agent-profiles list", description: "Confirm the agent profile is revoked" }],
90
+ hints: ["Revoke is absolute: the governance gateway denies all further tool calls for this agentProfile."],
91
+ });
92
+ });
93
+ /**
94
+ * Top-level `naive revoke` sugar — revoke an agent profile (or, with --tenant, the
95
+ * agent profile for that tenant).
96
+ */
97
+ export const revokeCmd = new Command("revoke")
98
+ .description("Absolute revoke of an agent profile (sugar for `naive agent-profiles revoke`)")
99
+ .argument("[id]", "Agent profile id")
100
+ .option("--agent-profile <id>", "Agent profile id")
101
+ .option("--tenant <id>", "Tenant id (its agent profile id equals the tenant id)")
102
+ .action(async (idArg, opts) => {
103
+ const id = idArg ?? opts.agentProfile ?? opts.tenant;
104
+ if (!id) {
105
+ agentOutput({
106
+ action: "revoke",
107
+ result: { error: "missing agent profile id" },
108
+ next_steps: [{ command: "naive revoke <agent_profile_id>", description: "Provide an agent profile id" }],
109
+ });
110
+ return;
111
+ }
112
+ const resp = await apiRequest("POST", `/v1/agent-profiles/${id}/revoke`);
113
+ handleApiError("revoke", resp);
114
+ agentOutput({
115
+ action: "revoke",
116
+ result: resp.data,
117
+ next_steps: [{ command: "naive agent-profiles list", description: "Confirm revoked" }],
118
+ });
119
+ });
120
+ //# sourceMappingURL=agent-profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-profiles.js","sourceRoot":"","sources":["../../src/commands/agent-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAC,gBAAgB,CAAC;KAC1D,KAAK,CAAC,eAAe,CAAC;KACtB,WAAW,CAAC,2FAA2F,CAAC,CAAC;AAE5G,gBAAgB;KACb,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CAAC,iEAAiE,CAAC;KAC9E,QAAQ,CAAC,YAAY,EAAE,2DAA2D,CAAC;KACnF,MAAM,CAAC,aAAa,EAAE,oFAAoF,CAAC;KAC3G,MAAM,CAAC,yBAAyB,EAAE,sEAAsE,CAAC;KACzG,MAAM,CAAC,oBAAoB,EAAE,sEAAsE,CAAC;KACpG,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,IAAoE,EAAE,EAAE;IACvG,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,YAAY,EAAE,IAAI,SAAS,CAAC;IACtD,IAAI,SAA8C,CAAC;IACnD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,IAAI,CAAC;YACH,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC;QA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ACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC3C,WAAW,CAAC,+EAA+E,CAAC;KAC5F,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;KACpC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC;KAClD,MAAM,CAAC,eAAe,EAAE,uDAAuD,CAAC;KAChF,MAAM,CAAC,KAAK,EAAE,KAAyB,EAAE,IAAgD,EAAE,EAAE;IAC5F,MAAM,EAAE,GAAG,KAAK,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC;IACrD,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,WAAW,CAAC;YACV,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,EAAE,KAAK,EAAE,0BAA0B,EAAE;YAC7C,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,iCAAiC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;SACzG,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAC;IACzE,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC/B,WAAW,CAAC;QACV,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,IAAI,CAAC,IAAI;QACjB,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;KACvF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -23,7 +23,7 @@ Subcommands:
23
23
 
24
24
  Scope: pass --user <id> to target one tenant user, or omit to use the active
25
25
  user (set with 'naive use <id>'). Omit --user with no active user to use the
26
- operator's default user.
26
+ agent profile's default user.
27
27
 
28
28
  Examples:
29
29
  $ naive approvals list --status pending
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare const billingClientCmd: Command;
@@ -0,0 +1,271 @@
1
+ import { Command } from "commander";
2
+ import { apiRequest, handleApiError } from "../client.js";
3
+ import { agentOutput } from "../output.js";
4
+ export const billingClientCmd = new Command("billing-client")
5
+ .description("naive/billing-client — Stripe-via-Composio: invoice + bill your clients. Distinct from 'naive billing' (Naive platform plan).")
6
+ .addHelpText("after", `
7
+ Subcommands:
8
+ naive billing-client connection Check whether Stripe is connected via Composio
9
+ naive billing-client sync Manually pull latest invoices/subscriptions/customers from Stripe
10
+ naive billing-client invoices ... Manage Stripe invoices for your clients
11
+ naive billing-client subscriptions ... Manage Stripe subscriptions for retainers
12
+ naive billing-client profile <contact-id> Look up a billing profile for a CRM contact
13
+ naive billing-client overdue List overdue invoices (for dunning workflows)
14
+ naive billing-client mrr Net MRR change over a date range
15
+
16
+ Stripe must be connected via Composio first:
17
+ $ naive integrations connect stripe
18
+
19
+ If it isn't connected, every billing-client command returns:
20
+ { error_code: "stripe_not_connected", connect_url: "..." }
21
+ `);
22
+ billingClientCmd
23
+ .command("connection")
24
+ .description("Check Stripe (Composio) connection status")
25
+ .action(async () => {
26
+ const resp = await apiRequest("GET", "/v1/billing-client/connection");
27
+ handleApiError("billing-client.connection", resp);
28
+ const data = resp.data;
29
+ agentOutput({
30
+ action: "billing-client.connection",
31
+ result: resp.data,
32
+ next_steps: data.connected
33
+ ? [{ command: "naive billing-client invoices list", description: "List existing invoices" }]
34
+ : [{ command: "naive integrations connect stripe", description: "Connect Stripe via Composio" }],
35
+ hints: data.connected
36
+ ? ["Stripe is connected — billing-client commands will work"]
37
+ : ["Stripe is not connected — connect via Composio before invoicing clients"],
38
+ related_commands: ["naive integrations connect", "naive billing-client invoices list"],
39
+ });
40
+ });
41
+ billingClientCmd
42
+ .command("sync")
43
+ .description("Manually pull latest invoices/subscriptions/customers from Stripe (usually runs hourly)")
44
+ .action(async () => {
45
+ const resp = await apiRequest("POST", "/v1/billing-client/sync");
46
+ handleApiError("billing-client.sync", resp);
47
+ agentOutput({
48
+ action: "billing-client.sync",
49
+ result: resp.data,
50
+ related_commands: ["naive billing-client invoices list", "naive billing-client subscriptions list"],
51
+ });
52
+ });
53
+ // ── Invoices ──────────────────────────────────────────────────────────────
54
+ const invoicesCmd = billingClientCmd.command("invoices").description("Stripe invoice management");
55
+ invoicesCmd
56
+ .command("list")
57
+ .description("List invoices (denormalized read model)")
58
+ .option("--crm-contact <id>", "Filter to a CRM contact")
59
+ .option("--crm-company <id>", "Filter to a CRM company")
60
+ .option("--status <status>", "Stripe status (draft|open|paid|void|uncollectible)")
61
+ .option("--limit <n>", "Max results (default 50)", "50")
62
+ .option("--offset <n>", "Pagination offset", "0")
63
+ .action(async (opts) => {
64
+ const params = new URLSearchParams({ limit: opts.limit, offset: opts.offset });
65
+ if (opts.crmContact)
66
+ params.set("crm_contact_id", opts.crmContact);
67
+ if (opts.crmCompany)
68
+ params.set("crm_company_id", opts.crmCompany);
69
+ if (opts.status)
70
+ params.set("status", opts.status);
71
+ const resp = await apiRequest("GET", `/v1/billing-client/invoices?${params}`);
72
+ handleApiError("billing-client.invoices.list", resp);
73
+ const data = resp.data;
74
+ agentOutput({
75
+ action: "billing-client.invoices.list",
76
+ result: resp.data,
77
+ next_steps: data.invoices.length > 0
78
+ ? [{ command: `naive billing-client invoices get ${data.invoices[0].id}`, description: "View the most recent invoice" }]
79
+ : [{ command: "naive billing-client invoices create --crm-contact <id> --line-items <json>", description: "Create your first invoice" }],
80
+ hints: [`${data.count} invoice${data.count === 1 ? "" : "s"} returned`],
81
+ related_commands: ["naive billing-client invoices create", "naive billing-client invoices send"],
82
+ });
83
+ });
84
+ invoicesCmd
85
+ .command("create")
86
+ .description("Create a Stripe invoice for a CRM contact")
87
+ .requiredOption("--crm-contact <id>", "CRM contact UUID")
88
+ .requiredOption("--line-items <json>", "JSON array: [{description, amount_cents, quantity?, currency?}]")
89
+ .option("--memo <text>", "Memo text on the invoice")
90
+ .option("--due-date <iso>", "ISO date string")
91
+ .option("--currency <iso>", "Default currency (usd)")
92
+ .option("--auto-send", "Finalize and send immediately after creation")
93
+ .action(async (opts) => {
94
+ let lineItems;
95
+ try {
96
+ lineItems = JSON.parse(opts.lineItems);
97
+ }
98
+ catch {
99
+ agentOutput({
100
+ action: "billing-client.invoices.create",
101
+ result: { error: "invalid_input", message: "--line-items must be valid JSON" },
102
+ hints: ["Example: '[{\"description\":\"Audit\",\"amount_cents\":150000}]'"],
103
+ related_commands: ["naive billing-client invoices create"],
104
+ });
105
+ process.exit(1);
106
+ }
107
+ const resp = await apiRequest("POST", "/v1/billing-client/invoices", {
108
+ crm_contact_id: opts.crmContact,
109
+ line_items: lineItems,
110
+ memo: opts.memo,
111
+ due_date: opts.dueDate,
112
+ currency: opts.currency,
113
+ auto_send: opts.autoSend === true,
114
+ });
115
+ handleApiError("billing-client.invoices.create", resp);
116
+ const data = resp.data;
117
+ agentOutput({
118
+ action: "billing-client.invoices.create",
119
+ result: resp.data,
120
+ next_steps: [
121
+ ...(opts.autoSend
122
+ ? [{ command: `naive billing-client invoices get ${data.invoice.id}`, description: "Verify invoice was sent" }]
123
+ : [{ command: `naive billing-client invoices send ${data.invoice.id}`, description: "Finalize and send this draft invoice" }]),
124
+ ],
125
+ hints: data.invoice.hosted_invoice_url ? [`Hosted: ${data.invoice.hosted_invoice_url}`] : [],
126
+ related_commands: ["naive billing-client invoices send", "naive billing-client invoices void"],
127
+ });
128
+ });
129
+ invoicesCmd
130
+ .command("get <invoice_id>")
131
+ .description("Get a single invoice")
132
+ .action(async (invoiceId) => {
133
+ const resp = await apiRequest("GET", `/v1/billing-client/invoices/${invoiceId}`);
134
+ handleApiError("billing-client.invoices.get", resp);
135
+ agentOutput({
136
+ action: "billing-client.invoices.get",
137
+ result: resp.data,
138
+ related_commands: ["naive billing-client invoices send", "naive billing-client invoices void"],
139
+ });
140
+ });
141
+ invoicesCmd
142
+ .command("send <invoice_id>")
143
+ .description("Finalize (if draft) and send a Stripe invoice")
144
+ .action(async (invoiceId) => {
145
+ const resp = await apiRequest("POST", `/v1/billing-client/invoices/${invoiceId}/send`);
146
+ handleApiError("billing-client.invoices.send", resp);
147
+ agentOutput({
148
+ action: "billing-client.invoices.send",
149
+ result: resp.data,
150
+ related_commands: ["naive billing-client invoices get", "naive billing-client invoices list"],
151
+ });
152
+ });
153
+ invoicesCmd
154
+ .command("void <invoice_id>")
155
+ .description("Void a Stripe invoice")
156
+ .option("--reason <text>", "Why the invoice is being voided")
157
+ .action(async (invoiceId, opts) => {
158
+ const resp = await apiRequest("POST", `/v1/billing-client/invoices/${invoiceId}/void`, {
159
+ reason: opts.reason,
160
+ });
161
+ handleApiError("billing-client.invoices.void", resp);
162
+ agentOutput({
163
+ action: "billing-client.invoices.void",
164
+ result: resp.data,
165
+ related_commands: ["naive billing-client invoices list", "naive billing-client invoices create"],
166
+ });
167
+ });
168
+ // ── Subscriptions ────────────────────────────────────────────────────────
169
+ const subsCmd = billingClientCmd.command("subscriptions").description("Stripe subscription management (retainers)");
170
+ subsCmd
171
+ .command("list")
172
+ .description("List subscriptions")
173
+ .option("--crm-contact <id>", "Filter to a CRM contact")
174
+ .option("--status <status>", "Stripe status filter")
175
+ .option("--limit <n>", "Max results (default 50)", "50")
176
+ .option("--offset <n>", "Pagination offset", "0")
177
+ .action(async (opts) => {
178
+ const params = new URLSearchParams({ limit: opts.limit, offset: opts.offset });
179
+ if (opts.crmContact)
180
+ params.set("crm_contact_id", opts.crmContact);
181
+ if (opts.status)
182
+ params.set("status", opts.status);
183
+ const resp = await apiRequest("GET", `/v1/billing-client/subscriptions?${params}`);
184
+ handleApiError("billing-client.subscriptions.list", resp);
185
+ agentOutput({
186
+ action: "billing-client.subscriptions.list",
187
+ result: resp.data,
188
+ related_commands: ["naive billing-client subscriptions create", "naive billing-client subscriptions cancel"],
189
+ });
190
+ });
191
+ subsCmd
192
+ .command("create")
193
+ .description("Create a subscription for a CRM contact")
194
+ .requiredOption("--crm-contact <id>", "CRM contact UUID")
195
+ .requiredOption("--price-id <id>", "Stripe price ID (price_...)")
196
+ .option("--trial-days <n>", "Trial period in days")
197
+ .action(async (opts) => {
198
+ const resp = await apiRequest("POST", "/v1/billing-client/subscriptions", {
199
+ crm_contact_id: opts.crmContact,
200
+ price_id: opts.priceId,
201
+ ...(opts.trialDays && { trial_days: parseInt(opts.trialDays, 10) }),
202
+ });
203
+ handleApiError("billing-client.subscriptions.create", resp);
204
+ agentOutput({
205
+ action: "billing-client.subscriptions.create",
206
+ result: resp.data,
207
+ related_commands: ["naive billing-client subscriptions list", "naive billing-client mrr"],
208
+ });
209
+ });
210
+ subsCmd
211
+ .command("cancel <subscription_id>")
212
+ .description("Cancel a subscription (default: at period end)")
213
+ .option("--immediate", "Cancel immediately rather than at period end")
214
+ .action(async (subscriptionId, opts) => {
215
+ const resp = await apiRequest("POST", `/v1/billing-client/subscriptions/${subscriptionId}/cancel`, {
216
+ at_period_end: !opts.immediate,
217
+ });
218
+ handleApiError("billing-client.subscriptions.cancel", resp);
219
+ agentOutput({
220
+ action: "billing-client.subscriptions.cancel",
221
+ result: resp.data,
222
+ related_commands: ["naive billing-client subscriptions list"],
223
+ });
224
+ });
225
+ // ── Profiles + aggregates ─────────────────────────────────────────────────
226
+ billingClientCmd
227
+ .command("profile <contact_id>")
228
+ .description("Get the billing profile for a CRM contact (denormalized status, MRR, LTV)")
229
+ .action(async (contactId) => {
230
+ const resp = await apiRequest("GET", `/v1/billing-client/profiles/by-contact/${contactId}`);
231
+ handleApiError("billing-client.profile", resp);
232
+ agentOutput({
233
+ action: "billing-client.profile",
234
+ result: resp.data,
235
+ related_commands: ["naive billing-client invoices list", "naive billing-client subscriptions list"],
236
+ });
237
+ });
238
+ billingClientCmd
239
+ .command("overdue")
240
+ .description("List overdue invoices (for dunning)")
241
+ .option("--threshold-days <n>", "Only invoices overdue by at least N days", "0")
242
+ .action(async (opts) => {
243
+ const params = new URLSearchParams({ threshold_days: opts.thresholdDays });
244
+ const resp = await apiRequest("GET", `/v1/billing-client/invoices/overdue?${params}`);
245
+ handleApiError("billing-client.overdue", resp);
246
+ agentOutput({
247
+ action: "billing-client.overdue",
248
+ result: resp.data,
249
+ related_commands: ["naive billing-client invoices list", "naive billing-client invoices send"],
250
+ });
251
+ });
252
+ billingClientCmd
253
+ .command("mrr")
254
+ .description("Compute MRR change over a date range")
255
+ .option("--from <iso>", "Start date (default 30 days ago)")
256
+ .option("--to <iso>", "End date (default now)")
257
+ .action(async (opts) => {
258
+ const params = new URLSearchParams();
259
+ if (opts.from)
260
+ params.set("from", opts.from);
261
+ if (opts.to)
262
+ params.set("to", opts.to);
263
+ const resp = await apiRequest("GET", `/v1/billing-client/mrr?${params}`);
264
+ handleApiError("billing-client.mrr", resp);
265
+ agentOutput({
266
+ action: "billing-client.mrr",
267
+ result: resp.data,
268
+ related_commands: ["naive billing-client subscriptions list"],
269
+ });
270
+ });
271
+ //# sourceMappingURL=billing-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-client.js","sourceRoot":"","sources":["../../src/commands/billing-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAC,gBAAgB,CAAC;KAC1D,WAAW,CAAC,+HAA+H,CAAC;KAC5I,WAAW,CAAC,OAAO,EAAE;;;;;;;;;;;;;;;CAevB,CAAC,CAAC;AAEH,gBAAgB;KACb,OAAO,CAAC,YAAY,CAAC;KACrB,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC;IACtE,cAAc,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,IAAI,CAAC,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