@endyai/atq 0.0.1 → 0.0.3
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 +9 -18
- package/examples/normalize-names/companies.jsonl +100 -0
- package/index.js +5 -5
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -20,19 +20,12 @@ Each task gets its own fresh agent with a clean context. A pool of agents proces
|
|
|
20
20
|
- **Concurrent by default.** Control the pool size with `concurrency`.
|
|
21
21
|
- **Stream results.** Results stream to stdout as agents complete.
|
|
22
22
|
|
|
23
|
-
```mermaid
|
|
24
|
-
graph LR
|
|
25
|
-
stdin["stdin (JSONL)"] --> atq
|
|
26
|
-
atq --> A1[Agent 1]
|
|
27
|
-
atq --> A2[Agent 2]
|
|
28
|
-
atq --> A3[Agent N]
|
|
29
|
-
A1 --> stdout["stdout (JSONL)"]
|
|
30
|
-
A2 --> stdout
|
|
31
|
-
A3 --> stdout
|
|
32
|
-
```
|
|
33
|
-
|
|
34
23
|
## CLI
|
|
35
24
|
|
|
25
|
+
```
|
|
26
|
+
npm install -g @endyai/atq
|
|
27
|
+
```
|
|
28
|
+
|
|
36
29
|
```bash
|
|
37
30
|
cat companies.jsonl | atq -p "Normalize this company name. Return just the name." -c 10 -m claude-sonnet-4-6
|
|
38
31
|
```
|
|
@@ -69,8 +62,12 @@ Input is piped via stdin (one JSON object per line):
|
|
|
69
62
|
|
|
70
63
|
## SDK
|
|
71
64
|
|
|
65
|
+
```
|
|
66
|
+
npm install @endyai/atq
|
|
67
|
+
```
|
|
68
|
+
|
|
72
69
|
```js
|
|
73
|
-
import { Task } from 'atq';
|
|
70
|
+
import { Task } from '@endyai/atq';
|
|
74
71
|
|
|
75
72
|
const task = new Task({
|
|
76
73
|
prompt: 'Normalize this company name. Return just the name.',
|
|
@@ -101,9 +98,3 @@ Add an item to the queue.
|
|
|
101
98
|
### `.run()`
|
|
102
99
|
|
|
103
100
|
Async generator. Each yield: `{ item, output, progress: { completed, total } }`
|
|
104
|
-
|
|
105
|
-
## Install
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
npm install atq
|
|
109
|
-
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{"name": "Google LLC"}
|
|
2
|
+
{"name": "APPLE INC."}
|
|
3
|
+
{"name": "Meta Platforms, Inc."}
|
|
4
|
+
{"name": "AMAZON.COM, INC."}
|
|
5
|
+
{"name": "microsoft corporation"}
|
|
6
|
+
{"name": "NVIDIA Corp."}
|
|
7
|
+
{"name": "Tesla, Inc"}
|
|
8
|
+
{"name": "Netflix Inc"}
|
|
9
|
+
{"name": "Alphabet Inc. (Class A)"}
|
|
10
|
+
{"name": "The Walt Disney Company"}
|
|
11
|
+
{"name": "SALESFORCE, INC."}
|
|
12
|
+
{"name": "adobe systems incorporated"}
|
|
13
|
+
{"name": "INTL BUSINESS MACHINES CORP"}
|
|
14
|
+
{"name": "Coca-Cola Co (The)"}
|
|
15
|
+
{"name": "JPMORGAN CHASE & CO."}
|
|
16
|
+
{"name": "BANK OF AMERICA CORP"}
|
|
17
|
+
{"name": "Wells Fargo & Company"}
|
|
18
|
+
{"name": "Goldman Sachs Group, Inc. (The)"}
|
|
19
|
+
{"name": "Morgan Stanley Inc"}
|
|
20
|
+
{"name": "VISA INC."}
|
|
21
|
+
{"name": "Mastercard Incorporated"}
|
|
22
|
+
{"name": "PAYPAL HOLDINGS INC"}
|
|
23
|
+
{"name": "American Express Co."}
|
|
24
|
+
{"name": "charles schwab corp (the)"}
|
|
25
|
+
{"name": "CITIGROUP INC."}
|
|
26
|
+
{"name": "Intel Corporation"}
|
|
27
|
+
{"name": "Advanced Micro Devices, Inc."}
|
|
28
|
+
{"name": "QUALCOMM Inc"}
|
|
29
|
+
{"name": "BROADCOM INC."}
|
|
30
|
+
{"name": "texas instruments incorporated"}
|
|
31
|
+
{"name": "ORACLE CORP"}
|
|
32
|
+
{"name": "SAP SE ADR"}
|
|
33
|
+
{"name": "Intuit Inc."}
|
|
34
|
+
{"name": "ServiceNow, Inc"}
|
|
35
|
+
{"name": "SNOWFLAKE INC."}
|
|
36
|
+
{"name": "Shopify Inc (Class A)"}
|
|
37
|
+
{"name": "UBER TECHNOLOGIES, INC."}
|
|
38
|
+
{"name": "Lyft, Inc."}
|
|
39
|
+
{"name": "AIRBNB INC"}
|
|
40
|
+
{"name": "DoorDash, Inc. (Class A)"}
|
|
41
|
+
{"name": "SNAP INC."}
|
|
42
|
+
{"name": "Pinterest, Inc."}
|
|
43
|
+
{"name": "TWITTER, INC."}
|
|
44
|
+
{"name": "Block, Inc. (fka Square)"}
|
|
45
|
+
{"name": "ROKU INC"}
|
|
46
|
+
{"name": "Spotify Technology S.A."}
|
|
47
|
+
{"name": "zoom video communications inc"}
|
|
48
|
+
{"name": "TWILIO INC."}
|
|
49
|
+
{"name": "Atlassian Corporation PLC"}
|
|
50
|
+
{"name": "DATADOG INC"}
|
|
51
|
+
{"name": "CrowdStrike Holdings, Inc."}
|
|
52
|
+
{"name": "PALO ALTO NETWORKS INC"}
|
|
53
|
+
{"name": "Fortinet, Inc."}
|
|
54
|
+
{"name": "ZSCALER, INC."}
|
|
55
|
+
{"name": "Cloudflare, Inc."}
|
|
56
|
+
{"name": "MONGODB INC"}
|
|
57
|
+
{"name": "Elastic N.V."}
|
|
58
|
+
{"name": "SPLUNK INC."}
|
|
59
|
+
{"name": "Palantir Technologies Inc."}
|
|
60
|
+
{"name": "UNITY SOFTWARE INC."}
|
|
61
|
+
{"name": "Roblox Corporation (Class A)"}
|
|
62
|
+
{"name": "ELECTRONIC ARTS INC."}
|
|
63
|
+
{"name": "Activision Blizzard, Inc"}
|
|
64
|
+
{"name": "TAKE-TWO INTERACTIVE SOFTWARE, INC."}
|
|
65
|
+
{"name": "Nintendo Co., Ltd. ADR"}
|
|
66
|
+
{"name": "SONY GROUP CORPORATION ADR"}
|
|
67
|
+
{"name": "Samsung Electronics Co., Ltd. OTC"}
|
|
68
|
+
{"name": "TAIWAN SEMICONDUCTOR MFG. CO. LTD. ADR"}
|
|
69
|
+
{"name": "ASML Holding N.V. ADR"}
|
|
70
|
+
{"name": "Toyota Motor Corp ADR"}
|
|
71
|
+
{"name": "VOLKSWAGEN AG ADR"}
|
|
72
|
+
{"name": "general motors company"}
|
|
73
|
+
{"name": "FORD MOTOR CO."}
|
|
74
|
+
{"name": "Rivian Automotive, Inc."}
|
|
75
|
+
{"name": "LUCID GROUP INC"}
|
|
76
|
+
{"name": "NIO Inc. ADR"}
|
|
77
|
+
{"name": "LI AUTO INC. ADR"}
|
|
78
|
+
{"name": "XPENG INC. ADR"}
|
|
79
|
+
{"name": "BYD Company Limited OTC"}
|
|
80
|
+
{"name": "The Boeing Company"}
|
|
81
|
+
{"name": "LOCKHEED MARTIN CORPORATION"}
|
|
82
|
+
{"name": "Raytheon Technologies Corp"}
|
|
83
|
+
{"name": "NORTHROP GRUMMAN CORP."}
|
|
84
|
+
{"name": "General Dynamics Corporation"}
|
|
85
|
+
{"name": "3M COMPANY"}
|
|
86
|
+
{"name": "Honeywell International Inc."}
|
|
87
|
+
{"name": "CATERPILLAR INC."}
|
|
88
|
+
{"name": "Deere & Company"}
|
|
89
|
+
{"name": "UNITED PARCEL SERVICE, INC. (CLASS B)"}
|
|
90
|
+
{"name": "FedEx Corporation"}
|
|
91
|
+
{"name": "THE PROCTER & GAMBLE COMPANY"}
|
|
92
|
+
{"name": "Johnson & Johnson Inc"}
|
|
93
|
+
{"name": "PFIZER INC."}
|
|
94
|
+
{"name": "Moderna, Inc."}
|
|
95
|
+
{"name": "ABBVIE INC."}
|
|
96
|
+
{"name": "Merck & Co., Inc."}
|
|
97
|
+
{"name": "ELI LILLY AND COMPANY"}
|
|
98
|
+
{"name": "UnitedHealth Group Incorporated"}
|
|
99
|
+
{"name": "THE HOME DEPOT, INC."}
|
|
100
|
+
{"name": "Walmart Inc."}
|
package/index.js
CHANGED
|
@@ -37,12 +37,12 @@ export class Task {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
const exec = async (item) => {
|
|
40
|
+
const options = { systemPrompt: prompt };
|
|
41
|
+
if (this.model) options.model = this.model;
|
|
42
|
+
if (this.apiKey) options.apiKey = this.apiKey;
|
|
40
43
|
let result = '';
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
if (this.apiKey) opts.apiKey = this.apiKey;
|
|
44
|
-
for await (const msg of query(JSON.stringify(item), opts)) {
|
|
45
|
-
if (msg.type === 'text') result += msg.content;
|
|
44
|
+
for await (const msg of query({ prompt: JSON.stringify(item), options })) {
|
|
45
|
+
if (msg.type === 'result' && msg.subtype === 'success') result = msg.result;
|
|
46
46
|
}
|
|
47
47
|
return result.trim();
|
|
48
48
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@endyai/atq",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Batch process tasks across parallel AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"exports": "./index.js",
|
|
8
8
|
"bin": {
|
|
9
|
-
"atq": "
|
|
9
|
+
"atq": "cli.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"example:normalize-names": "cat examples/normalize-names/companies.jsonl | node cli.js -p 'Normalize this company name. Return just the name.' -c 10"
|
|
10
13
|
},
|
|
11
14
|
"dependencies": {
|
|
12
15
|
"@anthropic-ai/claude-agent-sdk": "^0.2.81"
|