@systemfsoftware/omp-claude-compat 1.1.4 → 1.1.5

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.
@@ -0,0 +1,3 @@
1
+ import{t as e}from"./dist-spu_CyKU.js";import{FileSystem as t}from"@effect/platform/FileSystem";import{Effect as n,Either as r,Match as i,Option as a,Schema as o}from"effect";import*as s from"@effect/platform/Path";const c=[`AGENTS.md`];var l=class extends o.TaggedClass()(`Inject`,{}){},u=class extends o.TaggedClass()(`Skip`,{matched:o.String}){};o.Struct({baseName:o.String,skipList:o.Array(o.String)});const d=e=>a.fromNullable(e.skipList.find(t=>t===e.baseName)),f=e=>i.value(d(e)).pipe(i.tag(`None`,()=>new l),i.tag(`Some`,e=>new u({matched:e.value})),i.exhaustive),p=n.fn(`extractRefs`)(function*(e,i,a){let o=yield*t,c=yield*s.Path,l=[];for(let t of e.split(`
2
+ `)){let e=t.trim().replace(/^[-*+]\s+/,``);if(!e.startsWith(`@`))continue;let s=e.slice(1).trim();if(!s||s.includes(` `)||c.isAbsolute(s))continue;let u=c.resolve(i,s);if(u.startsWith(a+`/`)||u===a){let e=yield*n.either(o.exists(u));if(r.isRight(e)&&e.right){l.push({sourcePath:i,resolvedPath:u});continue}}let d=c.resolve(a,s);(d.startsWith(a+`/`)||d===a)&&d!==u&&l.push({sourcePath:a,resolvedPath:d})}return l}),m=n.fn(`loadReferencedContent`)(function*(o){let l=yield*t,u=yield*s.Path,d=yield*e,m=[u.resolve(o,`CLAUDE.md`),u.resolve(o,`.claude`,`CLAUDE.md`)],h=[];for(let e of m){let t=yield*n.either(l.readFileString(e,`utf-8`));if(r.isRight(t)){let n=yield*p(t.right,u.dirname(e),o);h.push(...n)}}let g=new Set,_=[];for(let e of h)g.has(e.resolvedPath)||(g.add(e.resolvedPath),_.push(e));let v=(yield*d.load(o).pipe(n.tapError(e=>n.logWarning(`[omp-claude-compat] could not read systemfsoftware.toml in ${o}; using the default skip list`,e)),n.catchAll(()=>n.succeed(void 0))))?.no_inject_refs??c,y=[];for(let e of _){let t=e.resolvedPath.slice(o.length+1),s=i.value(f({baseName:u.basename(e.resolvedPath),skipList:v})).pipe(i.tag(`Skip`,e=>a.some(e.matched)),i.tag(`Inject`,()=>a.none()),i.exhaustive);if(a.isSome(s)){yield*n.logInfo(`[omp-claude-compat] skipped @-ref ${t}: host already provides ${s.value}`);continue}let c=yield*n.either(l.readFileString(e.resolvedPath,`utf-8`));if(r.isLeft(c)){yield*n.logWarning(`[omp-claude-compat] could not read @-ref ${t}; skipping it`);continue}y.push(`## ${t}\n${c.right}\n`)}return y.length===0?``:[`# Injected @-references from CLAUDE.md`,`The following files were @-imported by CLAUDE.md and contain project rules.`,``,...y].join(`
3
+ `)});export{m as loadReferencedContent};
@@ -0,0 +1 @@
1
+ import{n as e}from"./dist-spu_CyKU.js";import{Layer as t,ManagedRuntime as n}from"effect";import*as r from"@effect/platform/Path";import{NodeCommandExecutor as i,NodeFileSystem as a}from"@effect/platform-node";const o=i.layer.pipe(t.provideMerge(a.layer),t.provideMerge(r.layer)),s=n.make(e.pipe(t.provideMerge(o)));export{s as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/omp-claude-compat",
3
3
  "license": "MIT",
4
- "version": "1.1.4",
4
+ "version": "1.1.5",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "description": "OMP Claude Code compatibility: dispatch .claude/settings.json hooks + inject CLAUDE.md @-references",
7
7
  "type": "module",
@@ -12,28 +12,29 @@
12
12
  "files": [
13
13
  "dist"
14
14
  ],
15
- "dependencies": {
15
+ "peerDependencies": {
16
16
  "@effect/platform": "^0.97.0",
17
17
  "@effect/platform-node": "^0.97.0",
18
+ "@oh-my-pi/pi-coding-agent": "^17.0.5",
18
19
  "effect": "^3.22.0"
19
20
  },
20
- "peerDependencies": {
21
- "@oh-my-pi/pi-coding-agent": "^17.0.5"
22
- },
23
21
  "devDependencies": {
22
+ "@effect/platform": "^0.97.0",
23
+ "@effect/platform-node": "^0.97.0",
24
24
  "@effect/vitest": "0.30.0",
25
25
  "@oh-my-pi/pi-coding-agent": "^17.0.5",
26
26
  "@types/node": "^24",
27
+ "effect": "^3.22.0",
27
28
  "fast-check": "^3",
28
29
  "rimraf": "^6.1.3",
29
30
  "tsdown": "^0.22.9",
30
31
  "typescript": "^7",
31
32
  "vitest": "^4",
32
33
  "@systemfsoftware/effect-gherkin-spec": "^0.3.6",
33
- "@systemfsoftware/omp-utils": "^0.0.0",
34
34
  "@systemfsoftware/effect-memfs": "^1.0.6",
35
- "@systemfsoftware/oxlint-config": "^0.1.0",
36
- "@systemfsoftware/tsconfig": "^1.2.5"
35
+ "@systemfsoftware/omp-utils": "^0.0.0",
36
+ "@systemfsoftware/tsconfig": "^1.2.5",
37
+ "@systemfsoftware/oxlint-config": "^0.1.0"
37
38
  },
38
39
  "omp": {
39
40
  "extensions": [
@@ -53,9 +54,8 @@
53
54
  "directory": "omp/plugins/omp-claude-compat"
54
55
  },
55
56
  "scripts": {
56
- "clean": "rimraf dist",
57
57
  "build": "rimraf dist && tsdown",
58
- "verify-dist": "node ../../scripts/check-dist-builtins.mjs --dist dist/index.js --expect os",
58
+ "clean": "rimraf dist",
59
59
  "typecheck": "tsc --noEmit --incremental",
60
60
  "test": "vitest run",
61
61
  "lint": "oxlint . ${AGENT:+--format=unix --quiet}"