@tera-system/pro 0.2.1 → 0.2.10
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/MANIFEST.json +5 -4
- package/README.md +19 -7
- package/RELEASES.md +27 -0
- package/WELCOME.md +7 -0
- package/opencode.tera.example.json +3 -3
- package/package.json +5 -1
- package/scripts/build-bundle.mjs +15 -8
- package/scripts/lib/bundle.mjs +2 -0
package/MANIFEST.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/pro",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
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"
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
"agents": 20,
|
|
12
12
|
"commands": 11,
|
|
13
13
|
"coreFiles": 112,
|
|
14
|
-
"tools":
|
|
15
|
-
"projectControlTemplates": 1
|
|
14
|
+
"tools": 8,
|
|
15
|
+
"projectControlTemplates": 1,
|
|
16
|
+
"assets": 49
|
|
16
17
|
},
|
|
17
|
-
"bundleRef": "core-bundle-v0.
|
|
18
|
+
"bundleRef": "core-bundle-v0.2.10.signed.json (SHA256 4F776E78BC2CA99725DD320B9B9EC2C4F05200B52ED7B857BEE487A5F8FD4B13)",
|
|
18
19
|
"builtAt": "2026-08-28",
|
|
19
20
|
"sha256": {
|
|
20
21
|
"agents": "9769b3acc15e44e8ae56e4d585f7b965f6c30eafceea509edd0dfe3ce1d83270",
|
package/README.md
CHANGED
|
@@ -5,13 +5,25 @@
|
|
|
5
5
|
> âڑ ï¸ڈ **ظ‡ط°ظ‡ ط§ظ„طط²ظ…ط© ط§ظ„طھط¬ط§ط±ظٹط© طھطھط·ظ„ط¨ ظ…ظپطھط§ط طھط±ط®ظٹطµ طµط§ظ„ط.** ط¨ط¯ظˆظ† ظ…ظپطھط§ططŒ ظ„ط§ طھط¹ظ…ظ„ ط§ظ„ظˆظƒظ„ط§ط، ظˆظ„ط§ ط§ظ„ط£ظˆط§ظ…ط±.
|
|
6
6
|
> ظ„ظ„ططµظˆظ„ ط¹ظ„ظ‰ ظ…ظپطھط§ط: `https://teranoo.com/pricing`
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install @tera-system/pro
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
## التثبيت (أمر واحد)
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @tera-system/pro
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
عند التثبيت، يعمل سكربت `postinstall` تلقائياً على مساحة العمل (المجلد الذي نُفّذ فيه `npm install`).
|
|
15
|
+
|
|
16
|
+
> **⚠️ npm 11+ — السماح للسكربت:** إذا ظهر تحذير `allow-scripts` ولم تُنشأ ملفات `.opencode/`، شغّل:
|
|
17
|
+
> ```bash
|
|
18
|
+
> npm approve-scripts @tera-system/pro
|
|
19
|
+
> npm install @tera-system/pro --force
|
|
20
|
+
> ```
|
|
21
|
+
> أو مباشرة بدون موافقة:
|
|
22
|
+
> ```bash
|
|
23
|
+
> npx tera-restore
|
|
24
|
+
> # أو
|
|
25
|
+
> node node_modules/@tera-system/pro/scripts/install.js
|
|
26
|
+
> ```
|
|
15
27
|
|
|
16
28
|
ظٹظ…ظƒظ† ط¶ط¨ط· ط§ظ„ظˆط¬ظ‡ط© طµط±ط§طط©ظ‹:
|
|
17
29
|
|
package/RELEASES.md
CHANGED
|
@@ -4,6 +4,33 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
## 0.2.10 (2026-08-29)
|
|
9
|
+
|
|
10
|
+
### First-sale readiness: full content sync with core 0.2.10 + license gates
|
|
11
|
+
|
|
12
|
+
**What changed:**
|
|
13
|
+
- Synced all content from core 0.2.10: 20 agents, 11 commands, tera-system (112 files), tools (8), opencode.tera.example.json (structurizr enabled)
|
|
14
|
+
- License gates preserved/re-injected: every agent has its LICENSE GATE section, every command its license-gate line (verified 1-per-file)
|
|
15
|
+
- Bundle rebuilt with production key (core-bundle-v0.2.10.signed.json) - 200 files incl. assets (pricing calculator v4.3, 35 client templates, structurizr-mcp, architecture) - binary-safe
|
|
16
|
+
|
|
17
|
+
**Why:**
|
|
18
|
+
- First commercial sale prep - client must receive the current system (source ownership SCP-004, calculator v4.3, 5-tool standard SCP-012, voucher templates, etc.)
|
|
19
|
+
|
|
20
|
+
## 0.2.2 (2026-08-28)
|
|
21
|
+
|
|
22
|
+
### حل الاستعادة عند الحذف بالخطأ + توافق npm 11
|
|
23
|
+
|
|
24
|
+
**ما تغيّر:**
|
|
25
|
+
- إضافة `bin` جديد: `tera-restore` و `tera-pro-restore` — نفس حل core لكن للحزمة التجارية
|
|
26
|
+
- توثيق `npm approve-scripts @tera-system/pro` كحل لأمان npm 11
|
|
27
|
+
- قسم "الاستعادة عند الحذف بالخطأ" في README
|
|
28
|
+
|
|
29
|
+
**لماذا هذا التحديث:**
|
|
30
|
+
- نفس مشكلة core — حذف `.opencode/agents` بالخطأ كان يحتاج أمراً صريحاً لا يعتمد على `postinstall`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
7
34
|
## 0.2.1 (2026-08-28)
|
|
8
35
|
|
|
9
36
|
### آلية البروتوتايب الإلزامي + مزامنة المنظومة (مع حماية تجارية)
|
package/WELCOME.md
CHANGED
|
@@ -30,6 +30,13 @@
|
|
|
30
30
|
## ماذا لو توقفت أو حارت؟
|
|
31
31
|
اكتب `/tera-status` (أين أنت) أو `/tera-diagnose` (فحص ذاتي) — أو سلّم النظام جملة بالعربية تصف مقصدك وسيقودك.
|
|
32
32
|
|
|
33
|
+
## هل حذفت ملفات بالخطأ؟
|
|
34
|
+
إذا اختفت ملفات `.opencode/agents/` بعد `npm install` ولم تظهر، شغّل:
|
|
35
|
+
```bash
|
|
36
|
+
npx tera-restore
|
|
37
|
+
```
|
|
38
|
+
ثم أعد فتح OpenCode.
|
|
39
|
+
|
|
33
40
|
---
|
|
34
41
|
|
|
35
42
|
**خلاصة:** أنت لست بحاجة لفهم بنية Tera. شغّل الأوامر الأربعة، وافق، وراجع. هذا كل شيء.
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"structurizr-mcp",
|
|
21
21
|
"structurizr-mcp"
|
|
22
22
|
],
|
|
23
|
-
"enabled":
|
|
24
|
-
"
|
|
25
|
-
"STRUCTURIZR_WORKSPACE_DIR": "
|
|
23
|
+
"enabled": true,
|
|
24
|
+
"environment": {
|
|
25
|
+
"STRUCTURIZR_WORKSPACE_DIR": "architecture",
|
|
26
26
|
"STRUCTURIZR_URL": "http://localhost:8081"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/pro",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
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",
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"LICENSE.md",
|
|
18
18
|
"RELEASES.md"
|
|
19
19
|
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"tera-restore": "scripts/install.js",
|
|
22
|
+
"tera-pro-restore": "scripts/install.js"
|
|
23
|
+
},
|
|
20
24
|
"scripts": {
|
|
21
25
|
"postinstall": "node scripts/install.js",
|
|
22
26
|
"tera-license": "node scripts/tera-license.mjs",
|
package/scripts/build-bundle.mjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @tera-system/pro — Signed Core Bundle Builder
|
|
3
|
+
* @tera-system/pro — Signed Core Bundle Builder (SCP-2026-08-29-013)
|
|
4
4
|
* --------------------------------------------------------------
|
|
5
5
|
* Generates a signed bundle of all core content (agents, commands,
|
|
6
|
-
* tera-system, tools) that the remote server
|
|
6
|
+
* tera-system, tools, assets) that the remote server hosts as a static
|
|
7
7
|
* artifact. The installer/sync module downloads it, verifies the
|
|
8
8
|
* Ed25519 signature, validates hashes, and applies files.
|
|
9
9
|
*
|
|
10
|
+
* Binary-safe: every file is read as raw bytes and embedded as
|
|
11
|
+
* base64url — the pricing calculator (.xlsx) and images survive
|
|
12
|
+
* byte-for-byte.
|
|
13
|
+
*
|
|
10
14
|
* Usage:
|
|
11
15
|
* node scripts/build-bundle.mjs [--out artifacts/core-bundle.json]
|
|
12
16
|
*
|
|
@@ -52,26 +56,29 @@ function loadPrivateKey() {
|
|
|
52
56
|
throw new Error("Private key not found. Set TERA_PRIVATE_KEY_PATH.");
|
|
53
57
|
}
|
|
54
58
|
|
|
59
|
+
// Bundle groups. `assets` is binary-safe and installs to the repo root
|
|
60
|
+
// (project-control/, tera-workshop/, structurizr-mcp/, architecture/).
|
|
55
61
|
const groups = [
|
|
56
62
|
{ name: "agents", relDir: "agents" },
|
|
57
63
|
{ name: "commands", relDir: "commands" },
|
|
58
64
|
{ name: "tera-system", relDir: "core/tera-system" },
|
|
59
65
|
{ name: "tools", relDir: "tools" },
|
|
66
|
+
{ name: "assets", relDir: "assets" },
|
|
60
67
|
];
|
|
61
68
|
|
|
62
|
-
// Collect all bundle files
|
|
69
|
+
// Collect all bundle files — keep raw Buffer (binary-safe)
|
|
63
70
|
const files = [];
|
|
64
71
|
for (const g of groups) {
|
|
65
72
|
const srcDir = path.join(ROOT, g.relDir);
|
|
66
73
|
for (const f of walkFiles(srcDir)) {
|
|
67
|
-
files.push({ path: `${g.name}/${f.rel}`,
|
|
74
|
+
files.push({ path: `${g.name}/${f.rel}`, buf: fs.readFileSync(f.abs) });
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
77
|
|
|
71
|
-
// Build manifest of hashes
|
|
78
|
+
// Build manifest of hashes (over raw bytes)
|
|
72
79
|
const manifest = {};
|
|
73
80
|
for (const f of files) {
|
|
74
|
-
manifest[f.path] = createHash("sha256").update(f.
|
|
81
|
+
manifest[f.path] = createHash("sha256").update(f.buf).digest("hex");
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
// Canonical payload to sign: sorted manifest lines
|
|
@@ -91,7 +98,7 @@ const bundle = {
|
|
|
91
98
|
packageVersion: pkg.version,
|
|
92
99
|
createdAt: new Date().toISOString(),
|
|
93
100
|
contentSha256: canonicalHash,
|
|
94
|
-
files: files.map((f) => ({ path: f.path, data:
|
|
101
|
+
files: files.map((f) => ({ path: f.path, data: f.buf.toString("base64url") })),
|
|
95
102
|
manifest,
|
|
96
103
|
signature,
|
|
97
104
|
};
|
|
@@ -115,4 +122,4 @@ console.log(` contentSha256 : ${canonicalHash}`);
|
|
|
115
122
|
console.log(` signature : ${signature.slice(0, 40)}...`);
|
|
116
123
|
console.log(` full : ${outPath}`);
|
|
117
124
|
console.log(` compact : ${compactPath}`);
|
|
118
|
-
console.log(` size(full) : ${(fs.statSync(outPath).size / 1024).toFixed(1)} KB`);
|
|
125
|
+
console.log(` size(full) : ${(fs.statSync(outPath).size / 1024).toFixed(1)} KB`);
|
package/scripts/lib/bundle.mjs
CHANGED
|
@@ -80,6 +80,7 @@ export function verifyBundle(bundle) {
|
|
|
80
80
|
* - .opencode/commands/
|
|
81
81
|
* - tera-system/
|
|
82
82
|
* - tools/
|
|
83
|
+
* - project-control/, tera-workshop/, structurizr-mcp/, architecture/ (assets group)
|
|
83
84
|
*/
|
|
84
85
|
export function applyBundle(bundle, target, { dryRun = false } = {}) {
|
|
85
86
|
if (!Array.isArray(bundle.files)) return { applied: 0, errors: [] };
|
|
@@ -89,6 +90,7 @@ export function applyBundle(bundle, target, { dryRun = false } = {}) {
|
|
|
89
90
|
commands: path.join(target, ".opencode", "commands"),
|
|
90
91
|
"tera-system": path.join(target, "tera-system"),
|
|
91
92
|
tools: path.join(target, "tools"),
|
|
93
|
+
assets: path.join(target, "."), // calculator, client templates, structurizr-mcp, architecture
|
|
92
94
|
};
|
|
93
95
|
|
|
94
96
|
let applied = 0;
|