iranti 0.2.13 → 0.2.14
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 +31 -4
- 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
|
@@ -2151,14 +2151,41 @@ function verifyGlobalNpmInstall() {
|
|
|
2151
2151
|
function canScheduleWindowsGlobalNpmSelfUpgrade(context) {
|
|
2152
2152
|
return process.platform === 'win32' && context.runningFromGlobalNpmInstall;
|
|
2153
2153
|
}
|
|
2154
|
+
function escapeForSingleQuotedPowerShell(value) {
|
|
2155
|
+
return value.replace(/'/g, "''");
|
|
2156
|
+
}
|
|
2157
|
+
function resolveDetachedUpgradeCwd(command) {
|
|
2158
|
+
const desired = command.cwd?.trim();
|
|
2159
|
+
if (!desired) {
|
|
2160
|
+
return os_1.default.homedir();
|
|
2161
|
+
}
|
|
2162
|
+
const normalized = path_1.default.resolve(desired);
|
|
2163
|
+
const lower = normalized.toLowerCase();
|
|
2164
|
+
const globalNpmRoot = detectGlobalNpmRoot()?.toLowerCase();
|
|
2165
|
+
if (globalNpmRoot && (lower === globalNpmRoot || lower.startsWith(`${globalNpmRoot}${path_1.default.sep}`))) {
|
|
2166
|
+
return os_1.default.homedir();
|
|
2167
|
+
}
|
|
2168
|
+
return normalized;
|
|
2169
|
+
}
|
|
2154
2170
|
function scheduleDetachedWindowsGlobalNpmUpgrade(command) {
|
|
2155
|
-
const
|
|
2156
|
-
const
|
|
2157
|
-
const
|
|
2171
|
+
const neutralCwd = resolveDetachedUpgradeCwd(command);
|
|
2172
|
+
const parentPid = process.pid;
|
|
2173
|
+
const powershell = 'powershell.exe';
|
|
2174
|
+
const escapedCwd = escapeForSingleQuotedPowerShell(neutralCwd);
|
|
2175
|
+
const escapedExecutable = escapeForSingleQuotedPowerShell(command.executable);
|
|
2176
|
+
const escapedArgs = command.args.map((arg) => `'${escapeForSingleQuotedPowerShell(arg)}'`).join(', ');
|
|
2177
|
+
const script = [
|
|
2178
|
+
`$parentPid = ${parentPid}`,
|
|
2179
|
+
'while (Get-Process -Id $parentPid -ErrorAction SilentlyContinue) { Start-Sleep -Milliseconds 500 }',
|
|
2180
|
+
`Set-Location -LiteralPath '${escapedCwd}'`,
|
|
2181
|
+
`& '${escapedExecutable}' @(${escapedArgs})`,
|
|
2182
|
+
'exit $LASTEXITCODE',
|
|
2183
|
+
].join('; ');
|
|
2184
|
+
const child = (0, child_process_1.spawn)(powershell, ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', script], {
|
|
2158
2185
|
detached: true,
|
|
2159
2186
|
stdio: 'ignore',
|
|
2160
2187
|
windowsHide: true,
|
|
2161
|
-
cwd:
|
|
2188
|
+
cwd: neutralCwd,
|
|
2162
2189
|
env: process.env,
|
|
2163
2190
|
});
|
|
2164
2191
|
child.unref();
|
|
@@ -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.14',
|
|
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.14',
|
|
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.14',
|
|
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.14',
|
|
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.14' },
|
|
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.14',
|
|
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.14',
|
|
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.14',
|
|
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.14',
|
|
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.14',
|
|
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.14',
|
|
241
241
|
events: [
|
|
242
242
|
{
|
|
243
243
|
at: new Date().toISOString(),
|
package/dist/src/api/server.js
CHANGED
|
@@ -69,7 +69,7 @@ app.use(express_1.default.json({ limit: process.env.IRANTI_MAX_BODY_BYTES ?? '25
|
|
|
69
69
|
app.get(ROUTES.health, (_req, res) => {
|
|
70
70
|
res.json({
|
|
71
71
|
status: 'ok',
|
|
72
|
-
version: '0.2.
|
|
72
|
+
version: '0.2.14',
|
|
73
73
|
provider: process.env.LLM_PROVIDER ?? 'mock',
|
|
74
74
|
});
|
|
75
75
|
});
|