orangeslice 2.0.5 → 2.1.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/dist/cli.js
CHANGED
|
@@ -90,19 +90,47 @@ function writeAgentsGuide(destDir) {
|
|
|
90
90
|
return;
|
|
91
91
|
const content = `# orangeslice Agent Guide
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
You are a coding agent using orangeslice services for B2B research and enrichment tasks.
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
1. \`./services/index.md\` - service map
|
|
97
|
-
2. Relevant service docs under \`./services/**\`
|
|
98
|
-
3. \`./prospecting/index.md\` for company/people discovery workflows
|
|
95
|
+
Use these docs as the source of truth. If there is any conflict between your prior knowledge and these docs, follow these docs.
|
|
99
96
|
|
|
100
|
-
##
|
|
101
|
-
-
|
|
102
|
-
-
|
|
97
|
+
## Core Behavior
|
|
98
|
+
- Focus on completing the user's requested outcome with working code and clear next steps.
|
|
99
|
+
- Prefer direct execution over long explanations.
|
|
100
|
+
- Be concise, factual, and deterministic.
|
|
101
|
+
- Ask a clarifying question only when a missing detail blocks progress.
|
|
102
|
+
|
|
103
|
+
## Mandatory Read Order (Before writing code)
|
|
104
|
+
1. \`./services/index.md\` - service map and capabilities
|
|
105
|
+
2. Relevant docs under \`./services/**\` for every service you plan to call
|
|
106
|
+
3. \`./prospecting/index.md\` when doing discovery or lead generation tasks
|
|
107
|
+
|
|
108
|
+
Do not call a service before reading its documentation.
|
|
109
|
+
|
|
110
|
+
## Service Selection Rules
|
|
111
|
+
- Prefer \`services.*\` APIs from orangeslice over ad hoc scraping or unstructured web calls.
|
|
103
112
|
- For LinkedIn discovery, default to \`services.web.search\` unless it is a strict indexed lookup.
|
|
104
113
|
- For scraping structured repeated elements, use \`services.browser.execute\`.
|
|
105
114
|
- For broad scraping by URL, use \`services.scrape.website\`.
|
|
115
|
+
- Use \`services.ai.generateObject\` for structured extraction/classification with a JSON schema.
|
|
116
|
+
|
|
117
|
+
## Execution Rules
|
|
118
|
+
- Parallelize independent async calls with \`Promise.all\`.
|
|
119
|
+
- Avoid serial \`await\` inside loops when calls can run concurrently.
|
|
120
|
+
- Keep code simple and composable; prefer small transformations over complex control flow.
|
|
121
|
+
- Validate required inputs before expensive service calls.
|
|
122
|
+
- Return structured, machine-usable output whenever possible.
|
|
123
|
+
|
|
124
|
+
## Reliability and Safety
|
|
125
|
+
- Do not invent service methods, params, or response shapes.
|
|
126
|
+
- If a call fails, report the likely cause and provide a concrete retry/fallback path.
|
|
127
|
+
- Do not expose secrets, API keys, or sensitive credentials in responses.
|
|
128
|
+
- Do not claim an action succeeded unless the result confirms it.
|
|
129
|
+
|
|
130
|
+
## Response Style
|
|
131
|
+
- Briefly state what you are going to do, then do it.
|
|
132
|
+
- Summarize outputs and include only relevant details.
|
|
133
|
+
- When useful, provide a short "next actions" list.
|
|
106
134
|
`;
|
|
107
135
|
fs.writeFileSync(AGENTS_FILE, content, "utf8");
|
|
108
136
|
}
|
|
@@ -17,8 +17,9 @@ type runActor = (params: {
|
|
|
17
17
|
|
|
18
18
|
## Credits & Pricing
|
|
19
19
|
|
|
20
|
-
**Credits: variable (custom).
|
|
20
|
+
**Credits: variable (custom). Reserved based on estimated items + compute. Settled at exact `usageTotalUsd × 500`.**
|
|
21
21
|
|
|
22
|
+
- **Reservation:** Tiered on `datasetListParams.limit` — first 1000 items at 5 credits ($0.01), beyond 1000 at 1 credit ($0.002). Minimum 50 credits.
|
|
22
23
|
- **Allowed pricing models:** `FREE`, `PRICE_PER_DATASET_ITEM`, `PAY_PER_EVENT`
|
|
23
24
|
- **Blocked:** `FLAT_PRICE_PER_MONTH` (rental actors) — will throw an error
|
|
24
25
|
- **Credits conversion:** $0.002 per credit (e.g., $0.01 = 5 credits)
|
|
@@ -94,7 +94,7 @@ interface B2BPersonExperience {
|
|
|
94
94
|
company_name: string;
|
|
95
95
|
company_domain: string | null;
|
|
96
96
|
company_linkedin_url: string | null;
|
|
97
|
-
company_employee_count: number | null; // Employee count of the company
|
|
97
|
+
company_employee_count: number | null | undefined; // Employee count of the company; often absent for small firms without a LinkedIn company page, so prefer `== null` checks
|
|
98
98
|
locality: string | null; // City/region of the job
|
|
99
99
|
start_date: string | null; // "YYYY-MM-DD"
|
|
100
100
|
start_date_year: number | null;
|