iranti 0.2.47 → 0.2.48
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.
|
@@ -2384,7 +2384,10 @@ function defaultsSetupPlan(args) {
|
|
|
2384
2384
|
return explicit;
|
|
2385
2385
|
throw new Error(`Invalid --db-mode '${explicit}'. Use local, managed, or docker.`);
|
|
2386
2386
|
})();
|
|
2387
|
-
const
|
|
2387
|
+
const explicitDatabaseUrl = (getFlag(args, 'db-url')
|
|
2388
|
+
?? (databaseMode === 'managed' ? process.env.DATABASE_URL : '')
|
|
2389
|
+
?? '').trim();
|
|
2390
|
+
const databaseUrl = deriveDatabaseUrlForMode(databaseMode, instanceName, explicitDatabaseUrl);
|
|
2388
2391
|
const databaseIntentStrategy = parseDatabaseIntentStrategyFlag(getFlag(args, 'db-intent'), '--db-intent');
|
|
2389
2392
|
const provider = normalizeProvider(getFlag(args, 'provider') ?? process.env.LLM_PROVIDER ?? 'mock') ?? 'mock';
|
|
2390
2393
|
if (!isSupportedProvider(provider)) {
|
|
@@ -2950,10 +2953,14 @@ function deriveDatabaseUrlForMode(mode, instanceName, explicitDatabaseUrl) {
|
|
|
2950
2953
|
}
|
|
2951
2954
|
const user = encodeURIComponent((process.env.POSTGRES_USER ?? 'postgres').trim() || 'postgres');
|
|
2952
2955
|
const password = encodeURIComponent((process.env.POSTGRES_PASSWORD ?? 'postgres').trim() || 'postgres');
|
|
2956
|
+
const localDatabaseHost = preferredLocalDatabaseHost();
|
|
2953
2957
|
if (mode === 'local') {
|
|
2954
|
-
return `postgresql://${user}:${password}
|
|
2958
|
+
return `postgresql://${user}:${password}@${localDatabaseHost}:5432/iranti_${instanceName}`;
|
|
2955
2959
|
}
|
|
2956
|
-
return `postgresql://${user}:${password}
|
|
2960
|
+
return `postgresql://${user}:${password}@${localDatabaseHost}:5432/iranti_${instanceName}`;
|
|
2961
|
+
}
|
|
2962
|
+
function preferredLocalDatabaseHost() {
|
|
2963
|
+
return process.platform === 'win32' ? '127.0.0.1' : 'localhost';
|
|
2957
2964
|
}
|
|
2958
2965
|
function inferSetupDependencies(plan) {
|
|
2959
2966
|
if (plan.databaseMode !== 'docker') {
|
|
@@ -4528,7 +4535,7 @@ async function setupCommand(args) {
|
|
|
4528
4535
|
const dbPassword = await promptSecretWithDefault(prompt, 'Docker PostgreSQL password', 'postgres');
|
|
4529
4536
|
const containerName = sanitizeIdentifier(await promptNonEmpty(prompt, 'Docker container name', `iranti_${instanceName}_db`), `iranti_${instanceName}_db`);
|
|
4530
4537
|
dockerContainerName = containerName;
|
|
4531
|
-
dbUrl = `postgresql://postgres:${dbPassword}
|
|
4538
|
+
dbUrl = `postgresql://postgres:${dbPassword}@${preferredLocalDatabaseHost()}:${dbHostPort}/${dbName}`;
|
|
4532
4539
|
databaseIntentStrategy = parseDatabaseIntentStrategyFlag(await prompt.line('Database intent (dedicated, shared, external)', databaseIntentPromptValue(resolveInstanceDatabaseIntent({
|
|
4533
4540
|
instanceName,
|
|
4534
4541
|
env: existingInstance?.env ?? { DATABASE_URL: dbUrl },
|
|
@@ -5377,7 +5384,7 @@ async function createInstanceCommand(args) {
|
|
|
5377
5384
|
if (!Number.isFinite(port) || port <= 0)
|
|
5378
5385
|
throw new Error(`Invalid --port '${portRaw}'.`);
|
|
5379
5386
|
const dbUrl = getFlag(args, 'db-url') ??
|
|
5380
|
-
`postgresql://postgres:yourpassword
|
|
5387
|
+
`postgresql://postgres:yourpassword@${preferredLocalDatabaseHost()}:5432/iranti_${name}`;
|
|
5381
5388
|
const apiKey = getFlag(args, 'api-key');
|
|
5382
5389
|
const provider = normalizeProvider(getFlag(args, 'provider')) ?? 'mock';
|
|
5383
5390
|
const providerKey = getFlag(args, 'provider-key');
|
|
@@ -151,7 +151,7 @@ async function main() {
|
|
|
151
151
|
await ensureDefaultAgent(iranti);
|
|
152
152
|
const server = new mcp_js_1.McpServer({
|
|
153
153
|
name: 'iranti-mcp',
|
|
154
|
-
version: '0.2.
|
|
154
|
+
version: '0.2.48',
|
|
155
155
|
});
|
|
156
156
|
server.registerTool('iranti_handshake', {
|
|
157
157
|
description: `Initialize or refresh an agent's working-memory brief for the current task.
|
package/dist/src/api/server.js
CHANGED
|
@@ -40,7 +40,7 @@ const RUNTIME_AUTHORITY = (0, runtimeLifecycle_1.resolveRuntimeAuthorityFromEnv)
|
|
|
40
40
|
const INSTANCE_DIR = RUNTIME_AUTHORITY.instanceDir;
|
|
41
41
|
const INSTANCE_RUNTIME_FILE = RUNTIME_AUTHORITY.runtimeFile;
|
|
42
42
|
const INSTANCE_NAME = process.env.IRANTI_INSTANCE_NAME?.trim() || (INSTANCE_DIR ? path_1.default.basename(INSTANCE_DIR) : 'adhoc');
|
|
43
|
-
const VERSION = '0.2.
|
|
43
|
+
const VERSION = '0.2.48';
|
|
44
44
|
const PORT_RAW = (process.env.IRANTI_PORT ?? '3001').trim();
|
|
45
45
|
const PORT = Number.parseInt(PORT_RAW, 10);
|
|
46
46
|
const runtimeMetadataHealth = {
|