isthmus-cli 0.4.1 → 0.6.0
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/README.ko.md +64 -22
- package/README.md +70 -26
- package/Skills/isthmus/SKILL.md +93 -4
- package/dist/cli/check-command.d.ts +2 -25
- package/dist/cli/check-command.js +27 -181
- package/dist/cli/check-command.js.map +1 -1
- package/dist/cli/command-support.d.ts +48 -0
- package/dist/cli/command-support.js +144 -0
- package/dist/cli/command-support.js.map +1 -0
- package/dist/cli/diff-command.d.ts +1 -1
- package/dist/cli/diff-command.js +1 -1
- package/dist/cli/diff-command.js.map +1 -1
- package/dist/cli/graph-command.d.ts +1 -1
- package/dist/cli/graph-command.js +15 -14
- package/dist/cli/graph-command.js.map +1 -1
- package/dist/cli/impact-command.d.ts +5 -0
- package/dist/cli/impact-command.js +111 -0
- package/dist/cli/impact-command.js.map +1 -0
- package/dist/cli/main.js +35 -13
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/parse-arguments.d.ts +18 -0
- package/dist/cli/parse-arguments.js +48 -0
- package/dist/cli/parse-arguments.js.map +1 -0
- package/dist/cli/preflight-command.d.ts +5 -0
- package/dist/cli/preflight-command.js +83 -0
- package/dist/cli/preflight-command.js.map +1 -0
- package/dist/cli/query-command.d.ts +1 -1
- package/dist/cli/query-command.js +30 -10
- package/dist/cli/query-command.js.map +1 -1
- package/dist/cli/retentions-command.d.ts +1 -1
- package/dist/cli/retentions-command.js +11 -10
- package/dist/cli/retentions-command.js.map +1 -1
- package/dist/cli/runtime-command.d.ts +5 -0
- package/dist/cli/runtime-command.js +42 -0
- package/dist/cli/runtime-command.js.map +1 -0
- package/dist/cli/runtime-json-reader.d.ts +12 -0
- package/dist/cli/runtime-json-reader.js +37 -0
- package/dist/cli/runtime-json-reader.js.map +1 -0
- package/dist/exchange/impact-selection.d.ts +13 -0
- package/dist/exchange/impact-selection.js +35 -0
- package/dist/exchange/impact-selection.js.map +1 -0
- package/dist/exchange/kartograph-impact.d.ts +4 -0
- package/dist/exchange/kartograph-impact.js +169 -0
- package/dist/exchange/kartograph-impact.js.map +1 -0
- package/dist/exchange/messages.d.ts +51 -0
- package/dist/exchange/messages.js +126 -0
- package/dist/exchange/messages.js.map +1 -0
- package/dist/exchange/parse.d.ts +8 -0
- package/dist/exchange/parse.js +12 -8
- package/dist/exchange/parse.js.map +1 -1
- package/dist/exchange/preflight-context.d.ts +71 -0
- package/dist/exchange/preflight-context.js +317 -0
- package/dist/exchange/preflight-context.js.map +1 -0
- package/dist/exchange/producer-impact.d.ts +17 -0
- package/dist/exchange/producer-impact.js +226 -0
- package/dist/exchange/producer-impact.js.map +1 -0
- package/dist/exchange/runtime.d.ts +69 -0
- package/dist/exchange/runtime.js +160 -0
- package/dist/exchange/runtime.js.map +1 -0
- package/dist/join/message-address.d.ts +7 -0
- package/dist/join/message-address.js +37 -0
- package/dist/join/message-address.js.map +1 -0
- package/dist/join/messages.d.ts +23 -0
- package/dist/join/messages.js +80 -0
- package/dist/join/messages.js.map +1 -0
- package/dist/report/diff.d.ts +40 -33
- package/dist/report/diff.js +8 -4
- package/dist/report/diff.js.map +1 -1
- package/dist/report/impact.d.ts +62 -0
- package/dist/report/impact.js +168 -0
- package/dist/report/impact.js.map +1 -0
- package/dist/report/preflight-runtime.d.ts +42 -0
- package/dist/report/preflight-runtime.js +193 -0
- package/dist/report/preflight-runtime.js.map +1 -0
- package/dist/report/preflight-view.d.ts +146 -0
- package/dist/report/preflight-view.js +189 -0
- package/dist/report/preflight-view.js.map +1 -0
- package/dist/report/preflight.d.ts +104 -0
- package/dist/report/preflight.js +296 -0
- package/dist/report/preflight.js.map +1 -0
- package/dist/report/query.js +9 -2
- package/dist/report/query.js.map +1 -1
- package/dist/report/runtime-impact.d.ts +38 -0
- package/dist/report/runtime-impact.js +94 -0
- package/dist/report/runtime-impact.js.map +1 -0
- package/dist/report/runtime.d.ts +54 -0
- package/dist/report/runtime.js +137 -0
- package/dist/report/runtime.js.map +1 -0
- package/dist/report/sarif.d.ts +9 -2
- package/dist/report/sarif.js +4 -10
- package/dist/report/sarif.js.map +1 -1
- package/dist/report/sorted-json.d.ts +1 -1
- package/dist/report/sorted-json.js +2 -2
- package/dist/report/sorted-json.js.map +1 -1
- package/docs/BRIDGE-MESSAGES.md +102 -0
- package/docs/GRAPH-EXCHANGE.md +255 -0
- package/docs/IMPACT.md +96 -0
- package/docs/PREFLIGHT.md +295 -0
- package/docs/RUNTIME.md +172 -0
- package/docs/TOOLCHAIN.md +101 -0
- package/package.json +11 -2
- package/scripts/build-preflight-toolchain.mjs +186 -0
- package/scripts/capture-preflight.mjs +392 -0
- package/scripts/run-child.mjs +16 -0
package/README.ko.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# isthmus
|
|
2
2
|
|
|
3
3
|
크로스플랫폼 앱에서 **언어 경계를 넘는 호출**을 그래프로 잇는 도구.
|
|
4
|
-
[cartograph](https://github.com/ictechgy/cartograph)(Swift) · kartograph(Kotlin
|
|
4
|
+
[cartograph](https://github.com/ictechgy/cartograph)(Swift) · [kartograph](https://github.com/ictechgy/kartograph)(Kotlin) ·
|
|
5
5
|
[dartograph](https://github.com/ictechgy/dartograph)(Dart)가 각자 그린 지도를 하나로 붙인다.
|
|
6
6
|
|
|
7
7
|
[English](README.md)
|
|
@@ -22,29 +22,25 @@ React Native나 Flutter 앱의 네이티브 코드는 JS/Dart가 **문자열 이
|
|
|
22
22
|
|
|
23
23
|
isthmus는 각 언어 도구가 내보낸 **브리지 사실**(채널 이름 · 메서드 이름 · 등록 지점 ·
|
|
24
24
|
호출 지점)을 문자열 키로 조인해서, 경계를 넘는 간선을 만들고 위 세 가지를 답한다.
|
|
25
|
-
그리고 그 결과를 cartograph
|
|
25
|
+
그리고 그 결과를 cartograph에 **보존 근거로 돌려준다** — "Swift
|
|
26
26
|
`CameraHandler.takePhoto`는 `lib/camera.dart:42`가 채널 `com.example/camera`로 부르므로
|
|
27
27
|
보존".
|
|
28
28
|
|
|
29
29
|
## 상태
|
|
30
30
|
|
|
31
|
-
**0.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
도그푸딩과 React Native 지원이다.
|
|
45
|
-
|
|
46
|
-
정식 producer는 cartograph 0.5.3 이상과 dartograph 0.1.1 이상이다. 두 도구의 실제 출력과
|
|
47
|
-
공개 battery 플러그인의 Swift USR·Dart 호출 근거 왕복을 검증했다.
|
|
31
|
+
**0.6.0**은 Flutter Dart ↔ Swift/Kotlin 변경 사전 점검, MethodChannel·Pigeon/BasicMessageChannel
|
|
32
|
+
사실, 명시한 런타임 시나리오 대조와 내용 기반 수집 캐시를 지원한다. `impact
|
|
33
|
+
--file`/`--symbol`/`--changes`(정보 손실 없는 `--compact` JSON과 분석 공백도 실패시키는
|
|
34
|
+
`--strict` 포함), producer 전이 영향 경로를 다루는 `preflight <context.json>`의
|
|
35
|
+
`--summary`/`--explain`, `verify-runtime --expectations`가 추가됐다. 실제 macOS·Android
|
|
36
|
+
검증 앱에서 공개 플러그인 API를 실행했다. 설정과 측정 범위는 [사전 점검](docs/PREFLIGHT.md),
|
|
37
|
+
[런타임 검증](docs/RUNTIME.md), [고정 소스 구축](docs/TOOLCHAIN.md)을 참조한다.
|
|
38
|
+
|
|
39
|
+
npm 발행본은 **0.6.0**이며 위 기능은 호환되는 producer 개발 commit이 필요하다. 발행된
|
|
40
|
+
Dart/Swift MethodChannel 절차는 cartograph 0.5.3 이상과 dartograph 0.1.1 이상을 사용하며
|
|
41
|
+
공개 battery 플러그인으로 검증했다. Message channel 지원은 현재 개발 producer가 필요하다.
|
|
42
|
+
React Native·EventChannel 추출은 계획이고 보존 근거 내보내기는 현재 cartograph(Swift)를
|
|
43
|
+
대상으로 한다. 앱 전체 적용 범위와 최초 외부 사용자 구축은 아직 검증하지 않았다.
|
|
48
44
|
|
|
49
45
|
| 문서 | 내용 |
|
|
50
46
|
|---|---|
|
|
@@ -86,7 +82,38 @@ npx isthmus-cli --help
|
|
|
86
82
|
|
|
87
83
|
## 사용
|
|
88
84
|
|
|
89
|
-
|
|
85
|
+
`impact --file`·`--symbol`·`--changes` 사전 점검과 정보 손실 없는 `--compact`, 분석
|
|
86
|
+
공백도 실패시키는 `--strict`를 제공한다. 빌드·계약·현재 브리지 한정 범위는
|
|
87
|
+
[변경 사전 점검](docs/IMPACT.md)을 참조한다.
|
|
88
|
+
Android 개발 지원은 `selection.kotlin`과 Kartograph snapshot을 사용한다. Kotlin Method/Basic
|
|
89
|
+
사실을 Dart 소비자에 연결하고 Android 실행은 Kotlin 후보에만 대조한다.
|
|
90
|
+
[Android 수집 설정](docs/PREFLIGHT.md#android-수집)과 [선택적 Kotlin 도구 구축](docs/TOOLCHAIN.md)을 참조한다.
|
|
91
|
+
`verify-runtime --expectations`는 revision·시나리오·플랫폼·엔진 인스턴스별
|
|
92
|
+
통신 기록을 대조한다([계약](docs/RUNTIME.md)). 선택적 [Flutter 수집기](packages/isthmus_runtime/README.md)는
|
|
93
|
+
실제 macOS·Android 앱에서 핸들러와 `url_launcher_macos 3.2.2`·
|
|
94
|
+
`shared_preferences_android 2.4.1`의 Pigeon 생성 API로 검증했다.
|
|
95
|
+
언어 내부 전이 영향 연결과 스냅샷 수집은 구현됐으며, 더 넓은 앱 적용 범위와
|
|
96
|
+
처음 설치하는 사용자의 재현 절차는 검증 중이다.
|
|
97
|
+
|
|
98
|
+
0.6.0의 `preflight <context.json> --strict --compact`는 producer의 전이 영향과
|
|
99
|
+
브리지를 연결한다. 별도 수집 workflow는 명시된 입력의 내용 해시로 캐시를 재사용하며,
|
|
100
|
+
실제 producer를 사용한 합성 소스 검증을 통과했다. 사용법·지원 경계·CI 설정은
|
|
101
|
+
[언어 간 변경 사전 점검](docs/PREFLIGHT.md)을 참조한다. 실제 앱 전체 검증은 남아 있다.
|
|
102
|
+
runtime JSON과 `--expectations <checks.json>`를 함께 주면 같은 revision의 실행과
|
|
103
|
+
전이 분석을 대조하고, native 후보·미관찰 경계·시나리오 누락을 기존 정적 공백과 함께 보고한다.
|
|
104
|
+
|
|
105
|
+
`preflight <context.json> --summary --strict --compact`로 작은 개요를 읽고,
|
|
106
|
+
`--explain <exact-producer-symbol-id>`로 한 심볼의 전체 원인 경로를 조회한다.
|
|
107
|
+
summary는 목록당 기본 20개(`--limit 1..100`)를 표시하며 생략한 항목도 검토 상태에 반영한다.
|
|
108
|
+
선택적 [Basic/Pigeon v2 입력](docs/BRIDGE-MESSAGES.md)은 개발 producer로 literal 주소와
|
|
109
|
+
증명된 prefix 후보를 연결한다. prefix의 suffix·instance 배선 불확실성은 유지한다.
|
|
110
|
+
이 추가 기능에는 개발 producer가 필요하다.
|
|
111
|
+
호환 개발 도구를 로컬 Git의 고정 commit에서 새로 구축하는 방법은
|
|
112
|
+
[도구 구축 절차](docs/TOOLCHAIN.md)에 있다. Dart AOT 실행 파일, impact와 Basic을 함께
|
|
113
|
+
제공하는 Cartograph, 격리 설치된 isthmus 패키지를 준비한다.
|
|
114
|
+
|
|
115
|
+
isthmus CLI는 각 도구가 만든 JSON 파일을 읽는다. 선택적 수집 workflow는 설정에
|
|
116
|
+
명시한 준비·producer 명령을 실행한다.
|
|
90
117
|
|
|
91
118
|
```bash
|
|
92
119
|
isthmus check dart-bridges.json swift-bridges.json
|
|
@@ -105,6 +132,14 @@ isthmus --version
|
|
|
105
132
|
isthmus check dart-bridges.json swift-bridges.json --strict
|
|
106
133
|
```
|
|
107
134
|
|
|
135
|
+
옵션은 어떤 명령에서든 입력 파일 앞뒤 어디에 와도 된다
|
|
136
|
+
(`isthmus graph --format dot dart-bridges.json swift-bridges.json`도 동작).
|
|
137
|
+
`-`로 시작하는 값은 항상 다음 옵션으로 읽히므로, `-`로 시작하는 경로나 이름은
|
|
138
|
+
옵션 해석을 끝내는 `--` 구분자 뒤에 쓴다:
|
|
139
|
+
`isthmus query -- -unusual-name dart-bridges.json swift-bridges.json`.
|
|
140
|
+
`-h`/`--help`는 어느 위치에 있든 도움말을 내고, `isthmus help <command>`로 명령의
|
|
141
|
+
사용법을 볼 수 있으며, 모르는 명령은 루트 도움말을 출력한다.
|
|
142
|
+
|
|
108
143
|
### SARIF 출력
|
|
109
144
|
|
|
110
145
|
check 결과를 GitHub code scanning(또는 그 밖의 SARIF 2.1.0 소비자)에 올리려면
|
|
@@ -164,7 +199,8 @@ cartograph dead --external-retentions external-retentions.json
|
|
|
164
199
|
여러 위치에서 호출하면 근거가 전체 호출 위치를 `callers`로 실고(대표 `caller`는 옛
|
|
165
200
|
소비자를 위해 유지), 근거당 100개 상한을 넘은 호출은 조용히 버리지 않고
|
|
166
201
|
`callersOmitted`로 계수를 밝힌다. `mixed-targets` 문서는 v1에서 사실별 target을
|
|
167
|
-
복원할 수 없어 모든 소비 명령이 종료 코드 2로 조인을
|
|
202
|
+
복원할 수 없어 모든 소비 명령이 종료 코드 2로 조인을 보류하며, 이때 몇 개의 문서에서
|
|
203
|
+
관찰한 fact 몇 개가 조인되지 못했는지를 함께 알린다. 먼저 생산 단계에서
|
|
168
204
|
target별 문서로 분리해야 한다.
|
|
169
205
|
|
|
170
206
|
cartograph는 Swift 심볼만 보존하므로 `--for cartograph`는 수신 측 Swift 문서를 최소
|
|
@@ -217,6 +253,11 @@ isthmus graph dart-bridges.json swift-bridges.json --format mermaid
|
|
|
217
253
|
|
|
218
254
|
`query`는 같은 메서드가 여러 채널에 있으면 후보를 반환하고 임의로 고르지 않는다.
|
|
219
255
|
반환된 `qualifiedName`을 같은 subject 자리에 넣어 정확한 후보를 다시 조회할 수 있다.
|
|
256
|
+
`qualifiedName`은 `target:` 뒤에 퍼센트 이스케이프된 구성 요소가 붙는 형태로
|
|
257
|
+
`%`·`#`·`:`가 모두 이스케이프되므로, 첫 `:`와 `#` 기준으로 나눈 뒤 디코딩하면
|
|
258
|
+
채널·메서드 이름이 항상 되돌아온다. `notFound`·`ambiguous` 질의는 종료 코드 64와
|
|
259
|
+
함께 원인 한 줄을 stderr에 출력하므로, 스크립트가 stdout을 파싱하지 않고도
|
|
260
|
+
호출 오류와 이름 부재를 구분할 수 있다.
|
|
220
261
|
`graph`는 매치된 간선만 내보내며, 입력의 `limitations`를 JSON 필드 또는 DOT/Mermaid
|
|
221
262
|
주석으로 보존한다. 증거의 Cartesian 곱이 100,000개 간선을 넘으면 메모리 폭주를 막기
|
|
222
263
|
위해 종료 코드 2로 실패한다.
|
|
@@ -343,7 +384,8 @@ JSON으로 출력한다. 연결에는 호출자와 핸들러 위치가 포함된
|
|
|
343
384
|
이전 불일치가 더 이상 관찰되지 않는다는 뜻이며, 동적 전환·추출기 변경 때문인지 한계를
|
|
344
385
|
함께 확인해야 한다. `--strict`은 인자 위치와 무관하게 인식하며 두 번 이상 줄 수 없다.
|
|
345
386
|
|
|
346
|
-
|
|
387
|
+
개발 소스의 diff는 Flutter Dart와 Swift 또는 Kotlin 문서를 받는다. 한 비교에는 native 언어
|
|
388
|
+
하나만 사용하며 각 시점에 호출/수신 문서가 모두 필요하다.
|
|
347
389
|
양 시점의 `project`와 플랫폼·도구별 문서 개수가 같아야 한다. 한 checkout의 같은
|
|
348
390
|
경로에서 각 revision을 빌드해 JSON을 보관한다. 일부 파일만 추출한 결과와 전체 결과를
|
|
349
391
|
비교하지 말고 같은 분석 설정을 사용한다. 입력 파일은 합계 256개, 텍스트 길이 제한은
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# isthmus
|
|
2
2
|
|
|
3
3
|
**Cross-language bridge calls in cross-platform apps, joined into one graph.**
|
|
4
|
-
[cartograph](https://github.com/ictechgy/cartograph) (Swift) · kartograph (Kotlin
|
|
4
|
+
[cartograph](https://github.com/ictechgy/cartograph) (Swift) · [kartograph](https://github.com/ictechgy/kartograph) (Kotlin) ·
|
|
5
5
|
[dartograph](https://github.com/ictechgy/dartograph) (Dart) each draw their own map; isthmus
|
|
6
6
|
joins them into one.
|
|
7
7
|
|
|
@@ -24,32 +24,26 @@ see these strings. As a result:
|
|
|
24
24
|
|
|
25
25
|
isthmus joins the **bridge facts** each language tool exports (channel names, method names,
|
|
26
26
|
registration sites, invocation sites) by string key, builds the edges that cross the boundary,
|
|
27
|
-
and answers those three questions. It then hands the result **back to cartograph
|
|
27
|
+
and answers those three questions. It then hands the result **back to cartograph as
|
|
28
28
|
retention evidence** — "keep Swift `CameraHandler.takePhoto`, because `lib/camera.dart:42`
|
|
29
29
|
calls it over channel `com.example/camera`".
|
|
30
30
|
|
|
31
31
|
## Status
|
|
32
32
|
|
|
33
|
-
**0.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
itself come back as undecidable, not as mismatches, and gap mitigation never leaks across
|
|
48
|
-
targets. Next: dogfooding it on a real Flutter app, and React Native support.
|
|
49
|
-
|
|
50
|
-
The supported producers are cartograph 0.5.3+ and dartograph 0.1.1+. Both were verified on
|
|
51
|
-
their real output, and on a Swift USR ↔ Dart invocation evidence round trip over the public
|
|
52
|
-
battery plugin.
|
|
33
|
+
**0.6.0** supports Flutter Dart ↔ Swift/Kotlin change preflight, MethodChannel and
|
|
34
|
+
Pigeon/BasicMessageChannel facts, declared runtime scenarios, and content-based capture reuse.
|
|
35
|
+
It adds `impact --file`/`--symbol`/`--changes` (with lossless `--compact` JSON and a
|
|
36
|
+
gap-aware `--strict` gate), `preflight <context.json>` with `--summary`/`--explain` over
|
|
37
|
+
producer impact paths, and `verify-runtime --expectations`. Actual macOS and Android fixture
|
|
38
|
+
apps have exercised public plugin APIs. See [preflight](docs/PREFLIGHT.md),
|
|
39
|
+
[runtime verification](docs/RUNTIME.md), and
|
|
40
|
+
[building from pinned source commits](docs/TOOLCHAIN.md) for setup and measured limits.
|
|
41
|
+
|
|
42
|
+
The published npm version is **0.6.0**; these features require compatible producer commits.
|
|
43
|
+
The published Dart/Swift MethodChannel workflow uses cartograph 0.5.3+ and dartograph
|
|
44
|
+
0.1.1+; message-channel support currently needs development producers.
|
|
45
|
+
React Native and EventChannel extraction remain planned. Retention export currently targets
|
|
46
|
+
cartograph (Swift). Full application coverage and first-time external setup remain unverified.
|
|
53
47
|
|
|
54
48
|
| Document | Contents |
|
|
55
49
|
|---|---|
|
|
@@ -94,7 +88,43 @@ Do not use `npx isthmus` — that installs a different package with the same nam
|
|
|
94
88
|
|
|
95
89
|
## Usage
|
|
96
90
|
|
|
97
|
-
|
|
91
|
+
Change preflight is available with `impact --file`, `--symbol`, or `--changes`, plus
|
|
92
|
+
lossless `--compact` JSON and a gap-aware `--strict` gate. See
|
|
93
|
+
[change preflight](docs/IMPACT.md) for the build command, contract, and current
|
|
94
|
+
bridge-only scope.
|
|
95
|
+
Android development support uses `selection.kotlin` and a Kartograph snapshot. It connects
|
|
96
|
+
Kotlin Method/Basic facts to Dart consumers and matches Android observations only to Kotlin
|
|
97
|
+
candidates. See [Android capture](docs/PREFLIGHT.md#android-수집) and [toolchain builds](docs/TOOLCHAIN.md).
|
|
98
|
+
`verify-runtime --expectations` checks recorded calls
|
|
99
|
+
by revision, scenario, platform, and engine instance. See the [runtime contract](docs/RUNTIME.md).
|
|
100
|
+
The optional [Flutter recorder](packages/isthmus_runtime/README.md) has been exercised
|
|
101
|
+
in real macOS and Android apps, including the Pigeon-generated APIs of
|
|
102
|
+
`url_launcher_macos 3.2.2` and `shared_preferences_android 2.4.1`. Transitive producer impact
|
|
103
|
+
and snapshot capture are implemented; broader application coverage and first-time setup remain
|
|
104
|
+
under validation.
|
|
105
|
+
|
|
106
|
+
0.6.0 exposes `preflight <context.json> --strict --compact` to compose
|
|
107
|
+
producer impact paths across the bridge. A separate capture workflow caches declared
|
|
108
|
+
input content and has passed a synthetic source test with real producers. See
|
|
109
|
+
[cross-language preflight](docs/PREFLIGHT.md) for the contract, CI setup, and remaining
|
|
110
|
+
real-application validation.
|
|
111
|
+
To combine that context with recorded execution, pass runtime JSON files and
|
|
112
|
+
`--expectations <checks.json>`. Preflight reports revision alignment, native candidates,
|
|
113
|
+
and static boundaries missing observations or declared scenarios; existing static gaps remain visible.
|
|
114
|
+
|
|
115
|
+
Use `preflight <context.json> --summary --strict --compact` for a bounded overview, then
|
|
116
|
+
`--explain <exact-producer-symbol-id>` for a complete path to one symbol. Summary defaults
|
|
117
|
+
to 20 items per collection (`--limit 1..100`); omitted items still affect review status.
|
|
118
|
+
Optional [Basic/Pigeon v2 inputs](docs/BRIDGE-MESSAGES.md) connect literal addresses and
|
|
119
|
+
proven prefix candidates with development producers. Prefix matches preserve unresolved
|
|
120
|
+
suffix and instance wiring. These additions require development producers.
|
|
121
|
+
To build compatible development tools from pinned local Git commits, use the
|
|
122
|
+
[toolchain build workflow (Korean)](docs/TOOLCHAIN.md). It produces a standalone
|
|
123
|
+
Dart executable, a Cartograph executable with both impact and message support,
|
|
124
|
+
and an isolated installation of the isthmus package.
|
|
125
|
+
|
|
126
|
+
The isthmus CLI reads JSON produced by the sister tools. The optional capture workflow
|
|
127
|
+
runs the preparation and producer commands declared in its configuration:
|
|
98
128
|
|
|
99
129
|
```bash
|
|
100
130
|
isthmus check dart-bridges.json swift-bridges.json
|
|
@@ -113,6 +143,13 @@ To make CI fail when bridge errors exist, add `--strict`:
|
|
|
113
143
|
isthmus check dart-bridges.json swift-bridges.json --strict
|
|
114
144
|
```
|
|
115
145
|
|
|
146
|
+
Options may appear before or after the input files in any command (`isthmus graph --format dot
|
|
147
|
+
dart-bridges.json swift-bridges.json` works). Because a value that starts with `-` is always
|
|
148
|
+
read as the next option, paths or names that begin with `-` go after a `--` separator, which
|
|
149
|
+
ends option parsing: `isthmus query -- -unusual-name dart-bridges.json swift-bridges.json`.
|
|
150
|
+
`-h`/`--help` shows help from any position, `isthmus help <command>` names a command's usage,
|
|
151
|
+
and an unknown command prints the root help.
|
|
152
|
+
|
|
116
153
|
### SARIF output
|
|
117
154
|
|
|
118
155
|
To upload check results to GitHub code scanning (or any SARIF 2.1.0 consumer), ask for SARIF
|
|
@@ -176,7 +213,8 @@ invoked from several caller locations, the evidence carries all of them in `call
|
|
|
176
213
|
representative first `caller` stays for older consumers) and counts any entries beyond the
|
|
177
214
|
100-per-retention cap in `callersOmitted` instead of dropping them silently. A
|
|
178
215
|
`mixed-targets` document cannot have per-fact targets restored in v1, so every consuming
|
|
179
|
-
command defers the join with exit code 2
|
|
216
|
+
command defers the join with exit code 2, reporting how many observed facts across how many
|
|
217
|
+
documents could not be joined; split such a document per target at production time
|
|
180
218
|
first.
|
|
181
219
|
|
|
182
220
|
cartograph retains Swift symbols only, so `--for cartograph` requires at least one
|
|
@@ -231,7 +269,12 @@ isthmus graph dart-bridges.json swift-bridges.json --format mermaid
|
|
|
231
269
|
```
|
|
232
270
|
|
|
233
271
|
When the same method exists on several channels, `query` returns candidates instead of picking
|
|
234
|
-
one; feed a returned `qualifiedName` back into the same subject position to disambiguate.
|
|
272
|
+
one; feed a returned `qualifiedName` back into the same subject position to disambiguate. A
|
|
273
|
+
`qualifiedName` is `target:` followed by percent-escaped components — `%`, `#`, and `:` are
|
|
274
|
+
escaped — so splitting on the first `:` and on `#` and decoding the parts always recovers the
|
|
275
|
+
channel and method names. A `notFound` or `ambiguous` query exits 64 and prints a one-line
|
|
276
|
+
cause on stderr, so a script can tell a bad invocation from a missing name without parsing
|
|
277
|
+
stdout.
|
|
235
278
|
`graph` emits matched edges only and preserves the input `limitations` as a JSON field or as
|
|
236
279
|
DOT/Mermaid comments. If the Cartesian product of evidence would exceed 100,000 edges, the
|
|
237
280
|
command fails with exit code 2 to prevent a memory blowup.
|
|
@@ -373,7 +416,8 @@ analyzed". `resolvedIssues` likewise means a previous mismatch is no longer obse
|
|
|
373
416
|
the limitations to see whether a dynamic transition or an extractor change caused it.
|
|
374
417
|
`--strict` is recognized at any argument position and cannot be given more than once.
|
|
375
418
|
|
|
376
|
-
`diff`
|
|
419
|
+
Development `diff` accepts Flutter Dart plus either Swift or Kotlin documents. Keep one native language per comparison.
|
|
420
|
+
Both sender and receiver documents are required at
|
|
377
421
|
each point in time, and the two snapshots must agree on `project` and on the per-platform,
|
|
378
422
|
per-tool document counts. Build each revision from the same checkout path and keep the JSON.
|
|
379
423
|
Do not compare a partial extraction against a full one; use the same analysis settings. Input
|
package/Skills/isthmus/SKILL.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: isthmus
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
cartograph retention evidence
|
|
6
|
-
|
|
4
|
+
Inspect file or symbol changes across Flutter Dart-to-Swift/Kotlin bridges, trace callers,
|
|
5
|
+
compare snapshots, or produce cartograph retention evidence. Use before changing
|
|
6
|
+
MethodChannel or Pigeon/Basic handlers and their Dart callers; RN extraction is not supported.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# isthmus
|
|
@@ -16,11 +16,88 @@ analysis evidence; it does not authorize source edits, deletion, publishing, or
|
|
|
16
16
|
Use `isthmus-cli` 0.1.4+ (`isthmus` binary), cartograph 0.5.3+ and dartograph 0.1.1+.
|
|
17
17
|
Obtain both Dart and Swift bridge-facts JSON with identical project roots and analysis scope.
|
|
18
18
|
Swift production requires a built compiler index; use `cartograph bridges --target flutter --format json`.
|
|
19
|
+
Android preflight requires development Kotlin support: obtain Kotlin facts using
|
|
20
|
+
`kartograph bridges --project <root> --target flutter --graph-file <snapshot.json>`.
|
|
21
|
+
For Basic/Pigeon add `--messages`. A snapshot must come from the same prepared source/build;
|
|
22
|
+
source-only names are not compiler symbol identities. Use `selection.kotlin` in the context.
|
|
23
|
+
The capture workflow accepts `kartograph` and `kartographSnapshot`; Android-only capture does
|
|
24
|
+
not require cartograph. Fingerprint the Kartograph launcher and its runtime library directory.
|
|
25
|
+
For an app-local Pigeon package, explicitly include its source in Dartograph's `source_packages`
|
|
26
|
+
configuration and in capture inputs; see `docs/PREFLIGHT.md`. A runtime success alone does not
|
|
27
|
+
establish a static path from the Kotlin implementation through the generated Dart API to the app caller.
|
|
19
28
|
Do not fabricate missing facts or rewrite project identifiers just to make a join pass.
|
|
20
29
|
If inputs are missing, identify the required files and proceed with independent authorized work.
|
|
21
30
|
|
|
22
31
|
## Choose the requested operation
|
|
23
32
|
|
|
33
|
+
- Trace transitive cross-language impact when a current producer context is available
|
|
34
|
+
(development source, after 0.5.0):
|
|
35
|
+
`isthmus preflight <context.json> --summary --strict --compact`.
|
|
36
|
+
Add `--revision <expected-capture-revision>` when the workflow supplied that revision.
|
|
37
|
+
Read the whole-report `summary` and `requiresReview`, then bounded collections
|
|
38
|
+
`{total, items, omitted}` for roots, affected symbols, review files and limitations.
|
|
39
|
+
Default display limit is 20; `--limit <1..100>` only applies to summary. Omitted
|
|
40
|
+
entries were analyzed and still affect status. For a requested symbol's complete
|
|
41
|
+
root-to-target path, replace `--summary` with `--explain <exact-key-or-producer-id>`
|
|
42
|
+
from the preview. Exact qualifiedName is also accepted; ambiguous matches return
|
|
43
|
+
candidates with code 64. `result.path` is a full array; each step's relations are
|
|
44
|
+
bounded. Describe those actual steps; do not substitute a similarly named root
|
|
45
|
+
from summary. A path through shared registration may be broader than the requested
|
|
46
|
+
method's execution path. Do not combine summary and explain. Omit both flags only when the full
|
|
47
|
+
report is needed; it includes `affected[].via`, `boundaries` and all evidence.
|
|
48
|
+
Distinguish language use edges
|
|
49
|
+
from bridge evidence; dependency boundaries do not imply changes to every caller
|
|
50
|
+
of an unchanged native handler. Do not repeat queries for evidence already present.
|
|
51
|
+
Use the source-generation workflow to refresh stale context; do not hand-author
|
|
52
|
+
missing producer identities or analyses. The separate `scripts/capture-preflight.mjs`
|
|
53
|
+
workflow executes configured preparation and producer commands, so use the project's
|
|
54
|
+
established configuration and existing authorization. Its fingerprint covers declared
|
|
55
|
+
inputs; inspect that scope before reusing the cache. The `.sources.json` sidecar retains
|
|
56
|
+
original producer reports. Report paths are relative to `project`; verify existence
|
|
57
|
+
before making local links. Code 1 preserves a usable report with gaps; `noChanges`
|
|
58
|
+
only means no modeled source selection. To also verify runtime evidence, use
|
|
59
|
+
`isthmus preflight <context.json> <runtime.json> [more...] --expectations <checks.json> --summary --strict --compact`.
|
|
60
|
+
Read `runtime.aligned` as well as `runtime.verification.status`, `unobservedBoundaries`,
|
|
61
|
+
`uncoveredBoundaries`, and route `staticStatus`. Passing unrelated scenarios or matching
|
|
62
|
+
old expectations/logs cannot verify the current change. Basic/Pigeon static support
|
|
63
|
+
requires optional v2 `context.messages` from both producers; without it Basic is
|
|
64
|
+
unsupported for static matching. `matching: prefix` remains a possible address
|
|
65
|
+
family, with unresolved suffix/instance wiring even after a successful runtime call.
|
|
66
|
+
Address matches remain native candidates. Raw message limitations appear separately
|
|
67
|
+
as `messageLimitations` when message inputs are present.
|
|
68
|
+
Android observations match Kotlin candidates; iOS/macOS observations match Swift candidates.
|
|
69
|
+
In a mixed native context, one platform's success does not cover the other platform.
|
|
70
|
+
Follow each route's candidateKey; do not group native candidates by channel name alone.
|
|
71
|
+
For a runtime-only dynamic route, follow `candidateKey` into `runtime.candidates` for
|
|
72
|
+
native source evidence. In summary/explanation, `candidates.items[].handlers` is a
|
|
73
|
+
bounded collection of source locations/symbols; report its `omitted` count. The full
|
|
74
|
+
report uses `handlersOmitted` for its native-candidate display cap.
|
|
75
|
+
`passedChecks` counts expectations, not distinct scenarios. In summary/explanation,
|
|
76
|
+
`runtime.verification.declaredScenarioPlatforms` counts unique declared scenario/platform
|
|
77
|
+
pairs; it is not a count of passing scenarios. Multiple checks can share one scenario.
|
|
78
|
+
- Preflight a source change: check `isthmus --help` for `impact` (added after the
|
|
79
|
+
published 0.5.0; currently requires a build of the development source).
|
|
80
|
+
Run `isthmus impact --file <project-relative-path> <dart.json> <swift.json> --strict --compact`;
|
|
81
|
+
for a precise producer symbol use `--symbol <qualifiedName-or-usr>` instead.
|
|
82
|
+
For multiple files, pass `--changes <json>` with
|
|
83
|
+
`{"format":"isthmus-changes","version":1,"files":["lib/camera.dart","ios/Camera.swift"]}`.
|
|
84
|
+
Read `reviewFiles`, `methods` (callers and handlers), `issues`, `selectedFacts`,
|
|
85
|
+
`unmatchedSelectors`, and `relevantLimitations` in one response. Channel wiring
|
|
86
|
+
changes include every observed method on that channel. Compact output loses no evidence.
|
|
87
|
+
Impact already includes both sides; do not repeat a channel query just to retrieve
|
|
88
|
+
the same endpoints. Evidence paths are relative to report `project`, not the CLI
|
|
89
|
+
working directory. Make local file links only after confirming the files exist;
|
|
90
|
+
for non-local snapshots, give the reported relative path and line as evidence.
|
|
91
|
+
`--strict` returns code 1 on related errors, extraction gaps and unobserved selections;
|
|
92
|
+
read its JSON as the preflight result instead of rerunning the same inputs without the flag.
|
|
93
|
+
For deleted code use the pre-change snapshot. `scope: bridge` and `complete: false`
|
|
94
|
+
do not establish complete coverage of language-internal or runtime dependencies.
|
|
95
|
+
When current runtime evidence is available, add `--runtime <runtime.json> --revision <revision>`.
|
|
96
|
+
Inspect `runtime.routes`, failures/gaps and `runtime-observation` reasons. These add
|
|
97
|
+
native handler candidates for dynamically named calls, not proof of a particular
|
|
98
|
+
native symbol executing. Static unresolved facts remain unresolved for untested paths.
|
|
99
|
+
If the installed CLI lacks impact, use `query` on bridge names found in the source
|
|
100
|
+
and report that file-based preflight requires the newer implementation.
|
|
24
101
|
- Audit the boundary: `isthmus check <dart.json> <swift.json> [--strict]`.
|
|
25
102
|
Read `summary`, each `issues[].code/severity/evidence`, and `limitations`.
|
|
26
103
|
`-unverified` codes are undecidable findings, not clean results.
|
|
@@ -35,15 +112,27 @@ If inputs are missing, identify the required files and proceed with independent
|
|
|
35
112
|
Inspect added/removed logical methods, introduced/resolved issues, both sets of limitations,
|
|
36
113
|
and producer versions/timestamps. Revisions come from the caller's before/after choice.
|
|
37
114
|
Same-key endpoint changes and rename inference are outside this comparison.
|
|
115
|
+
- Verify recorded runtime calls (development source, after 0.5.0):
|
|
116
|
+
`isthmus verify-runtime --expectations <checks.json> <runtime.json> [more...] --strict --compact`.
|
|
117
|
+
Expectations must be specified independently of the observed log. Check `status`,
|
|
118
|
+
`summary`, unsuccessful `checks`, `failures`, and stale/incomplete `runs`.
|
|
119
|
+
`passed` covers only declared scenarios; missing, stale, dropped or pending evidence
|
|
120
|
+
cannot establish coverage. `evidenceOmitted` is display truncation; `droppedEvents`
|
|
121
|
+
means collection loss. Do not fabricate logs when the runtime recorder is unavailable.
|
|
122
|
+
Expected negative scenarios can declare `allowedOutcomes` explicitly; omitted means
|
|
123
|
+
success only. Preserve expected and unexpected failure counts. Pending calls, stale
|
|
124
|
+
runs, and missing observations cannot be allowed outcomes.
|
|
38
125
|
- Supply Swift retention evidence, when requested:
|
|
39
126
|
`isthmus retentions <dart.json> <swift.json> --for cartograph`.
|
|
40
127
|
Save stdout to a new private temporary file, check successful output, then pass its path to
|
|
41
128
|
`cartograph dead --external-retentions <path>`. Clean up only artifacts created for this run.
|
|
129
|
+
This command targets Swift; it does not emit Kotlin retention rules.
|
|
42
130
|
|
|
43
131
|
## Interpret and finish
|
|
44
132
|
|
|
45
133
|
Code 0 means the command ran successfully, not that code is safe to delete.
|
|
46
|
-
Code 1 from check/diff strict is a finding to report;
|
|
134
|
+
Code 1 from check/diff/impact/preflight/verify-runtime strict is a finding or evidence gap to report;
|
|
135
|
+
query code 64 with
|
|
47
136
|
`notFound`/`ambiguous` is a usable answer, while usage errors require corrected arguments.
|
|
48
137
|
Code 2 indicates unreadable, invalid, or deferred inputs: explain the cause category and next step.
|
|
49
138
|
Empty results, `resolvedIssues`, and missing callers can reflect dynamic names or incomplete coverage.
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
export type ReadTextFile = (path: string) => Promise<string>;
|
|
4
|
-
/** 파일 경로에 UTF-8 텍스트를 쓰는 주입 경계다. */
|
|
5
|
-
export type WriteTextFile = (path: string, text: string) => Promise<void>;
|
|
6
|
-
/** 생성 시각을 테스트 가능하게 주입하는 시계다. */
|
|
7
|
-
export type Clock = () => Date;
|
|
1
|
+
import { type Clock, type CommandResult, type ReadTextFile, type WriteTextFile } from './command-support.ts';
|
|
2
|
+
export type { Clock, CommandResult, ReadTextFile, WriteTextFile };
|
|
8
3
|
/** check가 내는 보고서 형식이다. SARIF는 isthmus 소유의 additive 출력이다. */
|
|
9
4
|
export type CheckOutputFormat = 'json' | 'sarif';
|
|
10
|
-
/** 한 입력 파일에서 허용하는 최대 UTF-16 문자열 길이다. */
|
|
11
|
-
export declare const MAX_INPUT_TEXT_LENGTH: number;
|
|
12
|
-
/** 한 명령에서 허용하는 전체 UTF-16 입력 문자열 길이다. */
|
|
13
|
-
export declare const MAX_TOTAL_INPUT_TEXT_LENGTH: number;
|
|
14
|
-
/** CLI가 프로세스 경계에 쓸 출력과 종료 코드다. */
|
|
15
|
-
export interface CommandResult {
|
|
16
|
-
readonly standardOutput: string;
|
|
17
|
-
readonly standardError: string;
|
|
18
|
-
readonly exitCode: 0 | 1 | 2 | 64;
|
|
19
|
-
}
|
|
20
5
|
/** check 인자를 실행해 프로세스에 독립적인 결과를 반환한다. */
|
|
21
6
|
export declare function runCheckCommand(arguments_: readonly string[], readTextFile: ReadTextFile, writeTextFile?: WriteTextFile, now?: Clock, producerVersion?: string): Promise<CommandResult>;
|
|
22
|
-
/** 입력을 순서대로 읽어 파일 수·메모리 상한 안에서 교환 문서로 파싱한다. */
|
|
23
|
-
export declare function readBridgeDocuments(inputPaths: readonly string[], readTextFile: ReadTextFile): Promise<BridgeFactsDocument[]>;
|
|
24
|
-
/** 알려진 입력·조인 실패를 원인별 해결 방향을 담은 코드 2 결과로 바꾼다. */
|
|
25
|
-
export declare function inputFailureResult(error: unknown): CommandResult | undefined;
|
|
26
|
-
/** 전체 조인 보류를 깨끗한 결과와 구분하는 코드 2 결과로 바꾼다. */
|
|
27
|
-
export declare function bridgeJoinDeferredError(): CommandResult;
|
|
28
|
-
/** 내부 결함을 입력 탓으로 돌리지 않는 경로 없는 코드 2 결과다. */
|
|
29
|
-
export declare function internalError(): CommandResult;
|
|
30
7
|
/** check 명령의 한 줄 사용법이다. */
|
|
31
8
|
export declare const checkUsage: string;
|