@tera-system/pro 0.2.10 → 0.2.11

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/LICENSE.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## النموذج: كود مفتوح + ترخيص مدفوع
6
6
 
7
- هذا الحزمة (`@tera-system/core`) مفتوحة المصدر لكنها **خاضعة لترخيص تجاري**.
7
+ منظومة Tera (`@tera-system/pro`) نظام تجاري مرخّص — كود مفتوح المصدر لكنه **خاضع لترخيص تجاري**.
8
8
 
9
9
  ### ماذا يعني ذلك عملياً:
10
10
 
package/MANIFEST.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tera-system/pro",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Build manifest for the Tera System Pro commercial plugin component (THIN mode — content served from teranoo.com signed bundle).",
5
5
  "compatibleEnvironments": [
6
6
  "opencode"
@@ -15,7 +15,7 @@
15
15
  "projectControlTemplates": 1,
16
16
  "assets": 49
17
17
  },
18
- "bundleRef": "core-bundle-v0.2.10.signed.json (SHA256 4F776E78BC2CA99725DD320B9B9EC2C4F05200B52ED7B857BEE487A5F8FD4B13)",
18
+ "bundleRef": "core-bundle-v0.2.11.signed.json (SHA256 B05E0A99811958BE44DFB162812366723D3080145122A3C3E0C345E37E2E51B2)",
19
19
  "builtAt": "2026-08-28",
