@general-input/cli 0.15.0 → 0.16.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 +126 -122
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -2217,17 +2217,17 @@ var require_cipherModes = __commonJS({
|
|
|
2217
2217
|
}
|
|
2218
2218
|
};
|
|
2219
2219
|
modes.gcm.prototype.tableMultiply = function(x) {
|
|
2220
|
-
var
|
|
2220
|
+
var z51 = [0, 0, 0, 0];
|
|
2221
2221
|
for (var i = 0; i < 32; ++i) {
|
|
2222
2222
|
var idx = i / 8 | 0;
|
|
2223
2223
|
var x_i = x[idx] >>> (7 - i % 8) * 4 & 15;
|
|
2224
2224
|
var ah = this._m[i][x_i];
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2225
|
+
z51[0] ^= ah[0];
|
|
2226
|
+
z51[1] ^= ah[1];
|
|
2227
|
+
z51[2] ^= ah[2];
|
|
2228
|
+
z51[3] ^= ah[3];
|
|
2229
2229
|
}
|
|
2230
|
-
return
|
|
2230
|
+
return z51;
|
|
2231
2231
|
};
|
|
2232
2232
|
modes.gcm.prototype.ghash = function(h, y, x) {
|
|
2233
2233
|
y[0] ^= x[0];
|
|
@@ -5972,26 +5972,26 @@ var require_jsbn = __commonJS({
|
|
|
5972
5972
|
function bnpIsEven() {
|
|
5973
5973
|
return (this.t > 0 ? this.data[0] & 1 : this.s) == 0;
|
|
5974
5974
|
}
|
|
5975
|
-
function bnpExp(e,
|
|
5975
|
+
function bnpExp(e, z51) {
|
|
5976
5976
|
if (e > 4294967295 || e < 1) return BigInteger.ONE;
|
|
5977
|
-
var r = nbi(), r2 = nbi(), g =
|
|
5977
|
+
var r = nbi(), r2 = nbi(), g = z51.convert(this), i = nbits(e) - 1;
|
|
5978
5978
|
g.copyTo(r);
|
|
5979
5979
|
while (--i >= 0) {
|
|
5980
|
-
|
|
5981
|
-
if ((e & 1 << i) > 0)
|
|
5980
|
+
z51.sqrTo(r, r2);
|
|
5981
|
+
if ((e & 1 << i) > 0) z51.mulTo(r2, g, r);
|
|
5982
5982
|
else {
|
|
5983
5983
|
var t = r;
|
|
5984
5984
|
r = r2;
|
|
5985
5985
|
r2 = t;
|
|
5986
5986
|
}
|
|
5987
5987
|
}
|
|
5988
|
-
return
|
|
5988
|
+
return z51.revert(r);
|
|
5989
5989
|
}
|
|
5990
5990
|
function bnModPowInt(e, m) {
|
|
5991
|
-
var
|
|
5992
|
-
if (e < 256 || m.isEven())
|
|
5993
|
-
else
|
|
5994
|
-
return this.exp(e,
|
|
5991
|
+
var z51;
|
|
5992
|
+
if (e < 256 || m.isEven()) z51 = new Classic(m);
|
|
5993
|
+
else z51 = new Montgomery(m);
|
|
5994
|
+
return this.exp(e, z51);
|
|
5995
5995
|
}
|
|
5996
5996
|
BigInteger.prototype.copyTo = bnpCopyTo;
|
|
5997
5997
|
BigInteger.prototype.fromInt = bnpFromInt;
|
|
@@ -6049,13 +6049,13 @@ var require_jsbn = __commonJS({
|
|
|
6049
6049
|
if (this.signum() == 0 || b < 2 || b > 36) return "0";
|
|
6050
6050
|
var cs = this.chunkSize(b);
|
|
6051
6051
|
var a = Math.pow(b, cs);
|
|
6052
|
-
var d = nbv(a), y = nbi(),
|
|
6053
|
-
this.divRemTo(d, y,
|
|
6052
|
+
var d = nbv(a), y = nbi(), z51 = nbi(), r = "";
|
|
6053
|
+
this.divRemTo(d, y, z51);
|
|
6054
6054
|
while (y.signum() > 0) {
|
|
6055
|
-
r = (a +
|
|
6056
|
-
y.divRemTo(d, y,
|
|
6055
|
+
r = (a + z51.intValue()).toString(b).substr(1) + r;
|
|
6056
|
+
y.divRemTo(d, y, z51);
|
|
6057
6057
|
}
|
|
6058
|
-
return
|
|
6058
|
+
return z51.intValue().toString(b) + r;
|
|
6059
6059
|
}
|
|
6060
6060
|
function bnpFromRadix(s, b) {
|
|
6061
6061
|
this.fromInt(0);
|
|
@@ -6428,7 +6428,7 @@ var require_jsbn = __commonJS({
|
|
|
6428
6428
|
Barrett.prototype.mulTo = barrettMulTo;
|
|
6429
6429
|
Barrett.prototype.sqrTo = barrettSqrTo;
|
|
6430
6430
|
function bnModPow(e, m) {
|
|
6431
|
-
var i = e.bitLength(), k, r = nbv(1),
|
|
6431
|
+
var i = e.bitLength(), k, r = nbv(1), z51;
|
|
6432
6432
|
if (i <= 0) return r;
|
|
6433
6433
|
else if (i < 18) k = 1;
|
|
6434
6434
|
else if (i < 48) k = 3;
|
|
@@ -6436,19 +6436,19 @@ var require_jsbn = __commonJS({
|
|
|
6436
6436
|
else if (i < 768) k = 5;
|
|
6437
6437
|
else k = 6;
|
|
6438
6438
|
if (i < 8)
|
|
6439
|
-
|
|
6439
|
+
z51 = new Classic(m);
|
|
6440
6440
|
else if (m.isEven())
|
|
6441
|
-
|
|
6441
|
+
z51 = new Barrett(m);
|
|
6442
6442
|
else
|
|
6443
|
-
|
|
6443
|
+
z51 = new Montgomery(m);
|
|
6444
6444
|
var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;
|
|
6445
|
-
g[1] =
|
|
6445
|
+
g[1] = z51.convert(this);
|
|
6446
6446
|
if (k > 1) {
|
|
6447
6447
|
var g2 = nbi();
|
|
6448
|
-
|
|
6448
|
+
z51.sqrTo(g[1], g2);
|
|
6449
6449
|
while (n <= km) {
|
|
6450
6450
|
g[n] = nbi();
|
|
6451
|
-
|
|
6451
|
+
z51.mulTo(g2, g[n - 2], g[n]);
|
|
6452
6452
|
n += 2;
|
|
6453
6453
|
}
|
|
6454
6454
|
}
|
|
@@ -6474,20 +6474,20 @@ var require_jsbn = __commonJS({
|
|
|
6474
6474
|
is1 = false;
|
|
6475
6475
|
} else {
|
|
6476
6476
|
while (n > 1) {
|
|
6477
|
-
|
|
6478
|
-
|
|
6477
|
+
z51.sqrTo(r, r2);
|
|
6478
|
+
z51.sqrTo(r2, r);
|
|
6479
6479
|
n -= 2;
|
|
6480
6480
|
}
|
|
6481
|
-
if (n > 0)
|
|
6481
|
+
if (n > 0) z51.sqrTo(r, r2);
|
|
6482
6482
|
else {
|
|
6483
6483
|
t = r;
|
|
6484
6484
|
r = r2;
|
|
6485
6485
|
r2 = t;
|
|
6486
6486
|
}
|
|
6487
|
-
|
|
6487
|
+
z51.mulTo(r2, g[w], r);
|
|
6488
6488
|
}
|
|
6489
6489
|
while (j >= 0 && (e.data[j] & 1 << i) == 0) {
|
|
6490
|
-
|
|
6490
|
+
z51.sqrTo(r, r2);
|
|
6491
6491
|
t = r;
|
|
6492
6492
|
r = r2;
|
|
6493
6493
|
r2 = t;
|
|
@@ -6497,7 +6497,7 @@ var require_jsbn = __commonJS({
|
|
|
6497
6497
|
}
|
|
6498
6498
|
}
|
|
6499
6499
|
}
|
|
6500
|
-
return
|
|
6500
|
+
return z51.revert(r);
|
|
6501
6501
|
}
|
|
6502
6502
|
function bnGCD(a) {
|
|
6503
6503
|
var x = this.s < 0 ? this.negate() : this.clone();
|
|
@@ -18288,7 +18288,7 @@ import chalk4 from "chalk";
|
|
|
18288
18288
|
// package.json
|
|
18289
18289
|
var package_default = {
|
|
18290
18290
|
name: "@general-input/cli",
|
|
18291
|
-
version: "0.
|
|
18291
|
+
version: "0.16.0",
|
|
18292
18292
|
type: "module",
|
|
18293
18293
|
description: "The agent-facing CLI for General Input. Authenticate, manage workflows, run bash with operator credentials injected by the cloud.",
|
|
18294
18294
|
license: "SEE LICENSE IN LICENSE",
|
|
@@ -20929,8 +20929,7 @@ var ChildProcessSpawner = class {
|
|
|
20929
20929
|
const stdoutClosed = pipeWithScrubbing(
|
|
20930
20930
|
child.stdout,
|
|
20931
20931
|
process.stdout,
|
|
20932
|
-
args.scrubber.stream()
|
|
20933
|
-
args.onStdoutChunk
|
|
20932
|
+
args.scrubber.stream()
|
|
20934
20933
|
);
|
|
20935
20934
|
const stderrClosed = pipeWithScrubbing(
|
|
20936
20935
|
child.stderr,
|
|
@@ -20959,13 +20958,12 @@ var ChildProcessSpawner = class {
|
|
|
20959
20958
|
}
|
|
20960
20959
|
}
|
|
20961
20960
|
};
|
|
20962
|
-
function pipeWithScrubbing(source, dest, scrubber
|
|
20961
|
+
function pipeWithScrubbing(source, dest, scrubber) {
|
|
20963
20962
|
return new Promise((resolve22) => {
|
|
20964
20963
|
let flushed = false;
|
|
20965
20964
|
const emit = (chunk) => {
|
|
20966
20965
|
if (chunk.length === 0) return;
|
|
20967
20966
|
dest.write(chunk);
|
|
20968
|
-
onChunk?.(chunk);
|
|
20969
20967
|
};
|
|
20970
20968
|
const finishOnce = () => {
|
|
20971
20969
|
if (flushed) return;
|
|
@@ -22054,6 +22052,7 @@ function registerWorkspaceCommands(program2) {
|
|
|
22054
22052
|
}
|
|
22055
22053
|
|
|
22056
22054
|
// src/commands/exec/bash.ts
|
|
22055
|
+
import { readFileSync as readFileSync6 } from "fs";
|
|
22057
22056
|
function registerExecBash(parent) {
|
|
22058
22057
|
parent.command("bash").description(
|
|
22059
22058
|
"Run `bash -lc <cmd>` locally with cloud-resolved credentials injected as env vars. Output is streamed back through a scrubber that replaces every registered secret with [REDACTED:credential_<id>]."
|
|
@@ -22067,6 +22066,9 @@ function registerExecBash(parent) {
|
|
|
22067
22066
|
"Why this credential is being accessed. Lands in the credential access log and is shown to the operator. Re-state on every call; the audit log is per-invocation.",
|
|
22068
22067
|
collect,
|
|
22069
22068
|
[]
|
|
22069
|
+
).option(
|
|
22070
|
+
"-f, --file <path>",
|
|
22071
|
+
"Read the command from a file instead of after `--`. Pass `-` to read it from stdin (heredoc or `< script.sh`). Preferred whenever the command has quotes or newlines: write the script to a file with your editor, then point --file at it \u2014 no shell-quoting layers to fight."
|
|
22070
22072
|
).option(
|
|
22071
22073
|
"--cwd <path>",
|
|
22072
22074
|
"Working directory for the command. Defaults to your current shell cwd."
|
|
@@ -22104,6 +22106,15 @@ Examples:
|
|
|
22104
22106
|
--cred cred_01HX --reason "Listing Slack channels" \\
|
|
22105
22107
|
-- 'curl -s -H "Authorization: Bearer $SLACK_ACCESS_TOKEN_01HX" https://slack.com/api/conversations.list'
|
|
22106
22108
|
|
|
22109
|
+
# Anything with nested quotes or a multi-line script: write it to a file,
|
|
22110
|
+
# then --file it. No shell-quoting layers, so inline jq/python just works:
|
|
22111
|
+
geni exec bash --cred cred_01HX --reason "Query QuickBooks" --file ./q.sh
|
|
22112
|
+
# ...or pipe it in via stdin:
|
|
22113
|
+
geni exec bash --cred cred_01HX --reason "Query QuickBooks" --file - <<'EOF'
|
|
22114
|
+
curl -s -H "Authorization: Bearer $QUICKBOOKS_ACCESS_TOKEN_01HX" "$URL" \\
|
|
22115
|
+
| jq '.QueryResponse.Account[] | {name: .Name, bal: .CurrentBalance}'
|
|
22116
|
+
EOF
|
|
22117
|
+
|
|
22107
22118
|
# Multiple credentials, fan-out (suffix keeps them distinct):
|
|
22108
22119
|
geni exec bash \\
|
|
22109
22120
|
--cred cred_slackA --reason "Posting to #engineering" \\
|
|
@@ -22124,11 +22135,37 @@ Exit codes:
|
|
|
22124
22135
|
function collect(value, prev) {
|
|
22125
22136
|
return [...prev, value];
|
|
22126
22137
|
}
|
|
22138
|
+
async function readStdin() {
|
|
22139
|
+
const chunks = [];
|
|
22140
|
+
for await (const chunk of process.stdin) {
|
|
22141
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
22142
|
+
}
|
|
22143
|
+
return Buffer.concat(chunks).toString("utf-8");
|
|
22144
|
+
}
|
|
22145
|
+
async function resolveCommand(opts, positional) {
|
|
22146
|
+
if (opts.file !== void 0) {
|
|
22147
|
+
if (positional.length > 0) {
|
|
22148
|
+
printError(
|
|
22149
|
+
"Pass the command with --file OR after `--`, not both. --file wins if you need quotes or newlines; drop the `-- ...` tail."
|
|
22150
|
+
);
|
|
22151
|
+
exit(ExitCode.InvalidArgs);
|
|
22152
|
+
}
|
|
22153
|
+
if (opts.file === "-") return readStdin();
|
|
22154
|
+
try {
|
|
22155
|
+
return readFileSync6(opts.file, "utf-8");
|
|
22156
|
+
} catch (error) {
|
|
22157
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
22158
|
+
printError(`Could not read --file ${opts.file}: ${detail}`);
|
|
22159
|
+
exit(ExitCode.InvalidArgs);
|
|
22160
|
+
}
|
|
22161
|
+
}
|
|
22162
|
+
return positional.join(" ").trim();
|
|
22163
|
+
}
|
|
22127
22164
|
async function runExecBash(opts, positional) {
|
|
22128
|
-
const command =
|
|
22129
|
-
if (!command) {
|
|
22165
|
+
const command = await resolveCommand(opts, positional);
|
|
22166
|
+
if (!command.trim()) {
|
|
22130
22167
|
printError(
|
|
22131
|
-
"Missing the bash command. Put it after a literal `--` (flags before `--` belong to geni). Example: `geni exec bash --cred cred_X --reason \"...\" -- 'curl ...'`."
|
|
22168
|
+
"Missing the bash command. Put it after a literal `--` (flags before `--` belong to geni), or pass `--file <path>` (`--file -` for stdin). Example: `geni exec bash --cred cred_X --reason \"...\" -- 'curl ...'`."
|
|
22132
22169
|
);
|
|
22133
22170
|
exit(ExitCode.InvalidArgs);
|
|
22134
22171
|
}
|
|
@@ -23983,13 +24020,13 @@ import {
|
|
|
23983
24020
|
mkdirSync as mkdirSync6,
|
|
23984
24021
|
writeFileSync as writeFileSync5,
|
|
23985
24022
|
existsSync as existsSync5,
|
|
23986
|
-
readFileSync as
|
|
24023
|
+
readFileSync as readFileSync7,
|
|
23987
24024
|
unlinkSync,
|
|
23988
24025
|
rmSync
|
|
23989
24026
|
} from "fs";
|
|
23990
24027
|
|
|
23991
24028
|
// src/skills/geni.md
|
|
23992
|
-
var geni_default = "---\nname: geni\ndescription: Use the operator's connected services (Slack, Gmail, GitHub, Stripe, anything they've authorized in General Input) to fulfill their request, or build them a saved workflow (scheduled or event-driven automation). Load this whenever the user wants you to take an action on their behalf against an external SaaS account, fetch data from one of their tools, wire something up that crosses service boundaries, or set up a recurring/triggered automation.\n---\n\n# geni\n\n`geni` is a CLI that gives you credentialed access to the operator's\nconnected accounts. The cloud injects their tokens into a fresh bash\nsubprocess as env vars; you write the `curl`, you never see the\nsecret. Run `geni --help` for the full command surface.\n\n## How to talk about geni\n\nTreat geni as a teammate \u2014 the integration specialist who picks the\nright operation and runs the credentialed call. You're the one\nsynthesizing and replying.\n\nIn summaries of multi-step work, credit geni naturally: \"Geni pulled\nthe last 30 days of charges from Stripe; I rolled them into the report\nbelow.\" Skip the credit on trivial single calls; don't manufacture\nteam language (\"with geni's help\u2026\") to fill space. Lowercase `geni`\nin commands; capitalize \"Geni\" when personifying.\n\n## Request flow\n\nDiscovery first. Don't guess URLs, params, or env var names \u2014 the\noperation docs have them.\n\n1. `geni credential list [--service <slug>]` \u2014 find a connected\n credential id. If nothing's connected for the service, run\n `geni integration list -q \"<keyword>\"` to confirm the slug, then\n `geni credential connect <service>` (see \"Connecting a missing\n credential\" below).\n2. `geni integration operations <service> [-q \"<keyword>\"]` \u2014 find\n the operation you need.\n3. `geni integration operation <id> --format markdown` \u2014 read the\n HTTP shape, params, and **exact env var names** this call will set.\n4. `geni exec bash --cred <cred_id> --reason \"<what + why>\" -- '<curl>'`\n\n## Connecting a missing credential\n\n`geni credential connect <service>` opens the integration's\ndashboard page in the operator's browser. Tell the operator to\nfinish the connection there and come back \u2014 then re-run `geni\ncredential list --service <service>` to pick up the new id. Don't\npoll, don't loop. In non-interactive shells, add `--print-url` so\nthe URL prints to stdout instead.\n\n## Env vars\n\nRead the names off the operation docs; never derive them. Two flavors\nemitted per credential:\n\n- **Suffixed**: `<SERVICE>_<FIELD>_<id>` (e.g. `$SLACK_BOT_TOKEN_ABC`,\n `$SALESFORCE_INSTANCE_URL_KG`). The `<id>` is the credential id with\n `cred_` stripped, uppercased. Use these when fanning out across\n multiple credentials of the same service in one call.\n- **Canonical aliases**: well-known SDK names (`$GH_TOKEN`,\n `$SLACK_BOT_TOKEN`, `$OPENAI_API_KEY`, `$STRIPE_API_KEY`, \u2026) for\n tools that hardcode them.\n\nPlus `$PLATFORM_API_KEY` and `$PLATFORM_BASE_URL` on every exec \u2014 use\nthem to call General Input's first-party services (web search, image\ngen, weather, send-email) without `--cred`.\n\n## --reason is per-call\n\nEvery `geni exec bash --cred ...` requires `--reason`. It lands in\nthe operator's audit log and is shown to them. Be specific\n(\"Posting daily digest to #engineering\"), not generic (\"Slack call\").\nRe-state it on every call \u2014 the log is per-call, not per-session.\n\n## Output is scrubbed\n\nstdout and stderr pass through a streaming scrubber that replaces\nevery registered secret with `[REDACTED:credential_<id>]`. Don't try\nto exfiltrate via `echo $TOKEN | base64`; common encodings are\ncaught too. You don't need to see the secret to use it \u2014 the\nsubprocess can.\n\n## Building resources (workflows, apps, and skills)\n\n`geni exec bash` is for one-off actions. When the user wants something\nsaved and reusable, build a **resource**. A resource is one of four\ntypes: a `code` **workflow** (deterministic, fixed steps, runs on a\nschedule or trigger), an `agent` **workflow** (LLM-driven, variable-length\ntasks like research or triage), an `app` (an interactive React mini-app\nwith server-side handlers, like a dashboard or internal tool), or a\n`skill` (a SKILL.md instruction bundle the platform's cloud agents load\nas context \u2014 not executed). The shared lifecycle lives under `geni\nresource`; type-specific tools under `geni workflow` and `geni app`.\n\nYou author the files locally with your own editor; the cloud validates,\nconfigures, publishes, and runs them. This is the same build loop as the\ngeni chat, just on the user's machine with your brain driving it. Same\nloop for every type; apps add a build step and handler tools (see\n\"Building apps\" below), skills drop the config step (see \"Building\nskills\" below).\n\n**Load the authoring skill first.** `geni skills load\n<code-workflow|agent-workflow|app|skill-authoring>` writes the platform's\nauthoring skill for that type into `geni-skills/<name>/`: `SKILL.md` (the\nmethod), `references/spec.md` (the full contract \u2014 required files, the\nruntime API, allowed and forbidden patterns), and `references/example/`\n(a complete, validated example to mirror). Read SKILL.md and the spec,\nand copy shapes from the example. (`skill-authoring` is the one type\nwhose short spec is inline in SKILL.md, with no example.) Don't write a\nsingle file before loading it.\n\nThe loop:\n\n1. `geni resource create --type code --name \"Daily Digest\"`: creates the\n resource in the cloud and scaffolds its files into the current\n directory, with a `.geni-resource.json` marker so later commands here\n resolve the id automatically.\n2. Edit the files (`workflow.json`, `main.ts`, `package.json`) with your\n normal Read/Write/Edit tools. **Don't run `npm install`, `tsc`, or\n `bun` locally**: `@general-input/core` only resolves server-side, so\n a local compile always fails on the missing module. That's not a real\n error.\n3. `geni resource validate`: server-side spec + wiring + (code\n workflows) TypeScript check. Exit 9 means invalid; fix what it\n reports and re-run. For apps the compile gate is the publish build,\n not validate.\n4. `geni resource config set`: wire what the workflow needs. Find\n credential ids with `geni credential list`; set them with\n `--cred <service>=<credentialId>`. Set consts with `--const k=v`,\n schedules with `--schedule <triggerId>=<cron>`. `geni resource config\nget` shows the current state. Find trigger providers with\n `geni trigger list`.\n5. `geni resource publish --summary \"<one plain sentence>\"`: promote\n your local files to the live version. Required before a test reflects\n your latest edits.\n6. `geni workflow test --payload '{...}'`: run a real cloud test\n execution and wait for the result, output, and logs. Iterate from\n step 2 until it does what the user asked.\n\nWhen a run misbehaves, `geni workflow execution <id> --download` writes\nits full trace to `executions/<id>/` (run.json, logs.txt, input.json, and\nthread.json). For an agent workflow, read `thread.json` to see every step\nthe agent took. Use `--thread` or `--input` to print those inline instead.\n\nUse the same discovery tools as exec: `geni integration operations\n<service>` and `geni integration operation <id>` to learn an API's shape\nbefore you write the `fetch` call in `main.ts`.\n\nFor a poll-triggered workflow, `geni workflow trigger-sample` returns\nlive sample records so you see the exact shape `input` receives before\nwriting `main.ts` (wire the trigger's credential and inputs with\n`config set` first). To test a file-type input, `geni workflow\nstage-input <file>` uploads a local file and prints a `store://` URI to\npass as that field's value in `--payload`.\n\n## Building apps\n\nAn `app` workflow is a React SPA (rendered in the dashboard's iframe)\nthat calls server-side handlers. Create it with `geni resource create\n--type app`; load the authoring skill with `geni skills load app` (its\n`references/` hold the contract, the component catalog, and a complete\nexample app). The shared commands work the same (validate, config set\nfor credential slots, publish), with these differences:\n\n- The scaffold is a whole Vite project. Edit only `app.json`, `src/App.tsx`,\n `src/pages/*`, your own `src/components/*`, and `handlers/*.ts`. Leave\n the platform-owned files alone.\n- `geni resource publish` builds the app; the result's `build` reports\n whether the Vite build passed. You can't preview the UI from the CLI,\n so drive correctness through handlers and the build.\n- `geni app run-handler <name> --input '{...}'` runs a handler\n against the live app (publish first). `geni app invocations`\n shows recent handler runs, `geni app errors` shows browser\n errors the iframe reported, `geni app build-status` shows the\n build, and `geni app clear-cache` flushes the handler cache.\n\nThe loop: create --type app -> edit handlers + pages -> validate ->\nconfig set (wire credential slots) -> publish (builds) -> app run-handler\nto verify -> tell the user to open it in their dashboard.\n\n## Building skills\n\nA `skill` is a SKILL.md bundle (frontmatter `name` slug + `description`,\nthen the instructions body; optional `scripts/`, `references/`,\n`assets/`) that the platform's cloud agents load as context. It is not\nexecuted, so the loop is shorter: create --type skill -> edit SKILL.md ->\nvalidate -> publish. No `config set` (nothing to wire) and publish needs\nno `--summary`. The frontmatter `description` is the only thing agents\nsee before deciding to load it, so it must say what the skill does AND\nwhen to use it. Skill ids are `skl_`-prefixed; pull/validate/publish\nwork on them like any resource.\n\nA skill is never run and has no triggers. Once published, tell the user\nit's in their dashboard Skills page, ready for their agents to load into\nfuture work. Commands accept the skill id as a positional or infer it\nfrom the marker in the current directory.\n\n## Exit codes worth knowing\n\n- `0` \u2014 success; `1\u2013125` \u2014 subprocess's own exit (curl, jq, etc.)\n- `4` \u2014 resource not found (bad cred id, slug, operation id)\n- `77` \u2014 server refused to resolve a credential. Don't retry; surface\n to the operator.\n- `78` \u2014 session expired. Tell the operator to run `geni login`.\n- `79` \u2014 this geni is below the server's minimum version. Run\n `geni upgrade`, then `geni skills install`, and retry.\n\n## Don't\n\n- Don't construct a curl without reading the operation docs first.\n Guessing at URLs and env var names is the most common failure mode.\n- Don't hand-write resource files before loading the authoring skill\n (`geni skills load <code-workflow|agent-workflow|app|skill-authoring>`)\n and reading its spec + example. Don't try to compile or `npm install`\n them locally; let `geni resource validate` be the gate.\n- Use `--json` on list/get commands when you're going to parse the\n output. Table output is for humans.\n";
|
|
24029
|
+
var geni_default = "---\nname: geni\ndescription: Use the operator's connected services (Slack, Gmail, GitHub, Stripe, anything they've authorized in General Input) to fulfill their request, or build them a saved workflow (scheduled or event-driven automation). Load this whenever the user wants you to take an action on their behalf against an external SaaS account, fetch data from one of their tools, wire something up that crosses service boundaries, or set up a recurring/triggered automation.\n---\n\n# geni\n\n`geni` is a CLI that gives you credentialed access to the operator's\nconnected accounts. The cloud injects their tokens into a fresh bash\nsubprocess as env vars; you write the `curl`, you never see the\nsecret. Run `geni --help` for the full command surface.\n\n## How to talk about geni\n\nTreat geni as a teammate \u2014 the integration specialist who picks the\nright operation and runs the credentialed call. You're the one\nsynthesizing and replying.\n\nIn summaries of multi-step work, credit geni naturally: \"Geni pulled\nthe last 30 days of charges from Stripe; I rolled them into the report\nbelow.\" Skip the credit on trivial single calls; don't manufacture\nteam language (\"with geni's help\u2026\") to fill space. Lowercase `geni`\nin commands; capitalize \"Geni\" when personifying.\n\n## Request flow\n\nDiscovery first. Don't guess URLs, params, or env var names \u2014 the\noperation docs have them.\n\n1. `geni credential list [--service <slug>]` \u2014 find a connected\n credential id. If nothing's connected for the service, run\n `geni integration list -q \"<keyword>\"` to confirm the slug, then\n `geni credential connect <service>` (see \"Connecting a missing\n credential\" below).\n2. `geni integration operations <service> [-q \"<keyword>\"]` \u2014 find\n the operation you need.\n3. `geni integration operation <id> --format markdown` \u2014 read the\n HTTP shape, params, and **exact env var names** this call will set.\n4. `geni exec bash --cred <cred_id> --reason \"<what + why>\" -- '<curl>'`\n\n## Complex commands: write a file, don't fight quotes\n\nThe `-- '<command>'` form goes through a shell-quoting layer. For a\none-line `curl` that's fine. The moment the command has nested quotes\nor newlines \u2014 a `curl` piped into `jq` or `python3 -c`, a JSON body\nwith `\"keys\"` \u2014 that quoting silently mangles and the call fails in\nconfusing ways. Don't escalate escaping. Write the script to a file\nwith your normal editor, then run it as data:\n\n```\ngeni exec bash --cred <id> --reason \"<why>\" --file ./query.sh\n```\n\n`--file -` reads the script from stdin (heredoc / `< script.sh`).\n`jq` is available in the exec environment \u2014 prefer it over inline\n`python3 -c` for shaping JSON.\n\n## Connecting a missing credential\n\n`geni credential connect <service>` opens the integration's\ndashboard page in the operator's browser. Tell the operator to\nfinish the connection there and come back \u2014 then re-run `geni\ncredential list --service <service>` to pick up the new id. Don't\npoll, don't loop. In non-interactive shells, add `--print-url` so\nthe URL prints to stdout instead.\n\n## Env vars\n\nRead the names off the operation docs; never derive them. Two flavors\nemitted per credential:\n\n- **Suffixed**: `<SERVICE>_<FIELD>_<id>` (e.g. `$SLACK_BOT_TOKEN_ABC`,\n `$SALESFORCE_INSTANCE_URL_KG`). The `<id>` is the credential id with\n `cred_` stripped, uppercased. Use these when fanning out across\n multiple credentials of the same service in one call.\n- **Canonical aliases**: well-known SDK names (`$GH_TOKEN`,\n `$SLACK_BOT_TOKEN`, `$OPENAI_API_KEY`, `$STRIPE_API_KEY`, \u2026) for\n tools that hardcode them.\n\nPlus `$PLATFORM_API_KEY` and `$PLATFORM_BASE_URL` on every exec \u2014 use\nthem to call General Input's first-party services (web search, image\ngen, weather, send-email) without `--cred`.\n\n## --reason is per-call\n\nEvery `geni exec bash --cred ...` requires `--reason`. It lands in\nthe operator's audit log and is shown to them. Be specific\n(\"Posting daily digest to #engineering\"), not generic (\"Slack call\").\nRe-state it on every call \u2014 the log is per-call, not per-session.\n\n## Output is scrubbed\n\nstdout and stderr pass through a streaming scrubber that replaces\nevery registered secret with `[REDACTED:credential_<id>]`. Don't try\nto exfiltrate via `echo $TOKEN | base64`; common encodings are\ncaught too. You don't need to see the secret to use it \u2014 the\nsubprocess can.\n\n## Building resources (workflows, apps, and skills)\n\n`geni exec bash` is for one-off actions. When the user wants something\nsaved and reusable, build a **resource**. A resource is one of four\ntypes: a `code` **workflow** (deterministic, fixed steps, runs on a\nschedule or trigger), an `agent` **workflow** (LLM-driven, variable-length\ntasks like research or triage), an `app` (an interactive React mini-app\nwith server-side handlers, like a dashboard or internal tool), or a\n`skill` (a SKILL.md instruction bundle the platform's cloud agents load\nas context \u2014 not executed). The shared lifecycle lives under `geni\nresource`; type-specific tools under `geni workflow` and `geni app`.\n\nYou author the files locally with your own editor; the cloud validates,\nconfigures, publishes, and runs them. This is the same build loop as the\ngeni chat, just on the user's machine with your brain driving it. Same\nloop for every type; apps add a build step and handler tools (see\n\"Building apps\" below), skills drop the config step (see \"Building\nskills\" below).\n\n**Load the authoring skill first.** `geni skills load\n<code-workflow|agent-workflow|app|skill-authoring>` writes the platform's\nauthoring skill for that type into `geni-skills/<name>/`: `SKILL.md` (the\nmethod), `references/spec.md` (the full contract \u2014 required files, the\nruntime API, allowed and forbidden patterns), and `references/example/`\n(a complete, validated example to mirror). Read SKILL.md and the spec,\nand copy shapes from the example. (`skill-authoring` is the one type\nwhose short spec is inline in SKILL.md, with no example.) Don't write a\nsingle file before loading it.\n\nThe loop:\n\n1. `geni resource create --type code --name \"Daily Digest\"`: creates the\n resource in the cloud and scaffolds its files into the current\n directory, with a `.geni-resource.json` marker so later commands here\n resolve the id automatically.\n2. Edit the files (`workflow.json`, `main.ts`, `package.json`) with your\n normal Read/Write/Edit tools. **Don't run `npm install`, `tsc`, or\n `bun` locally**: `@general-input/core` only resolves server-side, so\n a local compile always fails on the missing module. That's not a real\n error.\n3. `geni resource validate`: server-side spec + wiring + (code\n workflows) TypeScript check. Exit 9 means invalid; fix what it\n reports and re-run. For apps the compile gate is the publish build,\n not validate.\n4. `geni resource config set`: wire what the workflow needs. Find\n credential ids with `geni credential list`; set them with\n `--cred <service>=<credentialId>`. Set consts with `--const k=v`,\n schedules with `--schedule <triggerId>=<cron>`. `geni resource config\nget` shows the current state. Find trigger providers with\n `geni trigger list`.\n5. `geni resource publish --summary \"<one plain sentence>\"`: promote\n your local files to the live version. Required before a test reflects\n your latest edits.\n6. `geni workflow test --payload '{...}'`: run a real cloud test\n execution and wait for the result, output, and logs. Iterate from\n step 2 until it does what the user asked.\n\nWhen a run misbehaves, `geni workflow execution <id> --download` writes\nits full trace to `executions/<id>/` (run.json, logs.txt, input.json, and\nthread.json). For an agent workflow, read `thread.json` to see every step\nthe agent took. Use `--thread` or `--input` to print those inline instead.\n\nUse the same discovery tools as exec: `geni integration operations\n<service>` and `geni integration operation <id>` to learn an API's shape\nbefore you write the `fetch` call in `main.ts`.\n\nFor a poll-triggered workflow, `geni workflow trigger-sample` returns\nlive sample records so you see the exact shape `input` receives before\nwriting `main.ts` (wire the trigger's credential and inputs with\n`config set` first). To test a file-type input, `geni workflow\nstage-input <file>` uploads a local file and prints a `store://` URI to\npass as that field's value in `--payload`.\n\n## Building apps\n\nAn `app` workflow is a React SPA (rendered in the dashboard's iframe)\nthat calls server-side handlers. Create it with `geni resource create\n--type app`; load the authoring skill with `geni skills load app` (its\n`references/` hold the contract, the component catalog, and a complete\nexample app). The shared commands work the same (validate, config set\nfor credential slots, publish), with these differences:\n\n- The scaffold is a whole Vite project. Edit only `app.json`, `src/App.tsx`,\n `src/pages/*`, your own `src/components/*`, and `handlers/*.ts`. Leave\n the platform-owned files alone.\n- `geni resource publish` builds the app; the result's `build` reports\n whether the Vite build passed. You can't preview the UI from the CLI,\n so drive correctness through handlers and the build.\n- `geni app run-handler <name> --input '{...}'` runs a handler\n against the live app (publish first). `geni app invocations`\n shows recent handler runs, `geni app errors` shows browser\n errors the iframe reported, `geni app build-status` shows the\n build, and `geni app clear-cache` flushes the handler cache.\n\nThe loop: create --type app -> edit handlers + pages -> validate ->\nconfig set (wire credential slots) -> publish (builds) -> app run-handler\nto verify -> tell the user to open it in their dashboard.\n\n## Building skills\n\nA `skill` is a SKILL.md bundle (frontmatter `name` slug + `description`,\nthen the instructions body; optional `scripts/`, `references/`,\n`assets/`) that the platform's cloud agents load as context. It is not\nexecuted, so the loop is shorter: create --type skill -> edit SKILL.md ->\nvalidate -> publish. No `config set` (nothing to wire) and publish needs\nno `--summary`. The frontmatter `description` is the only thing agents\nsee before deciding to load it, so it must say what the skill does AND\nwhen to use it. Skill ids are `skl_`-prefixed; pull/validate/publish\nwork on them like any resource.\n\nA skill is never run and has no triggers. Once published, tell the user\nit's in their dashboard Skills page, ready for their agents to load into\nfuture work. Commands accept the skill id as a positional or infer it\nfrom the marker in the current directory.\n\n## Exit codes worth knowing\n\n- `0` \u2014 success; `1\u2013125` \u2014 subprocess's own exit (curl, jq, etc.)\n- `4` \u2014 resource not found (bad cred id, slug, operation id)\n- `77` \u2014 server refused to resolve a credential. Don't retry; surface\n to the operator.\n- `78` \u2014 session expired. Tell the operator to run `geni login`.\n- `79` \u2014 this geni is below the server's minimum version. Run\n `geni upgrade`, then `geni skills install`, and retry.\n\n## Don't\n\n- Don't construct a curl without reading the operation docs first.\n Guessing at URLs and env var names is the most common failure mode.\n- Don't hand-write resource files before loading the authoring skill\n (`geni skills load <code-workflow|agent-workflow|app|skill-authoring>`)\n and reading its spec + example. Don't try to compile or `npm install`\n them locally; let `geni resource validate` be the gate.\n- Use `--json` on list/get commands when you're going to parse the\n output. Table output is for humans.\n";
|
|
23993
24030
|
|
|
23994
24031
|
// src/skills/geni-crm.md
|
|
23995
24032
|
var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the operator\'s General Input CRM from the command line. Load this whenever the user wants you to look something up in their CRM, pull a list of people or companies, check a deal pipeline, find or verify someone\'s email or phone (enrichment), work outbound campaigns and their sequence drafts, OR change CRM data (create or update people/companies, manage lists and tags, add notes, create and resolve tasks, move deals through stages, log touchpoints). Full read/write access to people, companies, pipelines, deals, lists, tags, notes, tasks, enrichment, campaigns, and sequence drafts.\n---\n\n# geni crm\n\n`geni crm` reads and writes the operator\'s General Input CRM: the lead database\n(people and companies), deal pipelines and their cards, lists, tags, notes,\ntasks, touchpoints, custom fields, and outbound campaigns with their sequence\ndrafts. It is part of the same `geni` CLI, so it\nuses the same session and active workspace. The workspace must have CRM access,\nor these commands return a 403. Run `geni crm --help` for the full surface, and\n`geni crm <noun> --help` for a noun\'s verbs.\n\nThe shape is `geni crm <noun> <verb>`. Each noun is a group: `people`,\n`companies`, `lists`, `tags`, `notes`, `tasks`, `pipelines`, `stages`, `cards`,\n`touchpoints`, `fields`, `employments`, `contact-points`, `campaigns`,\n`sequences`, `waterfalls`, `enrich`, plus a top-level `search`.\n\n## Finding things, then acting on them\n\nThe same two-step flow as the rest of geni: find an id, then read or write it.\n\n1. Find by name with one query across everything:\n `geni crm search "<text>" [--type person|company|list|pipeline|card]`. Or\n list one kind: `geni crm people "<text>"`, `geni crm companies "<text>"`,\n `geni crm pipelines`, `geni crm lists`, `geni crm tags`, `geni crm tasks`.\n `people` and `companies` also take `--filter`, a JSON array of column\n conditions, e.g. `--filter \'[{"field":"seniority","operator":"any_of","values":["vp"]},{"field":"icpScore","operator":"gte","value":70}]\'` \u2014\n see `--help` for the field and operator lists (custom fields filter as\n `custom.<key>`).\n2. Read one record: `geni crm people get <id>`, `geni crm companies get <id>`,\n `geni crm cards get <id>`, `geni crm pipelines get <id>` (add `--board` for\n its cards), `geni crm tasks get <id>`.\n\n## Writing\n\nCreates and updates take the record body as `--json`; the server validates it,\nso a 400 means the body was wrong (read the error and fix the JSON). Run\n`geni crm <noun> <verb> --help` to see the expected fields.\n\n- **Create / update records** (JSON body):\n - `geni crm people create --json \'[{"fullName":"Ada Lovelace","companyName":"Acme","email":"ada@acme.com"}]\'` (batch, find-or-create, deduped). `companies create` mirrors it. A `"created": false` result matched an existing record by identity key (email/LinkedIn; domain for companies) \u2014 the CLI warns on stderr when the matched name differs, e.g. a shared inbox collapsing distinct people.\n - `geni crm people update --json \'[{"id":"<id>","title":"VP Eng","linkedinUrl":"https://\u2026"}]\'` (batch, ids inline). `companies update` mirrors it. Writes take the create field names (`title`, `linkedinUrl`), not the read names you see on `get` (`currentTitle`, `primaryLinkedinUrl`); unknown keys are rejected with a 400 naming them.\n - `geni crm lists create --json \'{"name":"Q3 ICP","type":"company"}\'`, `geni crm tags create --json \'{"name":"Customer","entityType":"company"}\'`, `geni crm tasks create --json \'{"title":"Follow up","entity":{"type":"person","id":"<id>"}}\'`, `geni crm cards create <pipelineId> --json \'{"title":"Acme renewal","amount":50000}\'`.\n- **Notes** take the text directly: `geni crm notes create person <id> --body "Met at the conference"`.\n- **State-change verbs** (no JSON, just flags/ids):\n - Lists/tags: `geni crm lists add <listId> <entityIds...>`, `geni crm tags assign <tagId> <entityIds...>` (and `remove` / `unassign`).\n - Tasks: `geni crm tasks done <id>` (also `dismiss`, `reopen`, `delete`).\n - Cards: `geni crm cards move <id> --stage <stageId>`, `geni crm cards status <id> --status won|lost|open [--reason "..."]`, `geni crm cards archive <id>`, `geni crm cards add-contact <cardId> <personId>`.\n- **Deals/touchpoints**: `geni crm touchpoints log <cardId> --json \'{"channel":"call","occurredAt":"2026-07-01T15:00:00Z","summary":"Pricing call"}\'`.\n- **Delete** is `<noun> delete <id...>` (people/companies/lists take multiple ids; most others take one).\n\nCard edits, moves, and status changes use optimistic concurrency. Pass\n`--expected-updated-at <ts>` to enforce it; omit it and the CLI reads the card\'s\ncurrent version first (last-write-wins), which is usually what you want from a\nscript. With the token, a stale card fails with an HTTP 409 conflict; re-read\nthe card and retry.\n\n## Output\n\nList commands print a table; pass `--json` to parse. `get` commands and all\nwrites print the affected record as JSON (state-change verbs print a short\nconfirmation). The single-record `get` commands take `--field <path>` to pull\none value, e.g. `geni crm cards get <id> --field status`.\n\nJSON shapes vary by verb: searches print `{"results": [...]}` (people/companies\nadd `nextCursor`), `people get` prints `{person, company, contactPoints, ...}`,\nand bare noun lists wrap in a named key (e.g. `{"lists": [...]}`) \u2014 check before\npiping into a parser.\n\n## Enrichment\n\nFind and verify contact info for people through the workspace\'s configured\nprovider waterfalls. This is **paid** (it spends credits per provider call), so\nevery verb requires `--yes` and a run is capped at 25 people. Only enrich when\nthe operator has asked you to. Found emails and numbers save onto the person\'s\ncontact points automatically.\n\n- See what\'s wired first: `geni crm waterfalls` lists the provider chain for each\n capability (email-enrichment, email-validation, phone-enrichment). An empty\n chain finds nothing and spends nothing.\n- `geni crm enrich emails <personIds...> --yes` finds work emails;\n `geni crm enrich phones <personIds...> --yes` finds mobile numbers (both take\n `--retry-unverified`).\n- `geni crm enrich validate <personIds...> --yes` checks deliverability \u2014 run it\n before sequencing so you don\'t send to a bad address.\n\n## Campaigns and sequences (draft here \u2014 the dashboard delivers)\n\nOutbound is prep + export: campaigns group people under one purpose, each\nmember gets a fully personalized per-person sequence **draft**, and the\noperator syncs the campaign to an external sequencer (Instantly, Smartlead,\nCSV) from the dashboard. There is no sending from General Input, and the CLI\ncannot sync \u2014 by design. When drafts are ready, tell the operator to review\nand sync from the campaign\'s page in the dashboard.\n\n- `geni crm campaigns [query]` lists campaigns with member/sequence rollups;\n `get <id>` shows one (its `purpose` is the messaging angle every draft in it\n must serve); `--person <id>` lists the campaigns a person is in.\n- `geni crm campaigns create --json \'{"name":"Q3 fintech CFOs","purpose":"Book intro calls about closing automation"}\'`.\n Names are unique per workspace. `update <id>` and `delete <id>` exist;\n deleting removes the campaign\'s drafts too.\n- Membership first: `geni crm campaigns add <campaignId> <personIds...>` adds\n people; `members <id>` shows who is in and who still has no draft.\n `remove` also deletes the member\'s synced leads from linked sequencers \u2014\n it\'s how "stop emailing them" propagates.\n- `geni crm sequences [query] [--person <id>] [--campaign <id>]` lists\n drafts; `get <id>` shows the steps.\n- Draft: `geni crm sequences create --person <id> --campaign <id> --json \'{"steps":[{"subject":"\u2026","body":"\u2026","waitDays":0},{"body":"\u2026","waitDays":3}]}\'`.\n The first step carries the subject; follow-ups reply in-thread after\n `waitDays` with no reply. Read the campaign\'s `purpose` first and write to\n it. A member has ONE draft per campaign \u2014 creating again rewrites it (and\n the next sync updates the lead instead of duplicating it).\n- `geni crm sequences update <id> --json \'\u2026\'` replaces a draft wholesale;\n `delete <id>` removes a draft (the person stays a member).\n- Consider `geni crm enrich validate` on recipients first so the operator\n isn\'t syncing mail to a dead address.\n\n## Composing with the rest of geni\n\nThe CRM is the source of who and what; connected credentials are how you act on\nthe outside world. To add contact info, prefer `geni crm enrich` (it runs the\nworkspace\'s provider waterfalls and saves results). For anything else, pull\npeople or a company from the CRM, reach a service through `geni exec bash` (send\nan email, update an external system), and write the result back to the CRM (a\nnote, a task, a touchpoint, a moved card). Credit each tool naturally in your\nsummary.\n\n## Exit codes worth knowing\n\n- `0` success.\n- `4` not found (bad id, or it is not in the active workspace).\n- `5` forbidden (the workspace lacks CRM access, or the record is out of scope).\n- `9` stale write (a card changed since you read it; re-read and retry, or pass `--expected-updated-at`).\n- `78` session expired. Tell the operator to run `geni login`.\n';
|
|
@@ -24047,7 +24084,7 @@ function installSkills() {
|
|
|
24047
24084
|
const path = join7(dir, "SKILL.md");
|
|
24048
24085
|
try {
|
|
24049
24086
|
mkdirSync6(dir, { recursive: true });
|
|
24050
|
-
const previous = existsSync5(path) ?
|
|
24087
|
+
const previous = existsSync5(path) ? readFileSync7(path, "utf-8") : null;
|
|
24051
24088
|
const changed = previous !== skill.md;
|
|
24052
24089
|
writeFileSync5(path, skill.md);
|
|
24053
24090
|
for (const legacy of target.legacyPaths(skill.name)) {
|
|
@@ -24364,7 +24401,7 @@ function parseJsonObjectArg(raw) {
|
|
|
24364
24401
|
}
|
|
24365
24402
|
|
|
24366
24403
|
// src/lib/leadFilterArg.ts
|
|
24367
|
-
import { z as
|
|
24404
|
+
import { z as z49 } from "zod";
|
|
24368
24405
|
|
|
24369
24406
|
// ../../packages/crm-api/dist/types/enums.js
|
|
24370
24407
|
import { z as z12 } from "zod";
|
|
@@ -26318,7 +26355,7 @@ var SetNotificationChannelAddressRequestSchema = z44.object({
|
|
|
26318
26355
|
address: z44.string().min(1)
|
|
26319
26356
|
});
|
|
26320
26357
|
|
|
26321
|
-
// ../../packages/api/dist/types/
|
|
26358
|
+
// ../../packages/api/dist/types/oauthProviderCatalog.js
|
|
26322
26359
|
var OAUTH_PROVIDER_GROUPS = {
|
|
26323
26360
|
google: {
|
|
26324
26361
|
title: "Google",
|
|
@@ -26369,6 +26406,16 @@ var OAUTH_PROVIDER_GROUPS = {
|
|
|
26369
26406
|
iconUrl: "https://icons.generalinput.com/linear.png",
|
|
26370
26407
|
services: ["linear"]
|
|
26371
26408
|
},
|
|
26409
|
+
x: {
|
|
26410
|
+
title: "X (Twitter)",
|
|
26411
|
+
iconUrl: "https://icons.generalinput.com/x-twitter.png",
|
|
26412
|
+
services: ["twitter"]
|
|
26413
|
+
},
|
|
26414
|
+
linkedin: {
|
|
26415
|
+
title: "LinkedIn",
|
|
26416
|
+
iconUrl: "https://icons.generalinput.com/linkedin.png",
|
|
26417
|
+
services: ["linkedin", "linkedin-ad-library"]
|
|
26418
|
+
},
|
|
26372
26419
|
hubspot: {
|
|
26373
26420
|
title: "HubSpot",
|
|
26374
26421
|
iconUrl: "https://icons.generalinput.com/hubspot.png",
|
|
@@ -26409,6 +26456,11 @@ var OAUTH_PROVIDER_GROUPS = {
|
|
|
26409
26456
|
iconUrl: "https://icons.generalinput.com/calendly.png",
|
|
26410
26457
|
services: ["calendly"]
|
|
26411
26458
|
},
|
|
26459
|
+
strava: {
|
|
26460
|
+
title: "Strava",
|
|
26461
|
+
iconUrl: "https://icons.generalinput.com/strava.png",
|
|
26462
|
+
services: ["strava"]
|
|
26463
|
+
},
|
|
26412
26464
|
ramp: {
|
|
26413
26465
|
title: "Ramp",
|
|
26414
26466
|
iconUrl: "https://icons.generalinput.com/ramp.png",
|
|
@@ -26494,6 +26546,16 @@ var OAUTH_PROVIDER_GROUPS = {
|
|
|
26494
26546
|
iconUrl: "https://icons.generalinput.com/meta-ads.jpg",
|
|
26495
26547
|
services: ["meta-ads"]
|
|
26496
26548
|
},
|
|
26549
|
+
instagram: {
|
|
26550
|
+
title: "Instagram",
|
|
26551
|
+
iconUrl: "https://icons.generalinput.com/instagram.png",
|
|
26552
|
+
services: ["instagram"]
|
|
26553
|
+
},
|
|
26554
|
+
"facebook-pages": {
|
|
26555
|
+
title: "Facebook Pages",
|
|
26556
|
+
iconUrl: "https://icons.generalinput.com/facebook.png",
|
|
26557
|
+
services: ["facebook-pages"]
|
|
26558
|
+
},
|
|
26497
26559
|
"linkedin-ads": {
|
|
26498
26560
|
title: "LinkedIn Ads",
|
|
26499
26561
|
iconUrl: "https://icons.generalinput.com/linkedin-ads.png",
|
|
@@ -26534,6 +26596,11 @@ var OAUTH_PROVIDER_GROUPS = {
|
|
|
26534
26596
|
iconUrl: "https://icons.generalinput.com/tiktok-ads.webp",
|
|
26535
26597
|
services: ["tiktok-ads"]
|
|
26536
26598
|
},
|
|
26599
|
+
tiktok: {
|
|
26600
|
+
title: "TikTok",
|
|
26601
|
+
iconUrl: "https://icons.generalinput.com/tiktok.png",
|
|
26602
|
+
services: ["tiktok"]
|
|
26603
|
+
},
|
|
26537
26604
|
bamboohr: {
|
|
26538
26605
|
title: "BambooHR",
|
|
26539
26606
|
iconUrl: "https://icons.generalinput.com/bamboohr.png",
|
|
@@ -26571,25 +26638,6 @@ var OAUTH_PROVIDER_GROUPS = {
|
|
|
26571
26638
|
}
|
|
26572
26639
|
};
|
|
26573
26640
|
|
|
26574
|
-
// ../../packages/api/dist/types/personalOAuthConnection.js
|
|
26575
|
-
var PERSONAL_OAUTH_PROVIDER_GROUPS = {
|
|
26576
|
-
x: {
|
|
26577
|
-
title: "X (Twitter)",
|
|
26578
|
-
iconUrl: "https://icons.generalinput.com/x-twitter.png",
|
|
26579
|
-
services: ["twitter"]
|
|
26580
|
-
},
|
|
26581
|
-
linkedin: {
|
|
26582
|
-
title: "LinkedIn",
|
|
26583
|
-
iconUrl: "https://icons.generalinput.com/linkedin.png",
|
|
26584
|
-
services: ["linkedin", "linkedin-ad-library"]
|
|
26585
|
-
},
|
|
26586
|
-
strava: {
|
|
26587
|
-
title: "Strava",
|
|
26588
|
-
iconUrl: "https://icons.generalinput.com/strava.png",
|
|
26589
|
-
services: ["strava"]
|
|
26590
|
-
}
|
|
26591
|
-
};
|
|
26592
|
-
|
|
26593
26641
|
// ../../packages/api/dist/types/prompt.js
|
|
26594
26642
|
import { z as z45 } from "zod";
|
|
26595
26643
|
var PromptWorkflowTypeSchema = z45.enum(["code", "agent"]);
|
|
@@ -26699,60 +26747,16 @@ var CommandCenterTileLayoutSchema = z48.object({
|
|
|
26699
26747
|
h: z48.number().int().min(1)
|
|
26700
26748
|
});
|
|
26701
26749
|
|
|
26702
|
-
// ../../packages/api/dist/types/cli/exec.js
|
|
26703
|
-
import { z as z49 } from "zod";
|
|
26704
|
-
var CodeExecutionOutputLineSchema = z49.discriminatedUnion("type", [
|
|
26705
|
-
z49.object({
|
|
26706
|
-
type: z49.literal("log"),
|
|
26707
|
-
level: z49.enum(["info", "warn", "error"]),
|
|
26708
|
-
message: z49.string(),
|
|
26709
|
-
data: z49.unknown().optional()
|
|
26710
|
-
}),
|
|
26711
|
-
z49.object({
|
|
26712
|
-
type: z49.literal("result"),
|
|
26713
|
-
data: z49.unknown()
|
|
26714
|
-
}),
|
|
26715
|
-
z49.object({
|
|
26716
|
-
type: z49.literal("error"),
|
|
26717
|
-
error: z49.string(),
|
|
26718
|
-
stack: z49.string().optional()
|
|
26719
|
-
})
|
|
26720
|
-
]);
|
|
26721
|
-
var CodeExecutionResultSchema = z49.discriminatedUnion("success", [
|
|
26722
|
-
z49.object({
|
|
26723
|
-
success: z49.literal(true),
|
|
26724
|
-
result: z49.unknown(),
|
|
26725
|
-
logs: z49.array(z49.object({
|
|
26726
|
-
level: z49.string(),
|
|
26727
|
-
message: z49.string(),
|
|
26728
|
-
data: z49.unknown().optional()
|
|
26729
|
-
})),
|
|
26730
|
-
stderr: z49.string().optional()
|
|
26731
|
-
}),
|
|
26732
|
-
z49.object({
|
|
26733
|
-
success: z49.literal(false),
|
|
26734
|
-
error: z49.string(),
|
|
26735
|
-
logs: z49.array(z49.object({
|
|
26736
|
-
level: z49.string(),
|
|
26737
|
-
message: z49.string(),
|
|
26738
|
-
data: z49.unknown().optional()
|
|
26739
|
-
})),
|
|
26740
|
-
stderr: z49.string().optional()
|
|
26741
|
-
})
|
|
26742
|
-
]);
|
|
26743
|
-
|
|
26744
26750
|
// ../../packages/api/dist/oauthProviderLookup.js
|
|
26745
|
-
|
|
26746
|
-
|
|
26747
|
-
const provider = key;
|
|
26748
|
-
for (const service of group.services) {
|
|
26749
|
-
SERVICE_TO_PROVIDER.set(service, { type: "organization", provider });
|
|
26750
|
-
}
|
|
26751
|
+
function isValidOAuthConnectionProvider(value) {
|
|
26752
|
+
return value in OAUTH_PROVIDER_GROUPS;
|
|
26751
26753
|
}
|
|
26752
|
-
|
|
26753
|
-
|
|
26754
|
-
|
|
26755
|
-
|
|
26754
|
+
var SERVICE_TO_PROVIDER = /* @__PURE__ */ new Map();
|
|
26755
|
+
for (const provider of Object.keys(OAUTH_PROVIDER_GROUPS)) {
|
|
26756
|
+
if (!isValidOAuthConnectionProvider(provider))
|
|
26757
|
+
continue;
|
|
26758
|
+
for (const service of OAUTH_PROVIDER_GROUPS[provider].services) {
|
|
26759
|
+
SERVICE_TO_PROVIDER.set(service, provider);
|
|
26756
26760
|
}
|
|
26757
26761
|
}
|
|
26758
26762
|
|
|
@@ -26766,7 +26770,7 @@ function parseLeadFilterArg(raw) {
|
|
|
26766
26770
|
printError(`Invalid --filter: not valid JSON. Example: ${FILTER_EXAMPLE}`);
|
|
26767
26771
|
exit(ExitCode.InternalError);
|
|
26768
26772
|
}
|
|
26769
|
-
const parsed =
|
|
26773
|
+
const parsed = z49.array(LeadFilterConditionSchema).safeParse(value);
|
|
26770
26774
|
if (!parsed.success) {
|
|
26771
26775
|
const issue = parsed.error.issues[0];
|
|
26772
26776
|
const path = issue?.path.map(String).join(".");
|
|
@@ -28597,7 +28601,7 @@ function installHint(deps) {
|
|
|
28597
28601
|
}
|
|
28598
28602
|
|
|
28599
28603
|
// src/commands/doctor.ts
|
|
28600
|
-
import { existsSync as existsSync6, readFileSync as
|
|
28604
|
+
import { existsSync as existsSync6, readFileSync as readFileSync8 } from "fs";
|
|
28601
28605
|
function registerDoctorCommand(program2) {
|
|
28602
28606
|
program2.command("doctor").description(
|
|
28603
28607
|
"Diagnose your geni setup: required system tools, active session, network reach to the cloud, and skill installation across detected AI agents. Prints a checklist with \u2713/\u2717 for each."
|
|
@@ -28708,7 +28712,7 @@ function skillsCheck() {
|
|
|
28708
28712
|
});
|
|
28709
28713
|
continue;
|
|
28710
28714
|
}
|
|
28711
|
-
const onDisk =
|
|
28715
|
+
const onDisk = readFileSync8(target.path, "utf-8");
|
|
28712
28716
|
if (onDisk === target.expectedMd) {
|
|
28713
28717
|
out.push({
|
|
28714
28718
|
label: `${target.name}: ${target.skill} skill installed`,
|
|
@@ -28750,10 +28754,10 @@ function printReport(checks) {
|
|
|
28750
28754
|
import { spawn as spawn3, execFileSync } from "child_process";
|
|
28751
28755
|
import { realpathSync } from "fs";
|
|
28752
28756
|
import { sep as sep2 } from "path";
|
|
28753
|
-
import { z as
|
|
28757
|
+
import { z as z50 } from "zod";
|
|
28754
28758
|
import semver from "semver";
|
|
28755
28759
|
var PACKAGE_NAME = "@general-input/cli";
|
|
28756
|
-
var registryLatestSchema =
|
|
28760
|
+
var registryLatestSchema = z50.object({ version: z50.string() });
|
|
28757
28761
|
function registerUpgradeCommand(program2) {
|
|
28758
28762
|
program2.command("upgrade").description(
|
|
28759
28763
|
"Upgrade geni to the latest published version. Checks the npm registry and reinstalls via `npm install -g` when this install is npm-managed. Use --check to only report whether a newer version exists."
|