gsjos 0.6.1 → 0.6.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/verbs.mjs +19 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsjos",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Headless access to a gsjmedia OS workspace — CLI and MCP server over one API core.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
package/src/verbs.mjs CHANGED
@@ -54,18 +54,23 @@ export const VERBS = [
54
54
 
55
55
  {
56
56
  name: "people.list",
57
- summary: "List or search people (prospects). Filter by name with q.",
57
+ summary: "List or search people (prospects). Filter by name with q. Archived people are left out unless archived is set.",
58
58
  kind: "read",
59
59
  paginated: true,
60
60
  args: {
61
61
  q: { type: "string", desc: "name substring to search for" },
62
+ archived: { type: "boolean", desc: "list archived people instead" },
63
+ archived_reason: { type: "string", desc: "with archived: only this reason (do_not_contact is the DNC list)" },
62
64
  limit: { type: "number", desc: "max rows per page (default 25, max 200)" },
63
65
  cursor: { type: "string", desc: "page cursor from a previous response (opaque)" },
64
66
  all: { type: "boolean", desc: "walk every page and return the whole set" },
65
67
  },
66
- request: ({ q, limit, cursor }) => ({ method: "GET", path: "/people", query: { q, limit, cursor } }),
68
+ request: ({ q, archived, archived_reason, limit, cursor }) => ({
69
+ method: "GET", path: "/people",
70
+ query: { q, archived: archived ? "true" : undefined, archived_reason, limit, cursor },
71
+ }),
67
72
  text: (rows) =>
68
- rows.map((p) => `${short(p.id)} ${pad(p.full_name, 24)} ${pad(p.current_company_name, 22)} ${p.lead_status ?? ""}`).join("\n")
73
+ rows.map((p) => `${short(p.id)} ${pad(p.full_name, 24)} ${pad(p.current_company_name, 22)} ${p.archive_reason ? `archived: ${p.archive_reason}` : p.lead_status ?? ""}`).join("\n")
69
74
  + `\n\n${rows.length} people`,
70
75
  },
71
76
 
@@ -137,8 +142,17 @@ export const VERBS = [
137
142
  follow_up_date: { type: "string", desc: "ISO date to follow up on" },
138
143
  follow_up_reason: { type: "string", desc: "why the follow-up is set" },
139
144
  ai_context_summary: { type: "string", desc: "rolling summary of this person's context" },
140
- },
141
- request: ({ id, ...rest }) => ({ method: "PATCH", path: `/people/${encodeURIComponent(id)}`, body: rest }),
145
+ // Archive, never delete: only a person deletes people. do_not_contact
146
+ // also sets lead_status (in the database), and is how someone joins the
147
+ // DNC list. An inbound reply after the archive brings them back.
148
+ archive_reason: { type: "string", desc: "archive them: do_not_contact, wrong_person, bad_fit, competitor or other" },
149
+ archive_note: { type: "string", desc: "why they were archived" },
150
+ unarchive: { type: "boolean", desc: "bring an archived person back" },
151
+ },
152
+ request: ({ id, unarchive, ...rest }) => ({
153
+ method: "PATCH", path: `/people/${encodeURIComponent(id)}`,
154
+ body: unarchive ? { ...rest, archive_reason: null } : rest,
155
+ }),
142
156
  text: (d) => `updated ${short(d.id)}: ${d.updated.join(", ")}${d.ignored?.length ? ` (ignored: ${d.ignored.join(", ")})` : ""}`,
143
157
  },
144
158