20
20
  "sha256": {
21
21
  "agents": "9769b3acc15e44e8ae56e4d585f7b965f6c30eafceea509edd0dfe3ce1d83270",
package/README.md CHANGED
@@ -20,7 +20,7 @@ npm install @tera-system/pro
20
20
  > ```
21
21
  > أو مباشرة بدون موافقة:
22
22
  > ```bash
23
- > npx tera-restore
23
+ > npx tera-pro-restore
24
24
  > # أو
25
25
  > node node_modules/@tera-system/pro/scripts/install.js
26
26
  > ```
@@ -54,21 +54,21 @@ npm run tera-sync
54
54
  | ط§ظ„ظ†ظˆط§ط© ط§ظ„ط­ظˆظƒظ…ظٹط© (110 ظ…ظ„ظپط§ظ‹) | `tera-system/` |
55
55
  | ظ‡ظٹظƒظ„ `project-control/` (ظ‚ظˆط§ظ„ط¨) | `project-control/` *(ظپظ‚ط· ط¥ظ† ظ„ظ… ظٹظˆط¬ط¯ — ط­ط§ظ„ط© ط®ط§طµط© ط¨ظƒظ„ ط¹ظ…ظٹظ„)* |
56
56
  | ط£ط¯ظˆط§طھ ط§ظ„طھظˆط²ظٹط¹ (7 ط³ظƒط±ط¨طھط§طھ) | `tools/` |
57
- | ط³ط¬ظ„ ط§ظ„ظ…ظ„ظƒظٹط© | `.opencode/tera-core.manifest.json` |
57
+ | ط³ط¬ظ„ ط§ظ„ظ…ظ„ظƒظٹط© | `.opencode/tera.manifest.json` |
58
58
 
59
59
  ## ط³ظ„ظˆظƒ ط§ظ„ظ…ط«ط¨ظ‘طھ (ط؛ظٹط± ظ…ط¯ظ…ط± + ظˆط§ط¹ظچ ط¨ط§ظ„ظ…ظ„ظƒظٹط©)
60
60
 
61
61
  - **ظ„ط§ ظٹط­ط°ظپ ط£ظٹ ط´ظٹط، ط£ط¨ط¯ط§ظ‹.**
62
62
  - **ظ„ط§ ظٹظƒطھط¨ ظپظˆظ‚ ط£ظٹ ظ…ظ„ظپ ط؛ظٹط± ظ…ظ…ظ„ظˆظƒ ظ„ظ‡:** ط£ظٹ ظ…ظ„ظپ ظ…ظˆط¬ظˆط¯ ط¨ط§ط³ظ… ظٹطھط¹ط§ط±ط¶ ظ…ط¹ ط­ط²ظ…ط© `@tera-system/pro` (ظˆظ„ظ… طھط«ط¨ظ‘طھظ‡ ط§ظ„ط­ط²ظ…ط© ط³ط§ط¨ظ‚ط§ظ‹) ظٹظڈطھط±ظƒ ظƒظ…ط§ ظ‡ظˆ ظˆظٹظڈط³ط¬ظژظ‘ظ„ ظƒظ€ `CONFLICT` ظپظٹ طھظ‚ط±ظٹط± ط§ظ„طھط±ظƒظٹط¨.
63
- - **ظٹظپط±ظ‘ظ‚ ط¨ظٹظ† ظ…ظ„ظپط§طھظ‡ ظˆظ…ظ„ظپط§طھ ط§ظ„ظ…ط³طھط®ط¯ظ…** ط¹ط¨ط± ط³ط¬ظ„ ط§ظ„ظ…ظ„ظƒظٹط© `.opencode/tera-core.manifest.json`.
63
+ - **ظٹظپط±ظ‘ظ‚ ط¨ظٹظ† ظ…ظ„ظپط§طھظ‡ ظˆظ…ظ„ظپط§طھ ط§ظ„ظ…ط³طھط®ط¯ظ…** ط¹ط¨ط± ط³ط¬ظ„ ط§ظ„ظ…ظ„ظƒظٹط© `.opencode/tera.manifest.json`.
64
64
  - **ط§ظ„ظ…ظ„ظپط§طھ ط§ظ„ظ…ظ…ظ„ظˆظƒط© ظ„ظ„ط­ط²ظ…ط© ظپظ‚ط·** طھظڈط­ط¯ظژظ‘ط« ط¹ظ†ط¯ ط§ط®طھظ„ط§ظپظ‡ط§طŒ ظ…ط¹ **ظ†ط³ط®ط© ط§ط­طھظٹط§ط·ظٹط©** (`*.tera-bak-<ts>`) ظ‚ط¨ظ„ ط£ظٹ طھط­ط¯ظٹط«.
65
65
  - **ط¥ط¹ط§ط¯ط© ط§ظ„طھط´ط؛ظٹظ„ ط¢ظ…ظ†ط© (idempotent):** ط§ظ„ظ…ظ„ظپط§طھ ط§ظ„ظ…طھط·ط§ط¨ظ‚ط© طھظڈطھط®ط·ظ‘ظ‰.
66
66
  - `opencode.json` ط§ظ„ظ…ظˆط¬ظˆط¯ ظ„ط¯ظ‰ ط§ظ„ظ…ط³طھط®ط¯ظ… **ظ„ط§ ظٹظڈظ„ظ…ط³ ط£ط¨ط¯ط§ظ‹** — طھظڈظˆط¶ط¹ ظ†ط³ط®ط© ظ…ط±ط¬ط¹ظٹط© ظپظ‚ط· ظˆطھط¸ظ‡ط± ط§ظ„طھط¹ظ„ظٹظ…ط§طھ ظپظٹ ط§ظ„طھظ‚ط±ظٹط±.
67
67
 
68
68
  ## ط¥ظ„ط؛ط§ط، ط§ظ„طھط«ط¨ظٹطھ (ظٹط¯ظˆظٹ — ط؛ظٹط± ظ…ط¯ظ…ط±)
69
69
 
70
- 1. ط§ط­ط°ظپ ط§ظ„ظ…ظ„ظپط§طھ ط§ظ„ظ…ط³ط¬ظ‘ظ„ط© ظپظٹ `.opencode/tera-core.manifest.json` (`files`).
71
- 2. ط§ط­ط°ظپ `.opencode/tera-core.manifest.json` ظ†ظپط³ظ‡.
70
+ 1. ط§ط­ط°ظپ ط§ظ„ظ…ظ„ظپط§طھ ط§ظ„ظ…ط³ط¬ظ‘ظ„ط© ظپظٹ `.opencode/tera.manifest.json` (`files`).
71
+ 2. ط§ط­ط°ظپ `.opencode/tera.manifest.json` ظ†ظپط³ظ‡.
72
72
  3. ط§ط­طھظپط¸ ط¨ط£ظٹ `*.tera-bak-*` ط£ظˆ ظ…ظ„ظپط§طھظƒ ط§ظ„ط´ط®طµظٹط© ظƒظ…ط§ ظ‡ظٹ.
73
73
 
74
74
  ## ط§ظ„طھط­ظ‚ظ‚ ظ…ظ† ط§ظ„ظ†ط²ط§ظ‡ط©
package/RELEASES.md CHANGED
@@ -5,6 +5,20 @@
5
5
  ---
6
6
 
7
7
 
8
+
9
+ ## 0.2.11 (2026-08-30)
10
+
11
+ ### Security hardening: license-gate message fix + zero core traces
12
+
13
+ **What changed:**
14
+ - Runtime license-gate tamper message now points to @tera-system/pro (was @tera-system/core)
15
+ - Removed ALL references to any internal package from user-visible files (LICENSE, README, WELCOME, RELEASES)
16
+ - Manifest renamed .opencode/tera-core.manifest.json -> .opencode/tera.manifest.json (auto-migrated on install)
17
+ - Bundle type renamed tera-core-bundle -> tera-bundle (signed, verified)
18
+
19
+ **Why:**
20
+ - Commercial isolation: the licensed product is @tera-system/pro; no trace of other packages remains for clients
21
+
8
22
  ## 0.2.10 (2026-08-29)
9
23
 
10
24
  ### First-sale readiness: full content sync with core 0.2.10 + license gates
@@ -22,12 +36,12 @@
22
36
  ### حل الاستعادة عند الحذف بالخطأ + توافق npm 11
23
37
 
24
38
  **ما تغيّر:**
25
- - إضافة `bin` جديد: `tera-restore` و `tera-pro-restore` — نفس حل core لكن للحزمة التجارية
39
+ - إضافة `bin` جديد: `tera-restore` و `tera-pro-restore` — أمرا استعادة للحزمة التجارية
26
40
  - توثيق `npm approve-scripts @tera-system/pro` كحل لأمان npm 11
27
41
  - قسم "الاستعادة عند الحذف بالخطأ" في README
28
42
 
29
43
  **لماذا هذا التحديث:**
30
- - نفس مشكلة core — حذف `.opencode/agents` بالخطأ كان يحتاج أمراً صريحاً لا يعتمد على `postinstall`
44
+ - حذف `.opencode/agents` بالخطأ كان يحتاج أمراً صريحاً لا يعتمد على `postinstall`
31
45
 
32
46
  ---
33
47
 
package/WELCOME.md CHANGED
@@ -33,7 +33,7 @@
33
33
  ## هل حذفت ملفات بالخطأ؟
34
34
  إذا اختفت ملفات `.opencode/agents/` بعد `npm install` ولم تظهر، شغّل:
35
35
  ```bash
36
- npx tera-restore
36
+ npx tera-pro-restore
37
37
  ```
38
38
  ثم أعد فتح OpenCode.
39
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tera-system/pro",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Tera System Pro — commercial edition (thin): system files are fetched from teranoo.com as a signed bundle; enforced license gate + heartbeat",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -92,7 +92,7 @@ const privateKey = loadPrivateKey();
92
92
  const signature = crypto.sign(null, Buffer.from(canonicalHash), privateKey).toString("base64url");
93
93
 
94
94
  const bundle = {
95
- type: "tera-core-bundle",
95
+ type: "tera-bundle",
96
96
  schema: 1,
97
97
  packageName: pkg.name,
98
98
  packageVersion: pkg.version,
@@ -8,7 +8,7 @@
8
8
  * Rules:
9
9
  * - Never deletes anything.
10
10
  * - Never overwrites a file it does not own.
11
- * - Tracks ownership via `.opencode/tera-core.manifest.json`.
11
+ * - Tracks ownership via `.opencode/tera.manifest.json`.
12
12
  * - Only updates files it owns, always keeping a backup first.
13
13
  * - Idempotent: re-running is safe; identical files are skipped.
14
14
  * - Never touches an existing user `opencode.json`.
@@ -30,7 +30,8 @@ import { verifyBundle, applyBundle } from "./lib/bundle.mjs";
30
30
 
31
31
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
32
32
  const PKG_ROOT = path.resolve(__dirname, "..");
33
- const MANIFEST_NAME = "tera-core.manifest.json";
33
+ const MANIFEST_NAME = "tera.manifest.json";
34
+ const LEGACY_MANIFEST_NAME = "tera-core.manifest.json";
34
35
  const CONFIG_EXAMPLE = "opencode.tera.example.json";
35
36
 
36
37
  /** Generate a stable device id from hostname + target path. */
@@ -78,7 +79,19 @@ function copyFile(src, dest) {
78
79
 
79
80
  function loadOwnership(target) {
80
81
  const p = path.join(target, ".opencode", MANIFEST_NAME);
81
- if (!fs.existsSync(p)) return { files: {} };
82
+ if (!fs.existsSync(p)) {
83
+ // Legacy name (pre-0.2.11) — migrate silently
84
+ const legacy = path.join(target, ".opencode", LEGACY_MANIFEST_NAME);
85
+ if (fs.existsSync(legacy)) {
86
+ try {
87
+ const parsed = JSON.parse(fs.readFileSync(legacy, "utf8"));
88
+ return { files: parsed.files && typeof parsed.files === "object" ? parsed.files : {} };
89
+ } catch {
90
+ return { files: {} };
91
+ }
92
+ }
93
+ return { files: {} };
94
+ }
82
95
  try {
83
96
  const parsed = JSON.parse(fs.readFileSync(p, "utf8"));
84
97
  return { files: parsed.files && typeof parsed.files === "object" ? parsed.files : {} };
@@ -197,7 +210,7 @@ function installProjectControl() {
197
210
 
198
211
  /* ----------------------------------- run ----------------------------------- */
199
212
 
200
- console.log(`\n@tera/core v${pkg.version} — install`);
213
+ console.log(`\nTera System Pro v${pkg.version} — install`);
201
214
  console.log(` target workspace : ${target}\n`);
202
215
 
203
216
  installGroup({ name: "agents", src: path.join(PKG_ROOT, "agents"), dest: path.join(target, ".opencode", "agents") });
@@ -231,6 +244,15 @@ const manifestPath = path.join(target, ".opencode", MANIFEST_NAME);
231
244
  fs.mkdirSync(path.dirname(manifestPath), { recursive: true });
232
245
  fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
233
246
 
247
+ // Migrate away from the legacy manifest name (pre-0.2.11) — removes any "core" trace
248
+ const legacyManifestPath = path.join(target, ".opencode", LEGACY_MANIFEST_NAME);
249
+ if (fs.existsSync(legacyManifestPath)) {
250
+ try {
251
+ fs.unlinkSync(legacyManifestPath);
252
+ console.log(` [manifest] migrated: ${LEGACY_MANIFEST_NAME} → ${MANIFEST_NAME}`);
253
+ } catch { /* non-destructive best-effort */ }
254
+ }
255
+
234
256
  /* ------------------- license state (non-blocking, never breaks install) ------------------- */
235
257
 
236
258
  /**
@@ -18,7 +18,7 @@ export function loadPublicKey() {
18
18
  * Returns { ok, reason, manifest?, contentSha256? }
19
19
  */
20
20
  export function verifyBundle(bundle) {
21
- if (!bundle || bundle.type !== "tera-core-bundle") {
21
+ if (!bundle || bundle.type !== "tera-bundle") {
22
22
  return { ok: false, reason: "not-a-bundle" };
23
23
  }
24
24
  if (typeof bundle.contentSha256 !== "string" || !bundle.signature) {
@@ -169,7 +169,7 @@ export async function enforceLicenseGate(target, options = {}) {
169
169
  message:
170
170
  "❌ Tera System files have been tampered with.\n" +
171
171
  `Tampered files: ${criticalCheck.tampered.map((t) => t.file).join(", ")}\n\n` +
172
- "Reinstall required: npm install @tera-system/core@latest",
172
+ "Reinstall required: npm install @tera-system/pro@latest (or npx tera-pro-restore)",
173
173
  };
174
174
  }
175
175