gencow 0.1.199 → 0.1.200
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.
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { dirname, relative, resolve } from "path";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
3
|
+
|
|
4
|
+
import { patchSchemaEntrySource } from "./add-rag.mjs";
|
|
5
|
+
|
|
6
|
+
export async function patchMemoryProjectWiring(deps) {
|
|
7
|
+
const cwd = deps.cwdImpl();
|
|
8
|
+
const exists = deps.existsSyncImpl ?? existsSync;
|
|
9
|
+
const projectConfig = await deps.loadConfig();
|
|
10
|
+
const functionsDir = projectConfig?.rootDir || "gencow";
|
|
11
|
+
const schemaPath = resolve(cwd, functionsDir, "schema.ts");
|
|
12
|
+
|
|
13
|
+
if (!exists(dirname(schemaPath))) mkdirSync(dirname(schemaPath), { recursive: true });
|
|
14
|
+
|
|
15
|
+
const schemaSource = exists(schemaPath) ? readFileSync(schemaPath, "utf-8") : "";
|
|
16
|
+
const nextSchemaSource = patchSchemaEntrySource(schemaSource, "./schema-memory");
|
|
17
|
+
if (nextSchemaSource !== schemaSource) {
|
|
18
|
+
writeFileSync(schemaPath, nextSchemaSource);
|
|
19
|
+
deps.logImpl(` ${deps.GREEN}✓${deps.RESET} ${relative(cwd, schemaPath)} — exported schema-memory`);
|
|
20
|
+
}
|
|
21
|
+
}
|
package/lib/install-features.mjs
CHANGED
|
@@ -8,10 +8,12 @@ import {
|
|
|
8
8
|
logEnvFileOperationWithType,
|
|
9
9
|
} from "./backend-env-resolver.mjs";
|
|
10
10
|
import { installGoogleSsoAuthConfig } from "./add-sso.mjs";
|
|
11
|
+
import { patchMemoryProjectWiring } from "./add-memory.mjs";
|
|
11
12
|
import { patchRagProjectWiring } from "./add-rag.mjs";
|
|
12
13
|
import { patchTossPaymentsProjectWiring } from "./add-tosspayments.mjs";
|
|
13
14
|
|
|
14
15
|
export const SETUP_HOOKS = {
|
|
16
|
+
"memory-wiring": patchMemoryProjectWiring,
|
|
15
17
|
"rag-wiring": patchRagProjectWiring,
|
|
16
18
|
"sso-auth-config": installGoogleSsoAuthConfig,
|
|
17
19
|
"tosspayments-wiring": patchTossPaymentsProjectWiring,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gencow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.200",
|
|
4
4
|
"description": "Gencow — AI Backend Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.9.5",
|
|
35
35
|
"better-auth": "^1.6.23",
|
|
36
|
-
"@gencow/client": "0.2.6",
|
|
37
36
|
"@gencow/core": "0.1.42",
|
|
37
|
+
"@gencow/client": "0.2.6",
|
|
38
38
|
"@gencow/react": "0.2.6"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
package/runtime/server.mjs
CHANGED
|
@@ -180790,9 +180790,10 @@ function startDeploymentAttemptLeaseHeartbeat(input) {
|
|
|
180790
180790
|
ttlMs: input.ttlMs ?? DEPLOYMENT_ATTEMPT_LEASE_TTL_MS
|
|
180791
180791
|
});
|
|
180792
180792
|
if (!renewal.claimed && !stopped) {
|
|
180793
|
-
held = false;
|
|
180794
180793
|
stopped = true;
|
|
180795
180794
|
clearInterval(timer2);
|
|
180795
|
+
if (await input.isLeaseRetired?.()) return;
|
|
180796
|
+
held = false;
|
|
180796
180797
|
input.logger?.warn("[deployment-attempt] exact invocation lease was lost");
|
|
180797
180798
|
try {
|
|
180798
180799
|
await input.onLeaseLost?.();
|
|
@@ -401217,11 +401218,40 @@ var init_tenant_runtime_startup_budget = __esm({
|
|
|
401217
401218
|
});
|
|
401218
401219
|
|
|
401219
401220
|
// ../platform/src/direct-runner-health-probe.ts
|
|
401221
|
+
import { request as requestHttp } from "node:http";
|
|
401222
|
+
function requestLocalHealth(url2, init) {
|
|
401223
|
+
return new Promise((resolve115, reject3) => {
|
|
401224
|
+
const request = requestHttp(
|
|
401225
|
+
url2,
|
|
401226
|
+
{
|
|
401227
|
+
signal: init.signal ?? void 0,
|
|
401228
|
+
agent: false,
|
|
401229
|
+
headers: { connection: "close" }
|
|
401230
|
+
},
|
|
401231
|
+
(response) => {
|
|
401232
|
+
const status = response.statusCode ?? 0;
|
|
401233
|
+
response.once("end", () => resolve115({ ok: status >= 200 && status < 300 }));
|
|
401234
|
+
response.resume();
|
|
401235
|
+
}
|
|
401236
|
+
);
|
|
401237
|
+
request.once("error", reject3);
|
|
401238
|
+
request.end();
|
|
401239
|
+
});
|
|
401240
|
+
}
|
|
401241
|
+
async function requestLocalHealthWithFallback(url2, init) {
|
|
401242
|
+
try {
|
|
401243
|
+
return await requestLocalHealth(url2, init);
|
|
401244
|
+
} catch {
|
|
401245
|
+
return globalThis.fetch(url2, init);
|
|
401246
|
+
}
|
|
401247
|
+
}
|
|
401220
401248
|
function resolveDirectRunnerHealthTimeoutMs(lifecycleRole, runtimeEnv = {}) {
|
|
401221
401249
|
return lifecycleRole === "candidate" ? resolveTenantRuntimeStartupBudgetMs(runtimeEnv) : DIRECT_RUNNER_LEGACY_HEALTH_TIMEOUT_MS;
|
|
401222
401250
|
}
|
|
401223
401251
|
async function probeDirectRunnerHealth(port, timeoutMs, dependencies = {
|
|
401224
|
-
|
|
401252
|
+
// Runtime admission is a localhost control-plane operation. A native local
|
|
401253
|
+
// request keeps admission available if Bun's process-global fetch client stalls.
|
|
401254
|
+
fetch: requestLocalHealthWithFallback,
|
|
401225
401255
|
scheduleAbort: (callback, delayMs) => globalThis.setTimeout(callback, delayMs),
|
|
401226
401256
|
cancelAbort: (timer2) => globalThis.clearTimeout(timer2)
|
|
401227
401257
|
}, healthPath = "/") {
|
|
@@ -414102,6 +414132,14 @@ async function makeCandidateGenerationTreeWritable(root2) {
|
|
|
414102
414132
|
await makeCandidateGenerationTreeWritable(join25(root2, entry));
|
|
414103
414133
|
}
|
|
414104
414134
|
}
|
|
414135
|
+
async function removeCandidateGenerationTree(root2) {
|
|
414136
|
+
if (process.platform !== "win32" && process.geteuid?.() === 0) {
|
|
414137
|
+
await rm4(root2, { recursive: true, force: false, maxRetries: 2, retryDelay: 50 });
|
|
414138
|
+
return;
|
|
414139
|
+
}
|
|
414140
|
+
await makeCandidateGenerationTreeWritable(root2);
|
|
414141
|
+
await rm4(root2, { recursive: true, force: false, maxRetries: 2, retryDelay: 50 });
|
|
414142
|
+
}
|
|
414105
414143
|
async function verifyOrSealWorkspace(input) {
|
|
414106
414144
|
const workspacePath = resolve100(input.workspacePath);
|
|
414107
414145
|
const durableDataDir = resolve100(input.durableDataDir);
|
|
@@ -414381,10 +414419,62 @@ function createAppCandidateGenerationStore(options) {
|
|
|
414381
414419
|
if (metadata.generationRef !== input.generationRef || metadata.appId !== input.appId || metadata.environment !== input.environment || metadata.deploymentId !== input.deploymentId) {
|
|
414382
414420
|
return fail9("CANDIDATE_GENERATION_IDENTITY_MISMATCH");
|
|
414383
414421
|
}
|
|
414384
|
-
await
|
|
414385
|
-
await rm4(target, { recursive: true, force: false });
|
|
414422
|
+
await removeCandidateGenerationTree(target);
|
|
414386
414423
|
}
|
|
414387
|
-
|
|
414424
|
+
async function list() {
|
|
414425
|
+
const generationsRoot = join25(root2, "v1");
|
|
414426
|
+
const entries = await readdir6(generationsRoot, { withFileTypes: true }).catch((error51) => {
|
|
414427
|
+
if (error51?.code === "ENOENT") return [];
|
|
414428
|
+
throw error51;
|
|
414429
|
+
});
|
|
414430
|
+
const generations = [];
|
|
414431
|
+
for (const entry of entries) {
|
|
414432
|
+
if (!entry.isDirectory() || !SHA2564.test(entry.name)) continue;
|
|
414433
|
+
const path4 = join25(generationsRoot, entry.name);
|
|
414434
|
+
const candidateMetadata = join25(path4, "candidate.json");
|
|
414435
|
+
const metadataExists = await stat9(candidateMetadata).catch((error51) => {
|
|
414436
|
+
if (error51?.code === "ENOENT") return null;
|
|
414437
|
+
throw error51;
|
|
414438
|
+
});
|
|
414439
|
+
if (!metadataExists) {
|
|
414440
|
+
await removeCandidateGenerationTree(path4);
|
|
414441
|
+
continue;
|
|
414442
|
+
}
|
|
414443
|
+
const metadata = await readMetadata(path4);
|
|
414444
|
+
if (generationPath(metadata.generationRef) !== path4) {
|
|
414445
|
+
return fail9("CANDIDATE_GENERATION_IDENTITY_MISMATCH");
|
|
414446
|
+
}
|
|
414447
|
+
generations.push({ ...metadata, generationPath: path4, workspacePath: join25(path4, "workspace") });
|
|
414448
|
+
}
|
|
414449
|
+
return generations;
|
|
414450
|
+
}
|
|
414451
|
+
async function removeForApp(input) {
|
|
414452
|
+
if (!Number.isSafeInteger(input.appId) || input.appId <= 0) {
|
|
414453
|
+
return fail9("CANDIDATE_GENERATION_INPUT_INVALID");
|
|
414454
|
+
}
|
|
414455
|
+
const exactDataDir = input.durableDataDir ? resolve100(input.durableDataDir) : null;
|
|
414456
|
+
const retained = new Set(input.retainGenerationRefs ?? []);
|
|
414457
|
+
for (const generationRef of retained) {
|
|
414458
|
+
if (!GENERATION_REF.test(generationRef)) return fail9("CANDIDATE_GENERATION_REF_INVALID");
|
|
414459
|
+
}
|
|
414460
|
+
let removed = 0;
|
|
414461
|
+
for (const generation of await list()) {
|
|
414462
|
+
if (generation.appId !== input.appId) continue;
|
|
414463
|
+
if (retained.has(generation.generationRef)) continue;
|
|
414464
|
+
if (exactDataDir && resolve100(generation.durableDataDir) !== exactDataDir) {
|
|
414465
|
+
return fail9("CANDIDATE_GENERATION_IDENTITY_MISMATCH");
|
|
414466
|
+
}
|
|
414467
|
+
await removeExact({
|
|
414468
|
+
generationRef: generation.generationRef,
|
|
414469
|
+
appId: generation.appId,
|
|
414470
|
+
environment: generation.environment,
|
|
414471
|
+
deploymentId: generation.deploymentId
|
|
414472
|
+
});
|
|
414473
|
+
removed += 1;
|
|
414474
|
+
}
|
|
414475
|
+
return { removed };
|
|
414476
|
+
}
|
|
414477
|
+
return { prepare, finalize: finalize2, readReady, locateReady, quarantine, removeExact, list, removeForApp };
|
|
414388
414478
|
}
|
|
414389
414479
|
var ARTIFACT_REF5, GENERATION_REF, RUNTIME_GENERATION_REF3, SHA2564;
|
|
414390
414480
|
var init_app_candidate_generation_store = __esm({
|
|
@@ -420977,6 +421067,10 @@ async function deployWithRuntimeControlPlane(input) {
|
|
|
420977
421067
|
bundleHash: input.attempt.sourceBundleSha256,
|
|
420978
421068
|
runtimeRecord: input.runtimeRecord,
|
|
420979
421069
|
callableBackend: true,
|
|
421070
|
+
// A runtime recovery is still a new activation. Propagate the signed
|
|
421071
|
+
// serving-route publication contract into the activation transaction so
|
|
421072
|
+
// the edge manifest advances together with its replacement backend.
|
|
421073
|
+
servingRoutePublication: input.servingRoutePublication,
|
|
420980
421074
|
beforeCommit: async (context2) => {
|
|
420981
421075
|
await input.onExecutorPhase?.("committing");
|
|
420982
421076
|
await input.beforeActivationCommit?.(context2);
|
|
@@ -423758,50 +423852,89 @@ var init_app_serving_route_publication_adapter = __esm({
|
|
|
423758
423852
|
});
|
|
423759
423853
|
|
|
423760
423854
|
// ../platform/src/app-release-runtime-env.ts
|
|
423855
|
+
function optionalValue(value) {
|
|
423856
|
+
const normalized = value?.trim() ?? "";
|
|
423857
|
+
return normalized || null;
|
|
423858
|
+
}
|
|
423859
|
+
function positiveInteger4(value) {
|
|
423860
|
+
const parsed = Number(value);
|
|
423861
|
+
return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : null;
|
|
423862
|
+
}
|
|
423863
|
+
function releaseMode(value) {
|
|
423864
|
+
const normalized = value?.trim().toLowerCase();
|
|
423865
|
+
if (normalized === "1" || normalized === "true") return "all";
|
|
423866
|
+
return normalized === "allowlist" ? "allowlist" : "disabled";
|
|
423867
|
+
}
|
|
423868
|
+
function parseAppReleaseRuntimeConfig(env2) {
|
|
423869
|
+
return Object.freeze({
|
|
423870
|
+
executor: Object.freeze({
|
|
423871
|
+
appsDir: optionalValue(env2.GENCOW_APPS_DIR),
|
|
423872
|
+
nodeId: optionalValue(env2.GENCOW_NODE_ID)?.toLowerCase() ?? null,
|
|
423873
|
+
spoolDir: optionalValue(env2.GENCOW_DEPLOYMENT_EXECUTOR_SPOOL_DIR)
|
|
423874
|
+
}),
|
|
423875
|
+
staticOrigin: Object.freeze({
|
|
423876
|
+
artifactRoot: optionalValue(env2.GENCOW_STATIC_ORIGIN_ARTIFACT_ROOT),
|
|
423877
|
+
stageEnabled: env2.GENCOW_STATIC_ORIGIN_STAGE_ENABLED === "true"
|
|
423878
|
+
}),
|
|
423879
|
+
release: Object.freeze({
|
|
423880
|
+
mode: releaseMode(env2.GENCOW_RELEASE_VERSIONS_ENABLED),
|
|
423881
|
+
allowlist: Object.freeze(
|
|
423882
|
+
(env2.GENCOW_RELEASE_VERSIONS_ALLOWLIST ?? "").split(",").map((value) => value.trim()).filter(Boolean)
|
|
423883
|
+
),
|
|
423884
|
+
quotaBytes: positiveInteger4(env2.GENCOW_RELEASE_STORAGE_QUOTA_BYTES),
|
|
423885
|
+
allowFilesystem: env2.GENCOW_RELEASE_STORAGE_ALLOW_FILESYSTEM === "1",
|
|
423886
|
+
objectsDir: optionalValue(env2.GENCOW_RELEASE_OBJECTS_DIR)
|
|
423887
|
+
}),
|
|
423888
|
+
storage: Object.freeze({
|
|
423889
|
+
azureAccountName: optionalValue(env2.GENCOW_PLATFORM_STORAGE_AZURE_ACCOUNT_NAME),
|
|
423890
|
+
azureContainer: optionalValue(env2.GENCOW_PLATFORM_STORAGE_AZURE_CONTAINER),
|
|
423891
|
+
azureEndpoint: optionalValue(env2.GENCOW_PLATFORM_STORAGE_AZURE_ENDPOINT),
|
|
423892
|
+
azureAuth: env2.GENCOW_PLATFORM_STORAGE_AZURE_AUTH === "client_secret" ? "client_secret" : "managed_identity",
|
|
423893
|
+
azureClientId: optionalValue(env2.GENCOW_PLATFORM_STORAGE_AZURE_CLIENT_ID),
|
|
423894
|
+
azureTenantId: optionalValue(env2.GENCOW_PLATFORM_STORAGE_AZURE_TENANT_ID),
|
|
423895
|
+
azurePrefix: optionalValue(env2.GENCOW_PLATFORM_STORAGE_AZURE_PREFIX)?.replace(/\/+$/u, "") || null
|
|
423896
|
+
}),
|
|
423897
|
+
servingRoute: Object.freeze({
|
|
423898
|
+
publicationMode: optionalValue(env2.GENCOW_SERVING_ROUTE_PUBLICATION_MODE) ?? "off",
|
|
423899
|
+
environment: optionalValue(env2.GENCOW_SERVING_ROUTE_PUBLICATION_ENVIRONMENT),
|
|
423900
|
+
appAllowlist: optionalValue(env2.GENCOW_SERVING_ROUTE_PUBLICATION_APP_ALLOWLIST),
|
|
423901
|
+
topologyRevision: optionalValue(env2.GENCOW_SERVING_ROUTE_TOPOLOGY_REVISION),
|
|
423902
|
+
upsertTargetSetId: optionalValue(env2.GENCOW_SERVING_ROUTE_UPSERT_TARGET_SET_ID),
|
|
423903
|
+
tombstoneTargetSetId: optionalValue(env2.GENCOW_SERVING_ROUTE_TOMBSTONE_TARGET_SET_ID),
|
|
423904
|
+
artifactQuotaBytes: positiveInteger4(env2.GENCOW_SERVING_ROUTE_ARTIFACT_QUOTA_BYTES),
|
|
423905
|
+
baseDomain: optionalValue(env2.BASE_DOMAIN)
|
|
423906
|
+
})
|
|
423907
|
+
});
|
|
423908
|
+
}
|
|
423909
|
+
function parseAppReleaseProtectedSecrets(env2) {
|
|
423910
|
+
return Object.freeze({
|
|
423911
|
+
azureClientSecret: env2.GENCOW_PLATFORM_STORAGE_AZURE_CLIENT_SECRET || null
|
|
423912
|
+
});
|
|
423913
|
+
}
|
|
423914
|
+
function isReleaseControlPlane(env2) {
|
|
423915
|
+
return env2.IS_PLATFORM === "true" || env2.GENCOW_DEPLOYMENT_EXECUTOR_ENABLED === "true" && env2.GENCOW_DEPLOYMENT_EXECUTOR_MODE === "dedicated";
|
|
423916
|
+
}
|
|
423761
423917
|
function captureAppReleaseRuntimeEnv(env2 = process.env) {
|
|
423762
|
-
const
|
|
423763
|
-
if (
|
|
423764
|
-
|
|
423765
|
-
|
|
423766
|
-
|
|
423767
|
-
|
|
423768
|
-
|
|
423769
|
-
|
|
423770
|
-
return
|
|
423918
|
+
const host = globalThis;
|
|
423919
|
+
if (host[SNAPSHOT_KEY]) return host[SNAPSHOT_KEY];
|
|
423920
|
+
if (!isReleaseControlPlane(env2)) return null;
|
|
423921
|
+
const snapshot = Object.freeze({
|
|
423922
|
+
config: parseAppReleaseRuntimeConfig(env2),
|
|
423923
|
+
protectedSecrets: parseAppReleaseProtectedSecrets(env2)
|
|
423924
|
+
});
|
|
423925
|
+
host[SNAPSHOT_KEY] = snapshot;
|
|
423926
|
+
return snapshot;
|
|
423771
423927
|
}
|
|
423772
|
-
function
|
|
423773
|
-
|
|
423928
|
+
function appReleaseRuntimeConfig(explicit) {
|
|
423929
|
+
if (explicit) return parseAppReleaseRuntimeConfig(explicit);
|
|
423930
|
+
return globalThis[SNAPSHOT_KEY]?.config ?? parseAppReleaseRuntimeConfig(process.env);
|
|
423774
423931
|
}
|
|
423775
|
-
var SNAPSHOT_KEY, CAPTURE_SNAPSHOT_KEY
|
|
423932
|
+
var SNAPSHOT_KEY, CAPTURE_SNAPSHOT_KEY;
|
|
423776
423933
|
var init_app_release_runtime_env = __esm({
|
|
423777
423934
|
"../platform/src/app-release-runtime-env.ts"() {
|
|
423778
423935
|
"use strict";
|
|
423779
423936
|
SNAPSHOT_KEY = "__gencowAppReleaseRuntimeEnvSnapshot";
|
|
423780
423937
|
CAPTURE_SNAPSHOT_KEY = "__gencowCaptureAppReleaseRuntimeEnvSnapshot";
|
|
423781
|
-
APP_RELEASE_RUNTIME_ENV_KEYS = Object.freeze([
|
|
423782
|
-
"GENCOW_APPS_DIR",
|
|
423783
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_ACCOUNT_NAME",
|
|
423784
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_CONTAINER",
|
|
423785
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_ENDPOINT",
|
|
423786
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_AUTH",
|
|
423787
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_CLIENT_ID",
|
|
423788
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_TENANT_ID",
|
|
423789
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_CLIENT_SECRET",
|
|
423790
|
-
"GENCOW_PLATFORM_STORAGE_AZURE_PREFIX",
|
|
423791
|
-
"GENCOW_RELEASE_VERSIONS_ENABLED",
|
|
423792
|
-
"GENCOW_RELEASE_VERSIONS_ALLOWLIST",
|
|
423793
|
-
"GENCOW_RELEASE_STORAGE_QUOTA_BYTES",
|
|
423794
|
-
"GENCOW_RELEASE_STORAGE_ALLOW_FILESYSTEM",
|
|
423795
|
-
"GENCOW_RELEASE_OBJECTS_DIR",
|
|
423796
|
-
"GENCOW_SERVING_ROUTE_PUBLICATION_MODE",
|
|
423797
|
-
"GENCOW_SERVING_ROUTE_PUBLICATION_ENVIRONMENT",
|
|
423798
|
-
"GENCOW_SERVING_ROUTE_PUBLICATION_APP_ALLOWLIST",
|
|
423799
|
-
"GENCOW_SERVING_ROUTE_TOPOLOGY_REVISION",
|
|
423800
|
-
"GENCOW_SERVING_ROUTE_UPSERT_TARGET_SET_ID",
|
|
423801
|
-
"GENCOW_SERVING_ROUTE_TOMBSTONE_TARGET_SET_ID",
|
|
423802
|
-
"GENCOW_SERVING_ROUTE_ARTIFACT_QUOTA_BYTES",
|
|
423803
|
-
"BASE_DOMAIN"
|
|
423804
|
-
]);
|
|
423805
423938
|
globalThis[CAPTURE_SNAPSHOT_KEY] = captureAppReleaseRuntimeEnv;
|
|
423806
423939
|
}
|
|
423807
423940
|
});
|
|
@@ -423824,19 +423957,20 @@ function parseAllowlist(raw2) {
|
|
|
423824
423957
|
return new Set(decoded);
|
|
423825
423958
|
}
|
|
423826
423959
|
function loadAppServingRouteRolloutConfig(input) {
|
|
423827
|
-
const
|
|
423828
|
-
const
|
|
423960
|
+
const config2 = input.runtimeConfig ?? appReleaseRuntimeConfig(input.env);
|
|
423961
|
+
const route = config2.servingRoute;
|
|
423962
|
+
const mode = route.publicationMode;
|
|
423829
423963
|
if (mode === "off") return null;
|
|
423830
423964
|
if (mode !== "enforce" || !Number.isSafeInteger(input.appId) || input.appId < 1) return fail30();
|
|
423831
423965
|
const environment = input.deploymentEnvironment;
|
|
423832
|
-
const configuredEnvironment =
|
|
423833
|
-
const topologyRevision =
|
|
423834
|
-
const upsertTargetSetId =
|
|
423835
|
-
const tombstoneTargetSetId =
|
|
423836
|
-
const allowlist3 = parseAllowlist(
|
|
423966
|
+
const configuredEnvironment = route.environment ?? void 0;
|
|
423967
|
+
const topologyRevision = route.topologyRevision ?? "";
|
|
423968
|
+
const upsertTargetSetId = route.upsertTargetSetId ?? "";
|
|
423969
|
+
const tombstoneTargetSetId = route.tombstoneTargetSetId ?? "";
|
|
423970
|
+
const allowlist3 = parseAllowlist(route.appAllowlist ?? void 0);
|
|
423837
423971
|
let baseDomain;
|
|
423838
423972
|
try {
|
|
423839
|
-
baseDomain = normalizeServingRouteHost(
|
|
423973
|
+
baseDomain = normalizeServingRouteHost(route.baseDomain ?? "");
|
|
423840
423974
|
} catch {
|
|
423841
423975
|
return fail30();
|
|
423842
423976
|
}
|
|
@@ -424255,7 +424389,7 @@ function createRuntimeControlPlaneProductionAdapter(input) {
|
|
|
424255
424389
|
getWarmPoolBackendImpl
|
|
424256
424390
|
});
|
|
424257
424391
|
async function isDurablySupersededDrainingStop(row) {
|
|
424258
|
-
if (row.reason !== "deploy_replace" ||
|
|
424392
|
+
if (row.reason !== "deploy_replace" || !["serving", "draining"].includes(row.state) || !Number.isSafeInteger(row.port) || Number(row.port) <= 0) {
|
|
424259
424393
|
return false;
|
|
424260
424394
|
}
|
|
424261
424395
|
try {
|
|
@@ -457356,6 +457490,10 @@ var SYSTEM_ENV_KEYS = [
|
|
|
457356
457490
|
// Platform serving route tombstone target set
|
|
457357
457491
|
"GENCOW_SERVING_ROUTE_ARTIFACT_QUOTA_BYTES",
|
|
457358
457492
|
// serving artifact quota
|
|
457493
|
+
"GENCOW_STATIC_ORIGIN_STAGE_ENABLED",
|
|
457494
|
+
// Platform-only Static Origin rollout switch
|
|
457495
|
+
"GENCOW_STATIC_ORIGIN_ARTIFACT_ROOT",
|
|
457496
|
+
// Platform-only protected artifact root
|
|
457359
457497
|
"GENCOW_BACKUP_RETENTION_V2_MODE",
|
|
457360
457498
|
// platform backup retention rollout mode
|
|
457361
457499
|
"GENCOW_BACKUP_RETENTION_V2_EFFECTIVE_AT",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"env": {},
|
|
14
14
|
"indexImports": [],
|
|
15
|
+
"setup": "memory-wiring",
|
|
15
16
|
"guide": [
|
|
16
17
|
"Use gencow/memory.ts through the createMemory({ extractionModel, embeddingProfile }) factory or the default memory singleton.",
|
|
17
18
|
"Pure AI SDK: createMemory({ extractionModel: gencow.languageModel(\"gpt-5.4-mini\"), embeddingProfile: MEMORY_EMBEDDING_PROFILE })",
|
|
@@ -11,6 +11,8 @@ import { pgTable } from "drizzle-orm/pg-core";
|
|
|
11
11
|
import { serial, text, timestamp } from "drizzle-orm/pg-core";
|
|
12
12
|
import { account, authRelationsConfig, session, user, verification } from "./schema-auth";
|
|
13
13
|
|
|
14
|
+
export * from "./schema-memory";
|
|
15
|
+
|
|
14
16
|
export const conversations = pgTable(
|
|
15
17
|
"conversations",
|
|
16
18
|
{
|