@tera-system/core 0.2.0 → 0.2.2

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.
@@ -1,8 +1,8 @@
1
1
  # Tera Runtime Templates — Delivery & Execution
2
2
 
3
- These are the execution, delivery, and closure templates (Sections 29–34) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
3
+ These are the execution, delivery, closure, and operational-hardening templates (Sections 29–38) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
4
4
  Main file: `tera-system/runtime/TERA_RUNTIME_TEMPLATES.md` (Sections 1–28).
5
- Preparation-phase templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md` (Sections 35–40).
5
+ Preparation-phase templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_PREPARATION.md` (Sections 35–41).
6
6
 
7
7
  ---
8
8
 
@@ -1,8 +1,8 @@
1
1
  # Tera Runtime Templates — Preparation & Blueprint Outputs
2
2
 
3
- These are the preparation-phase templates (Sections 35–40: TCEA outputs and ApplicationBlueprint outputs) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
3
+ These are the preparation-phase templates (Sections 35–41: TCEA outputs, ApplicationBlueprint outputs, and Content Requirements) split from TERA_RUNTIME_TEMPLATES.md via INSPECTION-2026-08-01 (INS-02).
4
4
  Main file: `tera-system/runtime/TERA_RUNTIME_TEMPLATES.md` (Sections 1–28).
5
- Delivery templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` (Sections 29–34).
5
+ Delivery templates: `tera-system/runtime/TERA_RUNTIME_TEMPLATES_DELIVERY.md` (Sections 29–38).
6
6
 
7
7
  ---
8
8
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tera-system/core",
3
- "version": "0.2.0",
4
- "description": "Tera System OpenCode Plugin governance core, 20 agents, 11 commands, distribution tools (personal edition)",
3
+ "version": "0.2.2",
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": {
@@ -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
- stats.identical++;
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`);