catalyst-core-internal 0.1.5 → 0.1.6
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/changelog.md +21 -0
- package/mcp_v2/lib/helpers.js +17 -6
- package/mcp_v2/mcp.js +4 -3
- package/mcp_v2/setup.js +11 -5
- package/package.json +6 -13
- package/license +0 -10
package/changelog.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.0-beta.1] - 2026-04-15
|
|
4
|
+
|
|
5
|
+
- Promoted `0.1.0-canary.7` to the first proper beta release after stabilization.
|
|
6
|
+
- No code changes from `0.1.0-canary.7`; this release marks the same build as production-ready beta.
|
|
7
|
+
|
|
8
|
+
## [0.1.0-canary.7] - 2026-03-31
|
|
9
|
+
|
|
10
|
+
- Introduced Catalyst MCP v2 with a new setup flow, database schema, knowledge base, and source-aware migration tooling for stronger project guidance and conversion workflows.
|
|
11
|
+
- Expanded MCP/framework knowledge coverage across SEO, observability, webpack, React Compiler, CLI, file conventions, and native hooks, while improving setup and verification messaging across supported MCP clients.
|
|
12
|
+
|
|
13
|
+
## [0.1.0-canary.6] - 2026-03-09
|
|
14
|
+
|
|
15
|
+
- Hardened URL whitelisting with thread-safety improvements, broader test coverage, and related iOS build fixes to make access-control behavior more reliable.
|
|
16
|
+
- Improved compatibility and runtime resilience by softening bridge environment mismatch failures and preserving backward compatibility for `useDataProtection` on older native binaries.
|
|
17
|
+
|
|
18
|
+
## [0.1.0-canary.5] - 2026-02-27
|
|
19
|
+
|
|
20
|
+
- Strengthened native app security with backup restrictions, screen-capture protection, web data clearing, and related Android/iOS test coverage.
|
|
21
|
+
- Improved universal app runtime behavior with safe-area inset support, edge-to-edge rendering, and notification permission override fixes.
|
|
22
|
+
- Expanded platform support with offline fallback handling, notification/access-control refinements, localhost HTTP allowances for local development, and file-picker/HTTPS server improvements.
|
|
23
|
+
|
|
3
24
|
## [0.1.0-canary.4] - 2026-02-12
|
|
4
25
|
|
|
5
26
|
- Added Google Sign-In support for both Android and iOS in Catalyst, enabling a unified native authentication experience for apps built on the framework.
|
package/mcp_v2/lib/helpers.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict"
|
|
2
2
|
const fs = require("fs")
|
|
3
3
|
const path = require("path")
|
|
4
|
+
const supportedCatalystPackages = ["catalyst-core", "catalyst-core-internal"]
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Parse a semver-like version string into comparable parts.
|
|
@@ -38,8 +39,8 @@ function versionOlderThan(a, b) {
|
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
|
-
* Walk up the directory tree looking for a package.json that depends on
|
|
42
|
-
* Returns { dir, pkg, catalystVersion, installedVersion, versionMeta } or null.
|
|
42
|
+
* Walk up the directory tree looking for a package.json that depends on Catalyst.
|
|
43
|
+
* Returns { dir, pkg, catalystPackageName, catalystVersion, installedVersion, versionMeta } or null.
|
|
43
44
|
*/
|
|
44
45
|
function findCatalystRoot() {
|
|
45
46
|
// Walk up from __dirname first (mcp always lives inside the project at .catalyst/mcp/),
|
|
@@ -55,8 +56,11 @@ function findCatalystRoot() {
|
|
|
55
56
|
try {
|
|
56
57
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"))
|
|
57
58
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
const catalystPackageName = supportedCatalystPackages.find(
|
|
60
|
+
(packageName) => deps[packageName]
|
|
61
|
+
)
|
|
62
|
+
if (catalystPackageName) {
|
|
63
|
+
const nmPath = path.join(dir, "node_modules", catalystPackageName)
|
|
60
64
|
const installed = fs.existsSync(nmPath)
|
|
61
65
|
// Read the actual installed version from node_modules
|
|
62
66
|
let installedVersion = null
|
|
@@ -70,11 +74,12 @@ function findCatalystRoot() {
|
|
|
70
74
|
/* ignore */
|
|
71
75
|
}
|
|
72
76
|
}
|
|
73
|
-
const declaredRef = deps[
|
|
77
|
+
const declaredRef = deps[catalystPackageName]
|
|
74
78
|
const isGithubRef = declaredRef.startsWith("github:") || declaredRef.includes("#")
|
|
75
79
|
return {
|
|
76
80
|
dir,
|
|
77
81
|
pkg,
|
|
82
|
+
catalystPackageName,
|
|
78
83
|
catalystVersion: declaredRef, // what package.json says (may be github ref)
|
|
79
84
|
installedVersion, // what's actually in node_modules e.g. "0.0.3-canary.3"
|
|
80
85
|
notInstalled: !installed,
|
|
@@ -156,4 +161,10 @@ function makeProjectHelpers(root) {
|
|
|
156
161
|
return { fileExists, readJson, readText, grepSrc }
|
|
157
162
|
}
|
|
158
163
|
|
|
159
|
-
module.exports = {
|
|
164
|
+
module.exports = {
|
|
165
|
+
findCatalystRoot,
|
|
166
|
+
makeProjectHelpers,
|
|
167
|
+
versionOlderThan,
|
|
168
|
+
parseVersion,
|
|
169
|
+
supportedCatalystPackages,
|
|
170
|
+
}
|
package/mcp_v2/mcp.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Startup validation → module init → JSON-RPC loop over stdio.
|
|
6
6
|
*
|
|
7
7
|
* Hard fails if:
|
|
8
|
-
* - No
|
|
8
|
+
* - No Catalyst package in package.json (not a catalyst project)
|
|
9
9
|
* - context.db missing (setup.js not run)
|
|
10
10
|
*
|
|
11
11
|
* Tool routing: LLM reads tool name + description to route.
|
|
@@ -39,7 +39,8 @@ if (!projectInfo) {
|
|
|
39
39
|
jsonrpc: "2.0",
|
|
40
40
|
error: {
|
|
41
41
|
code: -32000,
|
|
42
|
-
message:
|
|
42
|
+
message:
|
|
43
|
+
"Not a Catalyst project. No catalyst-core or catalyst-core-internal dependency found in package.json.",
|
|
43
44
|
},
|
|
44
45
|
id: null,
|
|
45
46
|
}) + "\n"
|
|
@@ -52,7 +53,7 @@ if (projectInfo.notInstalled) {
|
|
|
52
53
|
jsonrpc: "2.0",
|
|
53
54
|
error: {
|
|
54
55
|
code: -32000,
|
|
55
|
-
message:
|
|
56
|
+
message: `${projectInfo.catalystPackageName} is listed in package.json (${projectInfo.catalystVersion}) but not installed in node_modules. Run: npm install`,
|
|
56
57
|
},
|
|
57
58
|
id: null,
|
|
58
59
|
}) + "\n"
|
package/mcp_v2/setup.js
CHANGED
|
@@ -22,6 +22,7 @@ const DB_PATH = path.join(MCP_DIR, "context.db")
|
|
|
22
22
|
const SCHEMA_PATH = path.join(MCP_DIR, "schema.sql")
|
|
23
23
|
const KB_PATH = path.join(MCP_DIR, "knowledge-base.json")
|
|
24
24
|
const SITEMAP_URL = "https://catalyst.1mg.com/public_docs/sitemap.xml"
|
|
25
|
+
const supportedCatalystPackages = ["catalyst-core", "catalyst-core-internal"]
|
|
25
26
|
|
|
26
27
|
// ── 1. Find & validate catalyst project ──────────────────────────────────────
|
|
27
28
|
|
|
@@ -32,8 +33,9 @@ function findCatalystRoot() {
|
|
|
32
33
|
if (fs.existsSync(pkgPath)) {
|
|
33
34
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"))
|
|
34
35
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
const catalystPackageName = supportedCatalystPackages.find((packageName) => deps[packageName])
|
|
37
|
+
if (catalystPackageName) {
|
|
38
|
+
return { dir, pkg, catalystPackageName, version: deps[catalystPackageName] }
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
dir = path.dirname(dir)
|
|
@@ -119,7 +121,9 @@ function seedKnowledgeBase(db, projectInfo) {
|
|
|
119
121
|
package_name: projectInfo.pkg.name || "unknown",
|
|
120
122
|
catalyst_version: projectInfo.version,
|
|
121
123
|
})
|
|
122
|
-
console.log(
|
|
124
|
+
console.log(
|
|
125
|
+
` ✓ Project context stored (${projectInfo.pkg.name}, ${projectInfo.catalystPackageName}@${projectInfo.version})`
|
|
126
|
+
)
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
// ── 5. sync_catalyst_docs (initial run) ───────────────────────────────────────
|
|
@@ -232,12 +236,14 @@ async function main() {
|
|
|
232
236
|
// 1. Validate catalyst project
|
|
233
237
|
const projectInfo = findCatalystRoot()
|
|
234
238
|
if (!projectInfo) {
|
|
235
|
-
console.error(
|
|
239
|
+
console.error(
|
|
240
|
+
"✗ No catalyst-core or catalyst-core-internal dependency found in any package.json above this directory."
|
|
241
|
+
)
|
|
236
242
|
console.error(" Run setup from inside your catalyst project.")
|
|
237
243
|
process.exit(1)
|
|
238
244
|
}
|
|
239
245
|
console.log(`✓ Catalyst project: ${projectInfo.pkg.name || projectInfo.dir}`)
|
|
240
|
-
console.log(`
|
|
246
|
+
console.log(` ${projectInfo.catalystPackageName}@${projectInfo.version}`)
|
|
241
247
|
|
|
242
248
|
// 2. Init DB
|
|
243
249
|
console.log("\nInitializing context.db...")
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "catalyst-core-internal",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"main": "index.js",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
5
|
"description": "Web framework that provides great performance out of the box",
|
|
6
6
|
"bin": {
|
|
7
7
|
"catalyst": "bin/catalyst.js"
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/tata1mg/catalyst-core.git"
|
|
11
|
+
"url": "https://github.com/tata1mg/catalyst-core.git",
|
|
12
|
+
"directory": "packages/catalyst-core"
|
|
12
13
|
},
|
|
13
14
|
"_moduleAliases": {
|
|
14
15
|
"@catalyst/template": ".",
|
|
@@ -37,10 +38,10 @@
|
|
|
37
38
|
},
|
|
38
39
|
"scripts": {
|
|
39
40
|
"lint": "eslint .",
|
|
40
|
-
"lint-staged": "lint-staged",
|
|
41
41
|
"prettify": "prettier . --write",
|
|
42
42
|
"prepare": "babel src --out-dir ./dist --ignore '**/.build/**' && mkdir -p dist/native && cp -r src/native/androidProject src/native/build.swift src/native/assets dist/native/ && mkdir -p dist/native/iosnativeWebView && tar -C src/native/iosnativeWebView --exclude='.build' --exclude='.package-config-hash' -cf - . | tar -C dist/native/iosnativeWebView -xf -",
|
|
43
|
-
"prepublishOnly": "npm
|
|
43
|
+
"prepublishOnly": "npm run prepare",
|
|
44
|
+
"test:fixture": "sh ../../scripts/test-catalyst-core.sh"
|
|
44
45
|
},
|
|
45
46
|
"license": "MIT",
|
|
46
47
|
"dependencies": {
|
|
@@ -113,14 +114,6 @@
|
|
|
113
114
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
114
115
|
"eslint-plugin-risxss": "^2.1.0",
|
|
115
116
|
"eslint-plugin-security": "^3.0.0",
|
|
116
|
-
"husky": "^9.0.11",
|
|
117
|
-
"lint-staged": "^15.2.2",
|
|
118
117
|
"prettier": "^3.2.5"
|
|
119
|
-
},
|
|
120
|
-
"lint-staged": {
|
|
121
|
-
"*.{js,jsx}": [
|
|
122
|
-
"eslint .",
|
|
123
|
-
"prettier . --write"
|
|
124
|
-
]
|
|
125
118
|
}
|
|
126
119
|
}
|
package/license
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 1mg Healthcare Solutions Private Limited.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
-
|