iranti 0.2.3 → 0.2.4
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/scripts/iranti-cli.js +12 -12
- package/dist/scripts/iranti-mcp.js +1 -1
- package/dist/scripts/seed.js +10 -10
- package/dist/src/api/server.js +1 -1
- package/package.json +1 -1
|
@@ -722,7 +722,7 @@ async function chooseAvailablePort(session, promptText, preferredPort, allowOccu
|
|
|
722
722
|
let suggested = preferredPort;
|
|
723
723
|
if (!allowOccupiedCurrent && !(await isPortAvailable(preferredPort))) {
|
|
724
724
|
suggested = await findNextAvailablePort(preferredPort + 1);
|
|
725
|
-
console.log(`${warnLabel()} Port ${preferredPort} is already in use.
|
|
725
|
+
console.log(`${warnLabel()} Port ${preferredPort} is already in use. A good next option is ${suggested}.`);
|
|
726
726
|
}
|
|
727
727
|
while (true) {
|
|
728
728
|
const raw = await promptNonEmpty(session, promptText, String(suggested));
|
|
@@ -1522,13 +1522,13 @@ async function setupCommand(args) {
|
|
|
1522
1522
|
const explicitScope = getFlag(args, 'scope');
|
|
1523
1523
|
const explicitRoot = getFlag(args, 'root');
|
|
1524
1524
|
console.log(bold('Iranti setup'));
|
|
1525
|
-
console.log('This wizard will install a runtime, create or update an instance,
|
|
1525
|
+
console.log('This wizard will get Iranti set up: install a runtime, create or update an instance, connect provider keys, create a usable Iranti API key, and optionally bind one or more project folders.');
|
|
1526
1526
|
console.log('');
|
|
1527
1527
|
let result = null;
|
|
1528
1528
|
await withPromptSession(async (prompt) => {
|
|
1529
1529
|
let setupMode = 'shared';
|
|
1530
1530
|
while (true) {
|
|
1531
|
-
const chosen = (await prompt.line('
|
|
1531
|
+
const chosen = (await prompt.line('How should Iranti install the runtime: shared or isolated folder', 'shared') ?? 'shared').trim().toLowerCase();
|
|
1532
1532
|
if (chosen === 'shared' || chosen === 'isolated') {
|
|
1533
1533
|
setupMode = chosen;
|
|
1534
1534
|
break;
|
|
@@ -1543,35 +1543,35 @@ async function setupCommand(args) {
|
|
|
1543
1543
|
}
|
|
1544
1544
|
else {
|
|
1545
1545
|
while (true) {
|
|
1546
|
-
const chosenScope = (await prompt.line('Install scope', explicitScope ?? 'user') ?? 'user').trim().toLowerCase();
|
|
1546
|
+
const chosenScope = (await prompt.line('Install scope: user or system', explicitScope ?? 'user') ?? 'user').trim().toLowerCase();
|
|
1547
1547
|
if (chosenScope === 'user' || chosenScope === 'system') {
|
|
1548
1548
|
finalScope = chosenScope;
|
|
1549
1549
|
break;
|
|
1550
1550
|
}
|
|
1551
|
-
console.log(`${warnLabel()}
|
|
1551
|
+
console.log(`${warnLabel()} Please choose either user or system.`);
|
|
1552
1552
|
}
|
|
1553
1553
|
finalRoot = explicitRoot ? path_1.default.resolve(explicitRoot) : resolveInstallRoot(args, finalScope);
|
|
1554
1554
|
}
|
|
1555
1555
|
await ensureRuntimeInstalled(finalRoot, finalScope);
|
|
1556
1556
|
console.log(`${okLabel()} Runtime ready at ${finalRoot}`);
|
|
1557
|
-
const instanceName = sanitizeIdentifier(await promptNonEmpty(prompt, '
|
|
1557
|
+
const instanceName = sanitizeIdentifier(await promptNonEmpty(prompt, 'What should this instance be called', setupMode === 'isolated' ? sanitizeIdentifier(path_1.default.basename(process.cwd()), 'local') : 'local'), 'local');
|
|
1558
1558
|
const existingInstance = fs_1.default.existsSync(instancePaths(finalRoot, instanceName).envFile)
|
|
1559
1559
|
? await loadInstanceEnv(finalRoot, instanceName)
|
|
1560
1560
|
: null;
|
|
1561
1561
|
if (existingInstance) {
|
|
1562
|
-
console.log(`${infoLabel()}
|
|
1562
|
+
console.log(`${infoLabel()} Found existing instance '${instanceName}'. Updating it.`);
|
|
1563
1563
|
}
|
|
1564
1564
|
else {
|
|
1565
1565
|
console.log(`${infoLabel()} Creating new instance '${instanceName}'.`);
|
|
1566
1566
|
}
|
|
1567
1567
|
const existingPort = Number.parseInt(existingInstance?.env.IRANTI_PORT ?? '3001', 10);
|
|
1568
|
-
const port = await chooseAvailablePort(prompt, 'Iranti API
|
|
1568
|
+
const port = await chooseAvailablePort(prompt, 'Which port should the Iranti API use', existingPort, Boolean(existingInstance));
|
|
1569
1569
|
const dockerAvailable = hasDockerInstalled();
|
|
1570
1570
|
let dbUrl = '';
|
|
1571
1571
|
let bootstrapDatabase = false;
|
|
1572
1572
|
while (true) {
|
|
1573
1573
|
const defaultMode = dockerAvailable ? 'docker' : 'existing';
|
|
1574
|
-
const dbMode = (await prompt.line('
|
|
1574
|
+
const dbMode = (await prompt.line('How should we set up the database: existing, managed, or docker', defaultMode) ?? defaultMode).trim().toLowerCase();
|
|
1575
1575
|
if (dbMode === 'existing' || dbMode === 'managed') {
|
|
1576
1576
|
while (true) {
|
|
1577
1577
|
dbUrl = await promptNonEmpty(prompt, 'DATABASE_URL', existingInstance?.env.DATABASE_URL ?? `postgresql://postgres:yourpassword@localhost:5432/iranti_${instanceName}`);
|
|
@@ -1587,9 +1587,9 @@ async function setupCommand(args) {
|
|
|
1587
1587
|
console.log(`${warnLabel()} Docker is not installed or not on PATH. Choose existing or managed instead.`);
|
|
1588
1588
|
continue;
|
|
1589
1589
|
}
|
|
1590
|
-
const dbHostPort = await chooseAvailablePort(prompt, 'Docker PostgreSQL
|
|
1591
|
-
const dbName = sanitizeIdentifier(await promptNonEmpty(prompt, 'Docker PostgreSQL database
|
|
1592
|
-
const dbPassword = await promptRequiredSecret(prompt, 'Docker PostgreSQL
|
|
1590
|
+
const dbHostPort = await chooseAvailablePort(prompt, 'Which host port should Docker PostgreSQL use', 5432, false);
|
|
1591
|
+
const dbName = sanitizeIdentifier(await promptNonEmpty(prompt, 'What should the Docker PostgreSQL database be called', `iranti_${instanceName}`), `iranti_${instanceName}`);
|
|
1592
|
+
const dbPassword = await promptRequiredSecret(prompt, 'Set a password for Docker PostgreSQL');
|
|
1593
1593
|
const containerName = sanitizeIdentifier(await promptNonEmpty(prompt, 'Docker container name', `iranti_${instanceName}_db`), `iranti_${instanceName}_db`);
|
|
1594
1594
|
dbUrl = `postgresql://postgres:${dbPassword}@localhost:${dbHostPort}/${dbName}`;
|
|
1595
1595
|
console.log(`${infoLabel()} Docker will be used only for PostgreSQL. Iranti itself does not require Docker once a PostgreSQL database is available.`);
|
|
@@ -144,7 +144,7 @@ async function main() {
|
|
|
144
144
|
await ensureDefaultAgent(iranti);
|
|
145
145
|
const server = new mcp_js_1.McpServer({
|
|
146
146
|
name: 'iranti-mcp',
|
|
147
|
-
version: '0.2.
|
|
147
|
+
version: '0.2.4',
|
|
148
148
|
});
|
|
149
149
|
server.registerTool('iranti_handshake', {
|
|
150
150
|
description: `Initialize or refresh an agent's working-memory brief for the current task.
|
package/dist/scripts/seed.js
CHANGED
|
@@ -15,7 +15,7 @@ const STAFF_ENTRIES = [
|
|
|
15
15
|
entityId: 'librarian',
|
|
16
16
|
key: 'operating_rules',
|
|
17
17
|
valueRaw: {
|
|
18
|
-
version: '0.2.
|
|
18
|
+
version: '0.2.4',
|
|
19
19
|
rules: [
|
|
20
20
|
'All writes from external agents go through the Librarian — never directly to the database',
|
|
21
21
|
'Check for existing entries before every write',
|
|
@@ -39,7 +39,7 @@ const STAFF_ENTRIES = [
|
|
|
39
39
|
entityId: 'attendant',
|
|
40
40
|
key: 'operating_rules',
|
|
41
41
|
valueRaw: {
|
|
42
|
-
version: '0.2.
|
|
42
|
+
version: '0.2.4',
|
|
43
43
|
rules: [
|
|
44
44
|
'Assigned one-per-external-agent — serve the agent, not the user',
|
|
45
45
|
'On handshake: read AGENTS.md and MCP config, query Librarian for relevant rules and task context',
|
|
@@ -61,7 +61,7 @@ const STAFF_ENTRIES = [
|
|
|
61
61
|
entityId: 'archivist',
|
|
62
62
|
key: 'operating_rules',
|
|
63
63
|
valueRaw: {
|
|
64
|
-
version: '0.2.
|
|
64
|
+
version: '0.2.4',
|
|
65
65
|
rules: [
|
|
66
66
|
'Run on schedule or when conflict flags exceed threshold — not on every write',
|
|
67
67
|
'Scan for expired, low-confidence, flagged, and duplicate entries',
|
|
@@ -82,7 +82,7 @@ const STAFF_ENTRIES = [
|
|
|
82
82
|
entityType: 'system',
|
|
83
83
|
entityId: 'library',
|
|
84
84
|
key: 'schema_version',
|
|
85
|
-
valueRaw: { version: '0.2.
|
|
85
|
+
valueRaw: { version: '0.2.4' },
|
|
86
86
|
valueSummary: 'Current Library schema version.',
|
|
87
87
|
confidence: 100,
|
|
88
88
|
source: 'seed',
|
|
@@ -95,7 +95,7 @@ const STAFF_ENTRIES = [
|
|
|
95
95
|
key: 'initialization_log',
|
|
96
96
|
valueRaw: {
|
|
97
97
|
initializedAt: new Date().toISOString(),
|
|
98
|
-
seedVersion: '0.2.
|
|
98
|
+
seedVersion: '0.2.4',
|
|
99
99
|
},
|
|
100
100
|
valueSummary: 'Record of when and how this Library was initialized.',
|
|
101
101
|
confidence: 100,
|
|
@@ -108,7 +108,7 @@ const STAFF_ENTRIES = [
|
|
|
108
108
|
entityId: 'ontology',
|
|
109
109
|
key: 'core_schema',
|
|
110
110
|
valueRaw: {
|
|
111
|
-
version: '0.2.
|
|
111
|
+
version: '0.2.4',
|
|
112
112
|
states: ['candidate', 'provisional', 'canonical'],
|
|
113
113
|
coreEntityTypes: [
|
|
114
114
|
'person',
|
|
@@ -156,7 +156,7 @@ const STAFF_ENTRIES = [
|
|
|
156
156
|
entityId: 'ontology',
|
|
157
157
|
key: 'extension_registry',
|
|
158
158
|
valueRaw: {
|
|
159
|
-
version: '0.2.
|
|
159
|
+
version: '0.2.4',
|
|
160
160
|
namespaces: {
|
|
161
161
|
education: {
|
|
162
162
|
status: 'provisional',
|
|
@@ -187,7 +187,7 @@ const STAFF_ENTRIES = [
|
|
|
187
187
|
entityId: 'ontology',
|
|
188
188
|
key: 'candidate_terms',
|
|
189
189
|
valueRaw: {
|
|
190
|
-
version: '0.2.
|
|
190
|
+
version: '0.2.4',
|
|
191
191
|
terms: [],
|
|
192
192
|
},
|
|
193
193
|
valueSummary: 'Staging area for ontology terms detected repeatedly but not yet promoted.',
|
|
@@ -201,7 +201,7 @@ const STAFF_ENTRIES = [
|
|
|
201
201
|
entityId: 'ontology',
|
|
202
202
|
key: 'promotion_policy',
|
|
203
203
|
valueRaw: {
|
|
204
|
-
version: '0.2.
|
|
204
|
+
version: '0.2.4',
|
|
205
205
|
candidateToProvisional: {
|
|
206
206
|
minSeenCount: 3,
|
|
207
207
|
minDistinctAgents: 2,
|
|
@@ -237,7 +237,7 @@ const STAFF_ENTRIES = [
|
|
|
237
237
|
entityId: 'ontology',
|
|
238
238
|
key: 'change_log',
|
|
239
239
|
valueRaw: {
|
|
240
|
-
version: '0.2.
|
|
240
|
+
version: '0.2.4',
|
|
241
241
|
events: [
|
|
242
242
|
{
|
|
243
243
|
at: new Date().toISOString(),
|
package/dist/src/api/server.js
CHANGED