chore(infra): update Studio/103 host IP to 114.85.107.50
Replace all references to the previous Portal host 180.159.29.143 with 114.85.107.50 across release scripts, safety gates, runbooks, and docs. Also add scripts/push-wechat-news-morning-draft-now.mjs for direct draft push without waiting on the worker poll interval. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -41,7 +41,7 @@ async function main() {
|
||||
const apply = process.argv.includes('--apply');
|
||||
const enableChatBridge = process.argv.includes('--enable-chat-bridge');
|
||||
const databaseUrl = execSync(
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@180.159.29.143 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@114.85.107.50 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
{ encoding: 'utf8' },
|
||||
).trim();
|
||||
const pool = mysql.createPool({ uri: databaseUrl, connectionLimit: 2 });
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
|
||||
say() {
|
||||
|
||||
@@ -8,7 +8,7 @@ set -euo pipefail
|
||||
# bash scripts/backfill-mindspace-geo-prod.sh
|
||||
# bash scripts/backfill-mindspace-geo-prod.sh --dry-run
|
||||
|
||||
HOST="${MEMIND_PROD_HOST:-john@180.159.29.143}"
|
||||
HOST="${MEMIND_PROD_HOST:-john@114.85.107.50}"
|
||||
LOCAL_REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
REMOTE_REPO="${MEMIND_PROD_REPO:-/Users/john/Project/Memind}"
|
||||
REMOTE_MINDSPACE_ROOT="${MEMIND_PROD_MINDSPACE_ROOT:-${REMOTE_REPO}/MindSpace}"
|
||||
|
||||
@@ -13,7 +13,7 @@ const port = process.env.GOOSE_V149_PORT || '18049';
|
||||
const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const base = `https://${host}:${port}`;
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
|
||||
function usage() {
|
||||
return [
|
||||
|
||||
@@ -9,7 +9,7 @@ const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_AGENT_START_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -11,7 +11,7 @@ const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
const pollMs = Number(process.env.GOOSE_V149_EXECUTOR_POLL_MS || 500);
|
||||
const timeoutMs = Number(process.env.GOOSE_V149_EXECUTOR_TIMEOUT_MS || 30_000);
|
||||
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_EXECUTOR_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -13,7 +13,7 @@ const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
const base = `https://${host}:${port}`;
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_HARNESS_FAIL: refusing production host ${host}`);
|
||||
|
||||
@@ -9,7 +9,7 @@ const host = process.env.GOOSE_V149_HOST || '127.0.0.1';
|
||||
const url = `https://${host}:${port}/status`;
|
||||
const maxBuffer = Number(process.env.GOOSE_V149_CHECK_MAX_BUFFER || 64 * 1024 * 1024);
|
||||
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_CHECK_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -12,7 +12,7 @@ import { enforceRealLlmGate } from './goose-v149-real-llm-gate.mjs';
|
||||
|
||||
enforceRealLlmGate('check-goosed-v149-memory-loop.mjs');
|
||||
|
||||
const BLOCKED_DB_HOSTS = ['180.159.29.143', '120.26.184.105', 'rds.aliyuncs.com'];
|
||||
const BLOCKED_DB_HOSTS = ['114.85.107.50', '120.26.184.105', 'rds.aliyuncs.com'];
|
||||
const MARKER = `goose-v149-memory-loop-${Date.now()}`;
|
||||
|
||||
function assertLocalDatabase(env = process.env) {
|
||||
|
||||
@@ -53,7 +53,7 @@ const apiUrl =
|
||||
|| 'https://api.deepseek.com/v1';
|
||||
const replyTimeoutMs = Number(process.env.GOOSE_V149_PROVIDER_REPLY_TIMEOUT_MS || 90_000);
|
||||
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_PROVIDER_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -17,7 +17,7 @@ const secret = process.env.GOOSE_SERVER__SECRET_KEY || 'local-v149-dev-secret';
|
||||
const workingDir = process.env.GOOSE_V149_WORKING_DIR || process.cwd();
|
||||
const timeoutMs = Number(process.env.GOOSE_V149_REPLY_TIMEOUT_MS || 30_000);
|
||||
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_REPLY_SMOKE_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -19,7 +19,7 @@ const serverPath =
|
||||
const pollMs = Number(process.env.GOOSE_V149_SANDBOX_POLL_MS || 500);
|
||||
const timeoutMs = Number(process.env.GOOSE_V149_SANDBOX_TIMEOUT_MS || 30_000);
|
||||
|
||||
const blockedHosts = ['180.159.29.143', '120.26.184.105'];
|
||||
const blockedHosts = ['114.85.107.50', '120.26.184.105'];
|
||||
if (blockedHosts.includes(host)) {
|
||||
console.error(`GOOSE_V149_SANDBOX_FS_FAIL: refusing production host ${host}`);
|
||||
process.exit(1);
|
||||
|
||||
@@ -10,7 +10,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const HOST = 'john@114.85.107.50';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const TANG = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
const JOHN_LOCAL = '1c99b83b-0454-474f-a5d2-129d34506a32';
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
HOST="${MEMIND_PROD_HOST:-john@180.159.29.143}"
|
||||
HOST="${MEMIND_PROD_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${MEMIND_PROD_ROOT:-/Users/john/Project/Memind}"
|
||||
BUNDLE=".runtime/portal/wechat-mp.bundle.mjs"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ fail() {
|
||||
|
||||
case "${PG_HOST}" in
|
||||
127.0.0.1|localhost|::1) ;;
|
||||
180.159.29.143|120.26.184.105|*rds.aliyuncs.com*|*tkmind.cn*)
|
||||
114.85.107.50|120.26.184.105|*rds.aliyuncs.com*|*tkmind.cn*)
|
||||
fail "refusing production or remote host: ${PG_HOST}"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -10,7 +10,7 @@ import mysql from 'mysql2/promise';
|
||||
|
||||
import { loadMemindEnvFiles } from './memind-runtime-profile.mjs';
|
||||
|
||||
const BLOCKED_DB_HOSTS = new Set(['180.159.29.143', '120.26.184.105', 'rds.aliyuncs.com']);
|
||||
const BLOCKED_DB_HOSTS = new Set(['114.85.107.50', '120.26.184.105', 'rds.aliyuncs.com']);
|
||||
|
||||
function usage() {
|
||||
return [
|
||||
|
||||
@@ -5,4 +5,4 @@ Ali_Secret=YOUR_ALIYUN_ACCESS_KEY_SECRET
|
||||
|
||||
# 可选:证书与 DNS 域名
|
||||
G2_DOMAIN=g2.tkmind.cn
|
||||
G2_PUBLIC_IP=180.159.29.143
|
||||
G2_PUBLIC_IP=114.85.107.50
|
||||
|
||||
@@ -90,7 +90,7 @@ export function prepareGooseV149CheckEnv(env = process.env, rootDir = memindRoot
|
||||
export const GOOSE_CANARY_MODES = new Set(['off', 'all', 'users']);
|
||||
|
||||
const BLOCKED_HOSTS = new Set([
|
||||
'180.159.29.143',
|
||||
'114.85.107.50',
|
||||
'120.26.184.105',
|
||||
'103.tkmind.cn',
|
||||
'105.tkmind.cn',
|
||||
|
||||
@@ -52,7 +52,7 @@ test('resolveGooseTargetForIdentity routes canary users to v149', () => {
|
||||
|
||||
test('assertLoopbackGooseTarget refuses production hosts', () => {
|
||||
assert.throws(
|
||||
() => assertLoopbackGooseTarget('https://180.159.29.143:18006'),
|
||||
() => assertLoopbackGooseTarget('https://114.85.107.50:18006'),
|
||||
/refuses production host/,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import { randomUUID } from 'node:crypto';
|
||||
import { Readable } from 'node:stream';
|
||||
import { Agent, fetch } from 'undici';
|
||||
|
||||
const blockedHosts = new Set(['180.159.29.143', '120.26.184.105']);
|
||||
const blockedHosts = new Set(['114.85.107.50', '120.26.184.105']);
|
||||
|
||||
export function createV149Client(options = {}) {
|
||||
const host = options.host ?? process.env.GOOSE_V149_HOST ?? '127.0.0.1';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 前置(阿里云控制台):
|
||||
# 1. 云解析 DNS 添加域名 tkmind.cn,NS 改到阿里云(见脚本末尾说明)
|
||||
# 2. 添加 A 记录:g2 -> 180.159.29.143
|
||||
# 2. 添加 A 记录:g2 -> 114.85.107.50
|
||||
# 3. RAM 创建 AccessKey,权限 AliyunDNSFullAccess
|
||||
# 4. cp scripts/g2-aliyun-cert.env.example scripts/g2-aliyun-cert.env 并填入密钥
|
||||
#
|
||||
@@ -92,6 +92,6 @@ echo ""
|
||||
echo "==> 阿里云 DNS 迁移检查清单"
|
||||
echo " 1. 云解析 DNS 已添加 tkmind.cn"
|
||||
echo " 2. 域名注册商 NS 已改为阿里云(例如 vip1.alidns.com / vip2.alidns.com)"
|
||||
echo " 3. A 记录 g2 -> ${G2_PUBLIC_IP:-180.159.29.143}"
|
||||
echo " 3. A 记录 g2 -> ${G2_PUBLIC_IP:-114.85.107.50}"
|
||||
echo " 4. 删除 Cloudflare 上 g2 的 CNAME/代理记录,避免冲突"
|
||||
echo " 5. dig @223.5.5.5 +short ${DOMAIN} A 应返回 ${G2_PUBLIC_IP:-180.159.29.143}"
|
||||
echo " 5. dig @223.5.5.5 +short ${DOMAIN} A 应返回 ${G2_PUBLIC_IP:-114.85.107.50}"
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* 在 Portal 主机(103/143)上直接推送一条新闻早报到微信公众号草稿箱。
|
||||
* 不依赖 worker 轮询,适合手动试推。
|
||||
*
|
||||
* 用法(在 143 上):
|
||||
* cd /Users/john/Project/Memind
|
||||
* node scripts/push-wechat-news-morning-draft-now.mjs
|
||||
* node scripts/push-wechat-news-morning-draft-now.mjs --allow-yesterday
|
||||
* node scripts/push-wechat-news-morning-draft-now.mjs --dry-run
|
||||
*/
|
||||
import process from 'node:process';
|
||||
import mysql from 'mysql2/promise';
|
||||
import { loadH5Environment } from './load-env.mjs';
|
||||
import { loadWechatMpConfig } from '../wechat-mp-config.mjs';
|
||||
import { createWechatNewsMorningDraftService } from '../wechat-news-morning-draft.mjs';
|
||||
|
||||
loadH5Environment(import.meta.dirname);
|
||||
|
||||
const DEFAULT_TANG_USER_ID = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
async function ensureDraftConfig(service) {
|
||||
const current = await service.getConfig();
|
||||
if (current.sourceUserId && current.enabled) return current;
|
||||
const userId = String(process.env.H5_WECHAT_NEWS_MORNING_DRAFT_USER_ID ?? DEFAULT_TANG_USER_ID).trim();
|
||||
return service.updateConfig({
|
||||
enabled: true,
|
||||
sourceUserId: userId,
|
||||
autoPushEnabled: current.autoPushEnabled ?? false,
|
||||
autoGenerateEnabled: current.autoGenerateEnabled ?? false,
|
||||
}, { updatedBy: 'push-now-script' });
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const dryRun = process.argv.includes('--dry-run');
|
||||
const allowYesterday = process.argv.includes('--allow-yesterday');
|
||||
if (!process.env.DATABASE_URL) {
|
||||
console.error('DATABASE_URL missing');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const mpConfig = loadWechatMpConfig(process.env);
|
||||
if (!mpConfig.enabled) {
|
||||
console.error('微信服务号未启用:请确认 H5_WECHAT_MP_ENABLED=1 且 appId/secret/token/publicBaseUrl 齐全');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const pool = mysql.createPool({ uri: process.env.DATABASE_URL, connectionLimit: 2 });
|
||||
const h5Root = process.env.H5_ROOT?.trim() || process.cwd();
|
||||
const service = createWechatNewsMorningDraftService(pool, {
|
||||
mpConfig,
|
||||
h5Root,
|
||||
memindLibRoot: h5Root,
|
||||
env: process.env,
|
||||
logger: console,
|
||||
});
|
||||
|
||||
const config = await ensureDraftConfig(service);
|
||||
console.log(JSON.stringify({
|
||||
dryRun,
|
||||
allowYesterday,
|
||||
sourceUserId: config.sourceUserId,
|
||||
templateId: config.templateId ?? null,
|
||||
templateVersion: config.templateVersion ?? null,
|
||||
h5Root,
|
||||
}, null, 2));
|
||||
|
||||
const preview = await service.pushDraft({
|
||||
dryRun: true,
|
||||
requireToday: !allowYesterday,
|
||||
triggeredBy: 'manual-push-now',
|
||||
});
|
||||
console.log('\n[preview]');
|
||||
console.log(JSON.stringify({
|
||||
pageSlug: preview.preview?.page?.slug ?? null,
|
||||
pageUrl: preview.preview?.page?.slug ? preview.preview.page.publicUrl : null,
|
||||
isTodayPage: preview.preview?.page?.isTodayPage ?? null,
|
||||
title: preview.preview?.article?.title ?? null,
|
||||
contentLength: preview.preview?.article?.content?.length ?? 0,
|
||||
}, null, 2));
|
||||
|
||||
if (dryRun) {
|
||||
console.log('\ndry-run:未调用微信 draft/add');
|
||||
await pool.end();
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await service.pushDraft({
|
||||
requireToday: !allowYesterday,
|
||||
triggeredBy: 'manual-push-now',
|
||||
});
|
||||
console.log('\n[success]');
|
||||
console.log(JSON.stringify({
|
||||
draftMediaId: result.draftMediaId,
|
||||
pageSlug: result.preview?.page?.slug ?? null,
|
||||
pageUrl: result.preview?.page?.publicUrl ?? null,
|
||||
coverSource: result.cover?.source ?? null,
|
||||
runId: result.run?.id ?? null,
|
||||
}, null, 2));
|
||||
|
||||
await pool.end();
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error('\n[failed]', error instanceof Error ? error.message : error);
|
||||
if (error?.run) {
|
||||
console.error(JSON.stringify(error.run, null, 2));
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -254,7 +254,7 @@ ${contentPreview}`;
|
||||
console.log(' 摘要:', pageAfter.summary?.slice(0, 120));
|
||||
console.log(' 内容已变更:', changed ? '是' : '否');
|
||||
|
||||
const publicBase = (process.env.H5_PUBLIC_BASE_URL ?? 'https://180.159.29.143').replace(/\/$/, '');
|
||||
const publicBase = (process.env.H5_PUBLIC_BASE_URL ?? 'https://114.85.107.50').replace(/\/$/, '');
|
||||
const [pubRows] = await pool.query(
|
||||
`SELECT url_slug, status FROM h5_publish_records WHERE id = (SELECT current_publish_id FROM h5_page_records WHERE id = ?)`,
|
||||
[PAGE_ID],
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
RUNTIME_BASE="${DEEP_SEARCH_RUNTIME_BASE:-${REMOTE_ROOT}/deep-search-runtime}"
|
||||
INCOMING="${REMOTE_ROOT}/incoming/deep-search-runtime"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
RUNTIME_BASE="${REMOTE_ROOT}/imgproxy-runtime"
|
||||
INCOMING="${REMOTE_ROOT}/incoming/imgproxy-runtime"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
DOCKER_BIN="${DOCKER_BIN:-/opt/homebrew/bin/docker}"
|
||||
RUNTIME_BASE="$REMOTE_ROOT/imgproxy-runtime"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_USER_ROOT="${STUDIO_USER_ROOT:-/Users/john}"
|
||||
SHARED_MEMIND_ROOT="${STUDIO_SHARED_MEMIND_ROOT:-/Users/john/Project/Memind}"
|
||||
APP_DIR="${REMOTE_USER_ROOT}/MindSpace"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
STABLE_DIR="${REMOTE_ROOT}/Memind"
|
||||
CANDIDATE_BASE="${REMOTE_ROOT}/Memind-candidates"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
APP_DIR="${REMOTE_ROOT}/Memind"
|
||||
INCOMING_DIR="${REMOTE_ROOT}/incoming/memind-portal-runtime"
|
||||
|
||||
@@ -18,7 +18,7 @@ EOF
|
||||
exit 1
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
APP_NAME="${STUDIO_APP_NAME:-Memind}"
|
||||
APP_DIR="${REMOTE_ROOT}/${APP_NAME}"
|
||||
|
||||
@@ -5,7 +5,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const HOST = 'john@114.85.107.50';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const TANG = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
HOST="${MEMIND_PROD_HOST:-john@180.159.29.143}"
|
||||
HOST="${MEMIND_PROD_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${MEMIND_PROD_ROOT:-/Users/john/Project/Memind}"
|
||||
|
||||
echo "[resume-agent-run] stop guard on ${HOST}"
|
||||
|
||||
@@ -5,7 +5,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const HOST = 'john@114.85.107.50';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const TANG = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
STABLE_DIR="${STUDIO_REMOTE_ROOT:-/Users/john/Project}/Memind"
|
||||
PORTAL_CANDIDATE_LABEL="cn.tkmind.memind-portal-candidate"
|
||||
CANARY_PROXY_LABEL="cn.tkmind.memind-canary-proxy"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
HOST="${STUDIO_HOST:-john@180.159.29.143}"
|
||||
HOST="${STUDIO_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ROOT="${STUDIO_REMOTE_ROOT:-/Users/john/Project}"
|
||||
APP_DIR="${REMOTE_ROOT}/Memind"
|
||||
BACKUP_DIR="${REMOTE_ROOT}/backups/memind"
|
||||
|
||||
@@ -12,7 +12,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const HOST = 'john@114.85.107.50';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const TANG_USER_ID = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -12,7 +12,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const HOST = 'john@180.159.29.143';
|
||||
const HOST = 'john@114.85.107.50';
|
||||
const REMOTE_ROOT = '/Users/john/Project/Memind';
|
||||
const NODE103 = '/opt/homebrew/opt/node@24/bin/node';
|
||||
const DEFAULT_TANG_USER_ID = 'a70ff537-8908-486e-9b6c-042e07cc25db';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copy local deepseek-cp provider config to production and rebind Goose executors.
|
||||
*
|
||||
* Usage (from dev machine):
|
||||
* eval "$(ssh john@180.159.29.143 'grep -E "^(DATABASE_URL|TKMIND_API_TARGET|TKMIND_API_TARGETS|TKMIND_SERVER__SECRET_KEY)=" /Users/john/Project/Memind/.env | sed "s/^/TARGET_/"')"
|
||||
* eval "$(ssh john@114.85.107.50 'grep -E "^(DATABASE_URL|TKMIND_API_TARGET|TKMIND_API_TARGETS|TKMIND_SERVER__SECRET_KEY)=" /Users/john/Project/Memind/.env | sed "s/^/TARGET_/"')"
|
||||
* node scripts/sync-deepseek-cp-prod.mjs
|
||||
*/
|
||||
import fs from 'node:fs';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# bash scripts/sync-token-optimization-env-103.sh --apply # write + restart portal
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${MEMIND_103_HOST:-john@180.159.29.143}"
|
||||
HOST="${MEMIND_103_HOST:-john@114.85.107.50}"
|
||||
REMOTE_ENV="/Users/john/Project/Memind/.env"
|
||||
APPLY=0
|
||||
if [[ "${1:-}" == "--apply" ]]; then
|
||||
|
||||
@@ -46,7 +46,7 @@ const REMOTE_SCRIPT = [
|
||||
|
||||
function parseArgs(argv) {
|
||||
const options = {
|
||||
host: process.env.STUDIO_HOST ?? 'john@180.159.29.143',
|
||||
host: process.env.STUDIO_HOST ?? 'john@114.85.107.50',
|
||||
commit: null,
|
||||
artifact: path.join(ROOT, '.runtime', 'portal'),
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ function previewMessage(message, index) {
|
||||
|
||||
async function load103Env() {
|
||||
const { execSync } = await import('node:child_process');
|
||||
const envText = execSync('ssh -o BatchMode=yes john@180.159.29.143 cat /Users/john/Project/Memind/.env', {
|
||||
const envText = execSync('ssh -o BatchMode=yes john@114.85.107.50 cat /Users/john/Project/Memind/.env', {
|
||||
encoding: 'utf8',
|
||||
});
|
||||
const dbLine = envText.match(/^DATABASE_URL=(.+)$/m)?.[1]?.trim().replace(/^["']|["']$/g, '');
|
||||
@@ -49,7 +49,7 @@ async function load103Env() {
|
||||
async function fetchGooseSession(secret, sid) {
|
||||
const { execSync } = await import('node:child_process');
|
||||
const json = execSync(
|
||||
`ssh -o BatchMode=yes john@180.159.29.143 'SECRET=$(grep ^TKMIND_SERVER__SECRET_KEY= /Users/john/Project/Memind/.env | cut -d= -f2- | tr -d "\\""); curl -k -sf "https://127.0.0.1:18006/sessions/${sid}" -H "X-Secret-Key: $SECRET"'`,
|
||||
`ssh -o BatchMode=yes john@114.85.107.50 'SECRET=$(grep ^TKMIND_SERVER__SECRET_KEY= /Users/john/Project/Memind/.env | cut -d= -f2- | tr -d "\\""); curl -k -sf "https://127.0.0.1:18006/sessions/${sid}" -H "X-Secret-Key: $SECRET"'`,
|
||||
{ encoding: 'utf8', maxBuffer: 10 * 1024 * 1024 },
|
||||
);
|
||||
return JSON.parse(json);
|
||||
|
||||
@@ -44,7 +44,7 @@ function fail(label, detail = '') {
|
||||
|
||||
async function loadProdDatabaseUrl() {
|
||||
return execSync(
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@180.159.29.143 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
"ssh -o BatchMode=yes -o ConnectTimeout=8 john@114.85.107.50 \"grep '^DATABASE_URL=' /Users/john/Project/Memind/.env | cut -d= -f2-\"",
|
||||
{ encoding: 'utf8' },
|
||||
).trim();
|
||||
}
|
||||
@@ -52,7 +52,7 @@ async function loadProdDatabaseUrl() {
|
||||
async function read103Env(pattern) {
|
||||
try {
|
||||
const out = execSync(
|
||||
`ssh -o BatchMode=yes -o ConnectTimeout=8 john@180.159.29.143 'grep -E "${pattern}" /Users/john/Project/Memind/.env || true'`,
|
||||
`ssh -o BatchMode=yes -o ConnectTimeout=8 john@114.85.107.50 'grep -E "${pattern}" /Users/john/Project/Memind/.env || true'`,
|
||||
{ encoding: 'utf8' },
|
||||
).trim();
|
||||
return out.split('\n').filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user