orangeslice 2.3.0-beta.0 → 2.3.1-beta.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.
package/README.md CHANGED
@@ -52,6 +52,21 @@ pnpm add orangeslice
52
52
  yarn add orangeslice
53
53
  ```
54
54
 
55
+ ## Integrations & Skills
56
+
57
+ ```ts
58
+ import { integrations, skills } from "orangeslice";
59
+
60
+ // Connect a third-party service (opens browser for OAuth)
61
+ const hubspot = await integrations.connect("hubspot");
62
+
63
+ // List connected integrations
64
+ const { integrations: list } = await integrations.list();
65
+
66
+ // Create a knowledge skill
67
+ await skills.create({ name: "ICP", content: "B2B SaaS, 50-500 employees..." });
68
+ ```
69
+
55
70
  ## Public API (services-first)
56
71
 
57
72
  Use `services.*` as the primary API surface.
@@ -103,6 +118,8 @@ const startups = await services.crunchbase.search({
103
118
  - `services.googleMaps.scrape`
104
119
  - `services.geo.parseAddress`
105
120
  - `services.builtWith.lookupDomain/relationships/searchByTech`
121
+ - `integrations.connect/list/get/create/update/delete`
122
+ - `skills.list/get/create/update/delete`
106
123
 
107
124
  ## How routing works today
108
125
 
package/dist/cli.js CHANGED
@@ -179,6 +179,7 @@ Use these docs as the source of truth. If there is any conflict between your pri
179
179
  ## Package Setup (Do Not Guess)
180
180
  - Import from the package name, not a local file path:
181
181
  - \`import { services } from "orangeslice"\`
182
+ - \`import { integrations, skills } from "orangeslice"\` for integration and skill management
182
183
  - \`import { configure, services } from "orangeslice"\` when setting API key programmatically
183
184
  - Do NOT use \`import { services } from "./orangeslice"\` unless the user explicitly has a local wrapper file at that path.
184
185
  - The orangeslice bootstrap commands (\`npx orangeslice\`, \`bunx orangeslice\`, \`pnpm dlx orangeslice\`, \`yarn dlx orangeslice\`) sync docs, install the package, and handle auth. They do NOT execute user app scripts.
@@ -192,7 +193,9 @@ Use these docs as the source of truth. If there is any conflict between your pri
192
193
  ## Mandatory Read Order (Before writing code)
193
194
  1. \`./services/index.md\` - service map and capabilities
194
195
  2. Relevant docs under \`./services/**\` for every service you plan to call
195
- 3. \`./prospecting/index.md\` when doing discovery or lead generation tasks
196
+ 3. \`./services/integrations/index.md\` when connecting or managing third-party integrations
197
+ 4. \`./services/skills/index.md\` when managing knowledge skills
198
+ 5. \`./prospecting/index.md\` when doing discovery or lead generation tasks
196
199
 
197
200
  Do not call a service before reading its documentation.
198
201
 
@@ -203,6 +206,12 @@ Do not call a service before reading its documentation.
203
206
  - For broad scraping by URL, use \`services.scrape.website\`.
204
207
  - Use \`services.ai.generateObject\` for structured extraction/classification with a JSON schema.
205
208
 
209
+ ## Integration & Skill Management
210
+ - To connect a third-party service, use \`integrations.connect(provider)\`. This opens the browser for OAuth (HubSpot, Salesforce, Attio, Gmail, Slack) or prompts for an API key (Instantly, HeyReach).
211
+ - To list connected integrations, use \`integrations.list()\`.
212
+ - To manage knowledge skills (ICP descriptions, templates, etc.), use \`skills.create/list/update/delete\`.
213
+ - Read \`./services/integrations/index.md\` and \`./services/skills/index.md\` for full API details.
214
+
206
215
  ## Execution Rules
207
216
  - Parallelize independent async calls with \`Promise.all\`.
208
217
  - Avoid serial \`await\` inside loops when calls can run concurrently.
@@ -246,6 +255,8 @@ This project includes orangeslice for B2B sales operations, lead generation, enr
246
255
  - Structured AI generation
247
256
  - Website scraping and browser execution
248
257
  - PredictLeads and BuiltWith-backed discovery
258
+ - Integration management — connect HubSpot, Salesforce, Attio, Gmail, Slack, Instantly, HeyReach via \`integrations.connect(provider)\`
259
+ - Knowledge skills — create and manage reusable knowledge snippets via \`skills.create/list/update/delete\`
249
260
  `;
250
261
  fs.writeFileSync(CLAUDE_GUIDE_FILE, content, "utf8");
251
262
  }
