archal 0.9.18 → 0.9.19
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/clone-assets/apify/tools.json +30 -64
- package/clone-assets/github/tools.json +6 -0
- package/clone-assets/supabase/tools.json +74 -14
- package/dist/cli.cjs +39277 -26395
- package/dist/index.cjs +1 -1
- package/dist/seed/dynamic-generator.cjs +256 -133
- package/dist/vitest/{chunk-IVXSSEYS.js → chunk-L36NXAU6.js} +165 -100
- package/dist/vitest/{chunk-CTSN67QR.js → chunk-WZ7SA4CK.js} +298 -117
- package/dist/vitest/index.cjs +509 -269
- package/dist/vitest/index.js +2 -2
- package/dist/vitest/runtime/hosted-session-reaper.cjs +293 -112
- package/dist/vitest/runtime/hosted-session-reaper.js +1 -1
- package/dist/vitest/runtime/setup-files.js +2 -2
- package/package.json +9 -9
- package/skills/attach/SKILL.md +402 -0
- package/skills/onboard/SKILL.md +12 -0
|
@@ -2981,7 +2981,7 @@ var require_compile = __commonJS({
|
|
|
2981
2981
|
const schOrFunc = root.refs[ref2];
|
|
2982
2982
|
if (schOrFunc)
|
|
2983
2983
|
return schOrFunc;
|
|
2984
|
-
let _sch =
|
|
2984
|
+
let _sch = resolve6.call(this, root, ref2);
|
|
2985
2985
|
if (_sch === void 0) {
|
|
2986
2986
|
const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref2];
|
|
2987
2987
|
const { schemaId } = this.opts;
|
|
@@ -3008,7 +3008,7 @@ var require_compile = __commonJS({
|
|
|
3008
3008
|
function sameSchemaEnv(s1, s2) {
|
|
3009
3009
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
3010
3010
|
}
|
|
3011
|
-
function
|
|
3011
|
+
function resolve6(root, ref2) {
|
|
3012
3012
|
let sch;
|
|
3013
3013
|
while (typeof (sch = this.refs[ref2]) == "string")
|
|
3014
3014
|
ref2 = sch;
|
|
@@ -3583,55 +3583,55 @@ var require_fast_uri = __commonJS({
|
|
|
3583
3583
|
}
|
|
3584
3584
|
return uri;
|
|
3585
3585
|
}
|
|
3586
|
-
function
|
|
3586
|
+
function resolve6(baseURI, relativeURI, options) {
|
|
3587
3587
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3588
3588
|
const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
3589
3589
|
schemelessOptions.skipEscape = true;
|
|
3590
3590
|
return serialize(resolved, schemelessOptions);
|
|
3591
3591
|
}
|
|
3592
|
-
function resolveComponent(base,
|
|
3592
|
+
function resolveComponent(base, relative3, options, skipNormalization) {
|
|
3593
3593
|
const target = {};
|
|
3594
3594
|
if (!skipNormalization) {
|
|
3595
3595
|
base = parse6(serialize(base, options), options);
|
|
3596
|
-
|
|
3596
|
+
relative3 = parse6(serialize(relative3, options), options);
|
|
3597
3597
|
}
|
|
3598
3598
|
options = options || {};
|
|
3599
|
-
if (!options.tolerant &&
|
|
3600
|
-
target.scheme =
|
|
3601
|
-
target.userinfo =
|
|
3602
|
-
target.host =
|
|
3603
|
-
target.port =
|
|
3604
|
-
target.path = removeDotSegments(
|
|
3605
|
-
target.query =
|
|
3599
|
+
if (!options.tolerant && relative3.scheme) {
|
|
3600
|
+
target.scheme = relative3.scheme;
|
|
3601
|
+
target.userinfo = relative3.userinfo;
|
|
3602
|
+
target.host = relative3.host;
|
|
3603
|
+
target.port = relative3.port;
|
|
3604
|
+
target.path = removeDotSegments(relative3.path || "");
|
|
3605
|
+
target.query = relative3.query;
|
|
3606
3606
|
} else {
|
|
3607
|
-
if (
|
|
3608
|
-
target.userinfo =
|
|
3609
|
-
target.host =
|
|
3610
|
-
target.port =
|
|
3611
|
-
target.path = removeDotSegments(
|
|
3612
|
-
target.query =
|
|
3607
|
+
if (relative3.userinfo !== void 0 || relative3.host !== void 0 || relative3.port !== void 0) {
|
|
3608
|
+
target.userinfo = relative3.userinfo;
|
|
3609
|
+
target.host = relative3.host;
|
|
3610
|
+
target.port = relative3.port;
|
|
3611
|
+
target.path = removeDotSegments(relative3.path || "");
|
|
3612
|
+
target.query = relative3.query;
|
|
3613
3613
|
} else {
|
|
3614
|
-
if (!
|
|
3614
|
+
if (!relative3.path) {
|
|
3615
3615
|
target.path = base.path;
|
|
3616
|
-
if (
|
|
3617
|
-
target.query =
|
|
3616
|
+
if (relative3.query !== void 0) {
|
|
3617
|
+
target.query = relative3.query;
|
|
3618
3618
|
} else {
|
|
3619
3619
|
target.query = base.query;
|
|
3620
3620
|
}
|
|
3621
3621
|
} else {
|
|
3622
|
-
if (
|
|
3623
|
-
target.path = removeDotSegments(
|
|
3622
|
+
if (relative3.path[0] === "/") {
|
|
3623
|
+
target.path = removeDotSegments(relative3.path);
|
|
3624
3624
|
} else {
|
|
3625
3625
|
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
|
|
3626
|
-
target.path = "/" +
|
|
3626
|
+
target.path = "/" + relative3.path;
|
|
3627
3627
|
} else if (!base.path) {
|
|
3628
|
-
target.path =
|
|
3628
|
+
target.path = relative3.path;
|
|
3629
3629
|
} else {
|
|
3630
|
-
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) +
|
|
3630
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative3.path;
|
|
3631
3631
|
}
|
|
3632
3632
|
target.path = removeDotSegments(target.path);
|
|
3633
3633
|
}
|
|
3634
|
-
target.query =
|
|
3634
|
+
target.query = relative3.query;
|
|
3635
3635
|
}
|
|
3636
3636
|
target.userinfo = base.userinfo;
|
|
3637
3637
|
target.host = base.host;
|
|
@@ -3639,7 +3639,7 @@ var require_fast_uri = __commonJS({
|
|
|
3639
3639
|
}
|
|
3640
3640
|
target.scheme = base.scheme;
|
|
3641
3641
|
}
|
|
3642
|
-
target.fragment =
|
|
3642
|
+
target.fragment = relative3.fragment;
|
|
3643
3643
|
return target;
|
|
3644
3644
|
}
|
|
3645
3645
|
function equal(uriA, uriB, options) {
|
|
@@ -3810,7 +3810,7 @@ var require_fast_uri = __commonJS({
|
|
|
3810
3810
|
var fastUri = {
|
|
3811
3811
|
SCHEMES,
|
|
3812
3812
|
normalize,
|
|
3813
|
-
resolve:
|
|
3813
|
+
resolve: resolve6,
|
|
3814
3814
|
resolveComponent,
|
|
3815
3815
|
equal,
|
|
3816
3816
|
serialize,
|
|
@@ -6809,7 +6809,7 @@ __export(dynamic_generator_exports, {
|
|
|
6809
6809
|
module.exports = __toCommonJS(dynamic_generator_exports);
|
|
6810
6810
|
|
|
6811
6811
|
// ../packages/seedgen/src/runner/seed/dynamic-generator.ts
|
|
6812
|
-
var
|
|
6812
|
+
var import_node_crypto15 = require("crypto");
|
|
6813
6813
|
|
|
6814
6814
|
// ../packages/node-auth/src/constants.ts
|
|
6815
6815
|
var CREDENTIALS_FILE = "credentials.json";
|
|
@@ -7382,8 +7382,9 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7382
7382
|
icon: "AP",
|
|
7383
7383
|
name: "Apify",
|
|
7384
7384
|
description: "Actors, runs, datasets, key-value stores, and request queues.",
|
|
7385
|
-
toolCount:
|
|
7386
|
-
transport: "rest"
|
|
7385
|
+
toolCount: 43,
|
|
7386
|
+
transport: "rest",
|
|
7387
|
+
opsCoverage: null
|
|
7387
7388
|
},
|
|
7388
7389
|
{
|
|
7389
7390
|
id: "discord",
|
|
@@ -7391,7 +7392,17 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7391
7392
|
name: "Discord",
|
|
7392
7393
|
description: "Guilds, channels, messages, webhooks, threads, commands, and interaction responses.",
|
|
7393
7394
|
toolCount: 67,
|
|
7394
|
-
transport: "both"
|
|
7395
|
+
transport: "both",
|
|
7396
|
+
opsCoverage: 14
|
|
7397
|
+
},
|
|
7398
|
+
{
|
|
7399
|
+
id: "firecrawl",
|
|
7400
|
+
icon: "FC",
|
|
7401
|
+
name: "Firecrawl",
|
|
7402
|
+
description: "Scraping, crawling, mapping, search, and extraction.",
|
|
7403
|
+
toolCount: 6,
|
|
7404
|
+
transport: "rest",
|
|
7405
|
+
opsCoverage: 77
|
|
7395
7406
|
},
|
|
7396
7407
|
{
|
|
7397
7408
|
id: "github",
|
|
@@ -7399,7 +7410,8 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7399
7410
|
name: "GitHub",
|
|
7400
7411
|
description: "Repos, issues, pull requests, branches, and commits.",
|
|
7401
7412
|
toolCount: 26,
|
|
7402
|
-
transport: "both"
|
|
7413
|
+
transport: "both",
|
|
7414
|
+
opsCoverage: 96
|
|
7403
7415
|
},
|
|
7404
7416
|
{
|
|
7405
7417
|
id: "google-workspace",
|
|
@@ -7407,7 +7419,17 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7407
7419
|
name: "Google Workspace",
|
|
7408
7420
|
description: "Gmail, Calendar, Drive, Sheets, and Contacts.",
|
|
7409
7421
|
toolCount: 249,
|
|
7410
|
-
transport: "both"
|
|
7422
|
+
transport: "both",
|
|
7423
|
+
opsCoverage: 64
|
|
7424
|
+
},
|
|
7425
|
+
{
|
|
7426
|
+
id: "hubspot",
|
|
7427
|
+
icon: "HS",
|
|
7428
|
+
name: "HubSpot",
|
|
7429
|
+
description: "CRM contacts, companies, deals, tickets, and engagements.",
|
|
7430
|
+
toolCount: 45,
|
|
7431
|
+
transport: "rest",
|
|
7432
|
+
opsCoverage: 10
|
|
7411
7433
|
},
|
|
7412
7434
|
{
|
|
7413
7435
|
id: "jira",
|
|
@@ -7415,7 +7437,8 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7415
7437
|
name: "Jira",
|
|
7416
7438
|
description: "Issues, projects, boards, sprints, and versions.",
|
|
7417
7439
|
toolCount: 49,
|
|
7418
|
-
transport: "both"
|
|
7440
|
+
transport: "both",
|
|
7441
|
+
opsCoverage: 80
|
|
7419
7442
|
},
|
|
7420
7443
|
{
|
|
7421
7444
|
id: "linear",
|
|
@@ -7423,7 +7446,8 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7423
7446
|
name: "Linear",
|
|
7424
7447
|
description: "Issues, projects, teams, cycles, and workflows.",
|
|
7425
7448
|
toolCount: 42,
|
|
7426
|
-
transport: "both"
|
|
7449
|
+
transport: "both",
|
|
7450
|
+
opsCoverage: 98
|
|
7427
7451
|
},
|
|
7428
7452
|
{
|
|
7429
7453
|
id: "ramp",
|
|
@@ -7431,7 +7455,17 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7431
7455
|
name: "Ramp",
|
|
7432
7456
|
description: "Cards, funds, expenses, reimbursements, bills, and travel.",
|
|
7433
7457
|
toolCount: 46,
|
|
7434
|
-
transport: "mcp"
|
|
7458
|
+
transport: "mcp",
|
|
7459
|
+
opsCoverage: null
|
|
7460
|
+
},
|
|
7461
|
+
{
|
|
7462
|
+
id: "sendgrid",
|
|
7463
|
+
icon: "SG",
|
|
7464
|
+
name: "SendGrid",
|
|
7465
|
+
description: "Mail send, contacts, lists, templates, and stats.",
|
|
7466
|
+
toolCount: 28,
|
|
7467
|
+
transport: "rest",
|
|
7468
|
+
opsCoverage: 100
|
|
7435
7469
|
},
|
|
7436
7470
|
{
|
|
7437
7471
|
id: "slack",
|
|
@@ -7439,7 +7473,8 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7439
7473
|
name: "Slack",
|
|
7440
7474
|
description: "Channels, messages, threads, users, and reactions.",
|
|
7441
7475
|
toolCount: 8,
|
|
7442
|
-
transport: "both"
|
|
7476
|
+
transport: "both",
|
|
7477
|
+
opsCoverage: 100
|
|
7443
7478
|
},
|
|
7444
7479
|
{
|
|
7445
7480
|
id: "stripe",
|
|
@@ -7447,7 +7482,8 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7447
7482
|
name: "Stripe",
|
|
7448
7483
|
description: "Customers, payments, subscriptions, invoices, and refunds.",
|
|
7449
7484
|
toolCount: 28,
|
|
7450
|
-
transport: "both"
|
|
7485
|
+
transport: "both",
|
|
7486
|
+
opsCoverage: null
|
|
7451
7487
|
},
|
|
7452
7488
|
{
|
|
7453
7489
|
id: "supabase",
|
|
@@ -7455,7 +7491,8 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7455
7491
|
name: "Supabase",
|
|
7456
7492
|
description: "SQL, migrations, logs, branches, and project metadata.",
|
|
7457
7493
|
toolCount: 29,
|
|
7458
|
-
transport: "both"
|
|
7494
|
+
transport: "both",
|
|
7495
|
+
opsCoverage: 100
|
|
7459
7496
|
},
|
|
7460
7497
|
{
|
|
7461
7498
|
id: "tavily",
|
|
@@ -7463,7 +7500,35 @@ var GENERATED_TWIN_CATALOG = [
|
|
|
7463
7500
|
name: "Tavily",
|
|
7464
7501
|
description: "Search, extract, crawl, map, research, usage, and API key operations.",
|
|
7465
7502
|
toolCount: 11,
|
|
7466
|
-
transport: "rest"
|
|
7503
|
+
transport: "rest",
|
|
7504
|
+
opsCoverage: 100
|
|
7505
|
+
},
|
|
7506
|
+
{
|
|
7507
|
+
id: "telegram",
|
|
7508
|
+
icon: "TG",
|
|
7509
|
+
name: "Telegram",
|
|
7510
|
+
description: "Bot messages, chats, updates, and webhooks.",
|
|
7511
|
+
toolCount: 32,
|
|
7512
|
+
transport: "both",
|
|
7513
|
+
opsCoverage: null
|
|
7514
|
+
},
|
|
7515
|
+
{
|
|
7516
|
+
id: "twilio",
|
|
7517
|
+
icon: "TW",
|
|
7518
|
+
name: "Twilio",
|
|
7519
|
+
description: "Messages, calls, phone numbers, and verifications.",
|
|
7520
|
+
toolCount: 35,
|
|
7521
|
+
transport: "rest",
|
|
7522
|
+
opsCoverage: 92
|
|
7523
|
+
},
|
|
7524
|
+
{
|
|
7525
|
+
id: "unipile",
|
|
7526
|
+
icon: "UP",
|
|
7527
|
+
name: "Unipile",
|
|
7528
|
+
description: "LinkedIn and email messaging, accounts, and chats.",
|
|
7529
|
+
toolCount: 24,
|
|
7530
|
+
transport: "rest",
|
|
7531
|
+
opsCoverage: 100
|
|
7467
7532
|
}
|
|
7468
7533
|
];
|
|
7469
7534
|
var GENERATED_STARTABLE_TWIN_IDS = [
|
|
@@ -27024,14 +27089,84 @@ var import_node_crypto7 = require("crypto");
|
|
|
27024
27089
|
var import_node_perf_hooks = require("perf_hooks");
|
|
27025
27090
|
|
|
27026
27091
|
// ../twins/core/src/fixture-oracle.ts
|
|
27027
|
-
var
|
|
27028
|
-
var
|
|
27092
|
+
var import_node_fs6 = require("fs");
|
|
27093
|
+
var import_node_path5 = require("path");
|
|
27029
27094
|
var import_node_url2 = require("url");
|
|
27030
27095
|
|
|
27031
|
-
// ../twins/core/src/
|
|
27096
|
+
// ../twins/core/src/legacy-asset-cache.ts
|
|
27097
|
+
var import_node_crypto9 = require("crypto");
|
|
27032
27098
|
var import_node_fs5 = require("fs");
|
|
27099
|
+
var import_node_os3 = require("os");
|
|
27033
27100
|
var import_node_path4 = require("path");
|
|
27034
27101
|
|
|
27102
|
+
// ../twins/core/src/recording-fetcher.ts
|
|
27103
|
+
var import_node_crypto8 = require("crypto");
|
|
27104
|
+
var import_node_fs4 = require("fs");
|
|
27105
|
+
var import_node_os2 = require("os");
|
|
27106
|
+
var import_node_path3 = require("path");
|
|
27107
|
+
var RecordingManifestEntrySchema = external_exports3.object({
|
|
27108
|
+
filename: external_exports3.string(),
|
|
27109
|
+
sha256: external_exports3.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex chars"),
|
|
27110
|
+
size: external_exports3.number().optional(),
|
|
27111
|
+
sizeBytes: external_exports3.number().optional(),
|
|
27112
|
+
uploadedAt: external_exports3.string().optional(),
|
|
27113
|
+
// Optional symbolic tags that map fixture-oracle / replay lookups onto this
|
|
27114
|
+
// recording. Lets twins keep tag→file resolution inside the manifest itself
|
|
27115
|
+
// rather than depending on a separate provenance.json (which is excluded
|
|
27116
|
+
// from the in-tree fixture allowlist for graduated twins). Codex P2 on
|
|
27117
|
+
// tavily #3603 — fixture-oracle previously required provenance.json to
|
|
27118
|
+
// resolve `rest-profile:tavily:tavily_search_basic` → filename.
|
|
27119
|
+
tags: external_exports3.array(external_exports3.string()).optional()
|
|
27120
|
+
}).loose();
|
|
27121
|
+
var RecordingManifestSchema = external_exports3.object({
|
|
27122
|
+
service: external_exports3.string().min(1),
|
|
27123
|
+
version: external_exports3.number().int(),
|
|
27124
|
+
container: external_exports3.string().min(1),
|
|
27125
|
+
baseUrl: external_exports3.string().optional(),
|
|
27126
|
+
entries: external_exports3.array(RecordingManifestEntrySchema)
|
|
27127
|
+
}).loose();
|
|
27128
|
+
var DEFAULT_BASE_URL = process.env["ARCHAL_FIXTURE_BASE_URL"] ?? "https://archalforge8f96908966.blob.core.windows.net/archal-fixture-artifacts?sv=2023-11-03&spr=https&se=2031-05-10T00%3A00%3A00Z&sr=c&sp=rl&sig=r3%2FC3EwzilSHls8z3Pn5ZR%2BkinwQw1C6%2BDKObIZSIu0%3D";
|
|
27129
|
+
var DEFAULT_CACHE_ROOT = process.env["ARCHAL_FIXTURE_CACHE_ROOT"] ?? (0, import_node_path3.resolve)((0, import_node_os2.homedir)(), ".archal", "forge", "recordings-cache");
|
|
27130
|
+
function warnIfSasExpiresSoon(baseUrl) {
|
|
27131
|
+
if (process.env["ARCHAL_FIXTURE_SAS_WARN"] === "0") return;
|
|
27132
|
+
const queryIdx = baseUrl.indexOf("?");
|
|
27133
|
+
if (queryIdx < 0) return;
|
|
27134
|
+
const query = baseUrl.slice(queryIdx + 1);
|
|
27135
|
+
const seParam = query.split("&").find((p) => p.startsWith("se="));
|
|
27136
|
+
if (!seParam) return;
|
|
27137
|
+
const seValue = decodeURIComponent(seParam.slice(3));
|
|
27138
|
+
const expiresAt = Date.parse(seValue);
|
|
27139
|
+
if (Number.isNaN(expiresAt)) return;
|
|
27140
|
+
const now = Date.now();
|
|
27141
|
+
const daysRemaining = Math.floor((expiresAt - now) / (1e3 * 60 * 60 * 24));
|
|
27142
|
+
if (daysRemaining < 365) {
|
|
27143
|
+
console.warn(
|
|
27144
|
+
`[recording-fetcher] SAS token in ARCHAL_FIXTURE_BASE_URL expires in ${daysRemaining}d (${seValue}). Rotate via scripts/rotate-fixture-sas.mjs before expiry.`
|
|
27145
|
+
);
|
|
27146
|
+
}
|
|
27147
|
+
}
|
|
27148
|
+
warnIfSasExpiresSoon(DEFAULT_BASE_URL);
|
|
27149
|
+
|
|
27150
|
+
// ../twins/core/src/legacy-asset-cache.ts
|
|
27151
|
+
var DEFAULT_CACHE_ROOT2 = process.env["ARCHAL_LEGACY_ASSET_CACHE_ROOT"] ?? (0, import_node_path4.resolve)((0, import_node_os3.homedir)(), ".archal", "forge", "legacy-assets-cache");
|
|
27152
|
+
var LegacyAssetEntrySchema = external_exports3.object({
|
|
27153
|
+
relativePath: external_exports3.string().min(1),
|
|
27154
|
+
sha256: external_exports3.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex chars"),
|
|
27155
|
+
sizeBytes: external_exports3.number().optional(),
|
|
27156
|
+
uploadedAt: external_exports3.string().optional()
|
|
27157
|
+
}).loose();
|
|
27158
|
+
var LegacyAssetManifestSchema = external_exports3.object({
|
|
27159
|
+
service: external_exports3.string().min(1),
|
|
27160
|
+
version: external_exports3.number().int(),
|
|
27161
|
+
container: external_exports3.string().min(1),
|
|
27162
|
+
layout: external_exports3.string().optional(),
|
|
27163
|
+
entries: external_exports3.array(LegacyAssetEntrySchema)
|
|
27164
|
+
}).loose();
|
|
27165
|
+
|
|
27166
|
+
// ../twins/core/src/run-twin-cli.ts
|
|
27167
|
+
var import_node_fs7 = require("fs");
|
|
27168
|
+
var import_node_path6 = require("path");
|
|
27169
|
+
|
|
27035
27170
|
// ../twins/manifest.json
|
|
27036
27171
|
var manifest_default = [
|
|
27037
27172
|
{
|
|
@@ -27081,6 +27216,12 @@ var manifest_default = [
|
|
|
27081
27216
|
package: "@archal/twin-firecrawl",
|
|
27082
27217
|
path: "twins/firecrawl",
|
|
27083
27218
|
stage: "internal",
|
|
27219
|
+
display: {
|
|
27220
|
+
icon: "FC",
|
|
27221
|
+
name: "Firecrawl",
|
|
27222
|
+
description: "Scraping, crawling, mapping, search, and extraction.",
|
|
27223
|
+
toolCount: 6
|
|
27224
|
+
},
|
|
27084
27225
|
transport: "rest",
|
|
27085
27226
|
hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
|
|
27086
27227
|
cli: { bundleAssets: false, bundleToolSnapshot: false },
|
|
@@ -27148,6 +27289,12 @@ var manifest_default = [
|
|
|
27148
27289
|
package: "@archal/twin-hubspot",
|
|
27149
27290
|
path: "twins/hubspot",
|
|
27150
27291
|
stage: "internal",
|
|
27292
|
+
display: {
|
|
27293
|
+
icon: "HS",
|
|
27294
|
+
name: "HubSpot",
|
|
27295
|
+
description: "CRM contacts, companies, deals, tickets, and engagements.",
|
|
27296
|
+
toolCount: 45
|
|
27297
|
+
},
|
|
27151
27298
|
transport: "rest",
|
|
27152
27299
|
hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
|
|
27153
27300
|
cli: { bundleAssets: false, bundleToolSnapshot: false },
|
|
@@ -27224,6 +27371,12 @@ var manifest_default = [
|
|
|
27224
27371
|
package: "@archal/twin-sendgrid",
|
|
27225
27372
|
path: "twins/sendgrid",
|
|
27226
27373
|
stage: "internal",
|
|
27374
|
+
display: {
|
|
27375
|
+
icon: "SG",
|
|
27376
|
+
name: "SendGrid",
|
|
27377
|
+
description: "Mail send, contacts, lists, templates, and stats.",
|
|
27378
|
+
toolCount: 28
|
|
27379
|
+
},
|
|
27227
27380
|
transport: "rest",
|
|
27228
27381
|
hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
|
|
27229
27382
|
cli: { bundleAssets: false, bundleToolSnapshot: false },
|
|
@@ -27320,6 +27473,12 @@ var manifest_default = [
|
|
|
27320
27473
|
package: "@archal/twin-telegram",
|
|
27321
27474
|
path: "twins/telegram",
|
|
27322
27475
|
stage: "internal",
|
|
27476
|
+
display: {
|
|
27477
|
+
icon: "TG",
|
|
27478
|
+
name: "Telegram",
|
|
27479
|
+
description: "Bot messages, chats, updates, and webhooks.",
|
|
27480
|
+
toolCount: 32
|
|
27481
|
+
},
|
|
27323
27482
|
transport: "both",
|
|
27324
27483
|
hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
|
|
27325
27484
|
cli: { bundleAssets: false, bundleToolSnapshot: false },
|
|
@@ -27332,6 +27491,12 @@ var manifest_default = [
|
|
|
27332
27491
|
package: "@archal/twin-twilio",
|
|
27333
27492
|
path: "twins/twilio",
|
|
27334
27493
|
stage: "internal",
|
|
27494
|
+
display: {
|
|
27495
|
+
icon: "TW",
|
|
27496
|
+
name: "Twilio",
|
|
27497
|
+
description: "Messages, calls, phone numbers, and verifications.",
|
|
27498
|
+
toolCount: 35
|
|
27499
|
+
},
|
|
27335
27500
|
transport: "rest",
|
|
27336
27501
|
hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
|
|
27337
27502
|
cli: { bundleAssets: false, bundleToolSnapshot: false },
|
|
@@ -27344,6 +27509,12 @@ var manifest_default = [
|
|
|
27344
27509
|
package: "@archal/twin-unipile",
|
|
27345
27510
|
path: "twins/unipile",
|
|
27346
27511
|
stage: "internal",
|
|
27512
|
+
display: {
|
|
27513
|
+
icon: "UP",
|
|
27514
|
+
name: "Unipile",
|
|
27515
|
+
description: "LinkedIn and email messaging, accounts, and chats.",
|
|
27516
|
+
toolCount: 24
|
|
27517
|
+
},
|
|
27347
27518
|
transport: "rest",
|
|
27348
27519
|
hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
|
|
27349
27520
|
cli: { bundleAssets: false, bundleToolSnapshot: false },
|
|
@@ -27362,10 +27533,10 @@ var CLONE_PACKAGES = CLONE_MANIFEST.map((t) => t.package);
|
|
|
27362
27533
|
var TWIN_PREFIX_PATTERN = new RegExp(`^(${CLONE_NAMES.join("|")})_`, "i");
|
|
27363
27534
|
|
|
27364
27535
|
// ../twins/core/src/session-run-id.ts
|
|
27365
|
-
var
|
|
27536
|
+
var import_node_crypto10 = require("crypto");
|
|
27366
27537
|
|
|
27367
27538
|
// ../twins/core/src/webhook-signing.ts
|
|
27368
|
-
var
|
|
27539
|
+
var import_node_crypto11 = require("crypto");
|
|
27369
27540
|
|
|
27370
27541
|
// ../twins/core/src/scenario-schemas.ts
|
|
27371
27542
|
var successCriterionSchema = external_exports3.object({
|
|
@@ -27503,59 +27674,11 @@ var SCENARIO_RISK_TAXONOMY = SCENARIO_RISK_RULES.map(
|
|
|
27503
27674
|
({ id, label, description }) => ({ id, label, description })
|
|
27504
27675
|
);
|
|
27505
27676
|
|
|
27506
|
-
// ../twins/core/src/recording-fetcher.ts
|
|
27507
|
-
var import_node_crypto10 = require("crypto");
|
|
27508
|
-
var import_node_fs6 = require("fs");
|
|
27509
|
-
var import_node_os2 = require("os");
|
|
27510
|
-
var import_node_path5 = require("path");
|
|
27511
|
-
var RecordingManifestEntrySchema = external_exports3.object({
|
|
27512
|
-
filename: external_exports3.string(),
|
|
27513
|
-
sha256: external_exports3.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex chars"),
|
|
27514
|
-
size: external_exports3.number().optional(),
|
|
27515
|
-
sizeBytes: external_exports3.number().optional(),
|
|
27516
|
-
uploadedAt: external_exports3.string().optional(),
|
|
27517
|
-
// Optional symbolic tags that map fixture-oracle / replay lookups onto this
|
|
27518
|
-
// recording. Lets twins keep tag→file resolution inside the manifest itself
|
|
27519
|
-
// rather than depending on a separate provenance.json (which is excluded
|
|
27520
|
-
// from the in-tree fixture allowlist for graduated twins). Codex P2 on
|
|
27521
|
-
// tavily #3603 — fixture-oracle previously required provenance.json to
|
|
27522
|
-
// resolve `rest-profile:tavily:tavily_search_basic` → filename.
|
|
27523
|
-
tags: external_exports3.array(external_exports3.string()).optional()
|
|
27524
|
-
}).loose();
|
|
27525
|
-
var RecordingManifestSchema = external_exports3.object({
|
|
27526
|
-
service: external_exports3.string().min(1),
|
|
27527
|
-
version: external_exports3.number().int(),
|
|
27528
|
-
container: external_exports3.string().min(1),
|
|
27529
|
-
baseUrl: external_exports3.string().optional(),
|
|
27530
|
-
entries: external_exports3.array(RecordingManifestEntrySchema)
|
|
27531
|
-
}).loose();
|
|
27532
|
-
var DEFAULT_BASE_URL = process.env["ARCHAL_FIXTURE_BASE_URL"] ?? "https://archalforge8f96908966.blob.core.windows.net/archal-fixture-artifacts?sv=2023-11-03&spr=https&se=2031-05-10T00%3A00%3A00Z&sr=c&sp=rl&sig=r3%2FC3EwzilSHls8z3Pn5ZR%2BkinwQw1C6%2BDKObIZSIu0%3D";
|
|
27533
|
-
var DEFAULT_CACHE_ROOT = process.env["ARCHAL_FIXTURE_CACHE_ROOT"] ?? (0, import_node_path5.resolve)((0, import_node_os2.homedir)(), ".archal", "forge", "recordings-cache");
|
|
27534
|
-
function warnIfSasExpiresSoon(baseUrl) {
|
|
27535
|
-
if (process.env["ARCHAL_FIXTURE_SAS_WARN"] === "0") return;
|
|
27536
|
-
const queryIdx = baseUrl.indexOf("?");
|
|
27537
|
-
if (queryIdx < 0) return;
|
|
27538
|
-
const query = baseUrl.slice(queryIdx + 1);
|
|
27539
|
-
const seParam = query.split("&").find((p) => p.startsWith("se="));
|
|
27540
|
-
if (!seParam) return;
|
|
27541
|
-
const seValue = decodeURIComponent(seParam.slice(3));
|
|
27542
|
-
const expiresAt = Date.parse(seValue);
|
|
27543
|
-
if (Number.isNaN(expiresAt)) return;
|
|
27544
|
-
const now = Date.now();
|
|
27545
|
-
const daysRemaining = Math.floor((expiresAt - now) / (1e3 * 60 * 60 * 24));
|
|
27546
|
-
if (daysRemaining < 365) {
|
|
27547
|
-
console.warn(
|
|
27548
|
-
`[recording-fetcher] SAS token in ARCHAL_FIXTURE_BASE_URL expires in ${daysRemaining}d (${seValue}). Rotate via scripts/rotate-fixture-sas.mjs before expiry.`
|
|
27549
|
-
);
|
|
27550
|
-
}
|
|
27551
|
-
}
|
|
27552
|
-
warnIfSasExpiresSoon(DEFAULT_BASE_URL);
|
|
27553
|
-
|
|
27554
27677
|
// ../packages/seedgen/src/codegen/executor.ts
|
|
27555
27678
|
var import_node_child_process2 = require("child_process");
|
|
27556
|
-
var
|
|
27679
|
+
var import_node_fs8 = require("fs");
|
|
27557
27680
|
var import_node_url3 = require("url");
|
|
27558
|
-
var
|
|
27681
|
+
var import_node_path7 = __toESM(require("path"), 1);
|
|
27559
27682
|
var import_node_vm2 = __toESM(require("vm"), 1);
|
|
27560
27683
|
|
|
27561
27684
|
// ../packages/seedgen/src/codegen/builder-ids.ts
|
|
@@ -34502,15 +34625,15 @@ var import_node_vm = __toESM(require("vm"), 1);
|
|
|
34502
34625
|
var import_meta = {};
|
|
34503
34626
|
var DEFAULT_TIMEOUT_MS = 5e3;
|
|
34504
34627
|
function resolveWorkerScriptPath() {
|
|
34505
|
-
const thisDir =
|
|
34628
|
+
const thisDir = import_node_path7.default.dirname((0, import_node_url3.fileURLToPath)(import_meta.url));
|
|
34506
34629
|
const candidates = [
|
|
34507
34630
|
// Source or unbundled output: executor.js and subprocess-worker.js live together.
|
|
34508
|
-
|
|
34631
|
+
import_node_path7.default.join(thisDir, "subprocess-worker.js"),
|
|
34509
34632
|
// tsup bundles executor into a root chunk while keeping the worker entry
|
|
34510
34633
|
// at dist/codegen/subprocess-worker.js.
|
|
34511
|
-
|
|
34634
|
+
import_node_path7.default.join(thisDir, "codegen", "subprocess-worker.js")
|
|
34512
34635
|
];
|
|
34513
|
-
return candidates.find((candidate) => (0,
|
|
34636
|
+
return candidates.find((candidate) => (0, import_node_fs8.existsSync)(candidate));
|
|
34514
34637
|
}
|
|
34515
34638
|
var workerScriptPath;
|
|
34516
34639
|
try {
|
|
@@ -34527,7 +34650,7 @@ async function executeSeedCodeIsolated(code, twinName, baseSeed, timeoutMs = DEF
|
|
|
34527
34650
|
"seedgen: subprocess worker script is unresolvable. Ensure the package is built before use."
|
|
34528
34651
|
);
|
|
34529
34652
|
}
|
|
34530
|
-
return new Promise((
|
|
34653
|
+
return new Promise((resolve6) => {
|
|
34531
34654
|
const child = (0, import_node_child_process2.fork)(workerScriptPath, {
|
|
34532
34655
|
// Silent: don't inherit parent stdout/stderr so worker crashes
|
|
34533
34656
|
// don't pollute the parent's output.
|
|
@@ -34552,28 +34675,28 @@ async function executeSeedCodeIsolated(code, twinName, baseSeed, timeoutMs = DEF
|
|
|
34552
34675
|
if (!resolved) {
|
|
34553
34676
|
resolved = true;
|
|
34554
34677
|
child.kill("SIGKILL");
|
|
34555
|
-
|
|
34678
|
+
resolve6({ ok: false, type: "timeout", message: `Subprocess timed out after ${timeoutMs}ms` });
|
|
34556
34679
|
}
|
|
34557
34680
|
}, timeoutMs + 2e3);
|
|
34558
34681
|
child.on("message", (msg) => {
|
|
34559
34682
|
if (!resolved) {
|
|
34560
34683
|
resolved = true;
|
|
34561
34684
|
clearTimeout(timer);
|
|
34562
|
-
|
|
34685
|
+
resolve6(msg);
|
|
34563
34686
|
}
|
|
34564
34687
|
});
|
|
34565
34688
|
child.on("error", (err) => {
|
|
34566
34689
|
if (!resolved) {
|
|
34567
34690
|
resolved = true;
|
|
34568
34691
|
clearTimeout(timer);
|
|
34569
|
-
|
|
34692
|
+
resolve6({ ok: false, type: "runtime", message: `Worker error: ${errorMessage2(err)}` });
|
|
34570
34693
|
}
|
|
34571
34694
|
});
|
|
34572
34695
|
child.on("exit", (exitCode) => {
|
|
34573
34696
|
if (!resolved) {
|
|
34574
34697
|
resolved = true;
|
|
34575
34698
|
clearTimeout(timer);
|
|
34576
|
-
|
|
34699
|
+
resolve6({
|
|
34577
34700
|
ok: false,
|
|
34578
34701
|
type: "runtime",
|
|
34579
34702
|
message: exitCode ? `Worker exited with code ${exitCode}` : "Worker exited unexpectedly"
|
|
@@ -36162,7 +36285,7 @@ var TRANSIENT_AWS_EXCEPTIONS_PATTERN = /ThrottlingException|ServiceUnavailableEx
|
|
|
36162
36285
|
var STATUS_CODE_IN_MESSAGE_PATTERN = /\b(429|500|502|503|529)\b/;
|
|
36163
36286
|
var TRANSIENT_NETWORK_ERRORS_PATTERN = /ECONNRESET|ETIMEDOUT|EAI_AGAIN/i;
|
|
36164
36287
|
function defaultSleep(backoffMs) {
|
|
36165
|
-
return new Promise((
|
|
36288
|
+
return new Promise((resolve6) => setTimeout(resolve6, backoffMs));
|
|
36166
36289
|
}
|
|
36167
36290
|
function getServerHintedDelayMs(error48) {
|
|
36168
36291
|
if (error48 instanceof UpstreamApiError && typeof error48.retryAfterMs === "number" && error48.retryAfterMs >= 0) {
|
|
@@ -37491,7 +37614,7 @@ function progress(message) {
|
|
|
37491
37614
|
}
|
|
37492
37615
|
|
|
37493
37616
|
// ../packages/seedgen/src/runner/seed/fill-templates.ts
|
|
37494
|
-
var
|
|
37617
|
+
var import_node_crypto12 = require("crypto");
|
|
37495
37618
|
function firstOf(seed, key) {
|
|
37496
37619
|
const arr = seed[key];
|
|
37497
37620
|
if (Array.isArray(arr) && arr.length > 0) {
|
|
@@ -38074,7 +38197,7 @@ var stripeWebhookEndpoints = (i, name, _d, _seed, _fk) => ({
|
|
|
38074
38197
|
url: `https://example.com/webhooks/stripe`,
|
|
38075
38198
|
enabledEvents: ["payment_intent.succeeded", "invoice.payment_succeeded"],
|
|
38076
38199
|
status: "enabled",
|
|
38077
|
-
secret: `whsec_${(0,
|
|
38200
|
+
secret: `whsec_${(0, import_node_crypto12.randomBytes)(24).toString("hex")}`,
|
|
38078
38201
|
description: name || null,
|
|
38079
38202
|
apiVersion: "2024-06-20",
|
|
38080
38203
|
livemode: false
|
|
@@ -42379,10 +42502,10 @@ function extractSeedIntent(twinName, setupDescription) {
|
|
|
42379
42502
|
}
|
|
42380
42503
|
|
|
42381
42504
|
// ../packages/seedgen/src/runner/seed/cache.ts
|
|
42382
|
-
var
|
|
42383
|
-
var
|
|
42384
|
-
var
|
|
42385
|
-
var
|
|
42505
|
+
var import_node_crypto13 = require("crypto");
|
|
42506
|
+
var import_node_fs9 = require("fs");
|
|
42507
|
+
var import_node_path8 = require("path");
|
|
42508
|
+
var import_node_os4 = require("os");
|
|
42386
42509
|
|
|
42387
42510
|
// ../packages/seedgen/src/evaluator/deterministic-state.ts
|
|
42388
42511
|
function flattenTwinState(state) {
|
|
@@ -42747,13 +42870,13 @@ function trimSeedToExpectedCounts(seed, mismatches) {
|
|
|
42747
42870
|
|
|
42748
42871
|
// ../packages/seedgen/src/runner/seed/cache.ts
|
|
42749
42872
|
var SEED_CACHE_VERSION = 6;
|
|
42750
|
-
var CACHE_DIR = (0,
|
|
42873
|
+
var CACHE_DIR = (0, import_node_path8.join)((0, import_node_os4.homedir)(), ".archal", "seed-cache");
|
|
42751
42874
|
var MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
42752
42875
|
function normalizeSetupText(setupText) {
|
|
42753
42876
|
return setupText.toLowerCase().replace(/[^a-z0-9\s_/-]/g, " ").replace(/\s+/g, " ").trim();
|
|
42754
42877
|
}
|
|
42755
42878
|
function setupHash(normalizedSetup) {
|
|
42756
|
-
return (0,
|
|
42879
|
+
return (0, import_node_crypto13.createHash)("sha256").update(normalizedSetup).digest("hex").slice(0, 32);
|
|
42757
42880
|
}
|
|
42758
42881
|
function canonicalize(value) {
|
|
42759
42882
|
if (Array.isArray(value)) {
|
|
@@ -42770,7 +42893,7 @@ function canonicalize(value) {
|
|
|
42770
42893
|
return value;
|
|
42771
42894
|
}
|
|
42772
42895
|
function hashValue(value) {
|
|
42773
|
-
return (0,
|
|
42896
|
+
return (0, import_node_crypto13.createHash)("sha256").update(JSON.stringify(canonicalize(value))).digest("hex").slice(0, 32);
|
|
42774
42897
|
}
|
|
42775
42898
|
function resolveScopeHashes(scope) {
|
|
42776
42899
|
const contextHash = scope?.cacheContext === void 0 ? "none" : hashValue(scope.cacheContext);
|
|
@@ -42780,10 +42903,10 @@ function resolveScopeHashes(scope) {
|
|
|
42780
42903
|
function cacheFilePathScoped(twinName, baseSeedName, setupText, scope) {
|
|
42781
42904
|
const normalizedSetup = normalizeSetupText(setupText);
|
|
42782
42905
|
const { contextHash, baseSeedHash } = resolveScopeHashes(scope);
|
|
42783
|
-
const key = (0,
|
|
42906
|
+
const key = (0, import_node_crypto13.createHash)("sha256").update(`${twinName}:${baseSeedName}:${normalizedSetup}:${contextHash}:${baseSeedHash}`).digest("hex").slice(0, 32);
|
|
42784
42907
|
const intentHash = setupHash(normalizedSetup);
|
|
42785
42908
|
return {
|
|
42786
|
-
path: (0,
|
|
42909
|
+
path: (0, import_node_path8.join)(CACHE_DIR, `${key}.json`),
|
|
42787
42910
|
key,
|
|
42788
42911
|
normalizedSetup,
|
|
42789
42912
|
intentHash,
|
|
@@ -42792,25 +42915,25 @@ function cacheFilePathScoped(twinName, baseSeedName, setupText, scope) {
|
|
|
42792
42915
|
};
|
|
42793
42916
|
}
|
|
42794
42917
|
function ensureCacheDir() {
|
|
42795
|
-
if (!(0,
|
|
42796
|
-
(0,
|
|
42918
|
+
if (!(0, import_node_fs9.existsSync)(CACHE_DIR)) {
|
|
42919
|
+
(0, import_node_fs9.mkdirSync)(CACHE_DIR, { recursive: true });
|
|
42797
42920
|
}
|
|
42798
42921
|
}
|
|
42799
42922
|
function evictStaleEntries() {
|
|
42800
42923
|
try {
|
|
42801
|
-
if (!(0,
|
|
42924
|
+
if (!(0, import_node_fs9.existsSync)(CACHE_DIR)) return;
|
|
42802
42925
|
const now = Date.now();
|
|
42803
|
-
for (const file2 of (0,
|
|
42926
|
+
for (const file2 of (0, import_node_fs9.readdirSync)(CACHE_DIR)) {
|
|
42804
42927
|
if (!file2.endsWith(".json")) continue;
|
|
42805
|
-
const filePath = (0,
|
|
42806
|
-
const stat = (0,
|
|
42928
|
+
const filePath = (0, import_node_path8.join)(CACHE_DIR, file2);
|
|
42929
|
+
const stat = (0, import_node_fs9.lstatSync)(filePath);
|
|
42807
42930
|
if (stat.isSymbolicLink()) {
|
|
42808
42931
|
debug3("Skipping symlink during cache eviction", { file: file2 });
|
|
42809
42932
|
continue;
|
|
42810
42933
|
}
|
|
42811
42934
|
const age = now - stat.mtimeMs;
|
|
42812
42935
|
if (age > MAX_AGE_MS) {
|
|
42813
|
-
(0,
|
|
42936
|
+
(0, import_node_fs9.unlinkSync)(filePath);
|
|
42814
42937
|
debug3("Evicted stale cache entry", { file: file2 });
|
|
42815
42938
|
}
|
|
42816
42939
|
}
|
|
@@ -42824,7 +42947,7 @@ function getCachedSeed(twinName, baseSeedName, setupText, scope) {
|
|
|
42824
42947
|
const { path: filePath, key } = cacheFilePathScoped(twinName, baseSeedName, setupText, scope);
|
|
42825
42948
|
let raw;
|
|
42826
42949
|
try {
|
|
42827
|
-
raw = (0,
|
|
42950
|
+
raw = (0, import_node_fs9.readFileSync)(filePath, "utf-8");
|
|
42828
42951
|
} catch {
|
|
42829
42952
|
return null;
|
|
42830
42953
|
}
|
|
@@ -42832,7 +42955,7 @@ function getCachedSeed(twinName, baseSeedName, setupText, scope) {
|
|
|
42832
42955
|
if (entry.version !== SEED_CACHE_VERSION) {
|
|
42833
42956
|
warn2(`Seed cache version mismatch (got ${entry.version}, want ${SEED_CACHE_VERSION}), evicting`);
|
|
42834
42957
|
try {
|
|
42835
|
-
(0,
|
|
42958
|
+
(0, import_node_fs9.unlinkSync)(filePath);
|
|
42836
42959
|
} catch {
|
|
42837
42960
|
}
|
|
42838
42961
|
return null;
|
|
@@ -42843,7 +42966,7 @@ function getCachedSeed(twinName, baseSeedName, setupText, scope) {
|
|
|
42843
42966
|
`Cached seed failed count verification, evicting: ${mismatches.map((m) => `${m.subject}: expected ${m.expected}, got ${m.actual}`).join("; ")}`
|
|
42844
42967
|
);
|
|
42845
42968
|
try {
|
|
42846
|
-
(0,
|
|
42969
|
+
(0, import_node_fs9.unlinkSync)(filePath);
|
|
42847
42970
|
} catch {
|
|
42848
42971
|
}
|
|
42849
42972
|
return null;
|
|
@@ -42895,8 +43018,8 @@ function cacheSeed(twinName, baseSeedName, setupText, seed, patch, scope, genera
|
|
|
42895
43018
|
...generatedCode !== void 0 && { generatedCode }
|
|
42896
43019
|
};
|
|
42897
43020
|
const tmpPath = `${filePath}.tmp`;
|
|
42898
|
-
(0,
|
|
42899
|
-
(0,
|
|
43021
|
+
(0, import_node_fs9.writeFileSync)(tmpPath, JSON.stringify(entry));
|
|
43022
|
+
(0, import_node_fs9.renameSync)(tmpPath, filePath);
|
|
42900
43023
|
debug3("Seed cached", { twin: twinName, baseSeed: baseSeedName, key });
|
|
42901
43024
|
} catch (err) {
|
|
42902
43025
|
warn2(`Failed to write seed cache entry: ${errorMessage2(err)}`);
|
|
@@ -43559,7 +43682,7 @@ ${snapshot}${buildFewShotExample(twinName)}`,
|
|
|
43559
43682
|
}
|
|
43560
43683
|
|
|
43561
43684
|
// ../packages/seedgen/src/runner/seed/key-fixer.ts
|
|
43562
|
-
var
|
|
43685
|
+
var import_node_crypto14 = require("crypto");
|
|
43563
43686
|
function parseIssueKey(value) {
|
|
43564
43687
|
const match = value.match(/^([A-Z]{2,})-(\d+)$/);
|
|
43565
43688
|
if (!match || !match[1] || !match[2]) return null;
|
|
@@ -43825,7 +43948,7 @@ function fixIssueKeys(seed, intent, twinName, options) {
|
|
|
43825
43948
|
newIssue[issueKeyField] = expectedKey;
|
|
43826
43949
|
newIssue[fkField] = projectId;
|
|
43827
43950
|
if (isLinear) {
|
|
43828
|
-
newIssue["linearId"] = (0,
|
|
43951
|
+
newIssue["linearId"] = (0, import_node_crypto14.randomUUID)();
|
|
43829
43952
|
newIssue["title"] = `Issue ${expectedKey}`;
|
|
43830
43953
|
} else {
|
|
43831
43954
|
newIssue["summary"] = `Issue ${expectedKey}`;
|
|
@@ -45432,7 +45555,7 @@ function buildSeedPromptHashInput() {
|
|
|
45432
45555
|
SUPABASE_SQL_SYSTEM_PROMPT
|
|
45433
45556
|
].join("\n\n---\n\n");
|
|
45434
45557
|
}
|
|
45435
|
-
var SYSTEM_PROMPT_HASH = (0,
|
|
45558
|
+
var SYSTEM_PROMPT_HASH = (0, import_node_crypto15.createHash)("sha256").update(buildSeedPromptHashInput()).digest("hex").slice(0, 12);
|
|
45436
45559
|
async function generateDynamicSeed(twinName, baseSeedName, baseSeedData, setupDescription, config2, intent, context) {
|
|
45437
45560
|
const scopedSetupDescription = config2.skipTwinScoping ? setupDescription : scopeSetupToTwin(twinName, setupDescription);
|
|
45438
45561
|
const seedIntent = resolveSeedIntentForGeneration(twinName, scopedSetupDescription, intent);
|