@alessandroraffa/tangyr 3.0.3 → 3.0.4

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.
Files changed (2) hide show
  1. package/dist/index.js +25 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28767,6 +28767,9 @@ function syncMcp2(config, sourceRoot, paths, options, lossReport, logger, provid
28767
28767
  };
28768
28768
  }
28769
28769
  function writeCompiledArtifact(component, destination, content, expectedHash, config, sourceRoot, options, logger, manifest, scopePath) {
28770
+ if (!options.force && isCompiledCurrent(destination, content, expectedHash)) {
28771
+ return { component, status: "skipped-current", path: destination };
28772
+ }
28770
28773
  const artifactClass = classifyArtifact(destination, config, sourceRoot);
28771
28774
  if (artifactClass === "managed-compiled" && !options.force && isCompiledCurrent(destination, content, expectedHash)) {
28772
28775
  return { component, status: "skipped-current", path: destination };
@@ -28846,11 +28849,9 @@ function handleConflict2(destination, config, options, logger, manifest, scopePa
28846
28849
  fs39.rmSync(destination, { recursive: true, force: true });
28847
28850
  return true;
28848
28851
  }
28849
- function isCompiledCurrent(destination, expectedContent, expectedHash) {
28852
+ function isCompiledCurrent(destination, expectedContent, _expectedHash) {
28850
28853
  try {
28851
- const current = fs39.readFileSync(destination, "utf8");
28852
- const marker = extractProvenanceMarker(current);
28853
- return expectedHash ? marker?.hash === expectedHash && marker.target === "codex" && current === expectedContent : current === expectedContent;
28854
+ return fs39.readFileSync(destination, "utf8") === expectedContent;
28854
28855
  } catch {
28855
28856
  return false;
28856
28857
  }
@@ -29389,6 +29390,9 @@ function syncMcp3(config, sourceRoot, paths, options, lossReport, logger) {
29389
29390
  );
29390
29391
  }
29391
29392
  function writeCompiledArtifact2(component, destination, content, expectedHash, config, sourceRoot, options, logger, manifest, scopePath) {
29393
+ if (!options.force && isCompiledCurrent2(destination, content, expectedHash)) {
29394
+ return { component, status: "skipped-current", path: destination };
29395
+ }
29392
29396
  const artifactClass = classifyArtifact(destination, config, sourceRoot);
29393
29397
  if (artifactClass === "managed-compiled" && !options.force && isCompiledCurrent2(destination, content, expectedHash)) {
29394
29398
  return { component, status: "skipped-current", path: destination };
@@ -29406,11 +29410,9 @@ function writeCompiledArtifact2(component, destination, content, expectedHash, c
29406
29410
  fs40.writeFileSync(destination, content);
29407
29411
  return { component, status: "success", path: destination };
29408
29412
  }
29409
- function isCompiledCurrent2(destination, expectedContent, expectedHash) {
29413
+ function isCompiledCurrent2(destination, expectedContent, _expectedHash) {
29410
29414
  try {
29411
- const current = fs40.readFileSync(destination, "utf8");
29412
- const marker = extractProvenanceMarker(current);
29413
- return expectedHash ? marker?.hash === expectedHash && marker.target === "copilot" && current === expectedContent : current === expectedContent;
29415
+ return fs40.readFileSync(destination, "utf8") === expectedContent;
29414
29416
  } catch {
29415
29417
  return false;
29416
29418
  }
@@ -30039,6 +30041,9 @@ function syncProviderPin(config, sourceRoot, lossReport) {
30039
30041
  }
30040
30042
  }
30041
30043
  function writeCompiledArtifact3(component, destination, content, expectedHash, config, sourceRoot, options, logger, manifest, scopePath) {
30044
+ if (!options.force && isCompiledCurrent3(destination, content, expectedHash)) {
30045
+ return { component, status: "skipped-current", path: destination };
30046
+ }
30042
30047
  const artifactClass = classifyArtifact(destination, config, sourceRoot);
30043
30048
  if (artifactClass === "managed-compiled" && !options.force && isCompiledCurrent3(destination, content, expectedHash)) {
30044
30049
  return { component, status: "skipped-current", path: destination };
@@ -30089,11 +30094,9 @@ function handleConflict4(destination, config, options, logger, manifest, scopePa
30089
30094
  fs41.rmSync(destination, { recursive: true, force: true });
30090
30095
  return true;
30091
30096
  }
30092
- function isCompiledCurrent3(destination, expectedContent, expectedHash) {
30097
+ function isCompiledCurrent3(destination, expectedContent, _expectedHash) {
30093
30098
  try {
30094
- const current = fs41.readFileSync(destination, "utf8");
30095
- const marker = extractProvenanceMarker(current);
30096
- return expectedHash ? marker?.hash === expectedHash && marker.target === "cursor" && current === expectedContent : current === expectedContent;
30099
+ return fs41.readFileSync(destination, "utf8") === expectedContent;
30097
30100
  } catch {
30098
30101
  return false;
30099
30102
  }
@@ -30529,6 +30532,9 @@ function syncProviderAndModel(config, sourceRoot, lossReport) {
30529
30532
  }
30530
30533
  }
30531
30534
  function writeCompiledArtifact4(component, destination, content, expectedHash, config, sourceRoot, options, logger, manifest, scopePath) {
30535
+ if (!options.force && isCompiledCurrent4(destination, content, expectedHash)) {
30536
+ return { component, status: "skipped-current", path: destination };
30537
+ }
30532
30538
  const artifactClass = classifyArtifact(destination, config, sourceRoot);
30533
30539
  if (artifactClass === "managed-compiled" && !options.force && isCompiledCurrent4(destination, content, expectedHash)) {
30534
30540
  return { component, status: "skipped-current", path: destination };
@@ -30579,11 +30585,9 @@ function handleConflict5(destination, config, options, logger, manifest, scopePa
30579
30585
  fs42.rmSync(destination, { recursive: true, force: true });
30580
30586
  return true;
30581
30587
  }
30582
- function isCompiledCurrent4(destination, expectedContent, expectedHash) {
30588
+ function isCompiledCurrent4(destination, expectedContent, _expectedHash) {
30583
30589
  try {
30584
- const current = fs42.readFileSync(destination, "utf8");
30585
- const marker = extractProvenanceMarker(current);
30586
- return expectedHash ? marker?.hash === expectedHash && marker.target === "cline" && current === expectedContent : current === expectedContent;
30590
+ return fs42.readFileSync(destination, "utf8") === expectedContent;
30587
30591
  } catch {
30588
30592
  return false;
30589
30593
  }
@@ -31037,6 +31041,9 @@ function syncConfigDoc(paths, mcpEntries, _lossReport, permissionMap, mappings)
31037
31041
  `);
31038
31042
  }
31039
31043
  function writeCompiledArtifact5(component, destination, content, expectedHash, config, sourceRoot, options, logger, manifest, scopePath) {
31044
+ if (!options.force && isCompiledCurrent5(destination, content, expectedHash)) {
31045
+ return { component, status: "skipped-current", path: destination };
31046
+ }
31040
31047
  const artifactClass = classifyArtifact(destination, config, sourceRoot);
31041
31048
  if (artifactClass === "managed-compiled" && !options.force && isCompiledCurrent5(destination, content, expectedHash)) {
31042
31049
  return { component, status: "skipped-current", path: destination };
@@ -31087,11 +31094,9 @@ function handleConflict6(destination, config, options, logger, manifest, scopePa
31087
31094
  fs43.rmSync(destination, { recursive: true, force: true });
31088
31095
  return true;
31089
31096
  }
31090
- function isCompiledCurrent5(destination, expectedContent, expectedHash) {
31097
+ function isCompiledCurrent5(destination, expectedContent, _expectedHash) {
31091
31098
  try {
31092
- const current = fs43.readFileSync(destination, "utf8");
31093
- const marker = extractProvenanceMarker(current);
31094
- return expectedHash ? marker?.hash === expectedHash && marker.target === "opencode" && current === expectedContent : current === expectedContent;
31099
+ return fs43.readFileSync(destination, "utf8") === expectedContent;
31095
31100
  } catch {
31096
31101
  return false;
31097
31102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alessandroraffa/tangyr",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "CLI for the Tangyr discipline — install and manage operating kits for AI coding tools",
5
5
  "license": "MIT",
6
6
  "engines": {