@tera-system/core 0.2.0 → 0.2.1
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 +2 -2
- package/package.json +2 -2
- package/scripts/install.js +12 -2
package/MANIFEST.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Build manifest for the Tera System OpenCode Plugin component.",
|
|
5
5
|
"compatibleEnvironments": [
|
|
6
6
|
"opencode"
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"tools": "1f96a2de662c50c5c0a4c62d27ec583671c690163a0b35add036bfdd2b3a1f1a",
|
|
21
21
|
"core/project-control": "cb979181d50e54c9b9b9173ffc890ca021bfaefe9678b1cad4a2f67ceac3dfdd"
|
|
22
22
|
},
|
|
23
|
-
"builtAt": "2026-08-
|
|
23
|
+
"builtAt": "2026-08-26"
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tera-system/core",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Tera System OpenCode Plugin
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Tera System OpenCode Plugin — governance core, 20 agents, 11 commands, distribution tools (personal edition)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
package/scripts/install.js
CHANGED
|
@@ -84,7 +84,7 @@ const target = resolveTarget();
|
|
|
84
84
|
const pkg = JSON.parse(fs.readFileSync(path.join(PKG_ROOT, "package.json"), "utf8"));
|
|
85
85
|
const ownership = loadOwnership(target);
|
|
86
86
|
|
|
87
|
-
const stats = { installed: 0, updated: 0, identical: 0, skippedGroups: 0, conflicts: [] };
|
|
87
|
+
const stats = { installed: 0, updated: 0, identical: 0, adopted: 0, skippedGroups: 0, conflicts: [] };
|
|
88
88
|
|
|
89
89
|
/* ------------------------------- group install ------------------------------- */
|
|
90
90
|
|
|
@@ -102,7 +102,15 @@ function installGroup(group) {
|
|
|
102
102
|
if (fs.existsSync(destFile)) {
|
|
103
103
|
const destHash = sha256(fs.readFileSync(destFile));
|
|
104
104
|
if (destHash === srcHash) {
|
|
105
|
-
|
|
105
|
+
// Identical content — adopt ownership if not already owned.
|
|
106
|
+
// (byte-identical file = package content, so it is safe to claim it.)
|
|
107
|
+
if (!Object.prototype.hasOwnProperty.call(ownership.files, destRel)) {
|
|
108
|
+
ownership.files[destRel] = srcHash;
|
|
109
|
+
stats.adopted++;
|
|
110
|
+
console.log(` [adopt ] ${destRel} — identical, now owned by package`);
|
|
111
|
+
} else {
|
|
112
|
+
stats.identical++;
|
|
113
|
+
}
|
|
106
114
|
continue;
|
|
107
115
|
}
|
|
108
116
|
const owned = Object.prototype.hasOwnProperty.call(ownership.files, destRel);
|
|
@@ -203,6 +211,7 @@ const manifest = {
|
|
|
203
211
|
installed: stats.installed,
|
|
204
212
|
updated: stats.updated,
|
|
205
213
|
identical: stats.identical,
|
|
214
|
+
adopted: stats.adopted,
|
|
206
215
|
skippedGroups: stats.skippedGroups,
|
|
207
216
|
conflicts: stats.conflicts.length,
|
|
208
217
|
},
|
|
@@ -234,6 +243,7 @@ console.log("\n summary:");
|
|
|
234
243
|
console.log(` installed : ${stats.installed}`);
|
|
235
244
|
console.log(` updated : ${stats.updated}`);
|
|
236
245
|
console.log(` identical : ${stats.identical}`);
|
|
246
|
+
console.log(` adopted : ${stats.adopted} (pre-existing identical files now owned)`);
|
|
237
247
|
console.log(` conflicts : ${stats.conflicts.length} (your files kept untouched)`);
|
|
238
248
|
console.log(` skipped : ${stats.skippedGroups} group(s) — user-owned state`);
|
|
239
249
|
console.log(` ownership log : ${path.join(".opencode", MANIFEST_NAME)}\n`);
|