insightcrm 0.1.0 → 0.1.1

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/SKILL.md +8 -4
  3. package/dist/cli.js +14 -12
  4. package/package.json +2 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 shadowcz007
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/SKILL.md CHANGED
@@ -89,16 +89,20 @@ crm list -q 跨境 --json # 关键词:姓名、公司
89
89
  crm get <id> --json
90
90
  ```
91
91
 
92
- ## 推荐库
92
+ ## 推荐库(是用户的库存,不是聊天里挖出来的东西)
93
93
 
94
- 用户维护的、可以发给客户的文章 / 产品 / 服务 / 活动:
94
+ 推荐库是**用户自己的待推荐库存**:他要推给客户的产品、服务、文章、活动。内容只来自用户本人。
95
+
96
+ - **平时只读**:`crm rec list --json`,用来给某个客户挑合适的推荐。
97
+ - **只在用户明确要求时才添加**(比如「把这个产品加到推荐库」,并且信息是他给的)。**不要**因为聊天里提到了某个产品、服务或链接就自己往里加,也不要编造产品、卖点或链接。
98
+ - 聊天里验证有效的话术**不是**推荐,那是钩子,用 `crm hook add`(见上面「成功钩子」)。两个库别混:钩子 = 从对话里总结出来的话术;推荐 = 用户要卖或要推的东西。
95
99
 
96
100
  ```bash
97
101
  crm rec list --json