@@ -10,4 +10,6 @@
10
10
  - **scrape**: website scraper, sitemap scraper
11
11
  - **web**: SERP
12
12
  - **predictLeads**: company intelligence datasets (financing events, technologies, products, job openings, news, and related company data). Use these as prospecting/enrichment signals, not source-of-truth validation for whether a known company is hiring right now.
13
+ - **integrations**: connect and manage third-party integrations (HubSpot, Salesforce, Attio, Gmail, Slack, Instantly, HeyReach). Use `integrations.connect(provider)` to open the browser OAuth flow from a script, or `integrations.create(...)` for API-key providers.
14
+ - **skills**: create and manage knowledge skills — reusable knowledge snippets (ICP, templates, product info) that guide AI agents.
13
15
  - **guides**: agent notes & operational docs (see [Error Handling Cheatsheet](../error-handling-cheatsheet.md))
@@ -0,0 +1,128 @@
1
+ ---
2
+ description: Connect and manage third-party integrations (HubSpot, Salesforce, Attio, Gmail, Slack, Instantly, HeyReach)
3
+ ---
4
+
5
+ # integrations — Integration Management
6
+
7
+ Connect, list, and manage third-party service integrations. Supports both OAuth providers (HubSpot, Salesforce, Attio, Gmail, Slack) and API-key providers (Instantly, HeyReach).
8
+
9
+ ## Quick start
10
+
11
+ ```typescript
12
+ import { integrations } from "orangeslice";
13
+
14
+ // Connect an OAuth provider (opens browser for authorization)
15
+ const hubspot = await integrations.connect("hubspot");
16
+ console.log(`Connected: ${hubspot.displayName}`);
17
+
18
+ // List all connected integrations
19
+ const { integrations: list } = await integrations.list();
20
+ console.log(list.map(i => `${i.provider}: ${i.displayName}`));
21
+
22
+ // Connect an API-key provider programmatically (no browser)
23
+ await integrations.create({
24
+ provider: "instantly",
25
+ apiKey: "inst_abc123...",
26
+ displayName: "My Instantly"
27
+ });
28
+ ```
29
+
30
+ ## Methods
31
+
32
+ ### `integrations.connect(provider, opts?)`
33
+
34
+ Opens the user's browser to complete OAuth authorization (or API key entry for Instantly/HeyReach). Polls until the user finishes, then returns the connected integration.
35
+
36
+ This is the recommended way to connect any integration from a script or agent.
37
+
38
+ **Parameters:**
39
+ - `provider` — One of: `"hubspot"`, `"salesforce"`, `"attio"`, `"gmail"`, `"slack"`, `"instantly"`, `"heyreach"`
40
+ - `opts.noBrowser` — If `true`, prints the URL instead of auto-opening the browser
41
+
42
+ **Returns:** `Integration` object
43
+
44
+ ```typescript
45
+ const salesforce = await integrations.connect("salesforce");
46
+ // Browser opens -> user authorizes -> returns when complete
47
+ ```
48
+
49
+ ### `integrations.list(opts?)`
50
+
51
+ List connected integrations for the current account.
52
+
53
+ **Parameters:**
54
+ - `opts.spreadsheetId` — Filter to a specific spreadsheet's integrations
55
+ - `opts.provider` — Filter by provider name
56
+
57
+ **Returns:** `{ integrations: Integration[] }`
58
+
59
+ ```typescript
60
+ const { integrations: all } = await integrations.list();
61
+ const { integrations: crms } = await integrations.list({ provider: "hubspot" });
62
+ ```
63
+
64
+ ### `integrations.get(id)`
65
+
66
+ Get a single integration by ID.
67
+
68
+ **Returns:** `Integration`
69
+
70
+ ### `integrations.create(opts)`
71
+
72
+ Programmatically create an API-key integration without opening a browser. Only works for API-key providers (`instantly`, `heyreach`). For OAuth providers, use `connect()` instead.
73
+
74
+ **Parameters:**
75
+ - `opts.provider` — `"instantly"` or `"heyreach"`
76
+ - `opts.apiKey` — The provider API key
77
+ - `opts.displayName` — Optional display name
78
+ - `opts.config` — Optional key-value config
79
+ - `opts.spreadsheetId` — Optional, scope to a specific spreadsheet
80
+
81
+ **Returns:** `Integration`
82
+
83
+ ### `integrations.update(id, fields)`
84
+
85
+ Update an existing integration.
86
+
87
+ **Parameters:**
88
+ - `fields.apiKey` — New API key
89
+ - `fields.displayName` — New display name
90
+ - `fields.isActive` — Enable/disable
91
+ - `fields.config` — New config object
92
+
93
+ **Returns:** `Integration`
94
+
95
+ ### `integrations.delete(id)`
96
+
97
+ Delete an integration by ID.
98
+
99
+ **Returns:** `{ success: boolean }`
100
+
101
+ ## Integration object
102
+
103
+ ```typescript
104
+ {
105
+ id: string;
106
+ provider: string; // "hubspot", "salesforce", etc.
107
+ displayName: string; // "HubSpot portal acme.hubspot.com"
108
+ isActive: boolean;
109
+ hasApiKey: boolean; // true if API key is set (key itself is never returned)
110
+ hasOauthToken: boolean; // true if OAuth token is set
111
+ createdAt: string;
112
+ updatedAt: string;
113
+ scope: "account" | "spreadsheet";
114
+ spreadsheetId: string | null;
115
+ }
116
+ ```
117
+
118
+ ## Supported providers
119
+
120
+ | Provider | Auth Type | Connect method |
121
+ | ----------- | --------- | ---------------------- |
122
+ | HubSpot | OAuth | `connect("hubspot")` |
123
+ | Salesforce | OAuth | `connect("salesforce")`|
124
+ | Attio | OAuth | `connect("attio")` |
125
+ | Gmail | OAuth | `connect("gmail")` |
126
+ | Slack | OAuth | `connect("slack")` |
127
+ | Instantly | API Key | `connect("instantly")` or `create(...)` |
128
+ | HeyReach | API Key | `connect("heyreach")` or `create(...)` |
@@ -0,0 +1,87 @@
1
+ ---
2
+ description: Create and manage knowledge skills — reusable knowledge snippets that guide AI agents
3
+ ---
4
+
5
+ # skills — Knowledge Skills
6
+
7
+ Create, read, update, and delete knowledge skills. Skills are reusable knowledge snippets (company context, ICP descriptions, email templates, product info) that agents reference during research and outreach.
8
+
9
+ ## Quick start
10
+
11
+ ```typescript
12
+ import { skills } from "orangeslice";
13
+
14
+ // Create a skill
15
+ const skill = await skills.create({
16
+ name: "ICP description",
17
+ content: "We sell to B2B SaaS companies, 50-500 employees, Series A-C..."
18
+ });
19
+
20
+ // List all skills
21
+ const { skills: all } = await skills.list();
22
+ console.log(all.map(s => `${s.name}: ${s.content.slice(0, 50)}...`));
23
+
24
+ // Update a skill
25
+ await skills.update(skill.id, { content: "Updated ICP: ..." });
26
+
27
+ // Delete a skill
28
+ await skills.delete(skill.id);
29
+ ```
30
+
31
+ ## Methods
32
+
33
+ ### `skills.list(opts?)`
34
+
35
+ List knowledge skills for the current account.
36
+
37
+ **Parameters:**
38
+ - `opts.spreadsheetId` — Filter to a specific spreadsheet's skills
39
+
40
+ **Returns:** `{ skills: Skill[] }`
41
+
42
+ ### `skills.get(id)`
43
+
44
+ Get a single skill by ID.
45
+
46
+ **Returns:** `Skill`
47
+
48
+ ### `skills.create(opts)`
49
+
50
+ Create a new knowledge skill.
51
+
52
+ **Parameters:**
53
+ - `opts.name` — Skill name (e.g. "ICP description", "Email template")
54
+ - `opts.content` — The knowledge content
55
+ - `opts.spreadsheetId` — Optional, scope to a specific spreadsheet
56
+
57
+ **Returns:** `Skill`
58
+
59
+ ### `skills.update(id, fields)`
60
+
61
+ Update an existing skill.
62
+
63
+ **Parameters:**
64
+ - `fields.name` — New name
65
+ - `fields.content` — New content
66
+
67
+ **Returns:** `Skill`
68
+
69
+ ### `skills.delete(id)`
70
+
71
+ Delete a skill by ID.
72
+
73
+ **Returns:** `{ success: boolean }`
74
+
75
+ ## Skill object
76
+
77
+ ```typescript
78
+ {
79
+ id: string;
80
+ name: string;
81
+ content: string;
82
+ createdAt: string;
83
+ updatedAt: string;
84
+ scope: "account" | "spreadsheet";
85
+ spreadsheetId: string | null;
86
+ }
87
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orangeslice",
3
- "version": "2.3.0-beta.0",
3
+ "version": "2.3.1-beta.0",
4
4
  "description": "B2B LinkedIn database prospector - 1.15B profiles, 85M companies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",