@general-input/cli 0.22.0 → 0.24.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 +1290 -940
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -2236,17 +2236,17 @@ var require_cipherModes = __commonJS({
|
|
|
2236
2236
|
}
|
|
2237
2237
|
};
|
|
2238
2238
|
modes.gcm.prototype.tableMultiply = function(x) {
|
|
2239
|
-
var
|
|
2239
|
+
var z52 = [0, 0, 0, 0];
|
|
2240
2240
|
for (var i = 0; i < 32; ++i) {
|
|
2241
2241
|
var idx = i / 8 | 0;
|
|
2242
2242
|
var x_i = x[idx] >>> (7 - i % 8) * 4 & 15;
|
|
2243
2243
|
var ah = this._m[i][x_i];
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2244
|
+
z52[0] ^= ah[0];
|
|
2245
|
+
z52[1] ^= ah[1];
|
|
2246
|
+
z52[2] ^= ah[2];
|
|
2247
|
+
z52[3] ^= ah[3];
|
|
2248
2248
|
}
|
|
2249
|
-
return
|
|
2249
|
+
return z52;
|
|
2250
2250
|
};
|
|
2251
2251
|
modes.gcm.prototype.ghash = function(h, y, x) {
|
|
2252
2252
|
y[0] ^= x[0];
|
|
@@ -6139,26 +6139,26 @@ var require_jsbn = __commonJS({
|
|
|
6139
6139
|
function bnpIsEven() {
|
|
6140
6140
|
return (this.t > 0 ? this.data[0] & 1 : this.s) == 0;
|
|
6141
6141
|
}
|
|
6142
|
-
function bnpExp(e,
|
|
6142
|
+
function bnpExp(e, z52) {
|
|
6143
6143
|
if (e > 4294967295 || e < 1) return BigInteger.ONE;
|
|
6144
|
-
var r = nbi(), r2 = nbi(), g =
|
|
6144
|
+
var r = nbi(), r2 = nbi(), g = z52.convert(this), i = nbits(e) - 1;
|
|
6145
6145
|
g.copyTo(r);
|
|
6146
6146
|
while (--i >= 0) {
|
|
6147
|
-
|
|
6148
|
-
if ((e & 1 << i) > 0)
|
|
6147
|
+
z52.sqrTo(r, r2);
|
|
6148
|
+
if ((e & 1 << i) > 0) z52.mulTo(r2, g, r);
|
|
6149
6149
|
else {
|
|
6150
6150
|
var t = r;
|
|
6151
6151
|
r = r2;
|
|
6152
6152
|
r2 = t;
|
|
6153
6153
|
}
|
|
6154
6154
|
}
|
|
6155
|
-
return
|
|
6155
|
+
return z52.revert(r);
|
|
6156
6156
|
}
|
|
6157
6157
|
function bnModPowInt(e, m) {
|
|
6158
|
-
var
|
|
6159
|
-
if (e < 256 || m.isEven())
|
|
6160
|
-
else
|
|
6161
|
-
return this.exp(e,
|
|
6158
|
+
var z52;
|
|
6159
|
+
if (e < 256 || m.isEven()) z52 = new Classic(m);
|
|
6160
|
+
else z52 = new Montgomery(m);
|
|
6161
|
+
return this.exp(e, z52);
|
|
6162
6162
|
}
|
|
6163
6163
|
BigInteger.prototype.copyTo = bnpCopyTo;
|
|
6164
6164
|
BigInteger.prototype.fromInt = bnpFromInt;
|
|
@@ -6216,13 +6216,13 @@ var require_jsbn = __commonJS({
|
|
|
6216
6216
|
if (this.signum() == 0 || b < 2 || b > 36) return "0";
|
|
6217
6217
|
var cs = this.chunkSize(b);
|
|
6218
6218
|
var a = Math.pow(b, cs);
|
|
6219
|
-
var d = nbv(a), y = nbi(),
|
|
6220
|
-
this.divRemTo(d, y,
|
|
6219
|
+
var d = nbv(a), y = nbi(), z52 = nbi(), r = "";
|
|
6220
|
+
this.divRemTo(d, y, z52);
|
|
6221
6221
|
while (y.signum() > 0) {
|
|
6222
|
-
r = (a +
|
|
6223
|
-
y.divRemTo(d, y,
|
|
6222
|
+
r = (a + z52.intValue()).toString(b).substr(1) + r;
|
|
6223
|
+
y.divRemTo(d, y, z52);
|
|
6224
6224
|
}
|
|
6225
|
-
return
|
|
6225
|
+
return z52.intValue().toString(b) + r;
|
|
6226
6226
|
}
|
|
6227
6227
|
function bnpFromRadix(s, b) {
|
|
6228
6228
|
this.fromInt(0);
|
|
@@ -6595,7 +6595,7 @@ var require_jsbn = __commonJS({
|
|
|
6595
6595
|
Barrett.prototype.mulTo = barrettMulTo;
|
|
6596
6596
|
Barrett.prototype.sqrTo = barrettSqrTo;
|
|
6597
6597
|
function bnModPow(e, m) {
|
|
6598
|
-
var i = e.bitLength(), k, r = nbv(1),
|
|
6598
|
+
var i = e.bitLength(), k, r = nbv(1), z52;
|
|
6599
6599
|
if (i <= 0) return r;
|
|
6600
6600
|
else if (i < 18) k = 1;
|
|
6601
6601
|
else if (i < 48) k = 3;
|
|
@@ -6603,19 +6603,19 @@ var require_jsbn = __commonJS({
|
|
|
6603
6603
|
else if (i < 768) k = 5;
|
|
6604
6604
|
else k = 6;
|
|
6605
6605
|
if (i < 8)
|
|
6606
|
-
|
|
6606
|
+
z52 = new Classic(m);
|
|
6607
6607
|
else if (m.isEven())
|
|
6608
|
-
|
|
6608
|
+
z52 = new Barrett(m);
|
|
6609
6609
|
else
|
|
6610
|
-
|
|
6610
|
+
z52 = new Montgomery(m);
|
|
6611
6611
|
var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;
|
|
6612
|
-
g[1] =
|
|
6612
|
+
g[1] = z52.convert(this);
|
|
6613
6613
|
if (k > 1) {
|
|
6614
6614
|
var g2 = nbi();
|
|
6615
|
-
|
|
6615
|
+
z52.sqrTo(g[1], g2);
|
|
6616
6616
|
while (n <= km) {
|
|
6617
6617
|
g[n] = nbi();
|
|
6618
|
-
|
|
6618
|
+
z52.mulTo(g2, g[n - 2], g[n]);
|
|
6619
6619
|
n += 2;
|
|
6620
6620
|
}
|
|
6621
6621
|
}
|
|
@@ -6641,20 +6641,20 @@ var require_jsbn = __commonJS({
|
|
|
6641
6641
|
is1 = false;
|
|
6642
6642
|
} else {
|
|
6643
6643
|
while (n > 1) {
|
|
6644
|
-
|
|
6645
|
-
|
|
6644
|
+
z52.sqrTo(r, r2);
|
|
6645
|
+
z52.sqrTo(r2, r);
|
|
6646
6646
|
n -= 2;
|
|
6647
6647
|
}
|
|
6648
|
-
if (n > 0)
|
|
6648
|
+
if (n > 0) z52.sqrTo(r, r2);
|
|
6649
6649
|
else {
|
|
6650
6650
|
t = r;
|
|
6651
6651
|
r = r2;
|
|
6652
6652
|
r2 = t;
|
|
6653
6653
|
}
|
|
6654
|
-
|
|
6654
|
+
z52.mulTo(r2, g[w], r);
|
|
6655
6655
|
}
|
|
6656
6656
|
while (j >= 0 && (e.data[j] & 1 << i) == 0) {
|
|
6657
|
-
|
|
6657
|
+
z52.sqrTo(r, r2);
|
|
6658
6658
|
t = r;
|
|
6659
6659
|
r = r2;
|
|
6660
6660
|
r2 = t;
|
|
@@ -6664,7 +6664,7 @@ var require_jsbn = __commonJS({
|
|
|
6664
6664
|
}
|
|
6665
6665
|
}
|
|
6666
6666
|
}
|
|
6667
|
-
return
|
|
6667
|
+
return z52.revert(r);
|
|
6668
6668
|
}
|
|
6669
6669
|
function bnGCD(a) {
|
|
6670
6670
|
var x = this.s < 0 ? this.negate() : this.clone();
|
|
@@ -18149,6 +18149,54 @@ import { Command as Command4 } from "commander";
|
|
|
18149
18149
|
// src/commands/sharing.ts
|
|
18150
18150
|
import { InvalidArgumentError, Option } from "commander";
|
|
18151
18151
|
|
|
18152
|
+
// ../../packages/api/dist/types/workspaceBrand.js
|
|
18153
|
+
var DEFAULT_BRAND_SCENE_ID = "horizon";
|
|
18154
|
+
var BRAND_ASSET_RULES = {
|
|
18155
|
+
wordmark: {
|
|
18156
|
+
contentTypes: ["image/svg+xml", "image/png", "image/webp", "image/jpeg"],
|
|
18157
|
+
maxBytes: 1024 * 1024
|
|
18158
|
+
},
|
|
18159
|
+
background: {
|
|
18160
|
+
contentTypes: ["image/jpeg", "image/png", "image/webp"],
|
|
18161
|
+
maxBytes: 5 * 1024 * 1024
|
|
18162
|
+
}
|
|
18163
|
+
};
|
|
18164
|
+
|
|
18165
|
+
// ../../packages/api/dist/types/user.js
|
|
18166
|
+
import { z } from "zod";
|
|
18167
|
+
var UserRoleSchema = z.enum([
|
|
18168
|
+
"InstanceOperator",
|
|
18169
|
+
"Owner",
|
|
18170
|
+
"Admin",
|
|
18171
|
+
"Member"
|
|
18172
|
+
]);
|
|
18173
|
+
function parseRoles(raw) {
|
|
18174
|
+
if (!raw)
|
|
18175
|
+
return ["Member"];
|
|
18176
|
+
const parsed = raw.split(",").map((s) => s.trim()).flatMap((s) => {
|
|
18177
|
+
const role = UserRoleSchema.safeParse(s);
|
|
18178
|
+
return role.success ? [role.data] : [];
|
|
18179
|
+
});
|
|
18180
|
+
return parsed.length > 0 ? parsed : ["Member"];
|
|
18181
|
+
}
|
|
18182
|
+
|
|
18183
|
+
// ../../packages/api/dist/types/clientIdentity.js
|
|
18184
|
+
var CLIENT_IDENTITY_HEADER = "X-GI-Client";
|
|
18185
|
+
var CLIENT_VERSION_PATTERN = /^[0-9A-Za-z.+-]{1,32}$/;
|
|
18186
|
+
function readClientVersion(value) {
|
|
18187
|
+
return value && CLIENT_VERSION_PATTERN.test(value) ? value : null;
|
|
18188
|
+
}
|
|
18189
|
+
function formatClientIdentityHeader(identity) {
|
|
18190
|
+
const version = readClientVersion(identity.version);
|
|
18191
|
+
const build = readClientVersion(identity.build);
|
|
18192
|
+
return [
|
|
18193
|
+
identity.kind,
|
|
18194
|
+
...version ? [`version=${version}`] : [],
|
|
18195
|
+
...build ? [`build=${build}`] : [],
|
|
18196
|
+
...identity.isInBackground ? ["state=background"] : []
|
|
18197
|
+
].join("; ");
|
|
18198
|
+
}
|
|
18199
|
+
|
|
18152
18200
|
// ../../packages/api/dist/types/workflowTypeTraits.js
|
|
18153
18201
|
var WORKFLOW_TYPE_KINDS = ["workflow", "app", "design"];
|
|
18154
18202
|
var WORKFLOW_TYPE_COLLECTIONS = [
|
|
@@ -18506,6 +18554,20 @@ var CLIENT_KNOWN_TYPE_ROWS = {
|
|
|
18506
18554
|
known: ["app", "design", "skill", "specialist", "workflow"]
|
|
18507
18555
|
}
|
|
18508
18556
|
],
|
|
18557
|
+
"SharedResourceLeaveApiClient.previewDeclineShareNotice": [
|
|
18558
|
+
{
|
|
18559
|
+
rows: ["dependents", "*"],
|
|
18560
|
+
field: ["workflowType"],
|
|
18561
|
+
known: ["agent", "app", "code", "design"]
|
|
18562
|
+
}
|
|
18563
|
+
],
|
|
18564
|
+
"SharedResourceLeaveApiClient.previewLeave": [
|
|
18565
|
+
{
|
|
18566
|
+
rows: ["dependents", "*"],
|
|
18567
|
+
field: ["workflowType"],
|
|
18568
|
+
known: ["agent", "app", "code", "design"]
|
|
18569
|
+
}
|
|
18570
|
+
],
|
|
18509
18571
|
"SpecialistTemplatesApiClient.getDetail": [
|
|
18510
18572
|
{
|
|
18511
18573
|
rows: ["page", "plannedResources", "*"],
|
|
@@ -18840,18 +18902,19 @@ function admitKnownRows(value, method) {
|
|
|
18840
18902
|
}
|
|
18841
18903
|
|
|
18842
18904
|
// ../../packages/core/dist/types/platform.js
|
|
18843
|
-
import { z } from "zod";
|
|
18844
|
-
var CredentialTypeSchema =
|
|
18905
|
+
import { z as z2 } from "zod";
|
|
18906
|
+
var CredentialTypeSchema = z2.enum([
|
|
18845
18907
|
"oauth2",
|
|
18846
18908
|
"apiKey",
|
|
18847
18909
|
"platform",
|
|
18848
18910
|
"platformResource",
|
|
18849
18911
|
"noAuth"
|
|
18850
18912
|
]);
|
|
18851
|
-
var PlatformServiceSchema =
|
|
18913
|
+
var PlatformServiceSchema = z2.enum([
|
|
18852
18914
|
"chat-completion",
|
|
18853
18915
|
"decision",
|
|
18854
18916
|
"search-internet",
|
|
18917
|
+
"image-search",
|
|
18855
18918
|
"proxy-scrape",
|
|
18856
18919
|
"generate-image",
|
|
18857
18920
|
"geolocation",
|
|
@@ -18862,75 +18925,75 @@ var PlatformServiceSchema = z.enum([
|
|
|
18862
18925
|
"workspace-members",
|
|
18863
18926
|
"notifications"
|
|
18864
18927
|
]);
|
|
18865
|
-
var PlatformResourceKindSchema =
|
|
18928
|
+
var PlatformResourceKindSchema = z2.enum([
|
|
18866
18929
|
"user-database",
|
|
18867
18930
|
"browser-profile",
|
|
18868
18931
|
"user-storage"
|
|
18869
18932
|
]);
|
|
18870
18933
|
|
|
18871
18934
|
// ../../packages/core/dist/types/proxyScrape.js
|
|
18872
|
-
import { z as
|
|
18873
|
-
var ProxyScrapeResponseSchema =
|
|
18874
|
-
content:
|
|
18875
|
-
statusCode:
|
|
18935
|
+
import { z as z3 } from "zod";
|
|
18936
|
+
var ProxyScrapeResponseSchema = z3.object({
|
|
18937
|
+
content: z3.string(),
|
|
18938
|
+
statusCode: z3.number(),
|
|
18876
18939
|
/** Fetched without JS rendering and the page came back as an empty app shell. */
|
|
18877
|
-
isLikelyJsShell:
|
|
18940
|
+
isLikelyJsShell: z3.boolean().optional()
|
|
18878
18941
|
});
|
|
18879
|
-
var ProxyScrapeFailureReasonSchema =
|
|
18942
|
+
var ProxyScrapeFailureReasonSchema = z3.enum([
|
|
18880
18943
|
"blocked",
|
|
18881
18944
|
"bad-request",
|
|
18882
18945
|
"provider-error",
|
|
18883
18946
|
"timeout",
|
|
18884
18947
|
"not-offered"
|
|
18885
18948
|
]);
|
|
18886
|
-
var ProxyScrapeErrorBodySchema =
|
|
18887
|
-
error:
|
|
18949
|
+
var ProxyScrapeErrorBodySchema = z3.object({
|
|
18950
|
+
error: z3.string(),
|
|
18888
18951
|
reason: ProxyScrapeFailureReasonSchema
|
|
18889
18952
|
});
|
|
18890
18953
|
|
|
18891
18954
|
// ../../packages/core/dist/types/trigger.js
|
|
18892
|
-
import { z as
|
|
18893
|
-
var TriggerTypeSchema =
|
|
18894
|
-
var TriggerConfigSchema =
|
|
18895
|
-
|
|
18896
|
-
type:
|
|
18897
|
-
payloadSchema:
|
|
18955
|
+
import { z as z4 } from "zod";
|
|
18956
|
+
var TriggerTypeSchema = z4.enum(["webhook", "cron", "poll"]);
|
|
18957
|
+
var TriggerConfigSchema = z4.discriminatedUnion("type", [
|
|
18958
|
+
z4.object({
|
|
18959
|
+
type: z4.literal("webhook"),
|
|
18960
|
+
payloadSchema: z4.record(z4.string(), z4.unknown()).optional()
|
|
18898
18961
|
}),
|
|
18899
|
-
|
|
18900
|
-
type:
|
|
18901
|
-
schedule:
|
|
18902
|
-
timezone:
|
|
18962
|
+
z4.object({
|
|
18963
|
+
type: z4.literal("cron"),
|
|
18964
|
+
schedule: z4.string(),
|
|
18965
|
+
timezone: z4.string().optional()
|
|
18903
18966
|
}),
|
|
18904
|
-
|
|
18905
|
-
type:
|
|
18906
|
-
triggerId:
|
|
18967
|
+
z4.object({
|
|
18968
|
+
type: z4.literal("poll"),
|
|
18969
|
+
triggerId: z4.string()
|
|
18907
18970
|
})
|
|
18908
18971
|
]);
|
|
18909
18972
|
|
|
18910
18973
|
// ../../packages/core/dist/types/artifact.js
|
|
18911
|
-
import { z as
|
|
18912
|
-
var ArtifactMetaSchema =
|
|
18913
|
-
filename:
|
|
18914
|
-
mimeType:
|
|
18915
|
-
label:
|
|
18916
|
-
sizeBytes:
|
|
18974
|
+
import { z as z5 } from "zod";
|
|
18975
|
+
var ArtifactMetaSchema = z5.object({
|
|
18976
|
+
filename: z5.string(),
|
|
18977
|
+
mimeType: z5.string(),
|
|
18978
|
+
label: z5.string(),
|
|
18979
|
+
sizeBytes: z5.number().nullable()
|
|
18917
18980
|
});
|
|
18918
|
-
var WriteArtifactOptionsSchema =
|
|
18919
|
-
filename:
|
|
18920
|
-
mimeType:
|
|
18921
|
-
label:
|
|
18981
|
+
var WriteArtifactOptionsSchema = z5.object({
|
|
18982
|
+
filename: z5.string(),
|
|
18983
|
+
mimeType: z5.string(),
|
|
18984
|
+
label: z5.string(),
|
|
18922
18985
|
// `z.instanceof(Buffer)` evaluates the `Buffer` constructor at module
|
|
18923
18986
|
// load — that crashes in the browser, where `Buffer` is undefined,
|
|
18924
18987
|
// any time something pulls in `@general-input/core` transitively (e.g.
|
|
18925
18988
|
// a value re-export from `@packages/api`). Use a guarded predicate
|
|
18926
18989
|
// instead so the schema is safe to define anywhere; the check still
|
|
18927
18990
|
// runs correctly when actually parsed in Node.
|
|
18928
|
-
data:
|
|
18991
|
+
data: z5.custom((value) => typeof Buffer !== "undefined" && value instanceof Buffer, "Expected a Buffer")
|
|
18929
18992
|
});
|
|
18930
18993
|
|
|
18931
18994
|
// ../../packages/core/dist/types/run.js
|
|
18932
|
-
import { z as
|
|
18933
|
-
var RunStatusSchema =
|
|
18995
|
+
import { z as z6 } from "zod";
|
|
18996
|
+
var RunStatusSchema = z6.enum([
|
|
18934
18997
|
"pending",
|
|
18935
18998
|
"running",
|
|
18936
18999
|
"awaiting_input",
|
|
@@ -18940,57 +19003,57 @@ var RunStatusSchema = z5.enum([
|
|
|
18940
19003
|
"filtered",
|
|
18941
19004
|
"skipped"
|
|
18942
19005
|
]);
|
|
18943
|
-
var LogEntrySchema =
|
|
18944
|
-
timestamp:
|
|
18945
|
-
level:
|
|
18946
|
-
message:
|
|
18947
|
-
data:
|
|
19006
|
+
var LogEntrySchema = z6.object({
|
|
19007
|
+
timestamp: z6.string(),
|
|
19008
|
+
level: z6.enum(["debug", "info", "warn", "error"]),
|
|
19009
|
+
message: z6.string(),
|
|
19010
|
+
data: z6.unknown().optional()
|
|
18948
19011
|
});
|
|
18949
|
-
var ExecutionStepSchema =
|
|
18950
|
-
message:
|
|
18951
|
-
timestamp:
|
|
19012
|
+
var ExecutionStepSchema = z6.object({
|
|
19013
|
+
message: z6.string(),
|
|
19014
|
+
timestamp: z6.string()
|
|
18952
19015
|
});
|
|
18953
|
-
var CredentialSnapshotEntrySchema =
|
|
18954
|
-
inputKey:
|
|
18955
|
-
service:
|
|
18956
|
-
credentialId:
|
|
18957
|
-
credentialTitle:
|
|
18958
|
-
iconUrl:
|
|
19016
|
+
var CredentialSnapshotEntrySchema = z6.object({
|
|
19017
|
+
inputKey: z6.string(),
|
|
19018
|
+
service: z6.string(),
|
|
19019
|
+
credentialId: z6.string(),
|
|
19020
|
+
credentialTitle: z6.string(),
|
|
19021
|
+
iconUrl: z6.string().optional()
|
|
18959
19022
|
});
|
|
18960
|
-
var PlatformIntegrationSnapshotEntrySchema =
|
|
18961
|
-
service:
|
|
18962
|
-
title:
|
|
18963
|
-
iconUrl:
|
|
18964
|
-
estimatedCostDisplay:
|
|
19023
|
+
var PlatformIntegrationSnapshotEntrySchema = z6.object({
|
|
19024
|
+
service: z6.string(),
|
|
19025
|
+
title: z6.string(),
|
|
19026
|
+
iconUrl: z6.string(),
|
|
19027
|
+
estimatedCostDisplay: z6.string()
|
|
18965
19028
|
});
|
|
18966
|
-
var ConstSnapshotEntrySchema =
|
|
18967
|
-
key:
|
|
18968
|
-
title:
|
|
18969
|
-
value:
|
|
19029
|
+
var ConstSnapshotEntrySchema = z6.object({
|
|
19030
|
+
key: z6.string(),
|
|
19031
|
+
title: z6.string(),
|
|
19032
|
+
value: z6.unknown()
|
|
18970
19033
|
});
|
|
18971
|
-
var WorkflowSnapshotSchema =
|
|
18972
|
-
id:
|
|
18973
|
-
name:
|
|
18974
|
-
description:
|
|
19034
|
+
var WorkflowSnapshotSchema = z6.object({
|
|
19035
|
+
id: z6.string(),
|
|
19036
|
+
name: z6.string(),
|
|
19037
|
+
description: z6.string()
|
|
18975
19038
|
});
|
|
18976
|
-
var WorkflowTypeSchema =
|
|
18977
|
-
var HumanInLoopNotifyChannelSchema =
|
|
19039
|
+
var WorkflowTypeSchema = z6.enum(["code", "agent", "app", "design"]);
|
|
19040
|
+
var HumanInLoopNotifyChannelSchema = z6.enum([
|
|
18978
19041
|
"email",
|
|
18979
19042
|
"slack",
|
|
18980
19043
|
"push",
|
|
18981
19044
|
"browser"
|
|
18982
19045
|
]);
|
|
18983
19046
|
var ALL_CONNECTED_NOTIFY = "all-connected";
|
|
18984
|
-
var HumanInLoopNotifySchema =
|
|
18985
|
-
|
|
18986
|
-
|
|
19047
|
+
var HumanInLoopNotifySchema = z6.union([
|
|
19048
|
+
z6.literal(ALL_CONNECTED_NOTIFY),
|
|
19049
|
+
z6.array(HumanInLoopNotifyChannelSchema)
|
|
18987
19050
|
]);
|
|
18988
|
-
var AgentHumanInLoopConfigSchema =
|
|
18989
|
-
enabled:
|
|
19051
|
+
var AgentHumanInLoopConfigSchema = z6.object({
|
|
19052
|
+
enabled: z6.boolean(),
|
|
18990
19053
|
// Defaults to empty so `{ "enabled": false }` — the natural shorthand for a
|
|
18991
19054
|
// fully autonomous workflow — validates without the ceremony of an empty
|
|
18992
19055
|
// string the author has no reason to type.
|
|
18993
|
-
instructions:
|
|
19056
|
+
instructions: z6.string().default(""),
|
|
18994
19057
|
// The default also covers configs written before the field, so a paused run reaches someone who never opens the app.
|
|
18995
19058
|
notify: HumanInLoopNotifySchema.default(ALL_CONNECTED_NOTIFY)
|
|
18996
19059
|
});
|
|
@@ -19001,200 +19064,200 @@ function autonomousHumanInLoopConfig() {
|
|
|
19001
19064
|
notify: ALL_CONNECTED_NOTIFY
|
|
19002
19065
|
};
|
|
19003
19066
|
}
|
|
19004
|
-
var AgentConfigSnapshotSchema =
|
|
19005
|
-
model:
|
|
19006
|
-
modelDisplayName:
|
|
19067
|
+
var AgentConfigSnapshotSchema = z6.object({
|
|
19068
|
+
model: z6.string(),
|
|
19069
|
+
modelDisplayName: z6.string(),
|
|
19007
19070
|
// Default keeps snapshots written before iconId was captured parseable.
|
|
19008
|
-
modelIconId:
|
|
19009
|
-
maxTimeMinutes:
|
|
19010
|
-
effort:
|
|
19071
|
+
modelIconId: z6.string().default("custom"),
|
|
19072
|
+
maxTimeMinutes: z6.number(),
|
|
19073
|
+
effort: z6.string().optional(),
|
|
19011
19074
|
// Default keeps run files written before HITL existed parseable.
|
|
19012
19075
|
humanInLoop: AgentHumanInLoopConfigSchema.default(autonomousHumanInLoopConfig)
|
|
19013
19076
|
});
|
|
19014
|
-
var WorkflowRunStatusSchema =
|
|
19015
|
-
id:
|
|
19016
|
-
workflowId:
|
|
19077
|
+
var WorkflowRunStatusSchema = z6.object({
|
|
19078
|
+
id: z6.string(),
|
|
19079
|
+
workflowId: z6.string(),
|
|
19017
19080
|
workflowType: WorkflowTypeSchema.default("code"),
|
|
19018
19081
|
workflow: WorkflowSnapshotSchema,
|
|
19019
19082
|
status: RunStatusSchema,
|
|
19020
|
-
trigger:
|
|
19021
|
-
id:
|
|
19022
|
-
payload:
|
|
19083
|
+
trigger: z6.object({
|
|
19084
|
+
id: z6.string(),
|
|
19085
|
+
payload: z6.unknown()
|
|
19023
19086
|
}).optional(),
|
|
19024
19087
|
// What the workflow received (trigger is what fired it; absent for
|
|
19025
19088
|
// manual runs). Optional: run files written before this field exist.
|
|
19026
|
-
input:
|
|
19027
|
-
startedAt:
|
|
19028
|
-
completedAt:
|
|
19029
|
-
error:
|
|
19030
|
-
steps:
|
|
19031
|
-
logs:
|
|
19032
|
-
artifacts:
|
|
19033
|
-
constSnapshot:
|
|
19034
|
-
credentialSnapshot:
|
|
19035
|
-
platformIntegrationSnapshot:
|
|
19089
|
+
input: z6.unknown().optional(),
|
|
19090
|
+
startedAt: z6.string().optional(),
|
|
19091
|
+
completedAt: z6.string().optional(),
|
|
19092
|
+
error: z6.string().optional(),
|
|
19093
|
+
steps: z6.array(ExecutionStepSchema).optional(),
|
|
19094
|
+
logs: z6.array(LogEntrySchema),
|
|
19095
|
+
artifacts: z6.array(ArtifactMetaSchema),
|
|
19096
|
+
constSnapshot: z6.array(ConstSnapshotEntrySchema).optional(),
|
|
19097
|
+
credentialSnapshot: z6.array(CredentialSnapshotEntrySchema).optional(),
|
|
19098
|
+
platformIntegrationSnapshot: z6.array(PlatformIntegrationSnapshotEntrySchema).optional(),
|
|
19036
19099
|
agentConfigSnapshot: AgentConfigSnapshotSchema.optional()
|
|
19037
19100
|
});
|
|
19038
19101
|
|
|
19039
19102
|
// ../../packages/core/dist/types/execution.js
|
|
19040
|
-
import { z as
|
|
19103
|
+
import { z as z9 } from "zod";
|
|
19041
19104
|
|
|
19042
19105
|
// ../../packages/core/dist/types/filter.js
|
|
19043
|
-
import { z as
|
|
19044
|
-
var WorkflowExecutionModeSchema =
|
|
19045
|
-
var WorkflowFilterDecisionSchema =
|
|
19046
|
-
|
|
19047
|
-
decision:
|
|
19048
|
-
reason:
|
|
19106
|
+
import { z as z7 } from "zod";
|
|
19107
|
+
var WorkflowExecutionModeSchema = z7.enum(["run", "filter", "sources"]);
|
|
19108
|
+
var WorkflowFilterDecisionSchema = z7.discriminatedUnion("decision", [
|
|
19109
|
+
z7.object({
|
|
19110
|
+
decision: z7.literal("skip"),
|
|
19111
|
+
reason: z7.string().min(1)
|
|
19049
19112
|
}),
|
|
19050
|
-
|
|
19051
|
-
decision:
|
|
19052
|
-
reason:
|
|
19113
|
+
z7.object({
|
|
19114
|
+
decision: z7.literal("run"),
|
|
19115
|
+
reason: z7.string().optional(),
|
|
19053
19116
|
/** Replaces the trigger payload for the run. Omit to pass it through. */
|
|
19054
|
-
input:
|
|
19117
|
+
input: z7.unknown().optional()
|
|
19055
19118
|
})
|
|
19056
19119
|
]);
|
|
19057
19120
|
|
|
19058
19121
|
// ../../packages/core/dist/types/designSources.js
|
|
19059
|
-
import { z as
|
|
19122
|
+
import { z as z8 } from "zod";
|
|
19060
19123
|
var MAX_DESIGN_SOURCE_BYTES = 5 * 1024 * 1024;
|
|
19061
19124
|
var DESIGN_SOURCE_TIMEOUT_MS = 2 * 6e4;
|
|
19062
|
-
var DesignSourceOutcomeSchema =
|
|
19063
|
-
|
|
19064
|
-
status:
|
|
19065
|
-
value:
|
|
19066
|
-
durationMs:
|
|
19125
|
+
var DesignSourceOutcomeSchema = z8.discriminatedUnion("status", [
|
|
19126
|
+
z8.object({
|
|
19127
|
+
status: z8.literal("ok"),
|
|
19128
|
+
value: z8.unknown(),
|
|
19129
|
+
durationMs: z8.number()
|
|
19067
19130
|
}),
|
|
19068
|
-
|
|
19069
|
-
status:
|
|
19070
|
-
error:
|
|
19071
|
-
durationMs:
|
|
19131
|
+
z8.object({
|
|
19132
|
+
status: z8.literal("failed"),
|
|
19133
|
+
error: z8.string(),
|
|
19134
|
+
durationMs: z8.number()
|
|
19072
19135
|
})
|
|
19073
19136
|
]);
|
|
19074
|
-
var DesignSourceResultsSchema =
|
|
19137
|
+
var DesignSourceResultsSchema = z8.record(z8.string(), DesignSourceOutcomeSchema);
|
|
19075
19138
|
|
|
19076
19139
|
// ../../packages/core/dist/types/execution.js
|
|
19077
|
-
var EgressRequesterAllowerSchema =
|
|
19078
|
-
var EgressBlockSourceSchema =
|
|
19079
|
-
|
|
19080
|
-
layer:
|
|
19081
|
-
settingsUrl:
|
|
19082
|
-
allower:
|
|
19140
|
+
var EgressRequesterAllowerSchema = z9.object({ kind: z9.literal("requester") });
|
|
19141
|
+
var EgressBlockSourceSchema = z9.discriminatedUnion("layer", [
|
|
19142
|
+
z9.object({
|
|
19143
|
+
layer: z9.literal("workspace"),
|
|
19144
|
+
settingsUrl: z9.string(),
|
|
19145
|
+
allower: z9.discriminatedUnion("kind", [
|
|
19083
19146
|
EgressRequesterAllowerSchema,
|
|
19084
|
-
|
|
19147
|
+
z9.object({ kind: z9.literal("workspace_admins") })
|
|
19085
19148
|
])
|
|
19086
19149
|
}),
|
|
19087
|
-
|
|
19088
|
-
layer:
|
|
19089
|
-
settingsUrl:
|
|
19090
|
-
allower:
|
|
19150
|
+
z9.object({
|
|
19151
|
+
layer: z9.literal("credential"),
|
|
19152
|
+
settingsUrl: z9.string(),
|
|
19153
|
+
allower: z9.discriminatedUnion("kind", [
|
|
19091
19154
|
EgressRequesterAllowerSchema,
|
|
19092
|
-
|
|
19155
|
+
z9.object({ kind: z9.literal("connection_owner"), name: z9.string() })
|
|
19093
19156
|
])
|
|
19094
19157
|
})
|
|
19095
19158
|
]);
|
|
19096
|
-
var ExecutionEgressPolicySchema =
|
|
19097
|
-
unmatched:
|
|
19098
|
-
credentials:
|
|
19099
|
-
inputKey:
|
|
19100
|
-
service:
|
|
19101
|
-
hosts:
|
|
19102
|
-
deny:
|
|
19103
|
-
method:
|
|
19104
|
-
pathTemplate:
|
|
19105
|
-
opId:
|
|
19106
|
-
title:
|
|
19159
|
+
var ExecutionEgressPolicySchema = z9.object({
|
|
19160
|
+
unmatched: z9.literal("allow_log"),
|
|
19161
|
+
credentials: z9.array(z9.object({
|
|
19162
|
+
inputKey: z9.string(),
|
|
19163
|
+
service: z9.string(),
|
|
19164
|
+
hosts: z9.array(z9.string()),
|
|
19165
|
+
deny: z9.array(z9.object({
|
|
19166
|
+
method: z9.string(),
|
|
19167
|
+
pathTemplate: z9.string(),
|
|
19168
|
+
opId: z9.string(),
|
|
19169
|
+
title: z9.string(),
|
|
19107
19170
|
// Description only: missing (older server) or unreadable (newer one)
|
|
19108
19171
|
// drops to [] so it can never void the policy and stop enforcement.
|
|
19109
|
-
blockedBy:
|
|
19172
|
+
blockedBy: z9.array(EgressBlockSourceSchema).catch([])
|
|
19110
19173
|
}))
|
|
19111
19174
|
}))
|
|
19112
19175
|
});
|
|
19113
|
-
var ExecutionPayloadSchema =
|
|
19114
|
-
executionId:
|
|
19115
|
-
workflowId:
|
|
19116
|
-
input:
|
|
19117
|
-
credentials:
|
|
19118
|
-
platformCredentials:
|
|
19119
|
-
consts:
|
|
19120
|
-
platformAuth:
|
|
19121
|
-
platformApiKey:
|
|
19122
|
-
platformBaseUrl:
|
|
19123
|
-
membershipId:
|
|
19176
|
+
var ExecutionPayloadSchema = z9.object({
|
|
19177
|
+
executionId: z9.string(),
|
|
19178
|
+
workflowId: z9.string(),
|
|
19179
|
+
input: z9.unknown(),
|
|
19180
|
+
credentials: z9.record(z9.string(), z9.record(z9.string(), z9.unknown())),
|
|
19181
|
+
platformCredentials: z9.record(z9.string(), z9.record(z9.string(), z9.unknown())),
|
|
19182
|
+
consts: z9.record(z9.string(), z9.unknown()),
|
|
19183
|
+
platformAuth: z9.object({
|
|
19184
|
+
platformApiKey: z9.string(),
|
|
19185
|
+
platformBaseUrl: z9.string(),
|
|
19186
|
+
membershipId: z9.string(),
|
|
19124
19187
|
// The resources this key may touch. Null means the run declared no
|
|
19125
19188
|
// resource slots and keeps unscoped access.
|
|
19126
|
-
boundResourceIds:
|
|
19189
|
+
boundResourceIds: z9.array(z9.string()).nullable()
|
|
19127
19190
|
}),
|
|
19128
|
-
trigger:
|
|
19129
|
-
id:
|
|
19130
|
-
key:
|
|
19131
|
-
payload:
|
|
19191
|
+
trigger: z9.object({
|
|
19192
|
+
id: z9.string(),
|
|
19193
|
+
key: z9.string(),
|
|
19194
|
+
payload: z9.unknown()
|
|
19132
19195
|
}).optional(),
|
|
19133
19196
|
egressPolicy: ExecutionEgressPolicySchema.optional()
|
|
19134
19197
|
});
|
|
19135
|
-
var ExecutionEventSchema =
|
|
19136
|
-
|
|
19137
|
-
type:
|
|
19138
|
-
executionId:
|
|
19139
|
-
workflowId:
|
|
19198
|
+
var ExecutionEventSchema = z9.discriminatedUnion("type", [
|
|
19199
|
+
z9.object({
|
|
19200
|
+
type: z9.literal("run:started"),
|
|
19201
|
+
executionId: z9.string(),
|
|
19202
|
+
workflowId: z9.string()
|
|
19140
19203
|
}),
|
|
19141
|
-
|
|
19142
|
-
|
|
19143
|
-
type:
|
|
19144
|
-
executionId:
|
|
19145
|
-
error:
|
|
19204
|
+
z9.object({ type: z9.literal("run:completed"), executionId: z9.string() }),
|
|
19205
|
+
z9.object({
|
|
19206
|
+
type: z9.literal("run:failed"),
|
|
19207
|
+
executionId: z9.string(),
|
|
19208
|
+
error: z9.string()
|
|
19146
19209
|
}),
|
|
19147
|
-
|
|
19148
|
-
type:
|
|
19149
|
-
executionId:
|
|
19150
|
-
message:
|
|
19210
|
+
z9.object({
|
|
19211
|
+
type: z9.literal("step"),
|
|
19212
|
+
executionId: z9.string(),
|
|
19213
|
+
message: z9.string()
|
|
19151
19214
|
}),
|
|
19152
|
-
|
|
19153
|
-
type:
|
|
19154
|
-
executionId:
|
|
19215
|
+
z9.object({
|
|
19216
|
+
type: z9.literal("artifact:written"),
|
|
19217
|
+
executionId: z9.string(),
|
|
19155
19218
|
artifact: ArtifactMetaSchema
|
|
19156
19219
|
}),
|
|
19157
|
-
|
|
19158
|
-
type:
|
|
19159
|
-
executionId:
|
|
19220
|
+
z9.object({
|
|
19221
|
+
type: z9.literal("log"),
|
|
19222
|
+
executionId: z9.string(),
|
|
19160
19223
|
entry: LogEntrySchema
|
|
19161
19224
|
}),
|
|
19162
|
-
|
|
19163
|
-
type:
|
|
19164
|
-
executionId:
|
|
19225
|
+
z9.object({
|
|
19226
|
+
type: z9.literal("filter:decision"),
|
|
19227
|
+
executionId: z9.string(),
|
|
19165
19228
|
decision: WorkflowFilterDecisionSchema
|
|
19166
19229
|
}),
|
|
19167
19230
|
// A large decision spills to an artifact rather than the stdout event stream:
|
|
19168
19231
|
// a line long enough to span chunks can arrive corrupted, and one the consumer
|
|
19169
19232
|
// cannot parse reads as "no decision" and fails the filter open.
|
|
19170
|
-
|
|
19171
|
-
type:
|
|
19172
|
-
executionId:
|
|
19173
|
-
filename:
|
|
19233
|
+
z9.object({
|
|
19234
|
+
type: z9.literal("filter:decision-artifact"),
|
|
19235
|
+
executionId: z9.string(),
|
|
19236
|
+
filename: z9.string()
|
|
19174
19237
|
}),
|
|
19175
|
-
|
|
19176
|
-
type:
|
|
19177
|
-
executionId:
|
|
19238
|
+
z9.object({
|
|
19239
|
+
type: z9.literal("sources:results"),
|
|
19240
|
+
executionId: z9.string(),
|
|
19178
19241
|
results: DesignSourceResultsSchema
|
|
19179
19242
|
}),
|
|
19180
19243
|
// Large results spill to an artifact for the same reason a filter decision does.
|
|
19181
|
-
|
|
19182
|
-
type:
|
|
19183
|
-
executionId:
|
|
19184
|
-
filename:
|
|
19244
|
+
z9.object({
|
|
19245
|
+
type: z9.literal("sources:results-artifact"),
|
|
19246
|
+
executionId: z9.string(),
|
|
19247
|
+
filename: z9.string()
|
|
19185
19248
|
}),
|
|
19186
19249
|
// An event line arrived unparseable. Emitted by the provider, never by the
|
|
19187
19250
|
// sandbox: it means bytes were lost in transport, which is not the same thing
|
|
19188
19251
|
// as the workflow having produced nothing.
|
|
19189
|
-
|
|
19190
|
-
type:
|
|
19191
|
-
executionId:
|
|
19192
|
-
byteLength:
|
|
19252
|
+
z9.object({
|
|
19253
|
+
type: z9.literal("stream:corrupt"),
|
|
19254
|
+
executionId: z9.string(),
|
|
19255
|
+
byteLength: z9.number()
|
|
19193
19256
|
})
|
|
19194
19257
|
]);
|
|
19195
19258
|
|
|
19196
19259
|
// ../../packages/core/dist/types/manifest.js
|
|
19197
|
-
import { z as
|
|
19260
|
+
import { z as z10 } from "zod";
|
|
19198
19261
|
|
|
19199
19262
|
// ../../packages/workflow-doc-schema/dist/nodeTypes.js
|
|
19200
19263
|
var WORKFLOW_CUSTOM_NODE_TYPES = {
|
|
@@ -19223,69 +19286,69 @@ var ALLOWED_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
|
19223
19286
|
]);
|
|
19224
19287
|
|
|
19225
19288
|
// ../../packages/core/dist/types/manifest.js
|
|
19226
|
-
var TriggerBlockSchema =
|
|
19227
|
-
type:
|
|
19228
|
-
attrs:
|
|
19229
|
-
id:
|
|
19230
|
-
triggerId:
|
|
19231
|
-
service:
|
|
19232
|
-
event:
|
|
19289
|
+
var TriggerBlockSchema = z10.object({
|
|
19290
|
+
type: z10.literal(WORKFLOW_CUSTOM_NODE_TYPES.trigger),
|
|
19291
|
+
attrs: z10.object({
|
|
19292
|
+
id: z10.string(),
|
|
19293
|
+
triggerId: z10.string().optional(),
|
|
19294
|
+
service: z10.string(),
|
|
19295
|
+
event: z10.string()
|
|
19233
19296
|
})
|
|
19234
19297
|
});
|
|
19235
|
-
var InputSchemaBlockSchema =
|
|
19236
|
-
type:
|
|
19237
|
-
attrs:
|
|
19238
|
-
schema:
|
|
19298
|
+
var InputSchemaBlockSchema = z10.object({
|
|
19299
|
+
type: z10.literal(WORKFLOW_CUSTOM_NODE_TYPES.inputSchema),
|
|
19300
|
+
attrs: z10.object({
|
|
19301
|
+
schema: z10.record(z10.string(), z10.unknown())
|
|
19239
19302
|
})
|
|
19240
19303
|
});
|
|
19241
|
-
var CredentialBlockSchema =
|
|
19242
|
-
type:
|
|
19243
|
-
attrs:
|
|
19244
|
-
service:
|
|
19245
|
-
inputKey:
|
|
19304
|
+
var CredentialBlockSchema = z10.object({
|
|
19305
|
+
type: z10.literal(WORKFLOW_CUSTOM_NODE_TYPES.credential),
|
|
19306
|
+
attrs: z10.object({
|
|
19307
|
+
service: z10.string(),
|
|
19308
|
+
inputKey: z10.string(),
|
|
19246
19309
|
// Absent or false = required. Optional credentials may be left unconnected;
|
|
19247
19310
|
// the workflow handles their absence at runtime (hasCredential).
|
|
19248
|
-
optional:
|
|
19311
|
+
optional: z10.boolean().optional()
|
|
19249
19312
|
})
|
|
19250
19313
|
});
|
|
19251
|
-
var PlatformCredentialBlockSchema =
|
|
19252
|
-
type:
|
|
19253
|
-
attrs:
|
|
19314
|
+
var PlatformCredentialBlockSchema = z10.object({
|
|
19315
|
+
type: z10.literal(WORKFLOW_CUSTOM_NODE_TYPES.platformCredential),
|
|
19316
|
+
attrs: z10.object({
|
|
19254
19317
|
service: PlatformServiceSchema,
|
|
19255
|
-
inputKey:
|
|
19318
|
+
inputKey: z10.string()
|
|
19256
19319
|
})
|
|
19257
19320
|
});
|
|
19258
|
-
var ConstBlockSchema =
|
|
19259
|
-
type:
|
|
19260
|
-
attrs:
|
|
19261
|
-
key:
|
|
19262
|
-
schema:
|
|
19321
|
+
var ConstBlockSchema = z10.object({
|
|
19322
|
+
type: z10.literal(WORKFLOW_CUSTOM_NODE_TYPES.const),
|
|
19323
|
+
attrs: z10.object({
|
|
19324
|
+
key: z10.string(),
|
|
19325
|
+
schema: z10.record(z10.string(), z10.unknown())
|
|
19263
19326
|
})
|
|
19264
19327
|
});
|
|
19265
|
-
var WorkflowManifestSchema =
|
|
19266
|
-
name:
|
|
19267
|
-
description:
|
|
19328
|
+
var WorkflowManifestSchema = z10.object({
|
|
19329
|
+
name: z10.string().optional(),
|
|
19330
|
+
description: z10.string().optional(),
|
|
19268
19331
|
/** The document declares a filter, so `filter.ts` gates every run. */
|
|
19269
|
-
hasFilter:
|
|
19270
|
-
triggers:
|
|
19271
|
-
id:
|
|
19272
|
-
triggerId:
|
|
19273
|
-
service:
|
|
19274
|
-
event:
|
|
19332
|
+
hasFilter: z10.boolean(),
|
|
19333
|
+
triggers: z10.array(z10.object({
|
|
19334
|
+
id: z10.string(),
|
|
19335
|
+
triggerId: z10.string().optional(),
|
|
19336
|
+
service: z10.string(),
|
|
19337
|
+
event: z10.string()
|
|
19275
19338
|
})),
|
|
19276
|
-
inputSchema:
|
|
19277
|
-
credentials:
|
|
19278
|
-
service:
|
|
19279
|
-
inputKey:
|
|
19280
|
-
optional:
|
|
19339
|
+
inputSchema: z10.record(z10.string(), z10.unknown()).optional(),
|
|
19340
|
+
credentials: z10.array(z10.object({
|
|
19341
|
+
service: z10.string(),
|
|
19342
|
+
inputKey: z10.string(),
|
|
19343
|
+
optional: z10.boolean().optional()
|
|
19281
19344
|
})),
|
|
19282
|
-
platformCredentials:
|
|
19345
|
+
platformCredentials: z10.array(z10.object({
|
|
19283
19346
|
service: PlatformServiceSchema,
|
|
19284
|
-
inputKey:
|
|
19347
|
+
inputKey: z10.string()
|
|
19285
19348
|
})),
|
|
19286
|
-
consts:
|
|
19287
|
-
key:
|
|
19288
|
-
schema:
|
|
19349
|
+
consts: z10.array(z10.object({
|
|
19350
|
+
key: z10.string(),
|
|
19351
|
+
schema: z10.record(z10.string(), z10.unknown())
|
|
19289
19352
|
}))
|
|
19290
19353
|
});
|
|
19291
19354
|
|
|
@@ -19486,6 +19549,10 @@ var Scrubber = class {
|
|
|
19486
19549
|
redact(text) {
|
|
19487
19550
|
return this.stream().redact(text, { final: true });
|
|
19488
19551
|
}
|
|
19552
|
+
/** For a redactor that runs where this object cannot, such as inside a sandbox. */
|
|
19553
|
+
entries() {
|
|
19554
|
+
return [...this.redactions].map(([secret, marker]) => ({ secret, marker }));
|
|
19555
|
+
}
|
|
19489
19556
|
/** Test-only: how many secrets are registered. */
|
|
19490
19557
|
get size() {
|
|
19491
19558
|
return this.redactions.size;
|
|
@@ -19606,6 +19673,8 @@ var OrgPermission = {
|
|
|
19606
19673
|
MEMBERS_ARCHIVE: "members:archive",
|
|
19607
19674
|
MEMBERS_DEMOTE_ADMIN: "members:demote_admin",
|
|
19608
19675
|
MEMBERS_TRANSFER_OWNERSHIP: "members:transfer_ownership",
|
|
19676
|
+
// Teams: create, rename, delete, and choose who is on each and who leads
|
|
19677
|
+
TEAMS_MANAGE: "teams:manage",
|
|
19609
19678
|
// OAuth connections
|
|
19610
19679
|
ORG_MANAGE_OAUTH_CONNECTIONS: "org:manage_oauth_connections",
|
|
19611
19680
|
// Notification channels — connect Slack/etc and match members to accounts
|
|
@@ -19620,6 +19689,8 @@ var OrgPermission = {
|
|
|
19620
19689
|
MEMORY_MODIFY: "memory:modify",
|
|
19621
19690
|
// CRM — order the enrichment provider waterfalls (org-wide chains)
|
|
19622
19691
|
CRM_CONFIGURE_WATERFALLS: "crm:configure_waterfalls",
|
|
19692
|
+
// CRM: see and manage every record, whoever owns it and however it's shared
|
|
19693
|
+
CRM_ACCESS_ALL_RECORDS: "crm:access_all_records",
|
|
19623
19694
|
INSTANCE_OPERATE: "instance:operate",
|
|
19624
19695
|
// Security audit
|
|
19625
19696
|
ORG_SECURITY_ACCESS: "audit:org_security_access",
|
|
@@ -19656,7 +19727,10 @@ var ORG_PERMISSIONS = [
|
|
|
19656
19727
|
id: OrgPermission.BILLING_MANAGE_SUBSCRIPTION,
|
|
19657
19728
|
label: "Manage subscription and seats"
|
|
19658
19729
|
},
|
|
19659
|
-
{
|
|
19730
|
+
{
|
|
19731
|
+
id: OrgPermission.ORG_UPDATE_NAME,
|
|
19732
|
+
label: "Update workspace name and branding"
|
|
19733
|
+
},
|
|
19660
19734
|
{ id: OrgPermission.ORG_UPDATE_AUTOFILL, label: "Update autofill settings" },
|
|
19661
19735
|
{ id: OrgPermission.ORG_DELETE, label: "Delete workspace" },
|
|
19662
19736
|
{ id: OrgPermission.MEMBERS_LIST_INVITES, label: "View pending invites" },
|
|
@@ -19668,6 +19742,7 @@ var ORG_PERMISSIONS = [
|
|
|
19668
19742
|
{ id: OrgPermission.MEMBERS_ARCHIVE, label: "Deactivate members" },
|
|
19669
19743
|
{ id: OrgPermission.MEMBERS_DEMOTE_ADMIN, label: "Demote admins" },
|
|
19670
19744
|
{ id: OrgPermission.MEMBERS_TRANSFER_OWNERSHIP, label: "Transfer ownership" },
|
|
19745
|
+
{ id: OrgPermission.TEAMS_MANAGE, label: "Manage teams" },
|
|
19671
19746
|
{
|
|
19672
19747
|
id: OrgPermission.ORG_MANAGE_OAUTH_CONNECTIONS,
|
|
19673
19748
|
label: "Manage OAuth integrations"
|
|
@@ -19692,6 +19767,10 @@ var ORG_PERMISSIONS = [
|
|
|
19692
19767
|
id: OrgPermission.CRM_CONFIGURE_WATERFALLS,
|
|
19693
19768
|
label: "Configure CRM waterfalls"
|
|
19694
19769
|
},
|
|
19770
|
+
{
|
|
19771
|
+
id: OrgPermission.CRM_ACCESS_ALL_RECORDS,
|
|
19772
|
+
label: "See and manage every CRM record"
|
|
19773
|
+
},
|
|
19695
19774
|
{
|
|
19696
19775
|
id: OrgPermission.MEMORY_MODIFY,
|
|
19697
19776
|
label: "Modify workspace memory"
|
|
@@ -19750,12 +19829,14 @@ var ROLES_BY_PERMISSION = {
|
|
|
19750
19829
|
[OrgPermission.MEMBERS_ARCHIVE]: ["Admin", "Owner"],
|
|
19751
19830
|
[OrgPermission.MEMBERS_DEMOTE_ADMIN]: ["Owner"],
|
|
19752
19831
|
[OrgPermission.MEMBERS_TRANSFER_OWNERSHIP]: ["Owner"],
|
|
19832
|
+
[OrgPermission.TEAMS_MANAGE]: ["Admin", "Owner"],
|
|
19753
19833
|
[OrgPermission.ORG_MANAGE_OAUTH_CONNECTIONS]: ["Admin", "Owner"],
|
|
19754
19834
|
[OrgPermission.ORG_MANAGE_NOTIFICATION_CHANNELS]: ["Admin", "Owner"],
|
|
19755
19835
|
[OrgPermission.ORG_MANAGE_EGRESS_POLICY]: ["Admin", "Owner"],
|
|
19756
19836
|
[OrgPermission.ORG_MANAGE_MODELS]: ["Admin", "Owner"],
|
|
19757
19837
|
[OrgPermission.ORG_MANAGE_PLATFORM_SERVICES]: ["Admin", "Owner"],
|
|
19758
19838
|
[OrgPermission.CRM_CONFIGURE_WATERFALLS]: ["Admin", "Owner"],
|
|
19839
|
+
[OrgPermission.CRM_ACCESS_ALL_RECORDS]: ["Admin", "Owner"],
|
|
19759
19840
|
[OrgPermission.MEMORY_MODIFY]: ["Admin", "Owner"],
|
|
19760
19841
|
[OrgPermission.INSTANCE_OPERATE]: ["InstanceOperator"],
|
|
19761
19842
|
[OrgPermission.ORG_SECURITY_ACCESS]: ["Admin", "Owner"],
|
|
@@ -19768,17 +19849,25 @@ var ROLES_BY_PERMISSION = {
|
|
|
19768
19849
|
[OrgPermission.VIEW_ANY_SKILL]: ["Admin", "Owner"],
|
|
19769
19850
|
[OrgPermission.MEMBERS_TRANSFER_RESOURCES]: ["Admin", "Owner"]
|
|
19770
19851
|
};
|
|
19771
|
-
var
|
|
19772
|
-
|
|
19773
|
-
|
|
19852
|
+
var ORG_PERMISSION_VALUES = Object.values(OrgPermission);
|
|
19853
|
+
var OWNER_OR_INSTANCE_PERMISSIONS = /* @__PURE__ */ new Set([
|
|
19854
|
+
OrgPermission.ORG_DELETE,
|
|
19855
|
+
OrgPermission.MEMBERS_TRANSFER_OWNERSHIP,
|
|
19856
|
+
OrgPermission.MEMBERS_DEMOTE_ADMIN,
|
|
19857
|
+
OrgPermission.INSTANCE_OPERATE
|
|
19858
|
+
]);
|
|
19859
|
+
var ASSIGNABLE_ORG_PERMISSIONS = ORG_PERMISSION_VALUES.filter((permission) => !OWNER_OR_INSTANCE_PERMISSIONS.has(permission));
|
|
19860
|
+
function baseRolePermissions(roles) {
|
|
19861
|
+
return ORG_PERMISSION_VALUES.filter((permission) => roles.some((role) => ROLES_BY_PERMISSION[permission].includes(role)));
|
|
19862
|
+
}
|
|
19774
19863
|
|
|
19775
19864
|
// ../../packages/api/dist/types/workspaceModelPolicy.js
|
|
19776
|
-
import { z as
|
|
19777
|
-
var WorkspaceModelManagerSchema =
|
|
19865
|
+
import { z as z11 } from "zod";
|
|
19866
|
+
var WorkspaceModelManagerSchema = z11.enum([
|
|
19778
19867
|
"workspace",
|
|
19779
19868
|
"instance-operators"
|
|
19780
19869
|
]);
|
|
19781
|
-
var AgentModelChoiceSchema =
|
|
19870
|
+
var AgentModelChoiceSchema = z11.enum(["any", "auto-only"]);
|
|
19782
19871
|
var DEFAULT_WORKSPACE_MODEL_POLICY = {
|
|
19783
19872
|
managedBy: "workspace",
|
|
19784
19873
|
agentModelChoice: "any"
|
|
@@ -19787,15 +19876,58 @@ var WORKSPACE_MODEL_MANAGER_RULES = {
|
|
|
19787
19876
|
workspace: {
|
|
19788
19877
|
managePermission: OrgPermission.ORG_MANAGE_MODELS,
|
|
19789
19878
|
canEveryMemberSeeSettings: true,
|
|
19790
|
-
|
|
19879
|
+
subscriptionSharers: "members",
|
|
19880
|
+
subscriptionAsk: "asks"
|
|
19791
19881
|
},
|
|
19792
19882
|
"instance-operators": {
|
|
19793
19883
|
managePermission: OrgPermission.INSTANCE_OPERATE,
|
|
19794
19884
|
canEveryMemberSeeSettings: false,
|
|
19795
|
-
|
|
19885
|
+
subscriptionSharers: "instance-operators",
|
|
19886
|
+
subscriptionAsk: "on-request"
|
|
19796
19887
|
}
|
|
19797
19888
|
};
|
|
19798
19889
|
|
|
19890
|
+
// ../../packages/utils/dist/privateNetwork.js
|
|
19891
|
+
function ipv4Range(dotted, prefix, scope) {
|
|
19892
|
+
return { base: ipv4Value(dotted) ?? 0, prefix, scope };
|
|
19893
|
+
}
|
|
19894
|
+
var NON_PUBLIC_IPV4_RANGES = [
|
|
19895
|
+
ipv4Range("0.0.0.0", 8, "reserved"),
|
|
19896
|
+
ipv4Range("10.0.0.0", 8, "private"),
|
|
19897
|
+
ipv4Range("100.64.0.0", 10, "private"),
|
|
19898
|
+
// CGNAT
|
|
19899
|
+
ipv4Range("127.0.0.0", 8, "private"),
|
|
19900
|
+
ipv4Range("169.254.0.0", 16, "reserved"),
|
|
19901
|
+
// link-local, cloud metadata
|
|
19902
|
+
ipv4Range("172.16.0.0", 12, "private"),
|
|
19903
|
+
ipv4Range("192.0.0.0", 24, "reserved"),
|
|
19904
|
+
ipv4Range("192.0.2.0", 24, "reserved"),
|
|
19905
|
+
ipv4Range("192.88.99.0", 24, "reserved"),
|
|
19906
|
+
ipv4Range("192.168.0.0", 16, "private"),
|
|
19907
|
+
ipv4Range("198.18.0.0", 15, "private"),
|
|
19908
|
+
ipv4Range("198.51.100.0", 24, "reserved"),
|
|
19909
|
+
ipv4Range("203.0.113.0", 24, "reserved"),
|
|
19910
|
+
ipv4Range("224.0.0.0", 4, "reserved"),
|
|
19911
|
+
// multicast
|
|
19912
|
+
ipv4Range("240.0.0.0", 4, "reserved")
|
|
19913
|
+
// reserved, broadcast
|
|
19914
|
+
];
|
|
19915
|
+
function ipv4Value(address) {
|
|
19916
|
+
const octets = address.split(".");
|
|
19917
|
+
if (octets.length !== 4)
|
|
19918
|
+
return null;
|
|
19919
|
+
let value = 0;
|
|
19920
|
+
for (const octet of octets) {
|
|
19921
|
+
if (!/^\d{1,3}$/.test(octet))
|
|
19922
|
+
return null;
|
|
19923
|
+
const number = Number(octet);
|
|
19924
|
+
if (number > 255)
|
|
19925
|
+
return null;
|
|
19926
|
+
value = value * 256 + number;
|
|
19927
|
+
}
|
|
19928
|
+
return value;
|
|
19929
|
+
}
|
|
19930
|
+
|
|
19799
19931
|
// ../../packages/utils/dist/workerAccessories.js
|
|
19800
19932
|
var WORKER_ACCESSORY_CATALOG = {
|
|
19801
19933
|
head: {
|
|
@@ -19936,6 +20068,13 @@ function workspaceDepartureOwnedKindsQuery() {
|
|
|
19936
20068
|
return WORKSPACE_DEPARTURE_OWNED_KINDS.join(",");
|
|
19937
20069
|
}
|
|
19938
20070
|
|
|
20071
|
+
// ../../packages/api/dist/types/legacyCreditsShown.js
|
|
20072
|
+
function fillLegacyCreditsShown(value) {
|
|
20073
|
+
if ("billingEnabled" in value && !("shouldShowCredits" in value)) {
|
|
20074
|
+
Reflect.set(value, "shouldShowCredits", true);
|
|
20075
|
+
}
|
|
20076
|
+
}
|
|
20077
|
+
|
|
19939
20078
|
// ../../packages/api/dist/types/legacyOnboardingFirstSpecialist.js
|
|
19940
20079
|
function fillLegacyOnboardingFirstSpecialist(state) {
|
|
19941
20080
|
if (!("stage" in state) || !("stages" in state))
|
|
@@ -20091,6 +20230,31 @@ function fillLegacyWorkspaceModelPolicy(value) {
|
|
|
20091
20230
|
}
|
|
20092
20231
|
}
|
|
20093
20232
|
|
|
20233
|
+
// ../../packages/api/dist/types/legacyWorkspacePermissions.js
|
|
20234
|
+
function rolesOf(value) {
|
|
20235
|
+
if ("roles" in value && Array.isArray(value.roles)) {
|
|
20236
|
+
return value.roles.flatMap((role) => {
|
|
20237
|
+
const parsed = UserRoleSchema.safeParse(role);
|
|
20238
|
+
return parsed.success ? [parsed.data] : [];
|
|
20239
|
+
});
|
|
20240
|
+
}
|
|
20241
|
+
if ("role" in value && typeof value.role === "string") {
|
|
20242
|
+
return parseRoles(value.role);
|
|
20243
|
+
}
|
|
20244
|
+
return null;
|
|
20245
|
+
}
|
|
20246
|
+
function fillLegacyWorkspacePermissions(value) {
|
|
20247
|
+
const isMembership = "modelDefaults" in value && "organizationId" in value;
|
|
20248
|
+
const isActiveWorkspace = "onboardingStage" in value && "membershipId" in value;
|
|
20249
|
+
if (!isMembership && !isActiveWorkspace)
|
|
20250
|
+
return;
|
|
20251
|
+
if ("permissions" in value)
|
|
20252
|
+
return;
|
|
20253
|
+
const roles = rolesOf(value);
|
|
20254
|
+
if (roles)
|
|
20255
|
+
Reflect.set(value, "permissions", baseRolePermissions(roles));
|
|
20256
|
+
}
|
|
20257
|
+
|
|
20094
20258
|
// ../../packages/api/dist/types/legacyHostedTunnelShareBlocker.js
|
|
20095
20259
|
function fillLegacyHostedTunnelShareBlocker(value) {
|
|
20096
20260
|
const isShareListWorkspace = "isShared" in value && "organizationId" in value && "organizationProfilePictureUrl" in value;
|
|
@@ -20178,6 +20342,33 @@ function fillLegacyMemberNames(value) {
|
|
|
20178
20342
|
}
|
|
20179
20343
|
}
|
|
20180
20344
|
|
|
20345
|
+
// ../../packages/api/dist/types/legacyMemberTeams.js
|
|
20346
|
+
function fillLegacyMemberTeams(value) {
|
|
20347
|
+
const isMember = "memberRoles" in value && "membershipId" in value;
|
|
20348
|
+
if (isMember && !("teams" in value))
|
|
20349
|
+
Reflect.set(value, "teams", []);
|
|
20350
|
+
}
|
|
20351
|
+
|
|
20352
|
+
// ../../packages/api/dist/types/legacyCrmRecordAccess.js
|
|
20353
|
+
function fillLegacyCrmRecordAccess(value) {
|
|
20354
|
+
if ("access" in value)
|
|
20355
|
+
return;
|
|
20356
|
+
const isPersonDetail = "person" in value && "employments" in value && "contactPoints" in value;
|
|
20357
|
+
const isCompanyDetail = "company" in value && "peopleCount" in value && "tags" in value;
|
|
20358
|
+
const isDeal = "pipelineId" in value && "boardPosition" in value && "staleness" in value;
|
|
20359
|
+
if (!isPersonDetail && !isCompanyDetail && !isDeal)
|
|
20360
|
+
return;
|
|
20361
|
+
const owner = (field) => isDeal ? Reflect.get(value, field) ?? null : null;
|
|
20362
|
+
Reflect.set(value, "access", {
|
|
20363
|
+
ownerMembershipId: owner("ownerMembershipId"),
|
|
20364
|
+
ownerName: owner("ownerName"),
|
|
20365
|
+
teamId: null,
|
|
20366
|
+
teamName: null,
|
|
20367
|
+
visibility: "workspace",
|
|
20368
|
+
canManage: false
|
|
20369
|
+
});
|
|
20370
|
+
}
|
|
20371
|
+
|
|
20181
20372
|
// ../../packages/api/dist/types/legacyGettingStartedShown.js
|
|
20182
20373
|
function fillLegacyGettingStartedShown(value) {
|
|
20183
20374
|
if ("steps" in value && "completedCount" in value && "totalCount" in value && !("isShown" in value) && typeof value.completedCount === "number" && typeof value.totalCount === "number") {
|
|
@@ -20194,6 +20385,41 @@ function fillLegacySpecialistConversationSnoozes(value) {
|
|
|
20194
20385
|
}
|
|
20195
20386
|
}
|
|
20196
20387
|
|
|
20388
|
+
// ../../packages/api/dist/types/legacyWorkspaceBrand.js
|
|
20389
|
+
var WORKSPACE_BY_HOST_KEYS = [
|
|
20390
|
+
"organizationId",
|
|
20391
|
+
"slug",
|
|
20392
|
+
"name",
|
|
20393
|
+
"profilePictureUrl"
|
|
20394
|
+
];
|
|
20395
|
+
function fillLegacyWorkspaceBrand(value) {
|
|
20396
|
+
if ("brand" in value)
|
|
20397
|
+
return;
|
|
20398
|
+
if (!WORKSPACE_BY_HOST_KEYS.every((key) => key in value))
|
|
20399
|
+
return;
|
|
20400
|
+
if (Object.keys(value).length !== WORKSPACE_BY_HOST_KEYS.length)
|
|
20401
|
+
return;
|
|
20402
|
+
const name = Reflect.get(value, "name");
|
|
20403
|
+
const profilePictureUrl = Reflect.get(value, "profilePictureUrl");
|
|
20404
|
+
if (typeof name !== "string")
|
|
20405
|
+
return;
|
|
20406
|
+
Reflect.set(value, "brand", {
|
|
20407
|
+
productName: name,
|
|
20408
|
+
tagline: null,
|
|
20409
|
+
sceneId: DEFAULT_BRAND_SCENE_ID,
|
|
20410
|
+
markUrl: typeof profilePictureUrl === "string" ? profilePictureUrl : null,
|
|
20411
|
+
wordmarkUrl: null,
|
|
20412
|
+
backgroundImageUrl: null
|
|
20413
|
+
});
|
|
20414
|
+
}
|
|
20415
|
+
|
|
20416
|
+
// ../../packages/api/dist/types/legacyDeviceCodePollCredential.js
|
|
20417
|
+
function fillLegacyDeviceCodePollCredential(value) {
|
|
20418
|
+
if ("deviceCode" in value && "verificationUri" in value && !("pollCredential" in value)) {
|
|
20419
|
+
Reflect.set(value, "pollCredential", "user-code");
|
|
20420
|
+
}
|
|
20421
|
+
}
|
|
20422
|
+
|
|
20197
20423
|
// ../../packages/api/dist/types/legacyApiFields.js
|
|
20198
20424
|
var LEGACY_FILLS = [
|
|
20199
20425
|
fillLegacyProjectAvatar,
|
|
@@ -20205,6 +20431,7 @@ var LEGACY_FILLS = [
|
|
|
20205
20431
|
fillLegacyCredentialOutage,
|
|
20206
20432
|
fillLegacyCredentialConnection,
|
|
20207
20433
|
fillLegacyWorkspaceModelPolicy,
|
|
20434
|
+
fillLegacyWorkspacePermissions,
|
|
20208
20435
|
fillLegacyHostedTunnelShareBlocker,
|
|
20209
20436
|
fillLegacyDesignCounts,
|
|
20210
20437
|
fillLegacySearchRecentDesigns,
|
|
@@ -20213,8 +20440,13 @@ var LEGACY_FILLS = [
|
|
|
20213
20440
|
fillLegacyDesignVideo,
|
|
20214
20441
|
fillLegacySpecialistFolders,
|
|
20215
20442
|
fillLegacyMemberNames,
|
|
20443
|
+
fillLegacyMemberTeams,
|
|
20444
|
+
fillLegacyCrmRecordAccess,
|
|
20216
20445
|
fillLegacyGettingStartedShown,
|
|
20217
|
-
fillLegacySpecialistConversationSnoozes
|
|
20446
|
+
fillLegacySpecialistConversationSnoozes,
|
|
20447
|
+
fillLegacyCreditsShown,
|
|
20448
|
+
fillLegacyWorkspaceBrand,
|
|
20449
|
+
fillLegacyDeviceCodePollCredential
|
|
20218
20450
|
];
|
|
20219
20451
|
function fillLegacyApiFields(value) {
|
|
20220
20452
|
if (Array.isArray(value)) {
|
|
@@ -20242,7 +20474,7 @@ var SPECIALIST_TEMPLATE_SCOPES = [
|
|
|
20242
20474
|
];
|
|
20243
20475
|
|
|
20244
20476
|
// ../../packages/api/dist/types/organizationCustomIntegration.js
|
|
20245
|
-
import { z as
|
|
20477
|
+
import { z as z12 } from "zod";
|
|
20246
20478
|
var CUSTOM_API_AUTHORING_ACTIONS = defineCustomApiAuthoringActions({
|
|
20247
20479
|
list: {
|
|
20248
20480
|
toolId: "list_custom_apis",
|
|
@@ -20283,45 +20515,45 @@ var TOOL_ID_UPSERT_CUSTOM_API_OPERATION = CUSTOM_API_AUTHORING_ACTIONS.upsertOpe
|
|
|
20283
20515
|
var TOOL_ID_DELETE_CUSTOM_API_OPERATION = CUSTOM_API_AUTHORING_ACTIONS.deleteOperation.toolId;
|
|
20284
20516
|
var TOOL_ID_SET_CUSTOM_API_STATUS = CUSTOM_API_AUTHORING_ACTIONS.setStatus.toolId;
|
|
20285
20517
|
var DEFAULT_CUSTOM_INTEGRATION_ICON_URL = "/icons/custom-api.svg";
|
|
20286
|
-
var CustomIntegrationIconUrlSchema =
|
|
20518
|
+
var CustomIntegrationIconUrlSchema = z12.string().refine((value) => {
|
|
20287
20519
|
if (value === DEFAULT_CUSTOM_INTEGRATION_ICON_URL)
|
|
20288
20520
|
return true;
|
|
20289
|
-
const parsed =
|
|
20521
|
+
const parsed = z12.url().safeParse(value);
|
|
20290
20522
|
if (!parsed.success)
|
|
20291
20523
|
return false;
|
|
20292
20524
|
const protocol = new URL(value).protocol;
|
|
20293
20525
|
return protocol === "http:" || protocol === "https:";
|
|
20294
20526
|
}, "Icon URL must be the stock icon path or use HTTP or HTTPS");
|
|
20295
|
-
var CustomIntegrationSecretFieldSchema =
|
|
20296
|
-
key:
|
|
20297
|
-
label:
|
|
20298
|
-
description:
|
|
20299
|
-
secret:
|
|
20527
|
+
var CustomIntegrationSecretFieldSchema = z12.object({
|
|
20528
|
+
key: z12.string().regex(/^[A-Za-z][A-Za-z0-9]*$/).describe("Camel-case credential field key, e.g. apiKey"),
|
|
20529
|
+
label: z12.string().trim().min(1).describe("Label shown in the credential form"),
|
|
20530
|
+
description: z12.string().trim().min(1).optional().describe("Optional guidance about where to find the value"),
|
|
20531
|
+
secret: z12.boolean().describe("Whether the value is masked and scrubbed")
|
|
20300
20532
|
});
|
|
20301
|
-
var CreateCustomApiDraftRequestSchema =
|
|
20302
|
-
title:
|
|
20303
|
-
description:
|
|
20533
|
+
var CreateCustomApiDraftRequestSchema = z12.object({
|
|
20534
|
+
title: z12.string().trim().min(1),
|
|
20535
|
+
description: z12.string().trim().min(1),
|
|
20304
20536
|
iconUrl: CustomIntegrationIconUrlSchema.optional()
|
|
20305
20537
|
});
|
|
20306
|
-
var PatchOrganizationCustomIntegrationRequestSchema =
|
|
20307
|
-
title:
|
|
20308
|
-
description:
|
|
20538
|
+
var PatchOrganizationCustomIntegrationRequestSchema = z12.object({
|
|
20539
|
+
title: z12.string().trim().min(1).optional(),
|
|
20540
|
+
description: z12.string().trim().min(1).optional(),
|
|
20309
20541
|
iconUrl: CustomIntegrationIconUrlSchema.optional(),
|
|
20310
|
-
credentialType:
|
|
20311
|
-
secretFields:
|
|
20312
|
-
commonDocs:
|
|
20313
|
-
setupGuide:
|
|
20542
|
+
credentialType: z12.enum(["apiKey", "noAuth"]).optional(),
|
|
20543
|
+
secretFields: z12.array(CustomIntegrationSecretFieldSchema).optional(),
|
|
20544
|
+
commonDocs: z12.string().nullable().optional(),
|
|
20545
|
+
setupGuide: z12.string().nullable().optional()
|
|
20314
20546
|
}).refine(hasCustomIntegrationDefinitionPatch, {
|
|
20315
20547
|
message: "At least one field is required"
|
|
20316
20548
|
});
|
|
20317
|
-
var SetCustomIntegrationStatusRequestSchema =
|
|
20318
|
-
status:
|
|
20549
|
+
var SetCustomIntegrationStatusRequestSchema = z12.object({
|
|
20550
|
+
status: z12.enum(["draft", "live"])
|
|
20319
20551
|
});
|
|
20320
|
-
var UpsertCustomIntegrationOperationRequestSchema =
|
|
20321
|
-
operationId:
|
|
20322
|
-
title:
|
|
20323
|
-
description:
|
|
20324
|
-
documentation:
|
|
20552
|
+
var UpsertCustomIntegrationOperationRequestSchema = z12.object({
|
|
20553
|
+
operationId: z12.string().min(1).optional(),
|
|
20554
|
+
title: z12.string().trim().min(1).optional(),
|
|
20555
|
+
description: z12.string().trim().min(1).optional(),
|
|
20556
|
+
documentation: z12.string().trim().min(1).optional()
|
|
20325
20557
|
}).superRefine((value, context) => {
|
|
20326
20558
|
if (value.operationId) {
|
|
20327
20559
|
if (!value.title && !value.description && !value.documentation) {
|
|
@@ -20358,28 +20590,28 @@ function defineCustomApiAuthoringActions(actions) {
|
|
|
20358
20590
|
}
|
|
20359
20591
|
|
|
20360
20592
|
// ../../packages/api/dist/types/cli/resourceOperations.js
|
|
20361
|
-
import { z as
|
|
20362
|
-
var FilterPreviewRequestSchema =
|
|
20363
|
-
triggerPayload:
|
|
20364
|
-
triggerKey:
|
|
20365
|
-
bundleKey:
|
|
20593
|
+
import { z as z13 } from "zod";
|
|
20594
|
+
var FilterPreviewRequestSchema = z13.object({
|
|
20595
|
+
triggerPayload: z13.record(z13.string(), z13.unknown()).optional(),
|
|
20596
|
+
triggerKey: z13.string().min(1).optional(),
|
|
20597
|
+
bundleKey: z13.string().min(1).max(1024).optional()
|
|
20366
20598
|
});
|
|
20367
|
-
var AppScreenshotsRequestSchema =
|
|
20368
|
-
routes:
|
|
20369
|
-
viewport:
|
|
20599
|
+
var AppScreenshotsRequestSchema = z13.object({
|
|
20600
|
+
routes: z13.array(z13.string().min(1).max(2048)).min(1).max(6).default(["/"]),
|
|
20601
|
+
viewport: z13.enum(["mobile", "desktop", "both"]).default("both")
|
|
20370
20602
|
});
|
|
20371
|
-
var TriggerActivityRequestSchema =
|
|
20372
|
-
limit:
|
|
20373
|
-
cursor:
|
|
20374
|
-
search:
|
|
20603
|
+
var TriggerActivityRequestSchema = z13.object({
|
|
20604
|
+
limit: z13.coerce.number().int().min(1).max(100).default(20),
|
|
20605
|
+
cursor: z13.string().optional(),
|
|
20606
|
+
search: z13.string().optional()
|
|
20375
20607
|
});
|
|
20376
|
-
var TriggerSyncRequestSchema =
|
|
20377
|
-
triggerId:
|
|
20608
|
+
var TriggerSyncRequestSchema = z13.object({
|
|
20609
|
+
triggerId: z13.string().min(1).optional()
|
|
20378
20610
|
});
|
|
20379
|
-
var TriggerReplayRequestSchema =
|
|
20380
|
-
itemId:
|
|
20381
|
-
kind:
|
|
20382
|
-
triggerKey:
|
|
20611
|
+
var TriggerReplayRequestSchema = z13.object({
|
|
20612
|
+
itemId: z13.string().min(1),
|
|
20613
|
+
kind: z13.enum(["execution", "poll_item"]),
|
|
20614
|
+
triggerKey: z13.string().min(1).optional()
|
|
20383
20615
|
});
|
|
20384
20616
|
|
|
20385
20617
|
// ../../packages/api/dist/clients/v1/V1AuthApiClient.js
|
|
@@ -20394,8 +20626,25 @@ var V1AuthApiClient = class {
|
|
|
20394
20626
|
body: args
|
|
20395
20627
|
});
|
|
20396
20628
|
}
|
|
20629
|
+
/** Collects the session the way the server that started the sign-in said to. */
|
|
20397
20630
|
async pollDeviceCode(args) {
|
|
20398
|
-
|
|
20631
|
+
const credential = args.start.pollCredential;
|
|
20632
|
+
switch (credential) {
|
|
20633
|
+
case "device-code":
|
|
20634
|
+
return this.http.fetch("/v1/auth/device-code/poll", {
|
|
20635
|
+
method: "POST",
|
|
20636
|
+
body: {
|
|
20637
|
+
deviceCode: args.start.deviceCode
|
|
20638
|
+
},
|
|
20639
|
+
signal: args.signal
|
|
20640
|
+
});
|
|
20641
|
+
case "user-code":
|
|
20642
|
+
return this.http.fetch(`/v1/auth/device-code/${encodeURIComponent(args.start.userCode)}/poll`, { method: "POST", signal: args.signal });
|
|
20643
|
+
default: {
|
|
20644
|
+
const unknownCredential = credential;
|
|
20645
|
+
throw new Error(`Unknown poll credential: ${String(unknownCredential)}`);
|
|
20646
|
+
}
|
|
20647
|
+
}
|
|
20399
20648
|
}
|
|
20400
20649
|
async deviceCodeStatus(args) {
|
|
20401
20650
|
return this.http.fetch(`/v1/auth/device-code/${encodeURIComponent(args.userCode)}`, { signal: args.signal });
|
|
@@ -20679,19 +20928,6 @@ var V1HttpClient = class {
|
|
|
20679
20928
|
read: async (response) => new Uint8Array(await response.arrayBuffer())
|
|
20680
20929
|
});
|
|
20681
20930
|
}
|
|
20682
|
-
async sendBinary(path, options) {
|
|
20683
|
-
return this.request({
|
|
20684
|
-
path,
|
|
20685
|
-
timeoutMs: options.timeoutMs,
|
|
20686
|
-
init: {
|
|
20687
|
-
method: options.method,
|
|
20688
|
-
headers: { "Content-Type": options.contentType },
|
|
20689
|
-
body: new Uint8Array(options.body),
|
|
20690
|
-
signal: options.signal
|
|
20691
|
-
},
|
|
20692
|
-
read: (response) => response.json()
|
|
20693
|
-
});
|
|
20694
|
-
}
|
|
20695
20931
|
get isAuthed() {
|
|
20696
20932
|
return this.args.getAccessToken() !== null;
|
|
20697
20933
|
}
|
|
@@ -20710,6 +20946,7 @@ var V1HttpClient = class {
|
|
|
20710
20946
|
}
|
|
20711
20947
|
async request(args) {
|
|
20712
20948
|
const requestToken = this.args.getAccessToken();
|
|
20949
|
+
const clientIdentity = this.args.getClientIdentity?.() ?? null;
|
|
20713
20950
|
const controller = new AbortController();
|
|
20714
20951
|
const externalSignal = args.init.signal;
|
|
20715
20952
|
const abortFromExternal = () => {
|
|
@@ -20735,6 +20972,9 @@ var V1HttpClient = class {
|
|
|
20735
20972
|
Accept: "application/json",
|
|
20736
20973
|
...this.args.headers,
|
|
20737
20974
|
...args.init.headers,
|
|
20975
|
+
...clientIdentity ? {
|
|
20976
|
+
[CLIENT_IDENTITY_HEADER]: formatClientIdentityHeader(clientIdentity)
|
|
20977
|
+
} : {},
|
|
20738
20978
|
...requestToken ? { Authorization: `Bearer ${requestToken}` } : {}
|
|
20739
20979
|
}
|
|
20740
20980
|
}).catch((cause) => {
|
|
@@ -20892,7 +21132,6 @@ var V1OperationsApiClient = class {
|
|
|
20892
21132
|
};
|
|
20893
21133
|
|
|
20894
21134
|
// ../../packages/api/dist/clients/v1/V1ProjectsApiClient.js
|
|
20895
|
-
var BUNDLE_CONTENT_TYPE = "application/gzip";
|
|
20896
21135
|
var FILE_UPLOAD_COMMIT_TIMEOUT_MS = 12e4;
|
|
20897
21136
|
var V1ProjectsApiClient = class {
|
|
20898
21137
|
http;
|
|
@@ -20973,16 +21212,6 @@ var V1ProjectsApiClient = class {
|
|
|
20973
21212
|
this.http.requireAuthed();
|
|
20974
21213
|
return this.http.fetch(`/v1/projects/${encodeURIComponent(args.projectId)}/files/link?path=${encodeURIComponent(args.path)}`, { signal: args.signal });
|
|
20975
21214
|
}
|
|
20976
|
-
/** Every project file as one gzipped tar. */
|
|
20977
|
-
async downloadFilesBundle(id) {
|
|
20978
|
-
this.http.requireAuthed();
|
|
20979
|
-
return this.http.fetchBinary(`/v1/projects/${encodeURIComponent(id)}/files/bundle`);
|
|
20980
|
-
}
|
|
20981
|
-
/** Add or replace the paths the bundle carries; other files stay put. */
|
|
20982
|
-
async uploadFilesBundle(id, bundle) {
|
|
20983
|
-
this.http.requireAuthed();
|
|
20984
|
-
return this.http.sendBinary(`/v1/projects/${encodeURIComponent(id)}/files/bundle`, { method: "POST", body: bundle, contentType: BUNDLE_CONTENT_TYPE });
|
|
20985
|
-
}
|
|
20986
21215
|
async deleteFile(id, path) {
|
|
20987
21216
|
this.http.requireAuthed();
|
|
20988
21217
|
return this.http.fetch(`/v1/projects/${encodeURIComponent(id)}/files?path=${encodeURIComponent(path)}`, { method: "DELETE" });
|
|
@@ -21156,11 +21385,6 @@ var V1SkillsApiClient = class {
|
|
|
21156
21385
|
this.http.requireAuthed();
|
|
21157
21386
|
return this.http.fetch(`/v1/skills/${encodeURIComponent(id)}/tree-url`);
|
|
21158
21387
|
}
|
|
21159
|
-
/** Presigned GET for the live bundle, for a server from before Tree pulls. */
|
|
21160
|
-
async bundleUrl(id) {
|
|
21161
|
-
this.http.requireAuthed();
|
|
21162
|
-
return this.http.fetch(`/v1/skills/${encodeURIComponent(id)}/bundle-url`);
|
|
21163
|
-
}
|
|
21164
21388
|
/** Presigned PUT + staged `bundleKey` for a push bundle (validate/publish). */
|
|
21165
21389
|
async bundleUploadUrl(id) {
|
|
21166
21390
|
this.http.requireAuthed();
|
|
@@ -21231,10 +21455,6 @@ var V1WorkflowsApiClient = class {
|
|
|
21231
21455
|
body
|
|
21232
21456
|
});
|
|
21233
21457
|
}
|
|
21234
|
-
async bundleUrl(id) {
|
|
21235
|
-
this.http.requireAuthed();
|
|
21236
|
-
return this.http.fetch(`/v1/workflows/${encodeURIComponent(id)}/bundle-url`);
|
|
21237
|
-
}
|
|
21238
21458
|
async treeUrl(id) {
|
|
21239
21459
|
this.http.requireAuthed();
|
|
21240
21460
|
return this.http.fetch(`/v1/workflows/${encodeURIComponent(id)}/tree-url`);
|
|
@@ -21532,6 +21752,10 @@ var V1WorkspacesApiClient = class {
|
|
|
21532
21752
|
this.http.requireAuthed();
|
|
21533
21753
|
return this.http.fetch("/v1/workspaces");
|
|
21534
21754
|
}
|
|
21755
|
+
async teams() {
|
|
21756
|
+
this.http.requireAuthed();
|
|
21757
|
+
return this.http.fetch("/v1/workspaces/teams");
|
|
21758
|
+
}
|
|
21535
21759
|
async members(args) {
|
|
21536
21760
|
this.http.requireAuthed();
|
|
21537
21761
|
const params = new URLSearchParams();
|
|
@@ -21600,7 +21824,19 @@ var V1SharingApiClient = class {
|
|
|
21600
21824
|
}
|
|
21601
21825
|
async inspect(kind, id) {
|
|
21602
21826
|
this.http.requireAuthed();
|
|
21603
|
-
|
|
21827
|
+
const [direct, teamGrants] = await Promise.all([
|
|
21828
|
+
this.http.fetch(`${subjectPath(kind, id)}/sharing`),
|
|
21829
|
+
this.http.fetch(`${teamGrantsPath(kind, id)}`)
|
|
21830
|
+
]);
|
|
21831
|
+
return {
|
|
21832
|
+
...direct,
|
|
21833
|
+
teams: teamGrants.teamGrants.map((grant) => ({
|
|
21834
|
+
teamId: grant.team.id,
|
|
21835
|
+
name: grant.team.name,
|
|
21836
|
+
memberCount: grant.team.memberCount,
|
|
21837
|
+
role: grant.role
|
|
21838
|
+
}))
|
|
21839
|
+
};
|
|
21604
21840
|
}
|
|
21605
21841
|
async grant(args) {
|
|
21606
21842
|
this.http.requireAuthed();
|
|
@@ -21614,24 +21850,31 @@ var V1SharingApiClient = class {
|
|
|
21614
21850
|
throw new Error(`Role ${args.role} is not offered on ${noun.plural}; use ${collaboratorRoles.join(" or ")}.`);
|
|
21615
21851
|
}
|
|
21616
21852
|
const path = subjectPath(args.kind, args.id);
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21853
|
+
switch (args.audience.type) {
|
|
21854
|
+
case "organization":
|
|
21855
|
+
await this.http.fetch(`${path}/org-grant`, {
|
|
21856
|
+
method: "PUT",
|
|
21857
|
+
body: { role: args.role }
|
|
21858
|
+
});
|
|
21859
|
+
return;
|
|
21860
|
+
case "member":
|
|
21861
|
+
await this.http.fetch(`${path}/collaborators`, {
|
|
21862
|
+
method: "POST",
|
|
21863
|
+
body: { membershipId: args.audience.membershipId, role: args.role }
|
|
21864
|
+
});
|
|
21865
|
+
return;
|
|
21866
|
+
case "team":
|
|
21867
|
+
await this.http.fetch(`${teamGrantsPath(args.kind, args.id)}/${encodeURIComponent(args.audience.teamId)}`, { method: "PUT", body: { role: args.role } });
|
|
21868
|
+
return;
|
|
21869
|
+
default: {
|
|
21870
|
+
const exhaustive = args.audience;
|
|
21871
|
+
throw new Error(`Unknown audience ${JSON.stringify(exhaustive)}`);
|
|
21872
|
+
}
|
|
21627
21873
|
}
|
|
21628
21874
|
}
|
|
21629
21875
|
async revoke(args) {
|
|
21630
21876
|
this.http.requireAuthed();
|
|
21631
|
-
|
|
21632
|
-
await this.http.fetch(`${subjectPath(args.kind, args.id)}/${suffix}`, {
|
|
21633
|
-
method: "DELETE"
|
|
21634
|
-
});
|
|
21877
|
+
await this.http.fetch(revokePath(args), { method: "DELETE" });
|
|
21635
21878
|
}
|
|
21636
21879
|
};
|
|
21637
21880
|
var OTHER_SHARING_PATHS = {
|
|
@@ -21643,6 +21886,31 @@ function subjectPath(kind, id) {
|
|
|
21643
21886
|
const path = isWorkflowTypeKind(kind) ? "workflows" : OTHER_SHARING_PATHS[kind];
|
|
21644
21887
|
return `/v1/${path}/${encodeURIComponent(id)}`;
|
|
21645
21888
|
}
|
|
21889
|
+
var OTHER_GRANT_TYPES = {
|
|
21890
|
+
specialist: "project",
|
|
21891
|
+
skill: "skill",
|
|
21892
|
+
credential: "credential"
|
|
21893
|
+
};
|
|
21894
|
+
function sharingGrantResourceType(kind) {
|
|
21895
|
+
return isWorkflowTypeKind(kind) ? "workflow" : OTHER_GRANT_TYPES[kind];
|
|
21896
|
+
}
|
|
21897
|
+
function teamGrantsPath(kind, id) {
|
|
21898
|
+
return `/v1/resource-grants/${sharingGrantResourceType(kind)}/${encodeURIComponent(id)}/teams`;
|
|
21899
|
+
}
|
|
21900
|
+
function revokePath(args) {
|
|
21901
|
+
switch (args.audience.type) {
|
|
21902
|
+
case "organization":
|
|
21903
|
+
return `${subjectPath(args.kind, args.id)}/org-grant`;
|
|
21904
|
+
case "member":
|
|
21905
|
+
return `${subjectPath(args.kind, args.id)}/collaborators/${encodeURIComponent(args.audience.membershipId)}`;
|
|
21906
|
+
case "team":
|
|
21907
|
+
return `${teamGrantsPath(args.kind, args.id)}/${encodeURIComponent(args.audience.teamId)}`;
|
|
21908
|
+
default: {
|
|
21909
|
+
const exhaustive = args.audience;
|
|
21910
|
+
throw new Error(`Unknown audience ${JSON.stringify(exhaustive)}`);
|
|
21911
|
+
}
|
|
21912
|
+
}
|
|
21913
|
+
}
|
|
21646
21914
|
|
|
21647
21915
|
// src/lib/output.ts
|
|
21648
21916
|
import chalk from "chalk";
|
|
@@ -21959,9 +22227,7 @@ var AuthService = class {
|
|
|
21959
22227
|
const hardDeadline = expiresAtMs + 3e4;
|
|
21960
22228
|
while (Date.now() < hardDeadline) {
|
|
21961
22229
|
await sleep(intervalMs);
|
|
21962
|
-
const status = await client.auth.pollDeviceCode({
|
|
21963
|
-
userCode: start.userCode
|
|
21964
|
-
});
|
|
22230
|
+
const status = await client.auth.pollDeviceCode({ start });
|
|
21965
22231
|
if (status.status === "pending") continue;
|
|
21966
22232
|
return status;
|
|
21967
22233
|
}
|
|
@@ -22225,7 +22491,7 @@ async function fetchResourceTree(args) {
|
|
|
22225
22491
|
}
|
|
22226
22492
|
|
|
22227
22493
|
// src/lib/bundleArchive.ts
|
|
22228
|
-
import {
|
|
22494
|
+
import { extract } from "tar";
|
|
22229
22495
|
|
|
22230
22496
|
// src/lib/resourceFiles.ts
|
|
22231
22497
|
import {
|
|
@@ -22330,15 +22596,6 @@ function dirHasResourceFiles(dir) {
|
|
|
22330
22596
|
}
|
|
22331
22597
|
|
|
22332
22598
|
// src/lib/bundleArchive.ts
|
|
22333
|
-
async function packResourceDir(dir) {
|
|
22334
|
-
const files = listResourceRelPaths(dir);
|
|
22335
|
-
const stream = create({ gzip: true, cwd: dir, portable: true }, files);
|
|
22336
|
-
const chunks = [];
|
|
22337
|
-
for await (const chunk of stream) {
|
|
22338
|
-
chunks.push(Buffer.from(chunk));
|
|
22339
|
-
}
|
|
22340
|
-
return Buffer.concat(chunks);
|
|
22341
|
-
}
|
|
22342
22599
|
async function extractBundle(dir, buffer) {
|
|
22343
22600
|
mkdirSync2(dir, { recursive: true });
|
|
22344
22601
|
await new Promise((resolve32, reject) => {
|
|
@@ -22370,39 +22627,22 @@ function readResourceFiles(dir) {
|
|
|
22370
22627
|
);
|
|
22371
22628
|
}
|
|
22372
22629
|
async function stageResourceDir(args) {
|
|
22373
|
-
const {
|
|
22374
|
-
if (!target.tree) {
|
|
22375
|
-
await putBytes({
|
|
22376
|
-
url: target.uploadUrl,
|
|
22377
|
-
body: await packResourceDir(dir),
|
|
22378
|
-
contentType: target.contentType
|
|
22379
|
-
});
|
|
22380
|
-
return target.bundleKey;
|
|
22381
|
-
}
|
|
22630
|
+
const { tree } = args.target;
|
|
22382
22631
|
const { manifest, content } = packResourceTree({
|
|
22383
|
-
files: readResourceFiles(dir),
|
|
22384
|
-
object:
|
|
22632
|
+
files: readResourceFiles(args.dir),
|
|
22633
|
+
object: tree.object
|
|
22385
22634
|
});
|
|
22386
22635
|
await putBytes({
|
|
22387
|
-
url:
|
|
22636
|
+
url: tree.packUploadUrl,
|
|
22388
22637
|
body: content,
|
|
22389
22638
|
contentType: "application/octet-stream"
|
|
22390
22639
|
});
|
|
22391
22640
|
await putBytes({
|
|
22392
|
-
url:
|
|
22641
|
+
url: tree.manifestUploadUrl,
|
|
22393
22642
|
body: serializeResourceTreeManifest(manifest),
|
|
22394
22643
|
contentType: "application/json"
|
|
22395
22644
|
});
|
|
22396
|
-
return
|
|
22397
|
-
}
|
|
22398
|
-
async function downloadResourceBundle(args) {
|
|
22399
|
-
const response = await fetch(args.downloadUrl);
|
|
22400
|
-
if (!response.ok) {
|
|
22401
|
-
throw new Error(`Bundle download failed (HTTP ${response.status}).`);
|
|
22402
|
-
}
|
|
22403
|
-
const buffer = Buffer.from(await response.arrayBuffer());
|
|
22404
|
-
await extractBundle(args.dir, buffer);
|
|
22405
|
-
return listResourceRelPaths(args.dir).length;
|
|
22645
|
+
return tree.bundleKey;
|
|
22406
22646
|
}
|
|
22407
22647
|
function assertNoLinkOnPath(args) {
|
|
22408
22648
|
let current = args.dir;
|
|
@@ -22442,25 +22682,10 @@ async function downloadResourceTree(args) {
|
|
|
22442
22682
|
return listResourceRelPaths(args.dir).length;
|
|
22443
22683
|
}
|
|
22444
22684
|
async function pullResourceDir(args) {
|
|
22445
|
-
|
|
22446
|
-
const pulled2 = await args.treeUrl();
|
|
22447
|
-
return {
|
|
22448
|
-
pulled: pulled2,
|
|
22449
|
-
fileCount: await downloadResourceTree({
|
|
22450
|
-
tree: pulled2.tree,
|
|
22451
|
-
dir: args.dir
|
|
22452
|
-
})
|
|
22453
|
-
};
|
|
22454
|
-
} catch (error) {
|
|
22455
|
-
if (!(error instanceof ApiError) || error.status !== 404) throw error;
|
|
22456
|
-
}
|
|
22457
|
-
const pulled = await args.bundleUrl();
|
|
22685
|
+
const pulled = await args.treeUrl();
|
|
22458
22686
|
return {
|
|
22459
22687
|
pulled,
|
|
22460
|
-
fileCount: await
|
|
22461
|
-
downloadUrl: pulled.downloadUrl,
|
|
22462
|
-
dir: args.dir
|
|
22463
|
-
})
|
|
22688
|
+
fileCount: await downloadResourceTree({ tree: pulled.tree, dir: args.dir })
|
|
22464
22689
|
};
|
|
22465
22690
|
}
|
|
22466
22691
|
|
|
@@ -22510,6 +22735,11 @@ var WorkspaceService = class {
|
|
|
22510
22735
|
const { client } = await this.sessionContext.requireAuthed();
|
|
22511
22736
|
return client.workspaces.list();
|
|
22512
22737
|
}
|
|
22738
|
+
/** The active workspace's teams, with what each carries and who is on it. */
|
|
22739
|
+
async teams() {
|
|
22740
|
+
const { client } = await this.sessionContext.requireAuthed();
|
|
22741
|
+
return client.workspaces.teams();
|
|
22742
|
+
}
|
|
22513
22743
|
/** Active members of the active workspace; optional substring filter. */
|
|
22514
22744
|
async members(args) {
|
|
22515
22745
|
const { client } = await this.sessionContext.requireAuthed();
|
|
@@ -23061,22 +23291,22 @@ function rankOperations(operations, query) {
|
|
|
23061
23291
|
}
|
|
23062
23292
|
|
|
23063
23293
|
// src/types/config.ts
|
|
23064
|
-
import { z as
|
|
23065
|
-
var CliConfigSchema =
|
|
23066
|
-
version:
|
|
23294
|
+
import { z as z14 } from "zod";
|
|
23295
|
+
var CliConfigSchema = z14.object({
|
|
23296
|
+
version: z14.literal(1),
|
|
23067
23297
|
/**
|
|
23068
23298
|
* Override for the cloud API base URL used at fresh `geni login`
|
|
23069
23299
|
* time. Once a session exists, the URL stored on it takes
|
|
23070
23300
|
* precedence — switching `apiUrl` after login does NOT reroute
|
|
23071
23301
|
* existing tokens (the session knows which server minted it).
|
|
23072
23302
|
*/
|
|
23073
|
-
apiUrl:
|
|
23303
|
+
apiUrl: z14.url().optional(),
|
|
23074
23304
|
/**
|
|
23075
23305
|
* Override for the dashboard base URL used by browser-opening
|
|
23076
23306
|
* commands (`geni credential connect`). Independent of `apiUrl`
|
|
23077
23307
|
* because in dev they live on different ports.
|
|
23078
23308
|
*/
|
|
23079
|
-
dashboardUrl:
|
|
23309
|
+
dashboardUrl: z14.url().optional()
|
|
23080
23310
|
});
|
|
23081
23311
|
var SETTABLE_CONFIG_KEYS = ["apiUrl", "dashboardUrl"];
|
|
23082
23312
|
var SETTABLE_CONFIG_KEY_SET = new Set(
|
|
@@ -23238,8 +23468,7 @@ var WorkflowAuthoringService = class {
|
|
|
23238
23468
|
fileCount
|
|
23239
23469
|
} = await pullResourceDir({
|
|
23240
23470
|
dir: args.dir,
|
|
23241
|
-
treeUrl: () => client.workflows.treeUrl(detail.id)
|
|
23242
|
-
bundleUrl: () => client.workflows.bundleUrl(detail.id)
|
|
23471
|
+
treeUrl: () => client.workflows.treeUrl(detail.id)
|
|
23243
23472
|
});
|
|
23244
23473
|
writeMarker(args.dir, {
|
|
23245
23474
|
resourceId: detail.id,
|
|
@@ -23268,8 +23497,7 @@ var WorkflowAuthoringService = class {
|
|
|
23268
23497
|
fileCount
|
|
23269
23498
|
} = await pullResourceDir({
|
|
23270
23499
|
dir: args.dir,
|
|
23271
|
-
treeUrl: () => client.workflows.treeUrl(args.id)
|
|
23272
|
-
bundleUrl: () => client.workflows.bundleUrl(args.id)
|
|
23500
|
+
treeUrl: () => client.workflows.treeUrl(args.id)
|
|
23273
23501
|
});
|
|
23274
23502
|
writeMarker(args.dir, {
|
|
23275
23503
|
resourceId: args.id,
|
|
@@ -23520,8 +23748,7 @@ Write the instructions the loading agent should follow.
|
|
|
23520
23748
|
fileCount
|
|
23521
23749
|
} = await pullResourceDir({
|
|
23522
23750
|
dir: args.dir,
|
|
23523
|
-
treeUrl: () => client.skills.treeUrl(args.id)
|
|
23524
|
-
bundleUrl: () => client.skills.bundleUrl(args.id)
|
|
23751
|
+
treeUrl: () => client.skills.treeUrl(args.id)
|
|
23525
23752
|
});
|
|
23526
23753
|
writeMarker(args.dir, {
|
|
23527
23754
|
resourceId: args.id,
|
|
@@ -23565,7 +23792,7 @@ Write the instructions the loading agent should follow.
|
|
|
23565
23792
|
}
|
|
23566
23793
|
return { fileCount: skill.files.length, description: skill.description };
|
|
23567
23794
|
}
|
|
23568
|
-
/**
|
|
23795
|
+
/** Stage `dir` for a push, return the staged `bundleKey`. */
|
|
23569
23796
|
async uploadBundle(id, dir) {
|
|
23570
23797
|
const { client } = await this.sessionContext.requireAuthed();
|
|
23571
23798
|
return stageResourceDir({
|
|
@@ -23695,6 +23922,9 @@ var CrmService = class {
|
|
|
23695
23922
|
async deleteTag(id) {
|
|
23696
23923
|
return (await this.crm()).deleteTag(id);
|
|
23697
23924
|
}
|
|
23925
|
+
async setRecordAccess(entityType, entityId, body) {
|
|
23926
|
+
return (await this.crm()).setRecordAccess(entityType, entityId, body);
|
|
23927
|
+
}
|
|
23698
23928
|
async assignTag(id, entityIds) {
|
|
23699
23929
|
return (await this.crm()).assignTag(id, entityIds);
|
|
23700
23930
|
}
|
|
@@ -24196,21 +24426,21 @@ var CustomApiService = class {
|
|
|
24196
24426
|
};
|
|
24197
24427
|
|
|
24198
24428
|
// ../../packages/crm-api/dist/types/enums.js
|
|
24199
|
-
import { z as
|
|
24200
|
-
var LeadSortDirectionSchema =
|
|
24201
|
-
var ContactPointKindSchema =
|
|
24429
|
+
import { z as z15 } from "zod";
|
|
24430
|
+
var LeadSortDirectionSchema = z15.enum(["asc", "desc"]);
|
|
24431
|
+
var ContactPointKindSchema = z15.enum([
|
|
24202
24432
|
"work_email",
|
|
24203
24433
|
"personal_email",
|
|
24204
24434
|
"mobile",
|
|
24205
24435
|
"phone"
|
|
24206
24436
|
]);
|
|
24207
|
-
var ContactPointStatusSchema =
|
|
24437
|
+
var ContactPointStatusSchema = z15.enum([
|
|
24208
24438
|
"verified",
|
|
24209
24439
|
"unverified",
|
|
24210
24440
|
"unavailable",
|
|
24211
24441
|
"bounced"
|
|
24212
24442
|
]);
|
|
24213
|
-
var EnrichmentOutcomeSchema =
|
|
24443
|
+
var EnrichmentOutcomeSchema = z15.enum([
|
|
24214
24444
|
"matched",
|
|
24215
24445
|
"no_match",
|
|
24216
24446
|
"no_contact",
|
|
@@ -24220,8 +24450,8 @@ var EnrichmentOutcomeSchema = z14.enum([
|
|
|
24220
24450
|
]);
|
|
24221
24451
|
|
|
24222
24452
|
// ../../packages/crm-api/dist/types/entity.js
|
|
24223
|
-
import { z as
|
|
24224
|
-
var CrmEntityTypeSchema =
|
|
24453
|
+
import { z as z16 } from "zod";
|
|
24454
|
+
var CrmEntityTypeSchema = z16.enum([
|
|
24225
24455
|
"person",
|
|
24226
24456
|
"company",
|
|
24227
24457
|
"pipeline_card"
|
|
@@ -24229,14 +24459,14 @@ var CrmEntityTypeSchema = z15.enum([
|
|
|
24229
24459
|
var CRM_ENTITY_TYPES = CrmEntityTypeSchema.options;
|
|
24230
24460
|
|
|
24231
24461
|
// ../../packages/crm-api/dist/types/recordEvent.js
|
|
24232
|
-
import { z as
|
|
24233
|
-
var CrmActorKindSchema =
|
|
24462
|
+
import { z as z17 } from "zod";
|
|
24463
|
+
var CrmActorKindSchema = z17.enum([
|
|
24234
24464
|
"user",
|
|
24235
24465
|
"agent",
|
|
24236
24466
|
"automation",
|
|
24237
24467
|
"system"
|
|
24238
24468
|
]);
|
|
24239
|
-
var CrmRecordEventKindSchema =
|
|
24469
|
+
var CrmRecordEventKindSchema = z17.enum([
|
|
24240
24470
|
"created",
|
|
24241
24471
|
"field_changed",
|
|
24242
24472
|
"stage_changed",
|
|
@@ -24250,6 +24480,7 @@ var CrmRecordEventKindSchema = z16.enum([
|
|
|
24250
24480
|
"tag_removed",
|
|
24251
24481
|
"list_added",
|
|
24252
24482
|
"list_removed",
|
|
24483
|
+
"access_changed",
|
|
24253
24484
|
"file_added",
|
|
24254
24485
|
"file_removed",
|
|
24255
24486
|
"task_created",
|
|
@@ -24258,21 +24489,32 @@ var CrmRecordEventKindSchema = z16.enum([
|
|
|
24258
24489
|
"task_dismissed",
|
|
24259
24490
|
"task_deleted"
|
|
24260
24491
|
]);
|
|
24261
|
-
var CrmRecordEventFeedQuerySchema =
|
|
24492
|
+
var CrmRecordEventFeedQuerySchema = z17.object({
|
|
24262
24493
|
/** The cursor a previous read returned; omitted, the read returns the latest events. */
|
|
24263
|
-
after:
|
|
24264
|
-
limit:
|
|
24494
|
+
after: z17.string().regex(/^\d+$/).optional(),
|
|
24495
|
+
limit: z17.coerce.number().int().min(1).max(500).default(100)
|
|
24496
|
+
});
|
|
24497
|
+
|
|
24498
|
+
// ../../packages/crm-api/dist/types/access.js
|
|
24499
|
+
import { z as z18 } from "zod";
|
|
24500
|
+
var CRM_RECORD_VISIBILITIES = ["private", "team", "workspace"];
|
|
24501
|
+
var CrmRecordVisibilitySchema = z18.enum(CRM_RECORD_VISIBILITIES);
|
|
24502
|
+
var SetCrmRecordAccessRequestSchema = z18.object({
|
|
24503
|
+
/** Null only for a pipeline card, which may be unassigned. */
|
|
24504
|
+
ownerMembershipId: z18.uuid().nullable(),
|
|
24505
|
+
teamId: z18.uuid().nullable(),
|
|
24506
|
+
visibility: CrmRecordVisibilitySchema
|
|
24265
24507
|
});
|
|
24266
24508
|
|
|
24267
24509
|
// ../../packages/crm-api/dist/types/concurrency.js
|
|
24268
|
-
import { z as
|
|
24269
|
-
var ExpectedUpdatedAtSchema =
|
|
24270
|
-
expectedUpdatedAt:
|
|
24510
|
+
import { z as z19 } from "zod";
|
|
24511
|
+
var ExpectedUpdatedAtSchema = z19.object({
|
|
24512
|
+
expectedUpdatedAt: z19.string()
|
|
24271
24513
|
});
|
|
24272
24514
|
|
|
24273
24515
|
// ../../packages/crm-api/dist/types/company.js
|
|
24274
|
-
import { z as
|
|
24275
|
-
var CompanyTypeSchema =
|
|
24516
|
+
import { z as z20 } from "zod";
|
|
24517
|
+
var CompanyTypeSchema = z20.enum([
|
|
24276
24518
|
"public",
|
|
24277
24519
|
"private",
|
|
24278
24520
|
"nonprofit",
|
|
@@ -24282,11 +24524,11 @@ var CompanyTypeSchema = z18.enum([
|
|
|
24282
24524
|
]);
|
|
24283
24525
|
|
|
24284
24526
|
// ../../packages/crm-api/dist/types/customField.js
|
|
24285
|
-
import { z as
|
|
24527
|
+
import { z as z22 } from "zod";
|
|
24286
24528
|
|
|
24287
24529
|
// ../../packages/crm-api/dist/types/tag.js
|
|
24288
|
-
import { z as
|
|
24289
|
-
var TagColorSchema =
|
|
24530
|
+
import { z as z21 } from "zod";
|
|
24531
|
+
var TagColorSchema = z21.enum([
|
|
24290
24532
|
"stone",
|
|
24291
24533
|
"charcoal",
|
|
24292
24534
|
"red",
|
|
@@ -24318,23 +24560,23 @@ var TagColorSchema = z19.enum([
|
|
|
24318
24560
|
"plum",
|
|
24319
24561
|
"tyrian"
|
|
24320
24562
|
]);
|
|
24321
|
-
var CreateTagRequestSchema =
|
|
24322
|
-
name:
|
|
24563
|
+
var CreateTagRequestSchema = z21.object({
|
|
24564
|
+
name: z21.string().min(1).max(100),
|
|
24323
24565
|
color: TagColorSchema.default("stone"),
|
|
24324
24566
|
entityType: CrmEntityTypeSchema
|
|
24325
24567
|
});
|
|
24326
|
-
var UpdateTagRequestSchema =
|
|
24327
|
-
name:
|
|
24568
|
+
var UpdateTagRequestSchema = z21.object({
|
|
24569
|
+
name: z21.string().min(1).max(100).optional(),
|
|
24328
24570
|
color: TagColorSchema.optional()
|
|
24329
24571
|
}).refine((req) => req.name !== void 0 || req.color !== void 0, {
|
|
24330
24572
|
message: "Nothing to update"
|
|
24331
24573
|
});
|
|
24332
|
-
var TagEntitiesRequestSchema =
|
|
24333
|
-
entityIds:
|
|
24574
|
+
var TagEntitiesRequestSchema = z21.object({
|
|
24575
|
+
entityIds: z21.array(z21.uuid()).min(1).max(1e3)
|
|
24334
24576
|
});
|
|
24335
24577
|
|
|
24336
24578
|
// ../../packages/crm-api/dist/types/customField.js
|
|
24337
|
-
var CustomFieldTypeSchema =
|
|
24579
|
+
var CustomFieldTypeSchema = z22.enum([
|
|
24338
24580
|
"text",
|
|
24339
24581
|
"long_text",
|
|
24340
24582
|
"number",
|
|
@@ -24353,91 +24595,91 @@ var CustomFieldTypeSchema = z20.enum([
|
|
|
24353
24595
|
function customFieldScopeKind(entityType) {
|
|
24354
24596
|
return entityType === "pipeline_card" ? "pipeline" : null;
|
|
24355
24597
|
}
|
|
24356
|
-
var CustomFieldOptionSchema =
|
|
24357
|
-
value:
|
|
24358
|
-
label:
|
|
24598
|
+
var CustomFieldOptionSchema = z22.object({
|
|
24599
|
+
value: z22.string().min(1).max(120),
|
|
24600
|
+
label: z22.string().min(1).max(120),
|
|
24359
24601
|
color: TagColorSchema.optional()
|
|
24360
24602
|
});
|
|
24361
|
-
var CustomFieldOptionInputSchema =
|
|
24362
|
-
value:
|
|
24363
|
-
label:
|
|
24603
|
+
var CustomFieldOptionInputSchema = z22.object({
|
|
24604
|
+
value: z22.string().max(120).optional(),
|
|
24605
|
+
label: z22.string().min(1).max(120),
|
|
24364
24606
|
color: TagColorSchema.optional()
|
|
24365
24607
|
});
|
|
24366
|
-
var CreateCustomFieldRequestSchema =
|
|
24608
|
+
var CreateCustomFieldRequestSchema = z22.object({
|
|
24367
24609
|
entityType: CrmEntityTypeSchema,
|
|
24368
|
-
scopeId:
|
|
24369
|
-
label:
|
|
24610
|
+
scopeId: z22.uuid().nullish(),
|
|
24611
|
+
label: z22.string().min(1).max(80),
|
|
24370
24612
|
fieldType: CustomFieldTypeSchema,
|
|
24371
|
-
options:
|
|
24372
|
-
isRequired:
|
|
24373
|
-
helpText:
|
|
24374
|
-
description:
|
|
24613
|
+
options: z22.array(CustomFieldOptionInputSchema).max(100).optional(),
|
|
24614
|
+
isRequired: z22.boolean().optional(),
|
|
24615
|
+
helpText: z22.string().max(200).nullish(),
|
|
24616
|
+
description: z22.string().max(1e3).nullish()
|
|
24375
24617
|
}).refine((req) => customFieldScopeKind(req.entityType) === "pipeline" === !!req.scopeId, {
|
|
24376
24618
|
message: "A pipeline_card field needs its pipeline; no other field takes one"
|
|
24377
24619
|
});
|
|
24378
|
-
var UpdateCustomFieldRequestSchema =
|
|
24379
|
-
label:
|
|
24380
|
-
options:
|
|
24381
|
-
isRequired:
|
|
24382
|
-
helpText:
|
|
24383
|
-
description:
|
|
24384
|
-
position:
|
|
24620
|
+
var UpdateCustomFieldRequestSchema = z22.object({
|
|
24621
|
+
label: z22.string().min(1).max(80).optional(),
|
|
24622
|
+
options: z22.array(CustomFieldOptionInputSchema).max(100).optional(),
|
|
24623
|
+
isRequired: z22.boolean().optional(),
|
|
24624
|
+
helpText: z22.string().max(200).nullish(),
|
|
24625
|
+
description: z22.string().max(1e3).nullish(),
|
|
24626
|
+
position: z22.number().int().min(0).optional()
|
|
24385
24627
|
}).refine((req) => Object.keys(req).length > 0, {
|
|
24386
24628
|
message: "Nothing to update"
|
|
24387
24629
|
});
|
|
24388
|
-
var ReorderCustomFieldsRequestSchema =
|
|
24389
|
-
orderedIds:
|
|
24630
|
+
var ReorderCustomFieldsRequestSchema = z22.object({
|
|
24631
|
+
orderedIds: z22.array(z22.uuid()).min(1)
|
|
24390
24632
|
});
|
|
24391
|
-
var CustomFieldValuesSchema =
|
|
24633
|
+
var CustomFieldValuesSchema = z22.record(z22.string(), z22.unknown());
|
|
24392
24634
|
|
|
24393
24635
|
// ../../packages/crm-api/dist/types/list.js
|
|
24394
|
-
import { z as
|
|
24395
|
-
var ListSearchSortSchema =
|
|
24636
|
+
import { z as z23 } from "zod";
|
|
24637
|
+
var ListSearchSortSchema = z23.enum([
|
|
24396
24638
|
"relevance",
|
|
24397
24639
|
"recent",
|
|
24398
24640
|
"updated",
|
|
24399
24641
|
"name",
|
|
24400
24642
|
"members"
|
|
24401
24643
|
]);
|
|
24402
|
-
var ListSearchFiltersSchema =
|
|
24644
|
+
var ListSearchFiltersSchema = z23.object({
|
|
24403
24645
|
entityType: CrmEntityTypeSchema.optional()
|
|
24404
24646
|
});
|
|
24405
|
-
var ListSearchRequestSchema =
|
|
24406
|
-
query:
|
|
24647
|
+
var ListSearchRequestSchema = z23.object({
|
|
24648
|
+
query: z23.string().optional(),
|
|
24407
24649
|
filters: ListSearchFiltersSchema.optional(),
|
|
24408
24650
|
sort: ListSearchSortSchema.default("relevance"),
|
|
24409
24651
|
// Direction for the column sort; omitted falls back to the sort's default.
|
|
24410
24652
|
direction: LeadSortDirectionSchema.optional(),
|
|
24411
|
-
cursor:
|
|
24412
|
-
limit:
|
|
24653
|
+
cursor: z23.string().nullable().optional(),
|
|
24654
|
+
limit: z23.number().int().min(1).max(100).default(25)
|
|
24413
24655
|
});
|
|
24414
|
-
var CreateListRequestSchema =
|
|
24415
|
-
name:
|
|
24416
|
-
purpose:
|
|
24656
|
+
var CreateListRequestSchema = z23.object({
|
|
24657
|
+
name: z23.string().min(1).max(200),
|
|
24658
|
+
purpose: z23.string().max(2e3).nullish(),
|
|
24417
24659
|
entityType: CrmEntityTypeSchema
|
|
24418
24660
|
});
|
|
24419
|
-
var UpdateListRequestSchema =
|
|
24420
|
-
name:
|
|
24421
|
-
purpose:
|
|
24661
|
+
var UpdateListRequestSchema = z23.object({
|
|
24662
|
+
name: z23.string().min(1).max(200).optional(),
|
|
24663
|
+
purpose: z23.string().max(2e3).nullable().optional()
|
|
24422
24664
|
}).refine((req) => req.name !== void 0 || req.purpose !== void 0, {
|
|
24423
24665
|
message: "Nothing to update"
|
|
24424
24666
|
});
|
|
24425
|
-
var AddListMembersRequestSchema =
|
|
24426
|
-
entityIds:
|
|
24667
|
+
var AddListMembersRequestSchema = z23.object({
|
|
24668
|
+
entityIds: z23.array(z23.uuid()).min(1).max(1e3)
|
|
24427
24669
|
});
|
|
24428
|
-
var DeleteListsRequestSchema =
|
|
24429
|
-
ids:
|
|
24670
|
+
var DeleteListsRequestSchema = z23.object({
|
|
24671
|
+
ids: z23.array(z23.uuid()).min(1).max(100)
|
|
24430
24672
|
});
|
|
24431
24673
|
|
|
24432
24674
|
// ../../packages/crm-api/dist/types/pipeline.js
|
|
24433
|
-
import { z as
|
|
24434
|
-
var PipelineKindSchema =
|
|
24435
|
-
var PipelineTemplateKindSchema =
|
|
24436
|
-
var StagePhaseSchema =
|
|
24437
|
-
var BallInCourtSchema =
|
|
24438
|
-
var StageOutcomeSchema =
|
|
24439
|
-
var CardStatusSchema =
|
|
24440
|
-
var CardEventFieldSchema =
|
|
24675
|
+
import { z as z24 } from "zod";
|
|
24676
|
+
var PipelineKindSchema = z24.enum(["sales", "recruiting", "custom"]);
|
|
24677
|
+
var PipelineTemplateKindSchema = z24.enum(["sales", "recruiting"]);
|
|
24678
|
+
var StagePhaseSchema = z24.enum(["acquisition", "fulfillment"]);
|
|
24679
|
+
var BallInCourtSchema = z24.enum(["us", "them", "mutual"]);
|
|
24680
|
+
var StageOutcomeSchema = z24.enum(["won", "lost"]);
|
|
24681
|
+
var CardStatusSchema = z24.enum(["open", "won", "lost"]);
|
|
24682
|
+
var CardEventFieldSchema = z24.enum([
|
|
24441
24683
|
"title",
|
|
24442
24684
|
"amount",
|
|
24443
24685
|
"currency",
|
|
@@ -24446,162 +24688,162 @@ var CardEventFieldSchema = z22.enum([
|
|
|
24446
24688
|
"close_date",
|
|
24447
24689
|
"attribution"
|
|
24448
24690
|
]);
|
|
24449
|
-
var CardLinkedEntityTypeSchema =
|
|
24450
|
-
var CreatePipelineFromTemplateRequestSchema =
|
|
24691
|
+
var CardLinkedEntityTypeSchema = z24.enum(["person", "company"]);
|
|
24692
|
+
var CreatePipelineFromTemplateRequestSchema = z24.object({
|
|
24451
24693
|
kind: PipelineTemplateKindSchema,
|
|
24452
|
-
name:
|
|
24694
|
+
name: z24.string().min(1).max(200).optional()
|
|
24453
24695
|
});
|
|
24454
|
-
var StageInputSchema =
|
|
24455
|
-
name:
|
|
24696
|
+
var StageInputSchema = z24.object({
|
|
24697
|
+
name: z24.string().min(1).max(80),
|
|
24456
24698
|
phase: StagePhaseSchema.default("acquisition"),
|
|
24457
24699
|
ballInCourt: BallInCourtSchema.default("us"),
|
|
24458
|
-
isCommitted:
|
|
24700
|
+
isCommitted: z24.boolean().default(false),
|
|
24459
24701
|
outcome: StageOutcomeSchema.nullish(),
|
|
24460
|
-
weight:
|
|
24702
|
+
weight: z24.number().int().min(0).max(100).default(0),
|
|
24461
24703
|
color: TagColorSchema.default("stone")
|
|
24462
24704
|
});
|
|
24463
|
-
var CreatePipelineRequestSchema =
|
|
24464
|
-
name:
|
|
24465
|
-
cardLabel:
|
|
24466
|
-
stages:
|
|
24705
|
+
var CreatePipelineRequestSchema = z24.object({
|
|
24706
|
+
name: z24.string().min(1).max(200),
|
|
24707
|
+
cardLabel: z24.string().min(1).max(60),
|
|
24708
|
+
stages: z24.array(StageInputSchema).min(1).max(20)
|
|
24467
24709
|
});
|
|
24468
|
-
var UpdatePipelineRequestSchema =
|
|
24469
|
-
name:
|
|
24470
|
-
cardLabel:
|
|
24471
|
-
archived:
|
|
24710
|
+
var UpdatePipelineRequestSchema = z24.object({
|
|
24711
|
+
name: z24.string().min(1).max(200).optional(),
|
|
24712
|
+
cardLabel: z24.string().min(1).max(60).optional(),
|
|
24713
|
+
archived: z24.boolean().optional()
|
|
24472
24714
|
}).refine((req) => req.name !== void 0 || req.cardLabel !== void 0 || req.archived !== void 0, { message: "Nothing to update" });
|
|
24473
24715
|
var AddStageRequestSchema = StageInputSchema.extend({
|
|
24474
24716
|
// 0-indexed insert position; appended when omitted.
|
|
24475
|
-
position:
|
|
24717
|
+
position: z24.number().int().min(0).optional()
|
|
24476
24718
|
});
|
|
24477
|
-
var UpdateStageRequestSchema =
|
|
24478
|
-
name:
|
|
24719
|
+
var UpdateStageRequestSchema = z24.object({
|
|
24720
|
+
name: z24.string().min(1).max(80).optional(),
|
|
24479
24721
|
phase: StagePhaseSchema.optional(),
|
|
24480
24722
|
ballInCourt: BallInCourtSchema.optional(),
|
|
24481
|
-
isCommitted:
|
|
24723
|
+
isCommitted: z24.boolean().optional(),
|
|
24482
24724
|
outcome: StageOutcomeSchema.nullable().optional(),
|
|
24483
|
-
weight:
|
|
24725
|
+
weight: z24.number().int().min(0).max(100).optional(),
|
|
24484
24726
|
color: TagColorSchema.optional()
|
|
24485
24727
|
}).refine((req) => Object.keys(req).length > 0, {
|
|
24486
24728
|
message: "Nothing to update"
|
|
24487
24729
|
});
|
|
24488
|
-
var ReorderStagesRequestSchema =
|
|
24489
|
-
stageIds:
|
|
24730
|
+
var ReorderStagesRequestSchema = z24.object({
|
|
24731
|
+
stageIds: z24.array(z24.uuid()).min(1)
|
|
24490
24732
|
});
|
|
24491
|
-
var CardPersonInputSchema =
|
|
24492
|
-
personId:
|
|
24493
|
-
role:
|
|
24494
|
-
isPrimary:
|
|
24733
|
+
var CardPersonInputSchema = z24.object({
|
|
24734
|
+
personId: z24.uuid(),
|
|
24735
|
+
role: z24.string().max(120).nullish(),
|
|
24736
|
+
isPrimary: z24.boolean().default(false)
|
|
24495
24737
|
});
|
|
24496
|
-
var CreateCardRequestSchema =
|
|
24497
|
-
title:
|
|
24738
|
+
var CreateCardRequestSchema = z24.object({
|
|
24739
|
+
title: z24.string().min(1).max(200),
|
|
24498
24740
|
// Defaults to the pipeline's first stage when omitted.
|
|
24499
|
-
stageId:
|
|
24500
|
-
ownerMembershipId:
|
|
24501
|
-
primaryCompanyId:
|
|
24502
|
-
people:
|
|
24503
|
-
amount:
|
|
24504
|
-
currency:
|
|
24505
|
-
expectedCloseAt:
|
|
24506
|
-
attributionSourceId:
|
|
24741
|
+
stageId: z24.uuid().optional(),
|
|
24742
|
+
ownerMembershipId: z24.uuid().nullish(),
|
|
24743
|
+
primaryCompanyId: z24.uuid().nullish(),
|
|
24744
|
+
people: z24.array(CardPersonInputSchema).max(50).default([]),
|
|
24745
|
+
amount: z24.number().min(0).nullish(),
|
|
24746
|
+
currency: z24.string().max(8).nullish(),
|
|
24747
|
+
expectedCloseAt: z24.string().nullish(),
|
|
24748
|
+
attributionSourceId: z24.uuid().nullish()
|
|
24507
24749
|
});
|
|
24508
|
-
var UpdateCardRequestSchema =
|
|
24509
|
-
title:
|
|
24510
|
-
ownerMembershipId:
|
|
24511
|
-
primaryCompanyId:
|
|
24512
|
-
amount:
|
|
24513
|
-
currency:
|
|
24514
|
-
expectedCloseAt:
|
|
24515
|
-
attributionSourceId:
|
|
24750
|
+
var UpdateCardRequestSchema = z24.object({
|
|
24751
|
+
title: z24.string().min(1).max(200).optional(),
|
|
24752
|
+
ownerMembershipId: z24.uuid().nullable().optional(),
|
|
24753
|
+
primaryCompanyId: z24.uuid().nullable().optional(),
|
|
24754
|
+
amount: z24.number().min(0).nullable().optional(),
|
|
24755
|
+
currency: z24.string().max(8).nullable().optional(),
|
|
24756
|
+
expectedCloseAt: z24.string().nullable().optional(),
|
|
24757
|
+
attributionSourceId: z24.uuid().nullable().optional(),
|
|
24516
24758
|
// Registry-defined custom fields; validated + merged server-side.
|
|
24517
24759
|
custom: CustomFieldValuesSchema.optional()
|
|
24518
24760
|
}).refine((req) => Object.keys(req).length > 0, {
|
|
24519
24761
|
message: "Nothing to update"
|
|
24520
24762
|
});
|
|
24521
|
-
var MoveCardRequestSchema =
|
|
24522
|
-
toStageId:
|
|
24523
|
-
boardPosition:
|
|
24763
|
+
var MoveCardRequestSchema = z24.object({
|
|
24764
|
+
toStageId: z24.uuid(),
|
|
24765
|
+
boardPosition: z24.number().optional()
|
|
24524
24766
|
});
|
|
24525
|
-
var SetCardStatusRequestSchema =
|
|
24767
|
+
var SetCardStatusRequestSchema = z24.object({
|
|
24526
24768
|
status: CardStatusSchema,
|
|
24527
|
-
lostReason:
|
|
24769
|
+
lostReason: z24.string().max(2e3).nullish()
|
|
24528
24770
|
});
|
|
24529
|
-
var AddCardContactRequestSchema =
|
|
24530
|
-
personId:
|
|
24771
|
+
var AddCardContactRequestSchema = z24.object({
|
|
24772
|
+
personId: z24.uuid()
|
|
24531
24773
|
});
|
|
24532
24774
|
var CARD_BATCH_MAX = 100;
|
|
24533
|
-
var DeleteCardsRequestSchema =
|
|
24534
|
-
ids:
|
|
24775
|
+
var DeleteCardsRequestSchema = z24.strictObject({
|
|
24776
|
+
ids: z24.array(z24.uuid()).min(1).max(CARD_BATCH_MAX)
|
|
24535
24777
|
});
|
|
24536
|
-
var SetCardCreditsRequestSchema =
|
|
24778
|
+
var SetCardCreditsRequestSchema = z24.object({
|
|
24537
24779
|
/** Replaces every credit. Shares add up to 100, or the list is empty. */
|
|
24538
|
-
credits:
|
|
24539
|
-
membershipId:
|
|
24540
|
-
role:
|
|
24541
|
-
percent:
|
|
24780
|
+
credits: z24.array(z24.object({
|
|
24781
|
+
membershipId: z24.uuid(),
|
|
24782
|
+
role: z24.string().min(1).max(50),
|
|
24783
|
+
percent: z24.number().positive().max(100)
|
|
24542
24784
|
})).max(10)
|
|
24543
24785
|
});
|
|
24544
24786
|
|
|
24545
24787
|
// ../../packages/crm-api/dist/types/attribution.js
|
|
24546
|
-
import { z as
|
|
24547
|
-
var CreateAttributionSourceRequestSchema =
|
|
24548
|
-
name:
|
|
24788
|
+
import { z as z25 } from "zod";
|
|
24789
|
+
var CreateAttributionSourceRequestSchema = z25.object({
|
|
24790
|
+
name: z25.string().min(1).max(100)
|
|
24549
24791
|
});
|
|
24550
|
-
var UpdateAttributionSourceRequestSchema =
|
|
24551
|
-
name:
|
|
24552
|
-
isArchived:
|
|
24792
|
+
var UpdateAttributionSourceRequestSchema = z25.object({
|
|
24793
|
+
name: z25.string().min(1).max(100).optional(),
|
|
24794
|
+
isArchived: z25.boolean().optional()
|
|
24553
24795
|
}).refine((req) => req.name !== void 0 || req.isArchived !== void 0, {
|
|
24554
24796
|
message: "Nothing to update"
|
|
24555
24797
|
});
|
|
24556
|
-
var ReorderAttributionSourcesRequestSchema =
|
|
24557
|
-
orderedIds:
|
|
24798
|
+
var ReorderAttributionSourcesRequestSchema = z25.object({
|
|
24799
|
+
orderedIds: z25.array(z25.uuid()).min(1)
|
|
24558
24800
|
});
|
|
24559
24801
|
|
|
24560
24802
|
// ../../packages/crm-api/dist/types/note.js
|
|
24561
|
-
import { z as
|
|
24562
|
-
var CreateNoteRequestSchema =
|
|
24563
|
-
body:
|
|
24803
|
+
import { z as z26 } from "zod";
|
|
24804
|
+
var CreateNoteRequestSchema = z26.object({
|
|
24805
|
+
body: z26.string().min(1).max(1e4),
|
|
24564
24806
|
// Stamped by the engine for agent writes — never user-supplied in the UI.
|
|
24565
|
-
draftedBy:
|
|
24807
|
+
draftedBy: z26.string().max(50).nullish()
|
|
24566
24808
|
});
|
|
24567
|
-
var UpdateNoteRequestSchema =
|
|
24568
|
-
body:
|
|
24809
|
+
var UpdateNoteRequestSchema = z26.object({
|
|
24810
|
+
body: z26.string().min(1).max(1e4)
|
|
24569
24811
|
});
|
|
24570
24812
|
|
|
24571
24813
|
// ../../packages/crm-api/dist/types/task.js
|
|
24572
|
-
import { z as
|
|
24573
|
-
var TaskStatusSchema =
|
|
24574
|
-
var TaskPrioritySchema =
|
|
24575
|
-
var TaskEntityRefRequestSchema =
|
|
24814
|
+
import { z as z27 } from "zod";
|
|
24815
|
+
var TaskStatusSchema = z27.enum(["open", "done", "dismissed"]);
|
|
24816
|
+
var TaskPrioritySchema = z27.enum(["low", "medium", "high"]);
|
|
24817
|
+
var TaskEntityRefRequestSchema = z27.object({
|
|
24576
24818
|
type: CrmEntityTypeSchema,
|
|
24577
|
-
id:
|
|
24819
|
+
id: z27.uuid()
|
|
24578
24820
|
});
|
|
24579
|
-
var CreateTaskRequestSchema =
|
|
24580
|
-
title:
|
|
24581
|
-
description:
|
|
24582
|
-
dueAt:
|
|
24821
|
+
var CreateTaskRequestSchema = z27.object({
|
|
24822
|
+
title: z27.string().min(1).max(500),
|
|
24823
|
+
description: z27.string().max(1e4).nullish(),
|
|
24824
|
+
dueAt: z27.iso.datetime().nullish(),
|
|
24583
24825
|
// Omitted or null = no priority.
|
|
24584
24826
|
priority: TaskPrioritySchema.nullish(),
|
|
24585
24827
|
// Defaults to the calling member when omitted.
|
|
24586
|
-
ownerMembershipId:
|
|
24828
|
+
ownerMembershipId: z27.uuid().nullish(),
|
|
24587
24829
|
entity: TaskEntityRefRequestSchema.nullish(),
|
|
24588
24830
|
// Stamped by the engine for agent writes — never user-supplied in the UI.
|
|
24589
|
-
createdByProvider:
|
|
24831
|
+
createdByProvider: z27.string().max(50).nullish()
|
|
24590
24832
|
});
|
|
24591
|
-
var UpdateTaskRequestSchema =
|
|
24592
|
-
title:
|
|
24593
|
-
description:
|
|
24594
|
-
dueAt:
|
|
24833
|
+
var UpdateTaskRequestSchema = z27.object({
|
|
24834
|
+
title: z27.string().min(1).max(500).optional(),
|
|
24835
|
+
description: z27.string().max(1e4).nullable().optional(),
|
|
24836
|
+
dueAt: z27.iso.datetime().nullable().optional(),
|
|
24595
24837
|
priority: TaskPrioritySchema.nullable().optional(),
|
|
24596
|
-
ownerMembershipId:
|
|
24838
|
+
ownerMembershipId: z27.uuid().optional()
|
|
24597
24839
|
});
|
|
24598
|
-
var SetTaskStatusRequestSchema =
|
|
24840
|
+
var SetTaskStatusRequestSchema = z27.object({
|
|
24599
24841
|
status: TaskStatusSchema
|
|
24600
24842
|
});
|
|
24601
24843
|
|
|
24602
24844
|
// ../../packages/crm-api/dist/types/activity.js
|
|
24603
|
-
import { z as
|
|
24604
|
-
var ActivityKindSchema =
|
|
24845
|
+
import { z as z28 } from "zod";
|
|
24846
|
+
var ActivityKindSchema = z28.enum([
|
|
24605
24847
|
"note",
|
|
24606
24848
|
"email",
|
|
24607
24849
|
"slack",
|
|
@@ -24611,47 +24853,47 @@ var ActivityKindSchema = z26.enum([
|
|
|
24611
24853
|
"linkedin",
|
|
24612
24854
|
"other"
|
|
24613
24855
|
]);
|
|
24614
|
-
var ActivityDirectionSchema =
|
|
24615
|
-
var ActivitySourceSchema =
|
|
24616
|
-
var ActivityUrlSchema =
|
|
24856
|
+
var ActivityDirectionSchema = z28.enum(["inbound", "outbound"]);
|
|
24857
|
+
var ActivitySourceSchema = z28.enum(["manual", "agent", "sync"]);
|
|
24858
|
+
var ActivityUrlSchema = z28.url().max(2e3).refine((value) => /^https?:\/\//i.test(value), {
|
|
24617
24859
|
message: "Link must be an http or https URL"
|
|
24618
24860
|
});
|
|
24619
|
-
var ActivityLinkRequestSchema =
|
|
24861
|
+
var ActivityLinkRequestSchema = z28.object({
|
|
24620
24862
|
type: CrmEntityTypeSchema,
|
|
24621
|
-
id:
|
|
24863
|
+
id: z28.uuid()
|
|
24622
24864
|
});
|
|
24623
|
-
var ActivityFieldsSchema =
|
|
24865
|
+
var ActivityFieldsSchema = z28.object({
|
|
24624
24866
|
kind: ActivityKindSchema,
|
|
24625
24867
|
direction: ActivityDirectionSchema.nullish(),
|
|
24626
24868
|
/** When it happened; a future time is a scheduled meeting or call. Omitted, now. */
|
|
24627
|
-
occurredAt:
|
|
24628
|
-
subject:
|
|
24629
|
-
body:
|
|
24869
|
+
occurredAt: z28.iso.datetime().nullish(),
|
|
24870
|
+
subject: z28.string().max(500).nullish(),
|
|
24871
|
+
body: z28.string().max(2e4).nullish(),
|
|
24630
24872
|
externalUrl: ActivityUrlSchema.nullish(),
|
|
24631
|
-
links:
|
|
24873
|
+
links: z28.array(ActivityLinkRequestSchema).min(1).max(25),
|
|
24632
24874
|
// Stamped by the engine for agent writes; never user-supplied in the UI.
|
|
24633
|
-
draftedBy:
|
|
24875
|
+
draftedBy: z28.string().max(50).nullish()
|
|
24634
24876
|
});
|
|
24635
24877
|
var CreateActivityRequestSchema = ActivityFieldsSchema.extend({
|
|
24636
|
-
externalRef:
|
|
24878
|
+
externalRef: z28.string().min(1).max(500).nullish()
|
|
24637
24879
|
});
|
|
24638
24880
|
var UpsertActivityRequestSchema = ActivityFieldsSchema.extend({
|
|
24639
|
-
externalRef:
|
|
24881
|
+
externalRef: z28.string().min(1).max(500)
|
|
24640
24882
|
});
|
|
24641
|
-
var UpdateActivityRequestSchema =
|
|
24883
|
+
var UpdateActivityRequestSchema = z28.object({
|
|
24642
24884
|
kind: ActivityKindSchema.optional(),
|
|
24643
24885
|
direction: ActivityDirectionSchema.nullable().optional(),
|
|
24644
|
-
occurredAt:
|
|
24645
|
-
subject:
|
|
24646
|
-
body:
|
|
24886
|
+
occurredAt: z28.iso.datetime().optional(),
|
|
24887
|
+
subject: z28.string().max(500).nullable().optional(),
|
|
24888
|
+
body: z28.string().max(2e4).nullable().optional(),
|
|
24647
24889
|
externalUrl: ActivityUrlSchema.nullable().optional(),
|
|
24648
24890
|
/** Replaces every link. */
|
|
24649
|
-
links:
|
|
24891
|
+
links: z28.array(ActivityLinkRequestSchema).min(1).max(25).optional()
|
|
24650
24892
|
});
|
|
24651
24893
|
|
|
24652
24894
|
// ../../packages/crm-api/dist/types/recordFile.js
|
|
24653
|
-
import { z as
|
|
24654
|
-
var CrmFileKindSchema =
|
|
24895
|
+
import { z as z29 } from "zod";
|
|
24896
|
+
var CrmFileKindSchema = z29.enum([
|
|
24655
24897
|
"document",
|
|
24656
24898
|
"resume",
|
|
24657
24899
|
"contract",
|
|
@@ -24659,48 +24901,48 @@ var CrmFileKindSchema = z27.enum([
|
|
|
24659
24901
|
"other"
|
|
24660
24902
|
]);
|
|
24661
24903
|
var CRM_FILE_MAX_BYTES = 25 * 1024 * 1024;
|
|
24662
|
-
var PrepareCrmFileUploadRequestSchema =
|
|
24904
|
+
var PrepareCrmFileUploadRequestSchema = z29.object({
|
|
24663
24905
|
entityType: CrmEntityTypeSchema,
|
|
24664
|
-
entityId:
|
|
24665
|
-
mimeType:
|
|
24906
|
+
entityId: z29.uuid(),
|
|
24907
|
+
mimeType: z29.string().min(1).max(200)
|
|
24666
24908
|
});
|
|
24667
|
-
var CommitCrmFileUploadRequestSchema =
|
|
24668
|
-
uploadId:
|
|
24909
|
+
var CommitCrmFileUploadRequestSchema = z29.object({
|
|
24910
|
+
uploadId: z29.uuid(),
|
|
24669
24911
|
entityType: CrmEntityTypeSchema,
|
|
24670
|
-
entityId:
|
|
24671
|
-
name:
|
|
24672
|
-
mimeType:
|
|
24912
|
+
entityId: z29.uuid(),
|
|
24913
|
+
name: z29.string().min(1).max(255),
|
|
24914
|
+
mimeType: z29.string().min(1).max(200),
|
|
24673
24915
|
kind: CrmFileKindSchema
|
|
24674
24916
|
});
|
|
24675
24917
|
|
|
24676
24918
|
// ../../packages/crm-api/dist/types/touchpoint.js
|
|
24677
|
-
import { z as
|
|
24678
|
-
var CreateTouchpointRequestSchema =
|
|
24919
|
+
import { z as z30 } from "zod";
|
|
24920
|
+
var CreateTouchpointRequestSchema = z30.object({
|
|
24679
24921
|
channel: ActivityKindSchema,
|
|
24680
24922
|
direction: ActivityDirectionSchema.nullish(),
|
|
24681
|
-
occurredAt:
|
|
24682
|
-
summary:
|
|
24683
|
-
subject:
|
|
24923
|
+
occurredAt: z30.iso.datetime(),
|
|
24924
|
+
summary: z30.string().max(1e4).nullish(),
|
|
24925
|
+
subject: z30.string().max(500).nullish(),
|
|
24684
24926
|
// The contact this was with; company is derived from the card server-side.
|
|
24685
|
-
personId:
|
|
24686
|
-
externalRef:
|
|
24927
|
+
personId: z30.uuid().nullish(),
|
|
24928
|
+
externalRef: z30.string().max(500).nullish(),
|
|
24687
24929
|
externalUrl: ActivityUrlSchema.nullish(),
|
|
24688
24930
|
// Stamped by the engine for agent writes — never user-supplied in the UI.
|
|
24689
|
-
loggedByProvider:
|
|
24931
|
+
loggedByProvider: z30.string().max(50).nullish()
|
|
24690
24932
|
});
|
|
24691
|
-
var UpdateTouchpointRequestSchema =
|
|
24933
|
+
var UpdateTouchpointRequestSchema = z30.object({
|
|
24692
24934
|
channel: ActivityKindSchema.optional(),
|
|
24693
24935
|
direction: ActivityDirectionSchema.nullable().optional(),
|
|
24694
|
-
occurredAt:
|
|
24695
|
-
summary:
|
|
24696
|
-
subject:
|
|
24697
|
-
personId:
|
|
24936
|
+
occurredAt: z30.iso.datetime().optional(),
|
|
24937
|
+
summary: z30.string().max(1e4).nullable().optional(),
|
|
24938
|
+
subject: z30.string().max(500).nullable().optional(),
|
|
24939
|
+
personId: z30.uuid().nullable().optional(),
|
|
24698
24940
|
externalUrl: ActivityUrlSchema.nullable().optional()
|
|
24699
24941
|
});
|
|
24700
24942
|
|
|
24701
24943
|
// ../../packages/crm-api/dist/types/leadFilters.js
|
|
24702
|
-
import { z as
|
|
24703
|
-
var LeadFilterFieldTypeSchema =
|
|
24944
|
+
import { z as z31 } from "zod";
|
|
24945
|
+
var LeadFilterFieldTypeSchema = z31.enum([
|
|
24704
24946
|
"text",
|
|
24705
24947
|
"number",
|
|
24706
24948
|
"date",
|
|
@@ -24708,7 +24950,7 @@ var LeadFilterFieldTypeSchema = z29.enum([
|
|
|
24708
24950
|
"stringArray",
|
|
24709
24951
|
"boolean"
|
|
24710
24952
|
]);
|
|
24711
|
-
var LeadFilterOperatorSchema =
|
|
24953
|
+
var LeadFilterOperatorSchema = z31.enum([
|
|
24712
24954
|
// text
|
|
24713
24955
|
"contains",
|
|
24714
24956
|
"not_contains",
|
|
@@ -24741,16 +24983,16 @@ var LeadFilterOperatorSchema = z29.enum([
|
|
|
24741
24983
|
"is_empty",
|
|
24742
24984
|
"is_not_empty"
|
|
24743
24985
|
]);
|
|
24744
|
-
var LeadFilterConditionSchema =
|
|
24745
|
-
field:
|
|
24986
|
+
var LeadFilterConditionSchema = z31.object({
|
|
24987
|
+
field: z31.string().min(1).max(200),
|
|
24746
24988
|
operator: LeadFilterOperatorSchema,
|
|
24747
24989
|
// Single-value operators (contains, gt, before, in_last_days, …).
|
|
24748
|
-
value:
|
|
24990
|
+
value: z31.union([z31.string().max(500), z31.number()]).optional(),
|
|
24749
24991
|
// Multi-value operators (any_of, includes_any, …).
|
|
24750
|
-
values:
|
|
24992
|
+
values: z31.array(z31.string().max(500)).max(100).optional(),
|
|
24751
24993
|
// `between` bounds — numbers, or ISO dates for date fields.
|
|
24752
|
-
min:
|
|
24753
|
-
max:
|
|
24994
|
+
min: z31.union([z31.string().max(100), z31.number()]).optional(),
|
|
24995
|
+
max: z31.union([z31.string().max(100), z31.number()]).optional()
|
|
24754
24996
|
});
|
|
24755
24997
|
function staticOptions(values) {
|
|
24756
24998
|
return values.map((value) => ({
|
|
@@ -24925,8 +25167,8 @@ var COMPANY_FILTER_FIELDS = [
|
|
|
24925
25167
|
{ key: "createdAt", label: "Added", type: "date", group: "Activity" },
|
|
24926
25168
|
{ key: "updatedAt", label: "Updated", type: "date", group: "Activity" }
|
|
24927
25169
|
];
|
|
24928
|
-
var LeadFilterOptionsQuerySchema =
|
|
24929
|
-
listId:
|
|
25170
|
+
var LeadFilterOptionsQuerySchema = z31.object({
|
|
25171
|
+
listId: z31.uuid().optional()
|
|
24930
25172
|
});
|
|
24931
25173
|
function leadFilterConditionsDescription(fields) {
|
|
24932
25174
|
const summary = fields.map((field) => `${field.key} (${field.type})`).join(", ");
|
|
@@ -24934,98 +25176,98 @@ function leadFilterConditionsDescription(fields) {
|
|
|
24934
25176
|
}
|
|
24935
25177
|
|
|
24936
25178
|
// ../../packages/crm-api/dist/types/savedView.js
|
|
24937
|
-
import { z as
|
|
24938
|
-
var SavedViewConfigSchema =
|
|
24939
|
-
filters:
|
|
24940
|
-
sort:
|
|
24941
|
-
field:
|
|
25179
|
+
import { z as z32 } from "zod";
|
|
25180
|
+
var SavedViewConfigSchema = z32.object({
|
|
25181
|
+
filters: z32.array(LeadFilterConditionSchema).max(50),
|
|
25182
|
+
sort: z32.object({
|
|
25183
|
+
field: z32.string().min(1).max(100),
|
|
24942
25184
|
direction: LeadSortDirectionSchema
|
|
24943
25185
|
}).nullable(),
|
|
24944
|
-
columns:
|
|
24945
|
-
layout:
|
|
25186
|
+
columns: z32.array(z32.string().min(1).max(100)).max(100).nullable(),
|
|
25187
|
+
layout: z32.enum(["table", "board"]).nullable()
|
|
24946
25188
|
});
|
|
24947
|
-
var SavedViewListQuerySchema =
|
|
25189
|
+
var SavedViewListQuerySchema = z32.object({
|
|
24948
25190
|
entityType: CrmEntityTypeSchema,
|
|
24949
|
-
pipelineId:
|
|
25191
|
+
pipelineId: z32.uuid().optional()
|
|
24950
25192
|
});
|
|
24951
|
-
var CreateSavedViewRequestSchema =
|
|
25193
|
+
var CreateSavedViewRequestSchema = z32.object({
|
|
24952
25194
|
entityType: CrmEntityTypeSchema,
|
|
24953
|
-
pipelineId:
|
|
24954
|
-
name:
|
|
24955
|
-
isShared:
|
|
25195
|
+
pipelineId: z32.uuid().nullish(),
|
|
25196
|
+
name: z32.string().min(1).max(100),
|
|
25197
|
+
isShared: z32.boolean(),
|
|
24956
25198
|
config: SavedViewConfigSchema
|
|
24957
25199
|
});
|
|
24958
|
-
var UpdateSavedViewRequestSchema =
|
|
24959
|
-
name:
|
|
24960
|
-
isShared:
|
|
25200
|
+
var UpdateSavedViewRequestSchema = z32.object({
|
|
25201
|
+
name: z32.string().min(1).max(100).optional(),
|
|
25202
|
+
isShared: z32.boolean().optional(),
|
|
24961
25203
|
config: SavedViewConfigSchema.optional(),
|
|
24962
|
-
position:
|
|
25204
|
+
position: z32.number().int().min(0).optional()
|
|
24963
25205
|
});
|
|
24964
25206
|
|
|
24965
25207
|
// ../../packages/crm-api/dist/types/privacy.js
|
|
24966
|
-
import { z as
|
|
24967
|
-
var MergeRecordsRequestSchema =
|
|
24968
|
-
keepId:
|
|
24969
|
-
mergeIds:
|
|
25208
|
+
import { z as z33 } from "zod";
|
|
25209
|
+
var MergeRecordsRequestSchema = z33.object({
|
|
25210
|
+
keepId: z33.uuid(),
|
|
25211
|
+
mergeIds: z33.array(z33.uuid()).min(1).max(20)
|
|
24970
25212
|
});
|
|
24971
|
-
var SetDoNotContactRequestSchema =
|
|
24972
|
-
isDoNotContact:
|
|
24973
|
-
reason:
|
|
25213
|
+
var SetDoNotContactRequestSchema = z33.object({
|
|
25214
|
+
isDoNotContact: z33.boolean(),
|
|
25215
|
+
reason: z33.string().max(500).nullish()
|
|
24974
25216
|
});
|
|
24975
|
-
var SetContactPointOptOutRequestSchema =
|
|
24976
|
-
isOptedOut:
|
|
24977
|
-
reason:
|
|
25217
|
+
var SetContactPointOptOutRequestSchema = z33.object({
|
|
25218
|
+
isOptedOut: z33.boolean(),
|
|
25219
|
+
reason: z33.string().max(500).nullish()
|
|
24978
25220
|
});
|
|
24979
|
-
var ContactChannelSchema =
|
|
24980
|
-
var ContactConsentQuerySchema =
|
|
24981
|
-
personId:
|
|
25221
|
+
var ContactChannelSchema = z33.enum(["email", "phone"]);
|
|
25222
|
+
var ContactConsentQuerySchema = z33.object({
|
|
25223
|
+
personId: z33.uuid(),
|
|
24982
25224
|
channel: ContactChannelSchema
|
|
24983
25225
|
});
|
|
24984
25226
|
|
|
24985
25227
|
// ../../packages/crm-api/dist/types/import.js
|
|
24986
|
-
import { z as
|
|
25228
|
+
import { z as z34 } from "zod";
|
|
24987
25229
|
var CRM_IMPORT_MAX_BYTES = 10 * 1024 * 1024;
|
|
24988
|
-
var ImportEntityTypeSchema =
|
|
24989
|
-
var ImportMappingSchema =
|
|
24990
|
-
var PreviewImportRequestSchema =
|
|
25230
|
+
var ImportEntityTypeSchema = z34.enum(["person", "company"]);
|
|
25231
|
+
var ImportMappingSchema = z34.record(z34.string(), z34.string().max(120));
|
|
25232
|
+
var PreviewImportRequestSchema = z34.object({
|
|
24991
25233
|
entityType: ImportEntityTypeSchema,
|
|
24992
|
-
csv:
|
|
25234
|
+
csv: z34.string().min(1).max(CRM_IMPORT_MAX_BYTES),
|
|
24993
25235
|
/** Omitted, the preview suggests one from the column names. */
|
|
24994
25236
|
mapping: ImportMappingSchema.optional()
|
|
24995
25237
|
});
|
|
24996
|
-
var StartImportRequestSchema =
|
|
25238
|
+
var StartImportRequestSchema = z34.object({
|
|
24997
25239
|
entityType: ImportEntityTypeSchema,
|
|
24998
|
-
csv:
|
|
25240
|
+
csv: z34.string().min(1).max(CRM_IMPORT_MAX_BYTES),
|
|
24999
25241
|
mapping: ImportMappingSchema,
|
|
25000
25242
|
/** A list of the same record type each imported record joins. */
|
|
25001
|
-
listId:
|
|
25002
|
-
tagIds:
|
|
25243
|
+
listId: z34.uuid().nullish(),
|
|
25244
|
+
tagIds: z34.array(z34.uuid()).max(20).optional()
|
|
25003
25245
|
});
|
|
25004
|
-
var ImportRunStatusSchema =
|
|
25246
|
+
var ImportRunStatusSchema = z34.enum([
|
|
25005
25247
|
"pending",
|
|
25006
25248
|
"running",
|
|
25007
25249
|
"completed",
|
|
25008
25250
|
"failed"
|
|
25009
25251
|
]);
|
|
25010
|
-
var MatchPeopleRequestSchema =
|
|
25011
|
-
emails:
|
|
25252
|
+
var MatchPeopleRequestSchema = z34.object({
|
|
25253
|
+
emails: z34.array(z34.string().min(3).max(320)).min(1).max(200)
|
|
25012
25254
|
});
|
|
25013
25255
|
|
|
25014
25256
|
// ../../packages/crm-api/dist/types/search.js
|
|
25015
|
-
import { z as
|
|
25016
|
-
var PersonSearchFiltersSchema =
|
|
25257
|
+
import { z as z35 } from "zod";
|
|
25258
|
+
var PersonSearchFiltersSchema = z35.object({
|
|
25017
25259
|
// Scope to one company's people (the company detail People tab).
|
|
25018
|
-
companyId:
|
|
25260
|
+
companyId: z35.uuid().optional(),
|
|
25019
25261
|
// Scope to a person list's members.
|
|
25020
|
-
listId:
|
|
25262
|
+
listId: z35.uuid().optional(),
|
|
25021
25263
|
// Carrying ANY of these tags (OR-within, like the other array facets).
|
|
25022
|
-
tagIds:
|
|
25023
|
-
minEmployeeCount:
|
|
25024
|
-
maxEmployeeCount:
|
|
25264
|
+
tagIds: z35.array(z35.uuid()).optional(),
|
|
25265
|
+
minEmployeeCount: z35.number().int().min(0).optional(),
|
|
25266
|
+
maxEmployeeCount: z35.number().int().min(0).optional(),
|
|
25025
25267
|
// Column conditions, ANDed together and with the keys above.
|
|
25026
|
-
conditions:
|
|
25268
|
+
conditions: z35.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(PERSON_FILTER_FIELDS))
|
|
25027
25269
|
});
|
|
25028
|
-
var PersonSearchSortSchema =
|
|
25270
|
+
var PersonSearchSortSchema = z35.enum([
|
|
25029
25271
|
"relevance",
|
|
25030
25272
|
"recent",
|
|
25031
25273
|
"updated",
|
|
@@ -25037,30 +25279,30 @@ var PersonSearchSortSchema = z33.enum([
|
|
|
25037
25279
|
"phone",
|
|
25038
25280
|
"linkedin"
|
|
25039
25281
|
]);
|
|
25040
|
-
var PersonSearchRequestSchema =
|
|
25282
|
+
var PersonSearchRequestSchema = z35.object({
|
|
25041
25283
|
// Free-text keyword query (FTS + fuzzy fallback). Omit for pure facet browse.
|
|
25042
|
-
query:
|
|
25284
|
+
query: z35.string().optional(),
|
|
25043
25285
|
filters: PersonSearchFiltersSchema.optional(),
|
|
25044
25286
|
sort: PersonSearchSortSchema.default("relevance"),
|
|
25045
25287
|
// Direction for the column sort; omitted falls back to the sort's default.
|
|
25046
25288
|
direction: LeadSortDirectionSchema.optional(),
|
|
25047
25289
|
// Keyset pagination — opaque cursor from the previous response.
|
|
25048
|
-
cursor:
|
|
25049
|
-
limit:
|
|
25290
|
+
cursor: z35.string().nullable().optional(),
|
|
25291
|
+
limit: z35.number().int().min(1).max(100).default(25)
|
|
25050
25292
|
});
|
|
25051
|
-
var CompanySearchFiltersSchema =
|
|
25293
|
+
var CompanySearchFiltersSchema = z35.object({
|
|
25052
25294
|
// Scope to a company list's members.
|
|
25053
|
-
listId:
|
|
25295
|
+
listId: z35.uuid().optional(),
|
|
25054
25296
|
// Carrying ANY of these tags (OR-within, like the other array facets).
|
|
25055
|
-
tagIds:
|
|
25056
|
-
industry:
|
|
25057
|
-
hqCountry:
|
|
25058
|
-
minEmployeeCount:
|
|
25059
|
-
maxEmployeeCount:
|
|
25297
|
+
tagIds: z35.array(z35.uuid()).optional(),
|
|
25298
|
+
industry: z35.array(z35.string()).optional(),
|
|
25299
|
+
hqCountry: z35.array(z35.string()).optional(),
|
|
25300
|
+
minEmployeeCount: z35.number().int().min(0).optional(),
|
|
25301
|
+
maxEmployeeCount: z35.number().int().min(0).optional(),
|
|
25060
25302
|
// Column conditions, ANDed together and with the keys above.
|
|
25061
|
-
conditions:
|
|
25303
|
+
conditions: z35.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(COMPANY_FILTER_FIELDS))
|
|
25062
25304
|
});
|
|
25063
|
-
var CompanySearchSortSchema =
|
|
25305
|
+
var CompanySearchSortSchema = z35.enum([
|
|
25064
25306
|
"relevance",
|
|
25065
25307
|
"employee_count",
|
|
25066
25308
|
"recent",
|
|
@@ -25070,211 +25312,211 @@ var CompanySearchSortSchema = z33.enum([
|
|
|
25070
25312
|
"industry",
|
|
25071
25313
|
"hq"
|
|
25072
25314
|
]);
|
|
25073
|
-
var CompanySearchRequestSchema =
|
|
25074
|
-
query:
|
|
25315
|
+
var CompanySearchRequestSchema = z35.object({
|
|
25316
|
+
query: z35.string().optional(),
|
|
25075
25317
|
filters: CompanySearchFiltersSchema.optional(),
|
|
25076
25318
|
sort: CompanySearchSortSchema.default("relevance"),
|
|
25077
25319
|
direction: LeadSortDirectionSchema.optional(),
|
|
25078
|
-
cursor:
|
|
25079
|
-
limit:
|
|
25080
|
-
includeFacets:
|
|
25320
|
+
cursor: z35.string().nullable().optional(),
|
|
25321
|
+
limit: z35.number().int().min(1).max(100).default(25),
|
|
25322
|
+
includeFacets: z35.boolean().default(false)
|
|
25081
25323
|
});
|
|
25082
25324
|
|
|
25083
25325
|
// ../../packages/crm-api/dist/types/globalSearch.js
|
|
25084
|
-
import { z as
|
|
25085
|
-
var GlobalSearchRequestSchema =
|
|
25086
|
-
query:
|
|
25326
|
+
import { z as z36 } from "zod";
|
|
25327
|
+
var GlobalSearchRequestSchema = z36.object({
|
|
25328
|
+
query: z36.string().min(1).max(200),
|
|
25087
25329
|
// Per-entity cap; the response holds up to 3 × this many results.
|
|
25088
|
-
limitPerType:
|
|
25330
|
+
limitPerType: z36.number().int().min(1).max(20).default(6)
|
|
25089
25331
|
});
|
|
25090
25332
|
|
|
25091
25333
|
// ../../packages/crm-api/dist/types/leadTools.js
|
|
25092
|
-
import { z as
|
|
25334
|
+
import { z as z37 } from "zod";
|
|
25093
25335
|
var LEAD_BATCH_MAX = 100;
|
|
25094
25336
|
var companyEnrichmentFields = {
|
|
25095
|
-
legalName:
|
|
25096
|
-
tagline:
|
|
25097
|
-
linkedinUrl:
|
|
25098
|
-
logoUrl:
|
|
25337
|
+
legalName: z37.string().nullish(),
|
|
25338
|
+
tagline: z37.string().nullish(),
|
|
25339
|
+
linkedinUrl: z37.string().nullish(),
|
|
25340
|
+
logoUrl: z37.string().nullish(),
|
|
25099
25341
|
companyType: CompanyTypeSchema.nullish(),
|
|
25100
|
-
industry:
|
|
25101
|
-
subIndustry:
|
|
25102
|
-
keywords:
|
|
25103
|
-
description:
|
|
25104
|
-
employeeCount:
|
|
25105
|
-
foundedYear:
|
|
25106
|
-
ticker:
|
|
25107
|
-
annualRevenueUsd:
|
|
25108
|
-
totalFundingUsd:
|
|
25109
|
-
lastFundingRound:
|
|
25342
|
+
industry: z37.string().nullish(),
|
|
25343
|
+
subIndustry: z37.string().nullish(),
|
|
25344
|
+
keywords: z37.array(z37.string()).max(50).nullish(),
|
|
25345
|
+
description: z37.string().nullish(),
|
|
25346
|
+
employeeCount: z37.number().int().min(0).nullish(),
|
|
25347
|
+
foundedYear: z37.number().int().nullish(),
|
|
25348
|
+
ticker: z37.string().nullish(),
|
|
25349
|
+
annualRevenueUsd: z37.number().min(0).nullish(),
|
|
25350
|
+
totalFundingUsd: z37.number().min(0).nullish(),
|
|
25351
|
+
lastFundingRound: z37.string().nullish(),
|
|
25110
25352
|
// ISO date, e.g. 2025-03-01
|
|
25111
|
-
lastFundingAt:
|
|
25112
|
-
investors:
|
|
25113
|
-
hqCity:
|
|
25114
|
-
hqRegion:
|
|
25115
|
-
hqCountry:
|
|
25116
|
-
hqAddress:
|
|
25117
|
-
phone:
|
|
25118
|
-
twitterUrl:
|
|
25119
|
-
githubUrl:
|
|
25120
|
-
facebookUrl:
|
|
25121
|
-
youtubeUrl:
|
|
25122
|
-
instagramUrl:
|
|
25123
|
-
crunchbaseUrl:
|
|
25124
|
-
techStack:
|
|
25353
|
+
lastFundingAt: z37.string().nullish(),
|
|
25354
|
+
investors: z37.array(z37.string()).max(50).nullish(),
|
|
25355
|
+
hqCity: z37.string().nullish(),
|
|
25356
|
+
hqRegion: z37.string().nullish(),
|
|
25357
|
+
hqCountry: z37.string().nullish(),
|
|
25358
|
+
hqAddress: z37.string().nullish(),
|
|
25359
|
+
phone: z37.string().nullish(),
|
|
25360
|
+
twitterUrl: z37.string().nullish(),
|
|
25361
|
+
githubUrl: z37.string().nullish(),
|
|
25362
|
+
facebookUrl: z37.string().nullish(),
|
|
25363
|
+
youtubeUrl: z37.string().nullish(),
|
|
25364
|
+
instagramUrl: z37.string().nullish(),
|
|
25365
|
+
crunchbaseUrl: z37.string().nullish(),
|
|
25366
|
+
techStack: z37.array(z37.string()).max(100).nullish()
|
|
25125
25367
|
};
|
|
25126
|
-
var CreateLeadCompanyRequestSchema =
|
|
25127
|
-
name:
|
|
25128
|
-
domain:
|
|
25368
|
+
var CreateLeadCompanyRequestSchema = z37.strictObject({
|
|
25369
|
+
name: z37.string().min(1),
|
|
25370
|
+
domain: z37.string().optional(),
|
|
25129
25371
|
...companyEnrichmentFields
|
|
25130
25372
|
});
|
|
25131
|
-
var LeadPersonEducationInputSchema =
|
|
25132
|
-
school:
|
|
25133
|
-
degree:
|
|
25134
|
-
field:
|
|
25135
|
-
startYear:
|
|
25136
|
-
endYear:
|
|
25373
|
+
var LeadPersonEducationInputSchema = z37.strictObject({
|
|
25374
|
+
school: z37.string().min(1),
|
|
25375
|
+
degree: z37.string().optional(),
|
|
25376
|
+
field: z37.string().optional(),
|
|
25377
|
+
startYear: z37.number().int().optional(),
|
|
25378
|
+
endYear: z37.number().int().optional()
|
|
25137
25379
|
});
|
|
25138
25380
|
var personEnrichmentFields = {
|
|
25139
|
-
title:
|
|
25140
|
-
headline:
|
|
25141
|
-
bio:
|
|
25142
|
-
department:
|
|
25143
|
-
yearsExperience:
|
|
25144
|
-
skills:
|
|
25145
|
-
languages:
|
|
25146
|
-
photoUrl:
|
|
25147
|
-
linkedinUrl:
|
|
25148
|
-
twitterUrl:
|
|
25149
|
-
githubUrl:
|
|
25150
|
-
facebookUrl:
|
|
25151
|
-
youtubeUrl:
|
|
25152
|
-
instagramUrl:
|
|
25153
|
-
personalWebsiteUrl:
|
|
25154
|
-
email:
|
|
25155
|
-
locationCity:
|
|
25156
|
-
locationRegion:
|
|
25157
|
-
locationCountry:
|
|
25381
|
+
title: z37.string().nullish(),
|
|
25382
|
+
headline: z37.string().nullish(),
|
|
25383
|
+
bio: z37.string().nullish(),
|
|
25384
|
+
department: z37.string().nullish(),
|
|
25385
|
+
yearsExperience: z37.number().int().min(0).max(80).nullish(),
|
|
25386
|
+
skills: z37.array(z37.string()).max(50).nullish(),
|
|
25387
|
+
languages: z37.array(z37.string()).max(20).nullish(),
|
|
25388
|
+
photoUrl: z37.string().nullish(),
|
|
25389
|
+
linkedinUrl: z37.string().nullish(),
|
|
25390
|
+
twitterUrl: z37.string().nullish(),
|
|
25391
|
+
githubUrl: z37.string().nullish(),
|
|
25392
|
+
facebookUrl: z37.string().nullish(),
|
|
25393
|
+
youtubeUrl: z37.string().nullish(),
|
|
25394
|
+
instagramUrl: z37.string().nullish(),
|
|
25395
|
+
personalWebsiteUrl: z37.string().nullish(),
|
|
25396
|
+
email: z37.string().nullish(),
|
|
25397
|
+
locationCity: z37.string().nullish(),
|
|
25398
|
+
locationRegion: z37.string().nullish(),
|
|
25399
|
+
locationCountry: z37.string().nullish(),
|
|
25158
25400
|
// IANA timezone, e.g. America/New_York
|
|
25159
|
-
timezone:
|
|
25401
|
+
timezone: z37.string().nullish(),
|
|
25160
25402
|
// Full education history — REPLACES any previously saved entries.
|
|
25161
|
-
educations:
|
|
25403
|
+
educations: z37.array(LeadPersonEducationInputSchema).max(10).optional()
|
|
25162
25404
|
};
|
|
25163
|
-
var CreateLeadPersonRequestSchema =
|
|
25164
|
-
fullName:
|
|
25405
|
+
var CreateLeadPersonRequestSchema = z37.strictObject({
|
|
25406
|
+
fullName: z37.string().min(1),
|
|
25165
25407
|
...personEnrichmentFields,
|
|
25166
|
-
companyId:
|
|
25167
|
-
companyName:
|
|
25168
|
-
companyDomain:
|
|
25408
|
+
companyId: z37.string().optional(),
|
|
25409
|
+
companyName: z37.string().optional(),
|
|
25410
|
+
companyDomain: z37.string().optional()
|
|
25169
25411
|
});
|
|
25170
|
-
var UpdateLeadCompanyRequestSchema =
|
|
25171
|
-
id:
|
|
25172
|
-
name:
|
|
25173
|
-
domain:
|
|
25412
|
+
var UpdateLeadCompanyRequestSchema = z37.strictObject({
|
|
25413
|
+
id: z37.uuid(),
|
|
25414
|
+
name: z37.string().min(1).optional(),
|
|
25415
|
+
domain: z37.string().optional(),
|
|
25174
25416
|
...companyEnrichmentFields,
|
|
25175
25417
|
// Registry-defined custom fields; validated + merged server-side.
|
|
25176
25418
|
custom: CustomFieldValuesSchema.optional()
|
|
25177
25419
|
});
|
|
25178
|
-
var UpdateLeadPersonRequestSchema =
|
|
25179
|
-
id:
|
|
25180
|
-
fullName:
|
|
25420
|
+
var UpdateLeadPersonRequestSchema = z37.strictObject({
|
|
25421
|
+
id: z37.uuid(),
|
|
25422
|
+
fullName: z37.string().min(1).optional(),
|
|
25181
25423
|
...personEnrichmentFields,
|
|
25182
25424
|
// (re)assign current employment — companyId, or companyName/companyDomain
|
|
25183
25425
|
// to find-or-create the company first
|
|
25184
|
-
companyId:
|
|
25185
|
-
companyName:
|
|
25186
|
-
companyDomain:
|
|
25426
|
+
companyId: z37.string().optional(),
|
|
25427
|
+
companyName: z37.string().optional(),
|
|
25428
|
+
companyDomain: z37.string().optional(),
|
|
25187
25429
|
// Set the primary company directly (the people.current_company_id cache shown
|
|
25188
25430
|
// in lists/header). Independent of the employment rows that hold the full set
|
|
25189
25431
|
// of current roles; null clears it. Recompute overwrites it when the current
|
|
25190
25432
|
// employment set changes.
|
|
25191
|
-
primaryCompanyId:
|
|
25433
|
+
primaryCompanyId: z37.string().nullish(),
|
|
25192
25434
|
// Registry-defined custom fields; validated + merged server-side.
|
|
25193
25435
|
custom: CustomFieldValuesSchema.optional()
|
|
25194
25436
|
});
|
|
25195
|
-
var LeadEmploymentInputSchema =
|
|
25196
|
-
companyId:
|
|
25197
|
-
companyName:
|
|
25198
|
-
title:
|
|
25199
|
-
startDate:
|
|
25200
|
-
endDate:
|
|
25201
|
-
isCurrent:
|
|
25437
|
+
var LeadEmploymentInputSchema = z37.strictObject({
|
|
25438
|
+
companyId: z37.uuid().nullish(),
|
|
25439
|
+
companyName: z37.string().nullish(),
|
|
25440
|
+
title: z37.string().nullish(),
|
|
25441
|
+
startDate: z37.string().nullish(),
|
|
25442
|
+
endDate: z37.string().nullish(),
|
|
25443
|
+
isCurrent: z37.boolean().default(false)
|
|
25202
25444
|
});
|
|
25203
|
-
var UpdateLeadEmploymentRequestSchema =
|
|
25204
|
-
companyId:
|
|
25205
|
-
companyName:
|
|
25206
|
-
title:
|
|
25207
|
-
startDate:
|
|
25208
|
-
endDate:
|
|
25209
|
-
isCurrent:
|
|
25445
|
+
var UpdateLeadEmploymentRequestSchema = z37.strictObject({
|
|
25446
|
+
companyId: z37.uuid().nullish(),
|
|
25447
|
+
companyName: z37.string().nullish(),
|
|
25448
|
+
title: z37.string().nullish(),
|
|
25449
|
+
startDate: z37.string().nullish(),
|
|
25450
|
+
endDate: z37.string().nullish(),
|
|
25451
|
+
isCurrent: z37.boolean().optional()
|
|
25210
25452
|
});
|
|
25211
|
-
var LeadContactPointInputSchema =
|
|
25453
|
+
var LeadContactPointInputSchema = z37.strictObject({
|
|
25212
25454
|
kind: ContactPointKindSchema,
|
|
25213
|
-
value:
|
|
25455
|
+
value: z37.string().min(1),
|
|
25214
25456
|
status: ContactPointStatusSchema.optional(),
|
|
25215
|
-
isPrimary:
|
|
25457
|
+
isPrimary: z37.boolean().optional()
|
|
25216
25458
|
});
|
|
25217
|
-
var UpdateLeadContactPointRequestSchema =
|
|
25459
|
+
var UpdateLeadContactPointRequestSchema = z37.strictObject({
|
|
25218
25460
|
kind: ContactPointKindSchema.optional(),
|
|
25219
|
-
value:
|
|
25461
|
+
value: z37.string().min(1).optional(),
|
|
25220
25462
|
status: ContactPointStatusSchema.optional(),
|
|
25221
|
-
isPrimary:
|
|
25463
|
+
isPrimary: z37.boolean().optional()
|
|
25222
25464
|
});
|
|
25223
|
-
var LeadCompanyPeopleRequestSchema =
|
|
25224
|
-
limit:
|
|
25225
|
-
cursor:
|
|
25465
|
+
var LeadCompanyPeopleRequestSchema = z37.object({
|
|
25466
|
+
limit: z37.coerce.number().int().min(1).max(100).default(50),
|
|
25467
|
+
cursor: z37.string().optional(),
|
|
25226
25468
|
sort: PersonSearchSortSchema.default("recent"),
|
|
25227
25469
|
direction: LeadSortDirectionSchema.optional()
|
|
25228
25470
|
});
|
|
25229
|
-
var CreateLeadCompaniesRequestSchema =
|
|
25230
|
-
companies:
|
|
25471
|
+
var CreateLeadCompaniesRequestSchema = z37.strictObject({
|
|
25472
|
+
companies: z37.array(CreateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25231
25473
|
});
|
|
25232
|
-
var CreateLeadPeopleRequestSchema =
|
|
25233
|
-
people:
|
|
25474
|
+
var CreateLeadPeopleRequestSchema = z37.strictObject({
|
|
25475
|
+
people: z37.array(CreateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25234
25476
|
});
|
|
25235
|
-
var UpdateLeadCompaniesRequestSchema =
|
|
25236
|
-
companies:
|
|
25477
|
+
var UpdateLeadCompaniesRequestSchema = z37.strictObject({
|
|
25478
|
+
companies: z37.array(UpdateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25237
25479
|
});
|
|
25238
|
-
var UpdateLeadPeopleRequestSchema =
|
|
25239
|
-
people:
|
|
25480
|
+
var UpdateLeadPeopleRequestSchema = z37.strictObject({
|
|
25481
|
+
people: z37.array(UpdateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25240
25482
|
});
|
|
25241
|
-
var DeleteLeadCompaniesRequestSchema =
|
|
25242
|
-
ids:
|
|
25483
|
+
var DeleteLeadCompaniesRequestSchema = z37.strictObject({
|
|
25484
|
+
ids: z37.array(z37.uuid()).min(1).max(LEAD_BATCH_MAX)
|
|
25243
25485
|
});
|
|
25244
|
-
var DeleteLeadPeopleRequestSchema =
|
|
25245
|
-
ids:
|
|
25486
|
+
var DeleteLeadPeopleRequestSchema = z37.strictObject({
|
|
25487
|
+
ids: z37.array(z37.uuid()).min(1).max(LEAD_BATCH_MAX)
|
|
25246
25488
|
});
|
|
25247
25489
|
|
|
25248
25490
|
// ../../packages/crm-api/dist/types/enrichment.js
|
|
25249
|
-
import { z as
|
|
25491
|
+
import { z as z38 } from "zod";
|
|
25250
25492
|
var ENRICHMENT_BATCH_LIMIT = 25;
|
|
25251
|
-
var EnrichPeopleRequestSchema =
|
|
25252
|
-
personIds:
|
|
25493
|
+
var EnrichPeopleRequestSchema = z38.object({
|
|
25494
|
+
personIds: z38.array(z38.uuid()).min(1).max(ENRICHMENT_BATCH_LIMIT),
|
|
25253
25495
|
// A person with only an UNVERIFIED contact reruns the chain, excluding the
|
|
25254
25496
|
// providers that sourced it. Verified contacts always short-circuit.
|
|
25255
|
-
retryUnverified:
|
|
25497
|
+
retryUnverified: z38.boolean().optional()
|
|
25256
25498
|
});
|
|
25257
25499
|
var ENRICHMENT_RUN_PERSON_LIMIT = 500;
|
|
25258
|
-
var EnrichmentRunActionSchema =
|
|
25500
|
+
var EnrichmentRunActionSchema = z38.enum([
|
|
25259
25501
|
"emails",
|
|
25260
25502
|
"validate",
|
|
25261
25503
|
"phones"
|
|
25262
25504
|
]);
|
|
25263
|
-
var StartEnrichmentRunRequestSchema =
|
|
25264
|
-
personIds:
|
|
25265
|
-
actions:
|
|
25266
|
-
retryUnverified:
|
|
25505
|
+
var StartEnrichmentRunRequestSchema = z38.object({
|
|
25506
|
+
personIds: z38.array(z38.uuid()).min(1).max(ENRICHMENT_RUN_PERSON_LIMIT),
|
|
25507
|
+
actions: z38.array(EnrichmentRunActionSchema).min(1),
|
|
25508
|
+
retryUnverified: z38.boolean()
|
|
25267
25509
|
});
|
|
25268
|
-
var EnrichmentCoverageRequestSchema =
|
|
25269
|
-
personIds:
|
|
25510
|
+
var EnrichmentCoverageRequestSchema = z38.object({
|
|
25511
|
+
personIds: z38.array(z38.uuid()).min(1).max(ENRICHMENT_RUN_PERSON_LIMIT)
|
|
25270
25512
|
});
|
|
25271
|
-
var UpdateContactPointStatusRequestSchema =
|
|
25272
|
-
status:
|
|
25513
|
+
var UpdateContactPointStatusRequestSchema = z38.object({
|
|
25514
|
+
status: z38.enum(["verified", "unverified"])
|
|
25273
25515
|
});
|
|
25274
25516
|
|
|
25275
25517
|
// ../../packages/crm-api/dist/types/providers.js
|
|
25276
|
-
import { z as
|
|
25277
|
-
var EmailEnrichmentProviderIdSchema =
|
|
25518
|
+
import { z as z39 } from "zod";
|
|
25519
|
+
var EmailEnrichmentProviderIdSchema = z39.enum([
|
|
25278
25520
|
"hunter",
|
|
25279
25521
|
"apollo",
|
|
25280
25522
|
"prospeo",
|
|
@@ -25289,7 +25531,7 @@ var EmailEnrichmentProviderIdSchema = z37.enum([
|
|
|
25289
25531
|
"wiza",
|
|
25290
25532
|
"crustdata"
|
|
25291
25533
|
]);
|
|
25292
|
-
var EmailValidationProviderIdSchema =
|
|
25534
|
+
var EmailValidationProviderIdSchema = z39.enum([
|
|
25293
25535
|
"zerobounce",
|
|
25294
25536
|
"neverbounce",
|
|
25295
25537
|
"hunter",
|
|
@@ -25297,7 +25539,7 @@ var EmailValidationProviderIdSchema = z37.enum([
|
|
|
25297
25539
|
"leadmagic",
|
|
25298
25540
|
"snov"
|
|
25299
25541
|
]);
|
|
25300
|
-
var PhoneEnrichmentProviderIdSchema =
|
|
25542
|
+
var PhoneEnrichmentProviderIdSchema = z39.enum([
|
|
25301
25543
|
"prospeo",
|
|
25302
25544
|
"findymail",
|
|
25303
25545
|
"leadmagic",
|
|
@@ -25309,7 +25551,7 @@ var PhoneEnrichmentProviderIdSchema = z37.enum([
|
|
|
25309
25551
|
"wiza",
|
|
25310
25552
|
"crustdata"
|
|
25311
25553
|
]);
|
|
25312
|
-
var IntegrationProviderIdSchema =
|
|
25554
|
+
var IntegrationProviderIdSchema = z39.enum([
|
|
25313
25555
|
"hunter",
|
|
25314
25556
|
"apollo",
|
|
25315
25557
|
"prospeo",
|
|
@@ -25326,10 +25568,10 @@ var IntegrationProviderIdSchema = z37.enum([
|
|
|
25326
25568
|
"wiza",
|
|
25327
25569
|
"crustdata"
|
|
25328
25570
|
]);
|
|
25329
|
-
var UpdateEnrichmentWaterfallsRequestSchema =
|
|
25330
|
-
emailEnrichment:
|
|
25331
|
-
emailValidation:
|
|
25332
|
-
phoneEnrichment:
|
|
25571
|
+
var UpdateEnrichmentWaterfallsRequestSchema = z39.object({
|
|
25572
|
+
emailEnrichment: z39.array(EmailEnrichmentProviderIdSchema).optional(),
|
|
25573
|
+
emailValidation: z39.array(EmailValidationProviderIdSchema).optional(),
|
|
25574
|
+
phoneEnrichment: z39.array(PhoneEnrichmentProviderIdSchema).optional()
|
|
25333
25575
|
});
|
|
25334
25576
|
|
|
25335
25577
|
// ../../packages/crm-api/dist/clients/V1CrmApiClient.js
|
|
@@ -25905,6 +26147,14 @@ var V1CrmApiClient = class {
|
|
|
25905
26147
|
method: "DELETE"
|
|
25906
26148
|
});
|
|
25907
26149
|
}
|
|
26150
|
+
// ── Record access ──────────────────────────────────────────────────
|
|
26151
|
+
async setRecordAccess(entityType, entityId, body) {
|
|
26152
|
+
this.http.requireAuthed();
|
|
26153
|
+
return this.http.fetch(`${CRM}/access/${entityType}/${enc(entityId)}`, {
|
|
26154
|
+
method: "PUT",
|
|
26155
|
+
body
|
|
26156
|
+
});
|
|
26157
|
+
}
|
|
25908
26158
|
// ── Custom fields ──────────────────────────────────────────────────
|
|
25909
26159
|
async createCustomField(body) {
|
|
25910
26160
|
this.http.requireAuthed();
|
|
@@ -25961,7 +26211,7 @@ var V1CrmApiClient = class {
|
|
|
25961
26211
|
// package.json
|
|
25962
26212
|
var package_default = {
|
|
25963
26213
|
name: "@general-input/cli",
|
|
25964
|
-
version: "0.
|
|
26214
|
+
version: "0.24.0",
|
|
25965
26215
|
type: "module",
|
|
25966
26216
|
description: "The agent-facing CLI for General Input. Authenticate, manage workflows, run bash with operator credentials injected by the cloud.",
|
|
25967
26217
|
license: "SEE LICENSE IN LICENSE",
|
|
@@ -26064,27 +26314,27 @@ var ApiClientFactory = class {
|
|
|
26064
26314
|
import { mkdir, readFile, writeFile, unlink, chmod } from "fs/promises";
|
|
26065
26315
|
|
|
26066
26316
|
// src/types/session.ts
|
|
26067
|
-
import { z as
|
|
26068
|
-
var RunnerSessionFileSchema =
|
|
26069
|
-
version:
|
|
26070
|
-
server:
|
|
26317
|
+
import { z as z40 } from "zod";
|
|
26318
|
+
var RunnerSessionFileSchema = z40.object({
|
|
26319
|
+
version: z40.literal(1),
|
|
26320
|
+
server: z40.url(),
|
|
26071
26321
|
/** Plaintext runner-session token (`geni_rs_…`). */
|
|
26072
|
-
token:
|
|
26073
|
-
user:
|
|
26074
|
-
id:
|
|
26075
|
-
email:
|
|
26076
|
-
name:
|
|
26322
|
+
token: z40.string().startsWith("geni_rs_"),
|
|
26323
|
+
user: z40.object({
|
|
26324
|
+
id: z40.string(),
|
|
26325
|
+
email: z40.string().nullable(),
|
|
26326
|
+
name: z40.string().nullable()
|
|
26077
26327
|
}),
|
|
26078
|
-
workspace:
|
|
26079
|
-
membershipId:
|
|
26080
|
-
organizationId:
|
|
26081
|
-
slug:
|
|
26082
|
-
name:
|
|
26083
|
-
profilePictureUrl:
|
|
26084
|
-
role:
|
|
26328
|
+
workspace: z40.object({
|
|
26329
|
+
membershipId: z40.string(),
|
|
26330
|
+
organizationId: z40.string(),
|
|
26331
|
+
slug: z40.string(),
|
|
26332
|
+
name: z40.string(),
|
|
26333
|
+
profilePictureUrl: z40.string().nullable().optional(),
|
|
26334
|
+
role: z40.string()
|
|
26085
26335
|
}),
|
|
26086
26336
|
/** ISO 8601 — when the file was last written by login or workspace switch. */
|
|
26087
|
-
savedAt:
|
|
26337
|
+
savedAt: z40.string()
|
|
26088
26338
|
});
|
|
26089
26339
|
|
|
26090
26340
|
// src/clients/SessionStore.ts
|
|
@@ -26173,16 +26423,16 @@ function isErrnoCode(err, expected) {
|
|
|
26173
26423
|
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, unlink as unlink2 } from "fs/promises";
|
|
26174
26424
|
|
|
26175
26425
|
// src/types/browserSession.ts
|
|
26176
|
-
import { z as
|
|
26177
|
-
var BrowserSessionFileSchema =
|
|
26178
|
-
token:
|
|
26179
|
-
cdpUrl:
|
|
26180
|
-
provider:
|
|
26181
|
-
liveViewUrl:
|
|
26426
|
+
import { z as z41 } from "zod";
|
|
26427
|
+
var BrowserSessionFileSchema = z41.object({
|
|
26428
|
+
token: z41.string(),
|
|
26429
|
+
cdpUrl: z41.string(),
|
|
26430
|
+
provider: z41.string(),
|
|
26431
|
+
liveViewUrl: z41.string().nullable(),
|
|
26182
26432
|
/** API server the session was opened against, for diagnostics. */
|
|
26183
|
-
server:
|
|
26184
|
-
openedAt:
|
|
26185
|
-
keepalivePid:
|
|
26433
|
+
server: z41.string(),
|
|
26434
|
+
openedAt: z41.string(),
|
|
26435
|
+
keepalivePid: z41.number().nullable()
|
|
26186
26436
|
});
|
|
26187
26437
|
|
|
26188
26438
|
// src/clients/BrowserSessionStore.ts
|
|
@@ -26562,14 +26812,28 @@ import http from "http";
|
|
|
26562
26812
|
import https from "https";
|
|
26563
26813
|
import net from "net";
|
|
26564
26814
|
import tls3 from "tls";
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26568
|
-
|
|
26569
|
-
|
|
26570
|
-
|
|
26571
|
-
|
|
26572
|
-
|
|
26815
|
+
|
|
26816
|
+
// ../../packages/egress-proxy/dist/authority.js
|
|
26817
|
+
var MAX_PORT = 65535;
|
|
26818
|
+
var AUTHORITY_PATTERN = /^(?:\[([0-9A-Fa-f:.]+)\]|([^\s:/?#@[\]]+))(?::(.*))?$/;
|
|
26819
|
+
function parseAuthority(args) {
|
|
26820
|
+
const match = AUTHORITY_PATTERN.exec(args.authority);
|
|
26821
|
+
const host = match?.[1] ?? match?.[2];
|
|
26822
|
+
if (!match || !host)
|
|
26823
|
+
return null;
|
|
26824
|
+
const portText = match[3];
|
|
26825
|
+
if (portText === void 0)
|
|
26826
|
+
return { host, port: args.defaultPort };
|
|
26827
|
+
if (!/^\d+$/.test(portText))
|
|
26828
|
+
return null;
|
|
26829
|
+
const port = Number(portText);
|
|
26830
|
+
return port >= 1 && port <= MAX_PORT ? { host, port } : null;
|
|
26831
|
+
}
|
|
26832
|
+
|
|
26833
|
+
// ../../packages/egress-proxy/dist/proxy.js
|
|
26834
|
+
function refuseMalformedAuthority(res) {
|
|
26835
|
+
res.writeHead(400, { "content-type": "text/plain" });
|
|
26836
|
+
res.end("egress proxy: malformed request authority");
|
|
26573
26837
|
}
|
|
26574
26838
|
function createEgressProxy(args) {
|
|
26575
26839
|
const { ca, policyStore, log } = args;
|
|
@@ -26604,8 +26868,13 @@ function createEgressProxy(args) {
|
|
|
26604
26868
|
req.pipe(upstream);
|
|
26605
26869
|
}
|
|
26606
26870
|
const mitmServer = http.createServer((req, res) => {
|
|
26607
|
-
const
|
|
26608
|
-
|
|
26871
|
+
const authority = parseAuthority({
|
|
26872
|
+
authority: req.headers.host ?? "",
|
|
26873
|
+
defaultPort: 443
|
|
26874
|
+
});
|
|
26875
|
+
if (!authority)
|
|
26876
|
+
return refuseMalformedAuthority(res);
|
|
26877
|
+
enforceOrForward(authority.host, authority.port, true, req, res);
|
|
26609
26878
|
});
|
|
26610
26879
|
mitmServer.on("clientError", (_err, socket) => socket.destroy());
|
|
26611
26880
|
const tlsServer = tls3.createServer({
|
|
@@ -26624,14 +26893,27 @@ function createEgressProxy(args) {
|
|
|
26624
26893
|
res.end("egress proxy: malformed request URL");
|
|
26625
26894
|
return;
|
|
26626
26895
|
}
|
|
26627
|
-
const
|
|
26896
|
+
const authority = parseAuthority({
|
|
26897
|
+
authority: parsed.host,
|
|
26898
|
+
defaultPort: 80
|
|
26899
|
+
});
|
|
26900
|
+
if (!authority)
|
|
26901
|
+
return refuseMalformedAuthority(res);
|
|
26628
26902
|
req.url = `${parsed.pathname}${parsed.search}`;
|
|
26629
|
-
enforceOrForward(host, port, false, req, res);
|
|
26903
|
+
enforceOrForward(authority.host, authority.port, false, req, res);
|
|
26630
26904
|
});
|
|
26631
26905
|
connectListener.on("clientError", (_err, socket) => socket.destroy());
|
|
26632
26906
|
connectListener.on("connect", (req, clientSocket, head) => {
|
|
26633
|
-
const { host, port } = parseHostPort(req.url ?? "", 443);
|
|
26634
26907
|
clientSocket.on("error", () => clientSocket.destroy());
|
|
26908
|
+
const authority = parseAuthority({
|
|
26909
|
+
authority: req.url ?? "",
|
|
26910
|
+
defaultPort: 443
|
|
26911
|
+
});
|
|
26912
|
+
if (!authority) {
|
|
26913
|
+
clientSocket.end("HTTP/1.1 400 Bad Request\r\n\r\n", () => clientSocket.destroy());
|
|
26914
|
+
return;
|
|
26915
|
+
}
|
|
26916
|
+
const { host, port } = authority;
|
|
26635
26917
|
if (policyStore.isEnforcedHost(host)) {
|
|
26636
26918
|
clientSocket.write("HTTP/1.1 200 Connection Established\r\n\r\n");
|
|
26637
26919
|
if (head.length > 0)
|
|
@@ -26654,13 +26936,13 @@ function createEgressProxy(args) {
|
|
|
26654
26936
|
// src/lib/egressCa.ts
|
|
26655
26937
|
import { existsSync as existsSync3, readFileSync as readFileSync6 } from "fs";
|
|
26656
26938
|
import { join as join5 } from "path";
|
|
26657
|
-
import { z as
|
|
26939
|
+
import { z as z42 } from "zod";
|
|
26658
26940
|
var EGRESS_CA_CACHE_VERSION = 3;
|
|
26659
|
-
var EgressCaCacheSchema =
|
|
26660
|
-
version:
|
|
26661
|
-
caKeyPem:
|
|
26662
|
-
caCertPem:
|
|
26663
|
-
leafKeyPem:
|
|
26941
|
+
var EgressCaCacheSchema = z42.object({
|
|
26942
|
+
version: z42.literal(EGRESS_CA_CACHE_VERSION),
|
|
26943
|
+
caKeyPem: z42.string().min(1),
|
|
26944
|
+
caCertPem: z42.string().min(1),
|
|
26945
|
+
leafKeyPem: z42.string().min(1)
|
|
26664
26946
|
});
|
|
26665
26947
|
function loadOrCreateEgressCa() {
|
|
26666
26948
|
const path = join5(ensureCacheDir(), "egress-ca.json");
|
|
@@ -26865,14 +27147,21 @@ function subject(command) {
|
|
|
26865
27147
|
);
|
|
26866
27148
|
}
|
|
26867
27149
|
function audienceOptions(command) {
|
|
26868
|
-
return command.option("--organization", "Apply to every workspace member.").option("--member <membershipId>", "Apply to one workspace membership id.")
|
|
27150
|
+
return command.option("--organization", "Apply to every workspace member.").option("--member <membershipId>", "Apply to one workspace membership id.").option(
|
|
27151
|
+
"--team <teamId>",
|
|
27152
|
+
"Apply to everyone on a team, now and later (`geni workspace teams` lists ids)."
|
|
27153
|
+
);
|
|
26869
27154
|
}
|
|
26870
27155
|
function audience(options) {
|
|
26871
|
-
|
|
27156
|
+
const chosen = [options.organization, options.member, options.team].filter(
|
|
27157
|
+
Boolean
|
|
27158
|
+
);
|
|
27159
|
+
if (chosen.length !== 1)
|
|
26872
27160
|
throw new Error(
|
|
26873
|
-
"Choose exactly one of --organization or --
|
|
27161
|
+
"Choose exactly one of --organization, --member <membershipId> or --team <teamId>."
|
|
26874
27162
|
);
|
|
26875
27163
|
if (options.member) return { type: "member", membershipId: options.member };
|
|
27164
|
+
if (options.team) return { type: "team", teamId: options.team };
|
|
26876
27165
|
return { type: "organization" };
|
|
26877
27166
|
}
|
|
26878
27167
|
async function execute(action) {
|
|
@@ -26884,7 +27173,7 @@ async function execute(action) {
|
|
|
26884
27173
|
}
|
|
26885
27174
|
function registerSharingCommands(program2) {
|
|
26886
27175
|
const sharing = program2.command("sharing").description(
|
|
26887
|
-
"Inspect, grant and revoke
|
|
27176
|
+
"Inspect, grant and revoke who a specialist, resource or credential is shared with: one member, a team, or the whole workspace. A specialist's grants also apply to everything inside it."
|
|
26888
27177
|
);
|
|
26889
27178
|
subject(sharing.command("inspect <id>")).action(
|
|
26890
27179
|
(id, options) => execute(
|
|
@@ -26914,7 +27203,7 @@ function registerSharingCommands(program2) {
|
|
|
26914
27203
|
await (await sessionContextService.requireAuthed()).client.sharing.revoke({ id, kind: options.kind, audience: target });
|
|
26915
27204
|
return {
|
|
26916
27205
|
isRevoked: true,
|
|
26917
|
-
note: "Other direct or inherited specialist grants may still provide access."
|
|
27206
|
+
note: "Other direct, team or inherited specialist grants may still provide access."
|
|
26918
27207
|
};
|
|
26919
27208
|
})
|
|
26920
27209
|
);
|
|
@@ -27211,7 +27500,7 @@ async function run(opts) {
|
|
|
27211
27500
|
// src/commands/workspace/members.ts
|
|
27212
27501
|
function registerWorkspaceMembers(parent) {
|
|
27213
27502
|
parent.command("members").description(
|
|
27214
|
-
"List active members of the active workspace (name
|
|
27503
|
+
"List active members of the active workspace (name, email, and the teams each is on). Use to resolve a person to an exact address before emailing, assigning, or sharing."
|
|
27215
27504
|
).option("-q, --query <text>", "Substring filter on name and email.").option("--page <n>", "1-based page of 25. Default 1.").option("--json", "Machine-readable output.").action(async (opts) => {
|
|
27216
27505
|
const page = opts.page ? Number.parseInt(opts.page, 10) : void 0;
|
|
27217
27506
|
try {
|
|
@@ -27231,10 +27520,11 @@ function registerWorkspaceMembers(parent) {
|
|
|
27231
27520
|
exit(ExitCode.Ok);
|
|
27232
27521
|
}
|
|
27233
27522
|
printTable(
|
|
27234
|
-
["NAME", "EMAIL"],
|
|
27523
|
+
["NAME", "EMAIL", "TEAMS"],
|
|
27235
27524
|
result.members.map((member) => [
|
|
27236
27525
|
member.name ?? "(no name)",
|
|
27237
|
-
member.email
|
|
27526
|
+
member.email,
|
|
27527
|
+
member.teams.length > 0 ? member.teams.join(", ") : "-"
|
|
27238
27528
|
])
|
|
27239
27529
|
);
|
|
27240
27530
|
if (result.hasMore) {
|
|
@@ -27250,6 +27540,44 @@ function registerWorkspaceMembers(parent) {
|
|
|
27250
27540
|
});
|
|
27251
27541
|
}
|
|
27252
27542
|
|
|
27543
|
+
// src/commands/workspace/teams.ts
|
|
27544
|
+
var PERMISSION_LABELS = new Map(
|
|
27545
|
+
ORG_PERMISSIONS.map((definition) => [definition.id, definition.label])
|
|
27546
|
+
);
|
|
27547
|
+
function registerWorkspaceTeams(parent) {
|
|
27548
|
+
parent.command("teams").description(
|
|
27549
|
+
"List the active workspace's teams: each team's id, the permissions everyone on it holds beyond their role, and who is on it. A team's id is what `geni sharing grant --team` takes. Admins change teams in Settings \u2192 Members."
|
|
27550
|
+
).option("--json", "Machine-readable output.").action(async (opts) => {
|
|
27551
|
+
try {
|
|
27552
|
+
const { teams } = await workspaceService.teams();
|
|
27553
|
+
if (opts.json) {
|
|
27554
|
+
printJson({ teams });
|
|
27555
|
+
exit(ExitCode.Ok);
|
|
27556
|
+
}
|
|
27557
|
+
if (teams.length === 0) {
|
|
27558
|
+
process.stdout.write(
|
|
27559
|
+
"This workspace has no teams yet. Admins make them in Settings \u2192 Members.\n"
|
|
27560
|
+
);
|
|
27561
|
+
exit(ExitCode.Ok);
|
|
27562
|
+
}
|
|
27563
|
+
printTable(
|
|
27564
|
+
["TEAM", "ID", "PERMISSIONS", "MEMBERS"],
|
|
27565
|
+
teams.map((team) => [
|
|
27566
|
+
team.name,
|
|
27567
|
+
team.id,
|
|
27568
|
+
team.permissions.length > 0 ? team.permissions.map(
|
|
27569
|
+
(permission) => PERMISSION_LABELS.get(permission) ?? permission
|
|
27570
|
+
).join(", ") : "-",
|
|
27571
|
+
team.members.length > 0 ? team.members.map((member) => member.name ?? member.email).join(", ") : "-"
|
|
27572
|
+
])
|
|
27573
|
+
);
|
|
27574
|
+
exit(ExitCode.Ok);
|
|
27575
|
+
} catch (error) {
|
|
27576
|
+
exitOnApiError(error);
|
|
27577
|
+
}
|
|
27578
|
+
});
|
|
27579
|
+
}
|
|
27580
|
+
|
|
27253
27581
|
// src/commands/workspace/index.ts
|
|
27254
27582
|
function registerWorkspaceCommands(program2) {
|
|
27255
27583
|
const workspace = program2.command("workspace").alias("workspaces").description(
|
|
@@ -27259,6 +27587,7 @@ function registerWorkspaceCommands(program2) {
|
|
|
27259
27587
|
registerWorkspaceSwitch(workspace);
|
|
27260
27588
|
registerWorkspaceCurrent(workspace);
|
|
27261
27589
|
registerWorkspaceMembers(workspace);
|
|
27590
|
+
registerWorkspaceTeams(workspace);
|
|
27262
27591
|
}
|
|
27263
27592
|
|
|
27264
27593
|
// src/commands/exec/bash.ts
|
|
@@ -28555,7 +28884,7 @@ function registerResourceLifecycle(parent) {
|
|
|
28555
28884
|
// src/commands/resource/create.ts
|
|
28556
28885
|
import { Option as Option2 } from "commander";
|
|
28557
28886
|
import { resolve as resolve4 } from "path";
|
|
28558
|
-
import { z as
|
|
28887
|
+
import { z as z43 } from "zod";
|
|
28559
28888
|
|
|
28560
28889
|
// src/lib/resourceTypeWords.ts
|
|
28561
28890
|
var RESOURCE_TYPE_FLAG = {
|
|
@@ -28578,9 +28907,9 @@ var RESOURCE_KIND_WORD = {
|
|
|
28578
28907
|
};
|
|
28579
28908
|
|
|
28580
28909
|
// src/commands/resource/create.ts
|
|
28581
|
-
var ResourceCreateTypeSchema =
|
|
28910
|
+
var ResourceCreateTypeSchema = z43.preprocess(
|
|
28582
28911
|
(value) => value === "deliverable" ? "design" : value,
|
|
28583
|
-
|
|
28912
|
+
z43.union([WorkflowTypeSchema, z43.literal("skill")])
|
|
28584
28913
|
);
|
|
28585
28914
|
function authoringSkillFor(workflowType) {
|
|
28586
28915
|
switch (workflowType) {
|
|
@@ -28931,7 +29260,7 @@ function printConfig(snapshot) {
|
|
|
28931
29260
|
|
|
28932
29261
|
// src/commands/resource/config/set.ts
|
|
28933
29262
|
import { resolve as resolve9 } from "path";
|
|
28934
|
-
import { z as
|
|
29263
|
+
import { z as z44 } from "zod";
|
|
28935
29264
|
function registerConfigSet(parent) {
|
|
28936
29265
|
parent.command("set [id]").description(
|
|
28937
29266
|
"Wire config. Repeat each flag as needed. Credentials: --cred <service>=<credentialId>. Consts: --const <key>=<value> (value JSON-parsed, else string). Schedules: --schedule <triggerId>=<cron>, --timezone <triggerId>=<tz>."
|
|
@@ -29049,7 +29378,7 @@ function buildPartial(opts) {
|
|
|
29049
29378
|
} catch {
|
|
29050
29379
|
inputValues = null;
|
|
29051
29380
|
}
|
|
29052
|
-
const parsed =
|
|
29381
|
+
const parsed = z44.record(z44.string(), z44.unknown()).safeParse(inputValues);
|
|
29053
29382
|
if (!parsed.success) {
|
|
29054
29383
|
printError("--trigger-input expects <triggerId>=<JSON object>.");
|
|
29055
29384
|
exit(ExitCode.InvalidArgs);
|
|
@@ -29267,7 +29596,7 @@ Commands accept the resource id as a positional, or infer it from the
|
|
|
29267
29596
|
|
|
29268
29597
|
// src/commands/workflow/executionControls.ts
|
|
29269
29598
|
import { resolve as resolve12 } from "path";
|
|
29270
|
-
import { z as
|
|
29599
|
+
import { z as z45 } from "zod";
|
|
29271
29600
|
function registerExecutionControls(parent) {
|
|
29272
29601
|
for (const action of [
|
|
29273
29602
|
"pending-input",
|
|
@@ -29312,7 +29641,7 @@ function registerExecutionControls(parent) {
|
|
|
29312
29641
|
if (action === "resume") {
|
|
29313
29642
|
const answers = parseJson(
|
|
29314
29643
|
options.answers,
|
|
29315
|
-
|
|
29644
|
+
z45.record(z45.string(), z45.string()),
|
|
29316
29645
|
"--answers"
|
|
29317
29646
|
);
|
|
29318
29647
|
await workflowAuthoringService.resumeExecution(
|
|
@@ -29350,7 +29679,7 @@ function registerExecutionControls(parent) {
|
|
|
29350
29679
|
|
|
29351
29680
|
// src/commands/workflow/previewFilter.ts
|
|
29352
29681
|
import { resolve as resolve13 } from "path";
|
|
29353
|
-
import { z as
|
|
29682
|
+
import { z as z46 } from "zod";
|
|
29354
29683
|
function registerPreviewFilter(parent) {
|
|
29355
29684
|
parent.command("preview-filter [id]").description(
|
|
29356
29685
|
"Run filter.ts once and inspect its decision, transformed input and logs. Uses live credentials and persists any dedup state it writes; does not run the workflow body."
|
|
@@ -29369,7 +29698,7 @@ function registerPreviewFilter(parent) {
|
|
|
29369
29698
|
const workflowId = resolveResourceId({ id, dir });
|
|
29370
29699
|
const triggerPayload = parseJson(
|
|
29371
29700
|
options.payload ?? "{}",
|
|
29372
|
-
|
|
29701
|
+
z46.record(z46.string(), z46.unknown()),
|
|
29373
29702
|
"--payload"
|
|
29374
29703
|
);
|
|
29375
29704
|
try {
|
|
@@ -29515,7 +29844,7 @@ function registerWorkflowSetType(parent) {
|
|
|
29515
29844
|
|
|
29516
29845
|
// src/commands/workflow/test.ts
|
|
29517
29846
|
import { resolve as resolve16 } from "path";
|
|
29518
|
-
import { z as
|
|
29847
|
+
import { z as z47 } from "zod";
|
|
29519
29848
|
var TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "cancelled", "awaiting_input"]);
|
|
29520
29849
|
var POLL_INTERVAL_MS = 2e3;
|
|
29521
29850
|
function registerWorkflowTest(parent) {
|
|
@@ -29642,7 +29971,7 @@ function parsePayload(raw) {
|
|
|
29642
29971
|
printError("--payload must be a JSON object, not an array.");
|
|
29643
29972
|
exit(ExitCode.InvalidArgs);
|
|
29644
29973
|
}
|
|
29645
|
-
const result =
|
|
29974
|
+
const result = z47.record(z47.string(), z47.unknown()).safeParse(parsed);
|
|
29646
29975
|
if (!result.success) {
|
|
29647
29976
|
printError(`--payload must be a JSON object (e.g. '{"days":7}').`);
|
|
29648
29977
|
exit(ExitCode.InvalidArgs);
|
|
@@ -29997,7 +30326,7 @@ function registerAppBuildStatus(parent) {
|
|
|
29997
30326
|
|
|
29998
30327
|
// src/commands/app/runHandler.ts
|
|
29999
30328
|
import { resolve as resolve24 } from "path";
|
|
30000
|
-
import { z as
|
|
30329
|
+
import { z as z48 } from "zod";
|
|
30001
30330
|
function registerAppRunHandler(parent) {
|
|
30002
30331
|
parent.command("run-handler <name> [id]").description(
|
|
30003
30332
|
"Dispatch a handler against the live app with --input JSON (bypasses cache) and print the result. Publish first. Exits nonzero on handler error."
|
|
@@ -30052,7 +30381,7 @@ function parseInput(raw) {
|
|
|
30052
30381
|
printError("--input must be a JSON object, not an array.");
|
|
30053
30382
|
exit(ExitCode.InvalidArgs);
|
|
30054
30383
|
}
|
|
30055
|
-
const result =
|
|
30384
|
+
const result = z48.record(z48.string(), z48.unknown()).safeParse(parsed);
|
|
30056
30385
|
if (!result.success) {
|
|
30057
30386
|
printError(`--input must be a JSON object (e.g. '{"limit":50}').`);
|
|
30058
30387
|
exit(ExitCode.InvalidArgs);
|
|
@@ -30071,7 +30400,7 @@ function parseTimeout2(raw) {
|
|
|
30071
30400
|
|
|
30072
30401
|
// src/commands/app/runAgent.ts
|
|
30073
30402
|
import { resolve as resolve25 } from "path";
|
|
30074
|
-
import { z as
|
|
30403
|
+
import { z as z49 } from "zod";
|
|
30075
30404
|
function registerAppRunAgent(parent) {
|
|
30076
30405
|
parent.command("run-agent <name> [id]").description(
|
|
30077
30406
|
"Trigger a declared app agent (agents/<name>/ in app.json) as a test execution against the live app. Async: prints the execution id; poll `geni workflow executions [id]` and `geni workflow execution <executionId>` for the outcome. Publish first."
|
|
@@ -30123,7 +30452,7 @@ function parseVariables(raw) {
|
|
|
30123
30452
|
printError(`--variables must be valid JSON. Got: ${raw}`);
|
|
30124
30453
|
exit(ExitCode.InvalidArgs);
|
|
30125
30454
|
}
|
|
30126
|
-
const result =
|
|
30455
|
+
const result = z49.record(z49.string(), z49.unknown()).safeParse(parsed);
|
|
30127
30456
|
if (!result.success) {
|
|
30128
30457
|
printError(`--variables must be a JSON object (e.g. '{"limit":50}').`);
|
|
30129
30458
|
exit(ExitCode.InvalidArgs);
|
|
@@ -30455,10 +30784,10 @@ import {
|
|
|
30455
30784
|
} from "fs";
|
|
30456
30785
|
|
|
30457
30786
|
// src/skills/geni.md
|
|
30458
|
-
var geni_default = "---\nname: geni\ndescription: Use the user'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 user'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 colleague \u2014 the integration expert 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. Not sure which service does it?\n `geni integration search \"<capability>\"` searches operations across\n every integration at once, grouped by service.\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\nNeed a workspace member's exact email (to notify, assign, or share to)? `geni\nworkspace members -q \"<name>\"`. General Input notifies members only\n(`POST $PLATFORM_BASE_URL/notifications`); anyone else is emailed from a\nconnected Gmail or Outlook.\n\nFor connection health, introspection refresh, labels, notes, dependent\nworkflows, access history, or disconnecting an account, use the dedicated\ncommands in `geni credential --help`. Inspect dependents before disconnecting.\n`geni sharing --help` covers direct member and organization grants on\nspecialists, resources, and credentials; inherited specialist access remains\nwhen a direct resource grant is removed.\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 user's browser. Tell the user 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, notifications) without `--cred`.\n\n## --reason is per-call\n\nEvery `geni exec bash --cred ...` requires `--reason`. It lands in\nthe user'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 a\nconversation with a specialist, just on the user's machine with your\nbrain 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 --specialist <specialistId> --name \"Daily Digest\"`:\n creates the resource in that specialist (`geni specialist list` shows the ones\n you can edit, `geni specialist create` makes one) and scaffolds its files\n into the current directory, with a `.geni-resource.json` marker so later\n commands here 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`. Poll triggers also need `--trigger-cred\n <triggerId>=<credentialId>` and `--trigger-input '<triggerId>={...}'`;\n clear a poll binding with `--trigger-cred-clear <triggerId>`.\n Resource credential slots and poll trigger bindings are separate.\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 --trigger <key> --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.\n7. `geni resource enable`: turn it on once it is verified. A workflow is\n validated first and the command exits 9 with the blockers when it is\n not ready; `geni resource disable` turns it off. Works for skills too.\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\nFor a paused run, inspect `geni workflow pending-input <executionId>` and\nanswer every open question with `geni workflow resume <executionId>\n--answers '{\"toolCallId\":\"answer\"}'`. Finished and paused agent runs support\n`continue <executionId> --message \"...\"` (on a paused run it skips the open\nquestions); `cancel` stops active runs and `retry`\nrepeats a finished run with its original input and trigger. These commands\ninfer the workflow from the local marker or accept `--workflow <id>`.\n\n`geni resource versions` lists published snapshots; `geni resource revert\n<versionId>` restores one and rebuilds apps when needed. Pull fresh files\nbefore editing after a revert. `geni resource delete` archives one owned\nresource.\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\nPass `--trigger <key>` to select the trigger for samples, tests and filter\npreviews. `geni workflow preview-filter --payload '{...}'` executes only\nthe filter; add `--draft` to preview local edits. It uses live credentials\nand can persist filter deduplication state. `trigger-activity` inspects live\npolling, filter decisions and captured events; `trigger-sync` polls now,\nand `trigger-replay` starts a real run from a captured event. Use each\ncommand's `--help` for selectors and pagination. Sync, retry and replay can\nrepeat external actions.\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 --specialist <specialistId>`; 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. `geni app screenshots` saves authenticated\n mobile and desktop captures; page loads can invoke live handlers.\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- `geni app run-agent <name> --variables '{...}'` triggers a declared\n app agent (`agents/<name>/` in app.json) as a test execution. Async:\n poll `geni workflow executions`, then `geni workflow execution <id>`.\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## Building custom API integrations\n\nWhen the integration catalog has no service for an API-key or public REST\nAPI, load its authoring contract with `geni skills load custom-api`. Read that\nskill before creating anything. Gather the provider's official documentation,\nshow the user the proposed title and description, and wait for approval.\n\nCreate the private draft with\n`geni custom-api create --title \"...\" --description \"...\" --confirm`. The\n`--confirm` flag means the user approved those exact\ndetails. Then use `geni custom-api update`, `upsert-operation`,\n`delete-operation`, and `set-status`; each accepts the same fields as the\ncorresponding cloud-agent tool. Prefer `--file` for documentation-heavy JSON.\nPublish with `set-status <id> live --confirm` only after the user explicitly\nasks and the loaded skill's source inventory has no unresolved assumptions.\nOAuth-only services need an integration request in the dashboard instead.\n\n## Hosted browser (login-walled sites)\n\nFor sites with no API \u2014 or data behind a login wall \u2014 drive a hosted\nbrowser with a Playwright script, exactly like the platform's agents do.\n\n1. `geni browser profiles` \u2014 saved browsers and their logins. The\n user's own browser is always listed; shared ones appear too.\n2. `geni browser open [--profile <id>] [--url <url>]` \u2014 open a hosted session, on that page when given.\n With `--profile` it arrives signed in (cookies + storage); without,\n it's logged out. One session at a time.\n3. While it's open, `geni exec bash` exports `GI_BROWSER_CDP_URL`.\n Write a playwright-core script that\n `chromium.connectOverCDP(process.env.GI_BROWSER_CDP_URL)` and run it\n with `node` (not bun). No `--cred` needed for the browser itself.\n4. `geni browser close` \u2014 ALWAYS, including after failures: it saves\n the login back onto the profile and stops billing. A forgotten\n session auto-closes after 2 hours.\n\nWhen a script hits a real login wall (a restricted page bounced to a\nsign-in form \u2014 a homepage merely showing a Sign in button doesn't\ncount), first sign in with a provider: if the login is listed as\n\"signed in with github.com\", or the sign-in page offers a provider\nthe browser lists as signed in (\"Continue with GitHub\"), click that\nbutton once. If it lands signed in, carry on and record the way in\nwith `geni browser report-login <domain> active --signed-in-with\ngithub.com`. Stop at anything it asks for (a password, a code, an\nemail, a choice of account, approval for an app). Otherwise:\n\n- On the user's own browser: `geni browser request-login <domain>`\n opens a live view in their real browser; they sign in (2FA and all),\n the browser saves as they go, and the next `open --profile` arrives\n signed in.\n- On a shared browser: `geni browser report-login <domain> logged_out`\n and tell the user to ask its owner to reconnect it. Use\n `... active` when you confirmed a listed login works.\n\n## Workspace memory\n\nThe workspace carries a memory: standing instructions, conventions,\nand reference material the workspace's agents have accumulated. It is\nnot optional context \u2014 it holds decisions you would otherwise\nre-derive or contradict.\n\n**Read it at the start of any non-trivial task:**\n\n```\ngeni memory show # the workspace's\ngeni memory show --personal # the user's own preferences\n```\n\nUse `geni memory files` to list referenced files and `geni memory read\n<path>` to read one. `read <path> --out <file>` downloads an original\nupload without changing its bytes; `geni memory pull --dir <directory>`\ndownloads a side's guide, references and originals. Add `--personal` for\nthe user's own memory.\n\nStanding instructions there override your defaults. If memory says\nreports go in a specific format, or a service is off-limits, follow it\nwithout re-asking.\n\n**File what you learn back:**\n\n```\ngeni memory remember \"invoices are reconciled against Stripe, never the ledger\"\ngeni memory remember --personal \"prefers terse summaries, no preamble\"\n```\n\nThis does not edit memory. It queues the change for the workspace's\nmemory agent, which folds it in on its next run and reconciles it\nagainst everything else it knows. `geni memory show` lists what is\nalready queued, so you don't file the same thing twice.\n\nReach for `remember` when a correction or convention would still\nmatter next week and isn't already recorded. Skip it for one-off\ndetails, anything already in `geni memory show`, and anything you only\nhalf-know \u2014 a wrong memory is worse than a missing one. Most tasks\nneed no call at all. Phrase the note as the change you want made\n(\"deploys go out Tuesdays\"), not a summary of the session (\"we talked\nabout deploys\").\n\nWorkspace memory is shared with the whole team, so keep it about the\nbusiness and the work, never about a person. Anything specific to this\nuser goes to `--personal`. Workspace proposals require Admin or Owner;\nevery member can propose changes to their own personal memory.\n\n## Specialist files and portability\n\n`geni specialist files --help` covers shared text and binary files, and the\nfolders people see them in (`mkdir`, `mv`, `rename`, `rmdir`): a specialist's\nworkflows, apps, and skills sit in those folders beside its files. Specialist\nimport/export and template commands are listed in `geni specialist --help`.\nReview archive contents and template versions before installing. Exports\nand publications carry only the files and memory explicitly selected;\nchoose the intended publication audience before publishing a template.\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 user.\n- `78` \u2014 session expired. Tell the user 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- Don't create or publish a custom API before loading `custom-api`, reviewing\n sources, and getting the user's explicit approval.\n- Don't re-derive a convention `geni memory show` already states, and\n don't put anything about a named person into workspace memory.\n- Use `--json` on list/get commands when you're going to parse the\n output. Table output is for humans.\n";
|
|
30787
|
+
var geni_default = "---\nname: geni\ndescription: Use the user'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 user'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 colleague \u2014 the integration expert 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. Not sure which service does it?\n `geni integration search \"<capability>\"` searches operations across\n every integration at once, grouped by service.\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\nNeed a workspace member's exact email (to notify, assign, or share to)? `geni\nworkspace members -q \"<name>\"`. General Input notifies members only\n(`POST $PLATFORM_BASE_URL/notifications`); anyone else is emailed from a\nconnected Gmail or Outlook.\n\nFor connection health, introspection refresh, labels, notes, dependent\nworkflows, access history, or disconnecting an account, use the dedicated\ncommands in `geni credential --help`. Inspect dependents before disconnecting.\n`geni sharing --help` covers member, team, and organization grants on\nspecialists, resources, and credentials (`inspect` lists all three); inherited\nspecialist access remains when a direct resource grant is removed. `geni\nworkspace teams` lists each team's id, what it carries, and who is on it.\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 user's browser. Tell the user 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, notifications) without `--cred`.\n\n## --reason is per-call\n\nEvery `geni exec bash --cred ...` requires `--reason`. It lands in\nthe user'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 a\nconversation with a specialist, just on the user's machine with your\nbrain 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 --specialist <specialistId> --name \"Daily Digest\"`:\n creates the resource in that specialist (`geni specialist list` shows the ones\n you can edit, `geni specialist create` makes one) and scaffolds its files\n into the current directory, with a `.geni-resource.json` marker so later\n commands here 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`. Poll triggers also need `--trigger-cred\n <triggerId>=<credentialId>` and `--trigger-input '<triggerId>={...}'`;\n clear a poll binding with `--trigger-cred-clear <triggerId>`.\n Resource credential slots and poll trigger bindings are separate.\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 --trigger <key> --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.\n7. `geni resource enable`: turn it on once it is verified. A workflow is\n validated first and the command exits 9 with the blockers when it is\n not ready; `geni resource disable` turns it off. Works for skills too.\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\nFor a paused run, inspect `geni workflow pending-input <executionId>` and\nanswer every open question with `geni workflow resume <executionId>\n--answers '{\"toolCallId\":\"answer\"}'`. Finished and paused agent runs support\n`continue <executionId> --message \"...\"` (on a paused run it skips the open\nquestions); `cancel` stops active runs and `retry`\nrepeats a finished run with its original input and trigger. These commands\ninfer the workflow from the local marker or accept `--workflow <id>`.\n\n`geni resource versions` lists published snapshots; `geni resource revert\n<versionId>` restores one and rebuilds apps when needed. Pull fresh files\nbefore editing after a revert. `geni resource delete` archives one owned\nresource.\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\nPass `--trigger <key>` to select the trigger for samples, tests and filter\npreviews. `geni workflow preview-filter --payload '{...}'` executes only\nthe filter; add `--draft` to preview local edits. It uses live credentials\nand can persist filter deduplication state. `trigger-activity` inspects live\npolling, filter decisions and captured events; `trigger-sync` polls now,\nand `trigger-replay` starts a real run from a captured event. Use each\ncommand's `--help` for selectors and pagination. Sync, retry and replay can\nrepeat external actions.\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 --specialist <specialistId>`; 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. `geni app screenshots` saves authenticated\n mobile and desktop captures; page loads can invoke live handlers.\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- `geni app run-agent <name> --variables '{...}'` triggers a declared\n app agent (`agents/<name>/` in app.json) as a test execution. Async:\n poll `geni workflow executions`, then `geni workflow execution <id>`.\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## Building custom API integrations\n\nWhen the integration catalog has no service for an API-key or public REST\nAPI, load its authoring contract with `geni skills load custom-api`. Read that\nskill before creating anything. Gather the provider's official documentation,\nshow the user the proposed title and description, and wait for approval.\n\nCreate the private draft with\n`geni custom-api create --title \"...\" --description \"...\" --confirm`. The\n`--confirm` flag means the user approved those exact\ndetails. Then use `geni custom-api update`, `upsert-operation`,\n`delete-operation`, and `set-status`; each accepts the same fields as the\ncorresponding cloud-agent tool. Prefer `--file` for documentation-heavy JSON.\nPublish with `set-status <id> live --confirm` only after the user explicitly\nasks and the loaded skill's source inventory has no unresolved assumptions.\nOAuth-only services need an integration request in the dashboard instead.\n\n## Hosted browser (login-walled sites)\n\nFor sites with no API \u2014 or data behind a login wall \u2014 drive a hosted\nbrowser with a Playwright script, exactly like the platform's agents do.\n\n1. `geni browser profiles` \u2014 saved browsers and their logins. The\n user's own browser is always listed; shared ones appear too.\n2. `geni browser open [--profile <id>] [--url <url>]` \u2014 open a hosted session, on that page when given.\n With `--profile` it arrives signed in (cookies + storage); without,\n it's logged out. One session at a time.\n3. While it's open, `geni exec bash` exports `GI_BROWSER_CDP_URL`.\n Write a playwright-core script that\n `chromium.connectOverCDP(process.env.GI_BROWSER_CDP_URL)` and run it\n with `node` (not bun). No `--cred` needed for the browser itself.\n4. `geni browser close` \u2014 ALWAYS, including after failures: it saves\n the login back onto the profile and stops billing. A forgotten\n session auto-closes after 2 hours.\n\nWhen a script hits a real login wall (a restricted page bounced to a\nsign-in form \u2014 a homepage merely showing a Sign in button doesn't\ncount), first sign in with a provider: if the login is listed as\n\"signed in with github.com\", or the sign-in page offers a provider\nthe browser lists as signed in (\"Continue with GitHub\"), click that\nbutton once. If it lands signed in, carry on and record the way in\nwith `geni browser report-login <domain> active --signed-in-with\ngithub.com`. Stop at anything it asks for (a password, a code, an\nemail, a choice of account, approval for an app). Otherwise:\n\n- On the user's own browser: `geni browser request-login <domain>`\n opens a live view in their real browser; they sign in (2FA and all),\n the browser saves as they go, and the next `open --profile` arrives\n signed in.\n- On a shared browser: `geni browser report-login <domain> logged_out`\n and tell the user to ask its owner to reconnect it. Use\n `... active` when you confirmed a listed login works.\n\n## Workspace memory\n\nThe workspace carries a memory: standing instructions, conventions,\nand reference material the workspace's agents have accumulated. It is\nnot optional context \u2014 it holds decisions you would otherwise\nre-derive or contradict.\n\n**Read it at the start of any non-trivial task:**\n\n```\ngeni memory show # the workspace's\ngeni memory show --personal # the user's own preferences\n```\n\nUse `geni memory files` to list referenced files and `geni memory read\n<path>` to read one. `read <path> --out <file>` downloads an original\nupload without changing its bytes; `geni memory pull --dir <directory>`\ndownloads a side's guide, references and originals. Add `--personal` for\nthe user's own memory.\n\nStanding instructions there override your defaults. If memory says\nreports go in a specific format, or a service is off-limits, follow it\nwithout re-asking.\n\n**File what you learn back:**\n\n```\ngeni memory remember \"invoices are reconciled against Stripe, never the ledger\"\ngeni memory remember --personal \"prefers terse summaries, no preamble\"\n```\n\nThis does not edit memory. It queues the change for the workspace's\nmemory agent, which folds it in on its next run and reconciles it\nagainst everything else it knows. `geni memory show` lists what is\nalready queued, so you don't file the same thing twice.\n\nReach for `remember` when a correction or convention would still\nmatter next week and isn't already recorded. Skip it for one-off\ndetails, anything already in `geni memory show`, and anything you only\nhalf-know \u2014 a wrong memory is worse than a missing one. Most tasks\nneed no call at all. Phrase the note as the change you want made\n(\"deploys go out Tuesdays\"), not a summary of the session (\"we talked\nabout deploys\").\n\nWorkspace memory is shared with the whole team, so keep it about the\nbusiness and the work, never about a person. Anything specific to this\nuser goes to `--personal`. Workspace proposals require Admin or Owner;\nevery member can propose changes to their own personal memory.\n\n## Specialist files and portability\n\n`geni specialist files --help` covers shared text and binary files, and the\nfolders people see them in (`mkdir`, `mv`, `rename`, `rmdir`): a specialist's\nworkflows, apps, and skills sit in those folders beside its files. Specialist\nimport/export and template commands are listed in `geni specialist --help`.\nReview archive contents and template versions before installing. Exports\nand publications carry only the files and memory explicitly selected;\nchoose the intended publication audience before publishing a template.\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 user.\n- `78` \u2014 session expired. Tell the user 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- Don't create or publish a custom API before loading `custom-api`, reviewing\n sources, and getting the user's explicit approval.\n- Don't re-derive a convention `geni memory show` already states, and\n don't put anything about a named person into workspace memory.\n- Use `--json` on list/get commands when you're going to parse the\n output. Table output is for humans.\n";
|
|
30459
30788
|
|
|
30460
30789
|
// src/skills/geni-crm.md
|
|
30461
|
-
var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the user\'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), 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, and enrichment.\n---\n\n# geni crm\n\n`geni crm` reads and writes the user\'s General Input CRM: the lead database\n(people and companies), deal pipelines and their cards, lists, tags, notes,\ntasks, touchpoints, and custom fields. 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`, `waterfalls`,\n`enrich`, `history`, `activities`, `files`, `views`, `merge`,\n`consent`, `privacy`, `credits`, `import`, plus top-level `search` and `match`.\n\nEvery command that names a record by type takes one of three record types:\n`person`, `company`, or `pipeline_card` (a card in any pipeline: a deal, or a\ncandidate in a recruiting pipeline). Tags, lists, notes, tasks, and custom\nfields work on all three.\n\nEveryone in the workspace sees and edits every person, company, and pipeline\ncard.\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|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":"title","operator":"contains","value":"vp"},{"field":"companyEmployeeCount","operator":"gte","value":50}]\'` \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## Activities\n\nNotes, calls, emails, meetings, Slack and LinkedIn messages are activities, and\none activity links to every record it concerns (a call with Ada about the\nAcme deal links Ada, Acme, and the deal card). Someone sees an activity only\nwhen they can see every record it links.\n\n- `geni crm activities list <entityType> <id> [--kind call email]` lists a record\'s activities, newest first.\n- `geni crm activities log --json \'{"kind":"call","direction":"outbound","body":"Walked through the offer","links":[{"type":"person","id":"<id>"},{"type":"pipeline_card","id":"<id>"}]}\'`. A future `occurredAt` schedules a meeting or call.\n- `geni crm activities sync --json \'{...,"externalRef":"<Message-ID>"}\'` creates or updates the activity that `externalRef` names and merges its links, so re-syncing a mailbox never duplicates a message. A message a teammate already logged stays as they logged it.\n- Only an activity\'s author edits or deletes it. Notes (`geni crm notes`) and card touchpoints are the same activities seen through one record.\n\n## Files\n\nA record can carry files (a resume on a person, a contract on a card), up to\n25 MB each. `geni crm files upload person <id> ./resume.pdf --kind resume`\nattaches one; `geni crm files list <entityType> <id>` lists them;\n`geni crm files text <fileId>` prints a text file\'s contents and\n`geni crm files download <fileId>` prints a short-lived link to any file.\nSomeone sees a file only when they can see its record.\n\n## Custom fields and saved views\n\nCustom fields (`geni crm fields`) can be text, long text, number, currency\n(`{"amount":1200,"currency":"USD"}`), checkbox, date, date and time (ISO),\nsingle select, multi-select, status, URL, email, phone, or member (a\nmembership id). Write values through the record\'s `custom` object.\n\nSaved views (`geni crm views`) are named filters, sort, and columns for one\nrecord type\'s table or board, personal or shared with the workspace.\n\n## Duplicates, consent, and privacy\n\n- **Merge duplicates**: `geni crm merge people <keepId> <dupeId...>` (and `companies`). The kept record takes every link, contact, file, and history line, and fills its empty fields from the duplicates.\n- **Before any outreach**, run `geni crm consent check <personId> --channel email` (or `phone`). Contact only the `reachable` values it returns, and nobody when `isAllowed` is false. Record a request with `geni crm consent do-not-contact <personId> --reason "..."` or `geni crm consent opt-out <contactPointId>`.\n- **Data requests**: `geni crm privacy export <personId>` returns everything held about them; `geni crm privacy erase <personId> --yes` deletes them for good, with anything merged into them.\n- **Credit splits** on a card: `geni crm credits set <cardId> --json \'{"credits":[{"membershipId":"<id>","role":"Recruiter","percent":60},{"membershipId":"<id>","role":"Account manager","percent":40}]}\'`.\n\n## Importing and syncing\n\n- **Import a CSV**: `geni crm import people leads.csv --dry-run` prints the suggested mapping (column to field, `custom.<key>` for a custom field) and the first rows that would fail. Then run it without `--dry-run`, optionally with `--map \'{...}\'`, `--list <listId>`, `--tag <tagId>`, and `--wait`. Rows match existing records by email, LinkedIn, or domain; a match only fills fields that are empty and never overwrites. `geni crm import status <importId>` shows counts and failed rows.\n- **Match addresses** before logging mail or meetings: `geni crm match a@x.com b@y.com` returns the person each address belongs to (any spelling, `+tags` ignored). Then log with `geni crm activities sync`.\n\n## History and triggers\n\nEvery change to a record is in its history: created, field changes (with the\nold and new value), stage and status moves, tags and lists, tasks, and\ndeletes. `geni crm history <entityType> <id>` prints one record\'s history,\nnewest first. `geni crm history feed [--after <cursor>]` reads the workspace\'s\nevents oldest first, and prints a cursor to pass back as `--after`.\n\nTo act when the CRM changes, build a workflow on a `general-input-crm` trigger\n(record created, field changed, card entered stage, tag added, task created,\nfile attached).\nIts payload is one history event: `entityType`, `entityId`, `kind`, `field`,\n`fromLabel`/`toLabel`, and `details` (stage ids for a stage move, the tag or\nlist id for a membership).\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","entityType":"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/cards take multiple ids; most others take one). `geni crm cards delete <ids...>` is permanent \u2014 it takes the card\'s contacts, activity, notes, touchpoints, tasks, tags, and list entries with it, and reports which ids it actually matched. Prefer `cards archive <id>` when the record should survive.\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 user 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 any outreach so nothing goes to a bad 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 user to run `geni login`.\n';
|
|
30790
|
+
var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the user\'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), 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, and enrichment.\n---\n\n# geni crm\n\n`geni crm` reads and writes the user\'s General Input CRM: the lead database\n(people and companies), deal pipelines and their cards, lists, tags, notes,\ntasks, touchpoints, and custom fields. 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`, `waterfalls`,\n`enrich`, `access`, `history`, `activities`, `files`, `views`, `merge`,\n`consent`, `privacy`, `credits`, `import`, plus top-level `search` and `match`.\n\nEvery command that names a record by type takes one of three record types:\n`person`, `company`, or `pipeline_card` (a card in any pipeline: a deal, or a\ncandidate in a recruiting pipeline). Tags, lists, notes, tasks, custom fields,\nand access work on all three.\n\nPeople, companies, and pipeline cards have an owner and a visibility: everyone in the\nworkspace, a team, or only the owner (and admins, who see every record). You\nonly see records you have access to; a record you can\'t see is a 404, and\ncreating one whose email, LinkedIn, or domain is already on a record you can\'t\nsee fails with a 409 `record_not_shared` instead of merging into it.\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|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":"title","operator":"contains","value":"vp"},{"field":"companyEmployeeCount","operator":"gte","value":50}]\'` \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## Activities\n\nNotes, calls, emails, meetings, Slack and LinkedIn messages are activities, and\none activity links to every record it concerns (a call with Ada about the\nAcme deal links Ada, Acme, and the deal card). Someone sees an activity only\nwhen they can see every record it links.\n\n- `geni crm activities list <entityType> <id> [--kind call email]` lists a record\'s activities, newest first.\n- `geni crm activities log --json \'{"kind":"call","direction":"outbound","body":"Walked through the offer","links":[{"type":"person","id":"<id>"},{"type":"pipeline_card","id":"<id>"}]}\'`. A future `occurredAt` schedules a meeting or call.\n- `geni crm activities sync --json \'{...,"externalRef":"<Message-ID>"}\'` creates or updates the activity that `externalRef` names and merges its links, so re-syncing a mailbox never duplicates a message. A message a teammate already logged stays as they logged it; one logged on a record you can\'t see answers 409 `activity_not_shared`, which a sync treats as done.\n- Only an activity\'s author (or an admin) edits or deletes it. Notes (`geni crm notes`) and card touchpoints are the same activities seen through one record.\n\n## Files\n\nA record can carry files (a resume on a person, a contract on a card), up to\n25 MB each. `geni crm files upload person <id> ./resume.pdf --kind resume`\nattaches one; `geni crm files list <entityType> <id>` lists them;\n`geni crm files text <fileId>` prints a text file\'s contents and\n`geni crm files download <fileId>` prints a short-lived link to any file.\nSomeone sees a file only when they can see its record.\n\n## Custom fields and saved views\n\nCustom fields (`geni crm fields`) can be text, long text, number, currency\n(`{"amount":1200,"currency":"USD"}`), checkbox, date, date and time (ISO),\nsingle select, multi-select, status, URL, email, phone, or member (a\nmembership id). Write values through the record\'s `custom` object.\n\nSaved views (`geni crm views`) are named filters, sort, and columns for one\nrecord type\'s table or board, personal or shared with the workspace.\n\n## Duplicates, consent, and privacy\n\n- **Merge duplicates**: `geni crm merge people <keepId> <dupeId...>` (and `companies`). The kept record takes every link, contact, file, and history line, and fills its empty fields from the duplicates. It needs the owner or an admin.\n- **Before any outreach**, run `geni crm consent check <personId> --channel email` (or `phone`). Contact only the `reachable` values it returns, and nobody when `isAllowed` is false. Record a request with `geni crm consent do-not-contact <personId> --reason "..."` or `geni crm consent opt-out <contactPointId>`.\n- **Data requests**: `geni crm privacy export <personId>` returns everything held about them; `geni crm privacy erase <personId> --yes` deletes them for good, with anything merged into them.\n- **Credit splits** on a card: `geni crm credits set <cardId> --json \'{"credits":[{"membershipId":"<id>","role":"Recruiter","percent":60},{"membershipId":"<id>","role":"Account manager","percent":40}]}\'`.\n\n## Importing and syncing\n\n- **Import a CSV**: `geni crm import people leads.csv --dry-run` prints the suggested mapping (column to field, `custom.<key>` for a custom field) and the first rows that would fail. Then run it without `--dry-run`, optionally with `--map \'{...}\'`, `--list <listId>`, `--tag <tagId>`, and `--wait`. Rows match existing records by email, LinkedIn, or domain; a match only fills fields that are empty and never overwrites. `geni crm import status <importId>` shows counts and failed rows.\n- **Match addresses** before logging mail or meetings: `geni crm match a@x.com b@y.com` returns the person each address belongs to (any spelling, `+tags` ignored). Then log with `geni crm activities sync`.\n\n## History and triggers\n\nEvery change to a record is in its history: created, field changes (with the\nold and new value), stage and status moves, tags and lists, tasks, access, and\ndeletes. `geni crm history <entityType> <id>` prints one record\'s history,\nnewest first. `geni crm history feed [--after <cursor>]` reads the workspace\'s\nevents oldest first, and prints a cursor to pass back as `--after`.\n\nTo act when the CRM changes, build a workflow on a `general-input-crm` trigger\n(record created, field changed, card entered stage, tag added, task created,\nfile attached).\nIts payload is one history event: `entityType`, `entityId`, `kind`, `field`,\n`fromLabel`/`toLabel`, and `details` (stage ids for a stage move, the tag or\nlist id for a membership).\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","entityType":"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- **Access** (owner, team, and who sees it; the owner or an admin): `geni crm access person <id> --json \'{"ownerMembershipId":"<membershipId>","teamId":null,"visibility":"private"}\'`. `company` and `pipeline_card` work the same; `visibility` is `private`, `team` (needs `teamId`), or `workspace`. Deleting a record also needs this access.\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/cards take multiple ids; most others take one). `geni crm cards delete <ids...>` is permanent \u2014 it takes the card\'s contacts, activity, notes, touchpoints, tasks, tags, and list entries with it, and reports which ids it actually matched. Prefer `cards archive <id>` when the record should survive.\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 user 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 any outreach so nothing goes to a bad 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 user to run `geni login`.\n';
|
|
30462
30791
|
|
|
30463
30792
|
// src/lib/skills.ts
|
|
30464
30793
|
var GENI_SKILL_NAME = "geni";
|
|
@@ -30938,7 +31267,7 @@ function printJsonOrField(record, field) {
|
|
|
30938
31267
|
}
|
|
30939
31268
|
|
|
30940
31269
|
// src/lib/leadFilterArg.ts
|
|
30941
|
-
import { z as
|
|
31270
|
+
import { z as z50 } from "zod";
|
|
30942
31271
|
var FILTER_EXAMPLE = `--filter '[{"field":"title","operator":"contains","value":"vp"}]'`;
|
|
30943
31272
|
function parseLeadFilterArg(raw) {
|
|
30944
31273
|
let value;
|
|
@@ -30948,7 +31277,7 @@ function parseLeadFilterArg(raw) {
|
|
|
30948
31277
|
printError(`Invalid --filter: not valid JSON. Example: ${FILTER_EXAMPLE}`);
|
|
30949
31278
|
exit(ExitCode.InternalError);
|
|
30950
31279
|
}
|
|
30951
|
-
const parsed =
|
|
31280
|
+
const parsed = z50.array(LeadFilterConditionSchema).safeParse(value);
|
|
30952
31281
|
if (!parsed.success) {
|
|
30953
31282
|
const issue = parsed.error.issues[0];
|
|
30954
31283
|
const path = issue?.path.map(String).join(".");
|
|
@@ -32250,6 +32579,26 @@ function registerCrmEnrich(parent) {
|
|
|
32250
32579
|
});
|
|
32251
32580
|
}
|
|
32252
32581
|
|
|
32582
|
+
// src/commands/crm/access.ts
|
|
32583
|
+
function registerCrmAccess(parent) {
|
|
32584
|
+
parent.command("access").argument("<entityType>", `${CRM_ENTITY_TYPE_WORDS}.`).argument("<id>", "Record id.").description(
|
|
32585
|
+
"Set a record's owner, team, and visibility. --json: { ownerMembershipId, teamId, visibility: private|team|workspace } (ownerMembershipId and teamId may be null; a pipeline_card may have no owner)."
|
|
32586
|
+
).requiredOption("--json <body>", "JSON access settings.").action(async (entityType, id, opts) => {
|
|
32587
|
+
const parsedType = crmEntityTypeOrExit(entityType);
|
|
32588
|
+
try {
|
|
32589
|
+
printJson(
|
|
32590
|
+
await crmService.setRecordAccess(
|
|
32591
|
+
parsedType,
|
|
32592
|
+
id,
|
|
32593
|
+
parseJsonArg(opts.json)
|
|
32594
|
+
)
|
|
32595
|
+
);
|
|
32596
|
+
} catch (error) {
|
|
32597
|
+
exitOnApiError(error);
|
|
32598
|
+
}
|
|
32599
|
+
});
|
|
32600
|
+
}
|
|
32601
|
+
|
|
32253
32602
|
// src/commands/crm/history.ts
|
|
32254
32603
|
function describeChange(event) {
|
|
32255
32604
|
const field = event.field ? `${event.field} ` : "";
|
|
@@ -32899,6 +33248,7 @@ function registerCrmCommands(program2) {
|
|
|
32899
33248
|
registerCrmContactPoints(crm);
|
|
32900
33249
|
registerCrmWaterfalls(crm);
|
|
32901
33250
|
registerCrmEnrich(crm);
|
|
33251
|
+
registerCrmAccess(crm);
|
|
32902
33252
|
crm.action(() => crm.help());
|
|
32903
33253
|
crm.enablePositionalOptions();
|
|
32904
33254
|
for (const noun of crm.commands) noun.enablePositionalOptions();
|
|
@@ -33721,10 +34071,10 @@ function printReport(checks) {
|
|
|
33721
34071
|
import { spawn as spawn3, execFileSync } from "child_process";
|
|
33722
34072
|
import { realpathSync } from "fs";
|
|
33723
34073
|
import { sep as sep2 } from "path";
|
|
33724
|
-
import { z as
|
|
34074
|
+
import { z as z51 } from "zod";
|
|
33725
34075
|
import semver from "semver";
|
|
33726
34076
|
var PACKAGE_NAME = "@general-input/cli";
|
|
33727
|
-
var registryLatestSchema =
|
|
34077
|
+
var registryLatestSchema = z51.object({ version: z51.string() });
|
|
33728
34078
|
function registerUpgradeCommand(program2) {
|
|
33729
34079
|
program2.command("upgrade").description(
|
|
33730
34080
|
"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."
|