98
- crm rec add --title "..." --type Article|Product|Service|Event --desc "适合什么样的客户" --link https://...
102
+ crm rec add --title "..." --type Article|Product|Service|Event --desc "适合什么样的客户" --link https://... # 仅在用户明确要求时
99
103
  ```
100
104
 
101
- 给客户挑推荐时,只推荐高度相关的,并说明理由。
105
+ 给客户挑推荐时:只推荐高度相关的,并说明为什么适合这个客户(对应客户的哪个痛点或目标);库里没有合适的就直说没有,不要硬凑,更不要编一个。
102
106
 
103
107
  ## Prompt 模板
104
108
 
package/dist/cli.js CHANGED
@@ -19832,7 +19832,7 @@ var SCHEMA = {
19832
19832
  ]
19833
19833
  },
19834
19834
  hook: {
19835
- description: "\u6210\u529F\u94A9\u5B50\u5E93\uFF1A\u8BB0\u5F55\u300C\u54EA\u53E5\u8BDD\u3001\u54EA\u79CD\u8BF4\u6CD5\u300D\u6210\u529F\u5F15\u8D77\u5BA2\u6237\u6CE8\u610F\u3002\u8FD9\u662F\u8DE8\u5BA2\u6237\u590D\u7528\u7684\u8BDD\u672F\u8D44\u4EA7\u3002",
19835
+ description: "\u6210\u529F\u94A9\u5B50\u5E93\uFF1A\u8BB0\u5F55\u300C\u54EA\u53E5\u8BDD\u3001\u54EA\u79CD\u8BF4\u6CD5\u300D\u5728\u5BF9\u8BDD\u91CC\u6210\u529F\u5F15\u8D77\u4E86\u5BA2\u6237\u6CE8\u610F\u3002\u8FD9\u662F\u4ECE\u5BF9\u8BDD\u91CC\u603B\u7ED3\u51FA\u6765\u7684\u8BDD\u672F\u8D44\u4EA7\uFF0C\u53EF\u4EE5\u8DE8\u5BA2\u6237\u590D\u7528\u3002\u5B83\u4E0D\u662F\u7528\u6237\u8981\u5356\u6216\u8981\u63A8\u7684\u4E1C\u897F\uFF1A\u90A3\u4E9B\u5728\u63A8\u8350\u5E93\uFF08rec\uFF09\u3002",
19836
19836
  fields: [
19837
19837
  ...hookFields,
19838
19838
  { name: "customerId", type: "uuid", nullable: true, guide: "\u8FD9\u6761\u94A9\u5B50\u6765\u81EA\u54EA\u4E2A\u5BA2\u6237\uFF1B\u4E0D\u5173\u8054\u5C31\u7701\u7565" },
@@ -19840,13 +19840,13 @@ var SCHEMA = {
19840
19840
  ]
19841
19841
  },
19842
19842
  rec: {
19843
- description: "\u63A8\u8350\u5E93\uFF1A\u53EF\u4EE5\u53D1\u7ED9\u5BA2\u6237\u7684\u6587\u7AE0\u3001\u4EA7\u54C1\u3001\u670D\u52A1\u3001\u6D3B\u52A8\u3002",
19843
+ description: "\u63A8\u8350\u5E93\uFF1A\u7528\u6237\u81EA\u5DF1\u7684\u5F85\u63A8\u8350\u5E93\u5B58\uFF0C\u4E5F\u5C31\u662F\u4ED6\u8981\u63A8\u7ED9\u5BA2\u6237\u7684\u4EA7\u54C1\u3001\u670D\u52A1\u3001\u6587\u7AE0\u3001\u6D3B\u52A8\u3002\u5185\u5BB9\u53EA\u6765\u81EA\u7528\u6237\uFF1A\u53EA\u5728\u7528\u6237\u660E\u786E\u8981\u6C42\u65F6\u6DFB\u52A0\uFF0C\u4E0D\u8981\u4ECE\u804A\u5929\u8BB0\u5F55\u91CC\u63D0\u53D6\uFF0C\u4E5F\u4E0D\u8981\u7F16\u9020\u3002\u5E73\u65F6\u53EA\u662F\u8BFB\u5B83\uFF0C\u7528\u6765\u7ED9\u5BA2\u6237\u6311\u5408\u9002\u7684\u63A8\u8350\u3002\u804A\u5929\u91CC\u9A8C\u8BC1\u6709\u6548\u7684\u8BDD\u672F\u4E0D\u5C5E\u4E8E\u8FD9\u91CC\uFF0C\u90A3\u662F\u94A9\u5B50\u5E93\uFF08hook\uFF09\u3002",
19844
19844
  fields: [
19845
- { name: "title", type: "string", required: true, guide: "\u6807\u9898" },
19846
- { name: "type", type: "enum", required: true, values: RECOMMENDATION_TYPES, guide: "Article / Product / Service / Event" },
19847
- { name: "description", type: "string", guide: "\u4E00\u4E24\u53E5\u8BDD\u8BF4\u660E\u9002\u5408\u4EC0\u4E48\u6837\u7684\u5BA2\u6237\u3001\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898" },
19848
- { name: "link", type: "string", nullable: true, guide: "\u94FE\u63A5" },
19849
- { name: "isEnabled", type: "boolean", guide: "\u662F\u5426\u542F\u7528\uFF0C\u9ED8\u8BA4 true" }
19845
+ { name: "title", type: "string", required: true, guide: "\u4EA7\u54C1 / \u670D\u52A1 / \u6587\u7AE0 / \u6D3B\u52A8\u7684\u540D\u79F0\uFF0C\u7528\u7528\u6237\u81EA\u5DF1\u7684\u53EB\u6CD5\uFF0C\u4E0D\u8981\u6539\u5199" },
19846
+ { name: "type", type: "enum", required: true, values: RECOMMENDATION_TYPES, guide: "Article=\u6587\u7AE0\uFF0CProduct=\u4EA7\u54C1\uFF0CService=\u670D\u52A1\uFF0CEvent=\u6D3B\u52A8" },
19847
+ { name: "description", type: "string", guide: "\u4E00\u4E24\u53E5\u8BDD\u8BF4\u660E\u9002\u5408\u4EC0\u4E48\u6837\u7684\u5BA2\u6237\u3001\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u3002\u53EA\u7528\u7528\u6237\u63D0\u4F9B\u7684\u4FE1\u606F\uFF0C\u4E0D\u8981\u81EA\u5DF1\u7F16\u5356\u70B9" },
19848
+ { name: "link", type: "string", nullable: true, guide: "\u7528\u6237\u7ED9\u7684\u94FE\u63A5\uFF1B\u6CA1\u6709\u5C31\u7701\u7565\uFF0C\u4E0D\u8981\u731C" },
19849
+ { name: "isEnabled", type: "boolean", guide: "\u662F\u5426\u542F\u7528\uFF08\u53C2\u4E0E\u63A8\u8350\uFF09\uFF0C\u9ED8\u8BA4 true" }
19850
19850
  ]
19851
19851
  }
19852
19852
  };
@@ -20059,8 +20059,9 @@ function defaultLang(env = process.env) {
20059
20059
  // package.json
20060
20060
  var package_default = {
20061
20061
  name: "insightcrm",
20062
- version: "0.1.0",
20062
+ version: "0.1.1",
20063
20063
  description: "Command line and agent skill for InsightCRM: file customers from chats and screenshots with your own AI agent. Non-interactive, --json output, stable exit codes.",
20064
+ license: "MIT",
20064
20065
  type: "module",
20065
20066
  bin: {
20066
20067
  insightcrm: "dist/cli.js",
@@ -20117,6 +20118,7 @@ Recommended workflow (for agents):
20117
20118
  Record a customer add - --json < profile.json (or: add --name ... --potential High)
20118
20119
  Update update <id> --add-pain "budget" --add-event 2026-10-20:follow_up:send quote --json
20119
20120
  Reuse what works hook list --json (successful phrasings from other customers)
20121
+ Recommend rec list --json (the user's OWN inventory: pick what fits; add items only when the user asks, never from chat)
20120
20122
  House rules prompts show extraction-rules (the user's own extraction rules: follow them when extracting)
20121
20123
  Task templates prompts show draft --customer <id> (also: gift, starters, advice; "prompts list" for all)
20122
20124
 
@@ -20417,7 +20419,7 @@ program.command("tags").description("List pain-point tags in use, most used firs
20417
20419
  const { tags: tags2 } = await (await client()).tags();
20418
20420
  out(tags2.length ? tags2.map((t) => `${String(t.count).padStart(4)} ${t.tag}`).join("\n") : "No tags yet.", { tags: tags2 });
20419
20421
  });
20420
- var hook = program.command("hook").description("Successful-hook library: phrasings that worked, reusable across customers");
20422
+ var hook = program.command("hook").description("Successful-hook library: phrasings that demonstrably worked in a conversation, reusable across customers. Not the user's product inventory (that is `crm rec`).");
20421
20423
  hook.command("add").description("Add a hook. Only record what actually worked in the conversation: don't invent one.").requiredOption("--title <s>").requiredOption("--desc <s>", "the reusable phrasing or logic, and why it worked").option("--customer <id>", "the customer it came from").option("--disabled", "add it switched off").action(async (o) => {
20422
20424
  const { hook: h } = await (await client()).addHook({ title: o.title, description: o.desc, customerId: o.customer ?? null, isEnabled: !o.disabled });
20423
20425
  out(`Added hook ${h.id} ${h.title}`, { hook: h, created: true });
@@ -20432,12 +20434,12 @@ hook.command("rm").argument("<id>").option("-y, --yes").action(async (id, o) =>
20432
20434
  await (await client()).removeHook(id);
20433
20435
  out(`Deleted ${id}`, { ok: true, id });
20434
20436
  });
20435
- var rec = program.command("rec").description("Recommendation library: articles, products, services, events you can send to customers");
20436
- rec.command("add").requiredOption("--title <s>").addOption(new Option("--type <type>").choices([...RECOMMENDATION_TYPES]).makeOptionMandatory()).option("--desc <s>", "who it suits and what it solves").option("--link <url>").option("--disabled", "add it switched off").action(async (o) => {
20437
+ var rec = program.command("rec").description("Recommendation library: the USER'S OWN inventory of products, services, articles and events to recommend. Read it to pick recommendations for a customer; add to it only when the user explicitly asks. Never invent entries or mine them from chats (phrasings that worked belong in `crm hook`).");
20438
+ rec.command("add").description("Add an item to the user's inventory. Only when the user asked for it, with details they gave: do not extract items from chat logs or make up selling points or links.").requiredOption("--title <s>").addOption(new Option("--type <type>").choices([...RECOMMENDATION_TYPES]).makeOptionMandatory()).option("--desc <s>", "who it suits and what it solves").option("--link <url>").option("--disabled", "add it switched off").action(async (o) => {
20437
20439
  const { recommendation: r } = await (await client()).addRec({ title: o.title, type: o.type, description: o.desc, link: o.link ?? null, isEnabled: !o.disabled });
20438
20440
  out(`Added ${r.type} ${r.id} ${r.title}`, { recommendation: r, created: true });
20439
20441
  });
20440
- rec.command("list").action(async () => {
20442
+ rec.command("list").description("List the user's inventory. Use it to choose what to recommend to a customer; say so if nothing fits instead of inventing something.").action(async () => {
20441
20443
  const { recommendations } = await (await client()).listRecs();
20442
20444
  out(recommendations.length ? recommendations.map((r) => `${r.id} ${r.isEnabled ? " " : "\xD7"} [${r.type}] ${r.title}${r.link ? ` ${r.link}` : ""}`).join("\n") : "No recommendations yet.", { recommendations, count: recommendations.length });
20443
20445
  });
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "insightcrm",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Command line and agent skill for InsightCRM: file customers from chats and screenshots with your own AI agent. Non-interactive, --json output, stable exit codes.",
5
+ "license": "MIT",
5
6
  "type": "module",
6
7
  "bin": {
7
8
  "insightcrm": "dist/cli.js",