gtmmaxing 0.1.8 → 0.1.9
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/gtm.js +36 -4
- package/package.json +1 -1
package/dist/gtm.js
CHANGED
|
@@ -22159,9 +22159,21 @@ function watchPolicy(signal2) {
|
|
|
22159
22159
|
intervalMs: 31 * 24 * 60 * 60 * 1e3,
|
|
22160
22160
|
supplierChecksPerMonth: 1,
|
|
22161
22161
|
supplierCheckAtomic: TOOL_DEFINITIONS[tool2].supplierReserve,
|
|
22162
|
+
// Rows read per company: headcount is one by nature, a tech stack read lists every technology it can report.
|
|
22162
22163
|
maxPostsPerCompany: signal2 === "headcount" ? 1 : 200
|
|
22163
22164
|
};
|
|
22164
22165
|
}
|
|
22166
|
+
function watchCheckCeiling(signal2, companies) {
|
|
22167
|
+
const policy = watchPolicy(signal2);
|
|
22168
|
+
const units = signal2 === "topic" ? TOPIC_WATCH_POLICY.maxPostsPerCheck : signal2 === "tech-stack" ? companies : companies * policy.maxPostsPerCompany;
|
|
22169
|
+
return units * policy.changeCredits;
|
|
22170
|
+
}
|
|
22171
|
+
function watchQuoteFigures(signal2, size) {
|
|
22172
|
+
const policy = watchPolicy(signal2);
|
|
22173
|
+
const perCheck = watchCheckCeiling(signal2, size);
|
|
22174
|
+
const checksPerMonth = Math.ceil(31 * 24 * 60 * 60 * 1e3 / policy.intervalMs);
|
|
22175
|
+
return { perChange: policy.changeCredits, perCheck, checksPerMonth, perMonth: perCheck * checksPerMonth };
|
|
22176
|
+
}
|
|
22165
22177
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
22166
22178
|
|
|
22167
22179
|
// ../contracts/src/lead-plan.ts
|
|
@@ -22537,7 +22549,7 @@ var accountInput = external_exports.object({
|
|
|
22537
22549
|
quote: external_exports.object({ capability: external_exports.string().pipe(capabilityIdSchema.meta({ "x-gtm-catalog": true })), count: external_exports.number().int().min(1).max(1e5) }).strict().optional()
|
|
22538
22550
|
}).strict();
|
|
22539
22551
|
var OUTCOME_TOOLS = {
|
|
22540
|
-
gtm_watch: { title: "Company watch", description: `Hiring/funding/topic ${HIRING_WATCH_POLICY.changeCredits}, headcount/tech-stack ${watchPolicy("tech-stack").changeCredits}
|
|
22552
|
+
gtm_watch: { title: "Company watch", description: `Hiring/funding/topic ${HIRING_WATCH_POLICY.changeCredits}, headcount ${watchPolicy("headcount").changeCredits}/change, tech-stack ${watchPolicy("tech-stack").changeCredits}/company. Quote first.`, paid: true, capabilities: ["signals"], input: watchInput },
|
|
22541
22553
|
gtm_find_contacts: {
|
|
22542
22554
|
title: "Find contacts",
|
|
22543
22555
|
description: `Profiles/names/run_id: ${CAPABILITIES["email-finder"].price.credits} cr/email; mailbox check included, ${price("phone-pilot")} cr/phone, recheck ${price("verify-email")}. Misses free.`,
|
|
@@ -23364,6 +23376,7 @@ var ARGUMENT_NAMES = {
|
|
|
23364
23376
|
post: "post_urls",
|
|
23365
23377
|
domain: "domains",
|
|
23366
23378
|
hiring: "role",
|
|
23379
|
+
source: "sources",
|
|
23367
23380
|
watch: "watch_id",
|
|
23368
23381
|
profile: "profiles"
|
|
23369
23382
|
};
|
|
@@ -23544,6 +23557,7 @@ function commandArgv(next) {
|
|
|
23544
23557
|
if (["pause", "resume", "delete"].includes(String(action)) || String(action).startsWith("webhook_")) push(take("watch_id"));
|
|
23545
23558
|
const companies = take("companies");
|
|
23546
23559
|
if (Array.isArray(companies)) for (const company of companies) words.push("--company", String(company));
|
|
23560
|
+
if (action === "create" && args.quote_id !== void 0 && args.max_credits !== void 0) args.yes = true;
|
|
23547
23561
|
break;
|
|
23548
23562
|
}
|
|
23549
23563
|
case "gtm_find_contacts":
|
|
@@ -23774,10 +23788,28 @@ async function watchCommand(session, command) {
|
|
|
23774
23788
|
"watch"
|
|
23775
23789
|
);
|
|
23776
23790
|
Object.assign(args, validated.data);
|
|
23777
|
-
const
|
|
23791
|
+
const figures = watchQuoteFigures(args.signal ?? "hiring", Array.isArray(args.companies) ? args.companies.length : 0);
|
|
23792
|
+
const asked = await session.gateway.call("gtm_watch", {
|
|
23778
23793
|
...args,
|
|
23779
23794
|
dry_run: true
|
|
23780
23795
|
});
|
|
23796
|
+
const quote2 = asked.status === "quote" ? {
|
|
23797
|
+
...asked,
|
|
23798
|
+
next: {
|
|
23799
|
+
tool: "gtm_watch",
|
|
23800
|
+
args: {
|
|
23801
|
+
action: "create",
|
|
23802
|
+
quote_id: asked.run_id,
|
|
23803
|
+
name: args.name,
|
|
23804
|
+
...args.signal === "topic" ? { signal: "topic", topic: args.topic, sources: args.sources } : {
|
|
23805
|
+
...command.file ? { file: command.file, ...command.column ? { column: command.column } : {} } : { companies: args.companies },
|
|
23806
|
+
...args.role ? { role: args.role } : {},
|
|
23807
|
+
...args.signal && args.signal !== "hiring" ? { signal: args.signal } : {}
|
|
23808
|
+
},
|
|
23809
|
+
max_credits: args.max_credits ?? Math.min(figures.perCheck, HIRING_WATCH_POLICY.maxMonthlyCredits)
|
|
23810
|
+
}
|
|
23811
|
+
}
|
|
23812
|
+
} : asked;
|
|
23781
23813
|
if (quote2.status !== "quote" || args.dry_run || args.max_credits === void 0)
|
|
23782
23814
|
return session.emit(quote2);
|
|
23783
23815
|
session.emit(quote2, {}, { stream: "stderr" });
|
|
@@ -24279,7 +24311,7 @@ async function toolFile(session, command) {
|
|
|
24279
24311
|
import { randomUUID } from "node:crypto";
|
|
24280
24312
|
|
|
24281
24313
|
// src/version.ts
|
|
24282
|
-
var VERSION = "0.1.
|
|
24314
|
+
var VERSION = "0.1.9";
|
|
24283
24315
|
|
|
24284
24316
|
// src/gateway.ts
|
|
24285
24317
|
var CliError = class extends Error {
|
|
@@ -24535,7 +24567,7 @@ var tool = (name) => `${OUTCOME_TOOLS[name].description} (Agent tool: ${name}.)`
|
|
|
24535
24567
|
var TOPICS = {
|
|
24536
24568
|
watch: {
|
|
24537
24569
|
summary: "Company and topic watches; quote first, charge only changes",
|
|
24538
|
-
lines: ["Usage:", " gtm watch create --name Sales --company acme.com --hiring SDR --dry-run", " gtm watch create --name Sales --file companies.csv --hiring SDR --max-credits N --yes", " gtm watch create --name Stack --company acme.com --signal tech-stack --max-credits N --yes", " gtm watch create --name Growth --company acme.com --signal headcount --max-credits N --yes", " gtm watch create --name Rounds --file companies.csv --signal funding --max-credits N --yes", " gtm watch create --name Buyers --topic 'CRM for agencies' [--source x|reddit|both] --max-credits N --yes", " gtm watch list [--offset N]", " gtm watch show ID", " gtm watch changes [--watch ID] [--since N | --new] [--csv]", " gtm watch pause|resume|delete ID", "", tool("gtm_watch"), "A monthly limit is mandatory. The first check is a free baseline. No cadence option.", "A topic watch checks X and Reddit weekly and charges only new qualifying posts.", "--yes confirms after the free quote; without it, interactive terminals ask for confirmation.", "--new saves a cursor per server, credential and watch under GTM_CONFIG_DIR.", "CSV contains full rows; the ordinary answer is a compact preview."]
|
|
24570
|
+
lines: ["Usage:", " gtm watch create --name Sales --company acme.com --hiring SDR --dry-run", " gtm watch create --name Sales --file companies.csv --hiring SDR --max-credits N --yes", " gtm watch create --name Stack --company acme.com --signal tech-stack --max-credits N --yes", " gtm watch create --name Growth --company acme.com --signal headcount --max-credits N --yes", " gtm watch create --name Rounds --file companies.csv --signal funding --max-credits N --yes", " gtm watch create --name Buyers --topic 'CRM for agencies' [--source x|reddit|both] --max-credits N --yes", " gtm watch list [--offset N]", " gtm watch show ID", " gtm watch changes [--watch ID] [--since N | --new] [--csv]", " gtm watch pause|resume|delete ID", " gtm watch webhook_set ID --url https://hooks.acme.com/signals Save or replace the address; prints a signing secret once", " gtm watch webhook_show ID Show the address and whether delivery is active or failing; never the secret", " gtm watch webhook_test ID Send a signed test delivery that carries no changes", " gtm watch webhook_rotate ID Make a new signing secret, printed once", " gtm watch webhook_remove ID Stop delivering to the address", "", "Webhook deliveries and tests use no credits. Setup and signature check: docs/watch-webhooks.md.", "", tool("gtm_watch"), "A monthly limit is mandatory. The first check is a free baseline. No cadence option.", "A topic watch checks X and Reddit weekly and charges only new qualifying posts.", "--yes confirms after the free quote; without it, interactive terminals ask for confirmation.", "--new saves a cursor per server, credential and watch under GTM_CONFIG_DIR.", "CSV contains full rows; the ordinary answer is a compact preview."]
|
|
24539
24571
|
},
|
|
24540
24572
|
login: {
|
|
24541
24573
|
summary: "Sign in with a code you confirm in the browser",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtmmaxing",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "gtm: the GTMMAXING command line. Find contacts, build lead lists and research companies from a terminal or a coding agent, with credit caps on every paid call.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gtm",
|