@kanvas/openclaw-plugin 0.1.19 → 0.1.21

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.
@@ -954,7 +954,7 @@ export class CrmService {
954
954
  async listContactTypes(first = 50) {
955
955
  const query = `
956
956
  query ContactTypes($first: Int) {
957
- contactTypes(first: $first) {
957
+ contactType(first: $first) {
958
958
  data {
959
959
  id
960
960
  name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kanvas/openclaw-plugin",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Connects agents to Kanvas — your company's nervous system for CRM, inventory, orders, and messaging.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,7 +23,11 @@ Use the native `kanvas_update_lead` tool.
23
23
  ### 3. Updating Contacts (People)
24
24
  Use the native `kanvas_update_people` tool.
25
25
  - You can seamlessly append phone numbers, emails, and custom fields to a Contact profile.
26
- - Pass the contacts array with the correct `contacts_types_id` (e.g., 1 for Email, 2 for Phone). Call `kanvas_list_contact_types` first if you are unsure of the IDs.
26
+ - Pass the contacts array with the correct `contacts_types_id`. **Well-known IDs (use directly, no lookup needed):**
27
+ - `1` → Email
28
+ - `2` → Phone
29
+ - `3` → Cell Phone
30
+ - For any other contact type (LinkedIn, Twitter, etc.), call `kanvas_list_contact_types` to look up the ID.
27
31
 
28
32
  ### 4. File Attachments
29
33
  Use the native tools:
@@ -69,9 +73,9 @@ When attaching a drafted cold email or pitch to a Lead profile for human review,
69
73
 
70
74
  ### 11. Apollo Integration & Contact Enrichment
71
75
  When using Apollo API to source leads, always extract the following fields and map them to Kanvas:
72
- - **Email:** Use `kanvas_list_contact_types` to find the ID (usually 1) and map to `contacts: [{ value: email, contacts_types_id: 1 }]`.
73
- - **LinkedIn Profile (Optional):** If the contact has a `linkedin_url`, extract it and map to `contacts: [{ value: linkedin_url, contacts_types_id: 5 }]`. Do not fail or block the lead creation if the LinkedIn profile is missing.
74
- - **Phone Numbers:** Apollo requires a webhook to reveal direct phone numbers. Until this is built into Kanvas, phone numbers cannot be automatically extracted via the synchronous API.
76
+ - **Email:** Map to `contacts: [{ value: email, contacts_types_id: 1 }]` — ID 1 is Email (well-known, no lookup needed).
77
+ - **Phone Numbers:** Apollo requires a webhook to reveal direct phone numbers. When available, map to `contacts_types_id: 2` (Phone) or `3` (Cell Phone).
78
+ - **LinkedIn Profile (Optional):** Look up the LinkedIn `contacts_types_id` via `kanvas_list_contact_types` (typically 5, but verify per app). Map to `contacts: [{ value: linkedin_url, contacts_types_id: <id> }]`. Do not fail or block lead creation if LinkedIn is missing.
75
79
 
76
80
  ### 12. White-Labeling & Value Communication
77
81
  When communicating with the leadership team, founders, or human architects, NEVER mention the specific technical backend tools (e.g., Apollo, Kanvas, OpenClaw, GraphQL).
@@ -118,6 +118,26 @@ For each task, in sequence order:
118
118
 
119
119
  When you transition a task, the system emits a ledger event AND a Pusher broadcast — humans watching the kanban see your progress in real time. **You don't need to do anything extra to "notify" them**; status transitions are the notification.
120
120
 
121
+ ### 4a. Roll up plan status after every task transition
122
+
123
+ After **every** task status change, look at the rest of the tasks in the plan and reconcile the plan's status. The plan should always reflect the aggregate state of its tasks:
124
+
125
+ | Task states in the plan | Plan status |
126
+ |---|---|
127
+ | All tasks `done` (and at least one task exists) | `done` |
128
+ | Any task `blocked` | `blocked` |
129
+ | At least one `in_progress` or `pending`, none blocked | `active` (leave it alone) |
130
+ | All tasks `failed` / `cancelled` | `failed` (use judgment — comment first) |
131
+
132
+ **Examples:**
133
+
134
+ - You just finished the last `pending` task → flip the plan to `done` (and set `output` JSON, see §10).
135
+ - You marked a task `blocked` because you're stuck → flip the plan to `blocked` (and add a comment, see §8).
136
+ - You marked a task `done` but other tasks are still `pending` → **leave the plan on `active`**. Do nothing more.
137
+ - A previously blocked task got unblocked and you moved it back to `in_progress` → if the plan was `blocked` and no other tasks are blocked, flip the plan back to `active`.
138
+
139
+ The status transition is what humans see on the kanban — keeping the plan in sync with its tasks is how the board stays trustworthy. **Never** leave a plan on `active` when all tasks are done, and **never** leave a plan on `active` when a task is blocked. If you forget this step, the human's dashboard lies.
140
+
121
141
  ---
122
142
 
123
143
  ## 5. Add files / artifacts as you produce them
@@ -291,6 +311,7 @@ Better to ask once than apologize a hundred times.
291
311
  - [ ] If no tasks, write the checklist before doing anything (`kanvas_add_task` or include in `kanvas_create_plan`)
292
312
  - [ ] If `requires_human_approval=true`, **don't act** — leave a comment with your proposed approach and wait
293
313
  - [ ] Move tasks `pending → in_progress → done` one at a time, in sequence order
314
+ - [ ] **After every task transition, roll up the plan's status** — all tasks `done` → plan `done`; any task `blocked` → plan `blocked`; otherwise leave plan on `active`
294
315
  - [ ] Comment when something non-obvious happens
295
316
  - [ ] Block + comment if you can't proceed
296
317
  - [ ] Set a useful `output` JSON before flipping to `done`