zorya-classifier 0.2.2 → 0.2.3

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 (37) hide show
  1. package/README.md +30 -16
  2. package/dist/app/classifier-contracts.d.ts +8 -8
  3. package/dist/app/composed-classifier.d.ts +17 -0
  4. package/dist/app/composed-classifier.js +1 -0
  5. package/dist/app/create-classifier.d.ts +7 -1
  6. package/dist/app/create-classifier.js +24 -16
  7. package/dist/cli.js +1 -1
  8. package/dist/entities/classification.d.ts +2 -17
  9. package/dist/entities/image.d.ts +2 -11
  10. package/dist/entities/image.js +1 -4
  11. package/dist/entities/localization.d.ts +6 -21
  12. package/dist/entities/object-proposals.d.ts +1 -1
  13. package/dist/entities/representation.d.ts +0 -183
  14. package/dist/entities/representation.js +1 -33
  15. package/dist/entities/segmentation-verification.d.ts +1 -1
  16. package/dist/entities/segmentation.d.ts +5 -20
  17. package/dist/entities/whole-object.d.ts +6 -21
  18. package/dist/infrastructure/segmentation/grabcut/index.d.ts +2 -2
  19. package/dist/infrastructure/segmentation/grabcut/index.js +1 -1
  20. package/dist/infrastructure/segmentation/mobile-sam/object-proposals.d.ts +1 -1
  21. package/dist/infrastructure/segmentation/mobile-sam/object-proposals.js +1 -1
  22. package/dist/infrastructure/segmentation/mobile-sam/options.d.ts +2 -2
  23. package/dist/infrastructure/segmentation/mobile-sam/segmenter.d.ts +1 -1
  24. package/dist/infrastructure/segmentation/mobile-sam/segmenter.js +1 -1
  25. package/docs/README.ru.md +37 -23
  26. package/docs/acceptance.md +6 -4
  27. package/docs/agents.ru.md +14 -12
  28. package/docs/api.md +4 -4
  29. package/docs/architecture.md +2 -2
  30. package/docs/architecture.ru.md +10 -10
  31. package/docs/migrations/experimental-text-image-removal.ru.md +9 -0
  32. package/docs/provenance.json +283 -0
  33. package/docs/v02-usage.md +8 -8
  34. package/docs/vision-results.md +1 -1
  35. package/package.json +2 -2
  36. package/dist/app/classifier-representation.d.ts +0 -5
  37. package/dist/app/classifier-representation.js +0 -33
@@ -6,12 +6,12 @@
6
6
 
7
7
  Zorya Classifier — MIT-библиотека для Node.js 22.12+. **Поддерживается** закрытая классификация текста и изображений: приложение передаёт явно настроенный `DecisionPort` или собирает адаптер самостоятельно. Библиотека не выбирает модель, провайдера или конечную точку API.
8
8
 
9
- **Экспериментальные и не квалифицированные** сценарии (в API помечены `@experimental`):
9
+ **Реализованные пространственные API** (модель, провайдер и нативные ресурсы — на стороне вызывающего; ячейка сетки ≠ рамка целого объекта):
10
10
 
11
11
  - сеточный `locate`, режим «целый объект» (`whole-object`), `RefinementPort`;
12
12
  - `extract` с сегментатором на стороне вызывающего, проверка рамки и связанная композиция;
13
13
  - `ObjectProposalPort` и явные нативные фабрики сегментации;
14
- - профиль `representation: { type: 'experimental-text', … }` — отклонён (`UNSUPPORTED`), пока профиль не пройдёт независимый отбор.
14
+ - селектор IMAGE-AS-TEXT (`experimental-text`) удалён из публичного runtime; запросы с ним дают `INVALID_INPUT`. Кодеки — только `benchmarks/experiments/`.
15
15
 
16
16
  Исследовательский код в `benchmarks/experiments/` и текстовые эксперименты без частей изображения **не входят** в дистрибутив npm. Отдельные скрипты в каталогах `benchmarks/v02/`, `benchmarks/v03/` и в корне `benchmarks/`: они используют вспомогательные модули из `experiments/`, но не сводятся к одной папке. Метрики в `docs/evidence/**` исторические; универсальное качество или «продвижение» стратегии из них не следует.
17
17
 
@@ -23,14 +23,14 @@ Zorya Classifier — MIT-библиотека для Node.js 22.12+. **Подд
23
23
 
24
24
  Правило зависимостей проверяет `npm run boundaries`: слои `entities` и `shared` не импортируют `infrastructure`; процессы не импортируют адаптеры напрямую — только контракты портов.
25
25
 
26
- | Слой | Роль | Примеры путей |
27
- | ---------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | `app` | Сборка классификатора, CLI, конфигурация | `create-classifier.ts`, `classifier-contracts.ts`, `classifier-config.ts`, `classifier-runtime.ts`, `classifier-spatial.ts`, `classifier-representation.ts`, `cli-route.ts` в `src/app/` |
29
- | `processes` | Оркестрация операций | `classify.ts`, `locate.ts`, `extract.ts`, `extract-from-region.ts`, `whole-object.ts`, `proposal-location.ts`, `boundary-state.ts` в `src/processes/` |
30
- | `features` | Чистая логика: Choice, сетка, промпты, маски | `choice.ts`, `uniform-grid.ts`, `choice-beam-layout.ts`, `prompts.ts`, `src/features/segmentation/*`, `src/features/proposals/*` |
31
- | `entities` | Контракты, Zod, геометрия | `contracts.ts`, `classification.ts`, `decision.ts`, `geometry.ts`, `image.ts`, `localization.ts`, `validation.ts`, `segmentation-metadata.ts` в `src/entities/` |
32
- | `infrastructure` | Реализации портов: HTTP, растр, фоновые процессы | `decision-transport/*`, `vision-chat/*`, `openrouter.ts`, `raster.ts`, `segmentation/mobile-sam/*`, `segmentation/grabcut/*` в `src/infrastructure/` |
33
- | `shared` | Утилиты без слоя `infrastructure` | `gate.ts`, `scope.ts`, `input-budget.ts`, `choice-mass.ts` в `src/shared/` |
26
+ | Слой | Роль | Примеры путей |
27
+ | ---------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `app` | Сборка классификатора, CLI, конфигурация | `create-classifier.ts`, `classifier-contracts.ts`, `classifier-config.ts`, `classifier-runtime.ts`, `classifier-spatial.ts`, `cli-route.ts` в `src/app/` |
29
+ | `processes` | Оркестрация операций | `classify.ts`, `locate.ts`, `extract.ts`, `extract-from-region.ts`, `whole-object.ts`, `proposal-location.ts`, `boundary-state.ts` в `src/processes/` |
30
+ | `features` | Чистая логика: Choice, сетка, промпты, маски | `choice.ts`, `uniform-grid.ts`, `choice-beam-layout.ts`, `prompts.ts`, `src/features/segmentation/*`, `src/features/proposals/*` |
31
+ | `entities` | Контракты, Zod, геометрия | `contracts.ts`, `classification.ts`, `decision.ts`, `geometry.ts`, `image.ts`, `localization.ts`, `validation.ts`, `segmentation-metadata.ts` в `src/entities/` |
32
+ | `infrastructure` | Реализации портов: HTTP, растр, фоновые процессы | `decision-transport/*`, `vision-chat/*`, `openrouter.ts`, `raster.ts`, `segmentation/mobile-sam/*`, `segmentation/grabcut/*` в `src/infrastructure/` |
33
+ | `shared` | Утилиты без слоя `infrastructure` | `gate.ts`, `scope.ts`, `input-budget.ts`, `choice-mass.ts` в `src/shared/` |
34
34
 
35
35
  **Порт** — контракт (интерфейс и схемы), через который процесс вызывает внешнюю работу. **Кто владеет ресурсом:** вызывающее приложение **настраивает** `DecisionPort` (у порта **нет** контракта `dispose`); при завершении работы вызывающий вызывает `dispose()` классификатора и сам освобождает переданные `SegmentationPort` / `ObjectProposalPort`. Фабрика `createClassifier` владеет очередью операций и встроенным `RasterPort` на базе Sharp, переданным в процессы. Явно созданный нативный адаптер **владеет** своим дочерним процессом и закрывает его при `dispose` адаптера. Пакеты среды выполнения (ONNX и т. п.) и файлы моделей — **предварительные условия вызывающего**; библиотека их не скачивает и не освобождает автоматически.
36
36
 
@@ -0,0 +1,9 @@
1
+ # Удаление публичного селектора IMAGE-AS-TEXT
2
+
3
+ Публичный runtime больше не принимает `representation: { type: 'experimental-text', profile: 'text-image-v1' }`. Любая попытка передать этот селектор (или неизвестные ключи в `representation`) завершается `ClassifierError` с кодом `INVALID_INPUT` **до** вызова `DecisionPort` или сетевого fetch.
4
+
5
+ Обычная **текстовая** классификация (`classify` со строкой или `{ text }`) и **vision**-адаптеры/запросы без экспериментального селектора не изменились.
6
+
7
+ Исследовательские text-image кодеки остаются только в `benchmarks/experiments/` и не входят в npm `dist`. Они не ожидают публичной квалификации; исторические замеры v0.2/v0.3 и отчёты сохранены без переклассификации.
8
+
9
+ Для офлайн-бенчмарков используйте `createResearchClassifier` с явным research-портом и benchmark-only схемами (`researchRepresentationSchema`).
@@ -18,6 +18,289 @@
18
18
  "destination": "tools/no-discarded-interval.mjs"
19
19
  }
20
20
  ],
21
+ "authoredResearchNotes": [
22
+ {
23
+ "status": "scoped-verified-offline-dev",
24
+ "experiment": "color-normalization-hsv12-v1",
25
+ "prospectiveFreezeSha256": "0f2fef5754e83e7d3999a0f3a725c059f746519b222c2b3005fcd47806480b1f",
26
+ "sourceCommit": "167e6e2c50465e79649a4d1dca59cbf6b878c071",
27
+ "producerInputsSha256": "d72afa66096ea353d43f50fa01acbf03bf6875278ab4ea235051a0a6d5025009",
28
+ "codeFreezePath": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/code-freeze.json",
29
+ "codeFreezeSha256": "e7dd607ce2f47545f4bd9eec978c12b3fe828f913867911218d003f03a5d3d03",
30
+ "artifactRoot": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025",
31
+ "runManifestPath": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/run/run-manifest.json",
32
+ "runManifestSha256": "2713a85e2833865ae11c189069459ad74862a4005228e0ba99d32685cce33fc7",
33
+ "evaluationReportPath": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/evaluation/evaluation-report.json",
34
+ "evaluationReportSha256": "f7c02ec50aebaa52e5758a94594d6e03270fa529d21941d10eb7073710d12e08",
35
+ "truthSha256": "af5bf46d19c7c7dd418f6da0b2d26b7708bf7e4ca659ea378641c424e2f3a1dd",
36
+ "independentAuditPath": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/root-independent-audit.json",
37
+ "visualsManifestPath": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/visuals/final/visuals-manifest.json",
38
+ "visualsManifestSha256": "4c50c070fbf28382d20aef6ba95d3fa9fc817010a232da7aac1e0c3613dc3d10",
39
+ "visualsPrimaryManifestPath": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/visuals/visuals-manifest.json",
40
+ "makeVisualsScript": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/make-visuals.mjs",
41
+ "makeVisualsScriptSha256": "5d194f1ec56e61ee87e1ca6b17ed97a200eda8147c3a15b13a44901d62476a2f",
42
+ "hypothesisArtifact": "/root/.codex/artifacts/zorya-classifier-color-normalization-20261025/hypothesis.txt",
43
+ "researchDoc": "docs/research/v03-color-normalization-v1.ru.md",
44
+ "providerCalls": 0,
45
+ "repositoryCheckNote": "Superseded: root-check.log stopped at Knip after secrets/typecheck/lint/boundaries. Linux local npm run check exit 0 (800 pass, 0 fail, 0 skip, build ok) — root-check-final.log; npm run pack:check exit 0 (445 files, 188 runtime dist, runtime dist sha256 unchanged vs v0.2.2) — root-pack-check.log. Local acceptance/package only; quality qualification and heldout not run.",
46
+ "note": "One complete offline DEV producer/evaluator run on frozen cohort; independent artifact audit passed; local check and pack:check passed on Linux; raster oracle metrics and visualization only — no promotion, no quality qualification."
47
+ },
48
+ {
49
+ "status": "scoped-verified-offline-dev",
50
+ "experiment": "contour-completion-v1",
51
+ "prospectiveFreezeSha256": "ea0bba2e9a421f2b80053c69e38e7ce54a1d356153e4a70691c7a2890ed3a2b9",
52
+ "producerInputsSha256": "e4be519770d7089c371f92a115d5141ecd46a9b49d358aa969a3d78057794218",
53
+ "v1RunManifestSha256": "2713a85e2833865ae11c189069459ad74862a4005228e0ba99d32685cce33fc7",
54
+ "sourceCommit": "167e6e2c50465e79649a4d1dca59cbf6b878c071",
55
+ "artifactRoot": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025",
56
+ "producerScript": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/contour-completion.mjs",
57
+ "producerScriptSha256": "c91ac92042b64a6bd0a5059b00c73070bd3a5da7ffd3fb775449016e6cc7eb7e",
58
+ "evaluatorScript": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/evaluate-contour-completion.mjs",
59
+ "evaluatorScriptSha256": "02ebce558bfcf7516f83a74a93bd7b37b68a3986bff0fd7f8e920c0452c35392",
60
+ "syntheticTestScript": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/contour-completion.test.mjs",
61
+ "syntheticTestScriptSha256": "682ca39473216627b74f827d9662bb00f45eff62524635e0bc768159c1e6d7c4",
62
+ "syntheticTestLog": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/contour-completion.test.log",
63
+ "runManifestPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/run/run-manifest.json",
64
+ "runManifestSha256": "87c55b12351a6b6f408eebb71eaa0d79f5a03a11d755c575d73f2c83a8c37d5d",
65
+ "evaluationReportPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/evaluation/evaluation-report.json",
66
+ "evaluationReportSha256": "ac9f8e193414892ae2adf9f03e3350a7b9fa3bf669f640127ea1193129d6c480",
67
+ "independentAuditPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/root-independent-audit.json",
68
+ "independentAuditSha256": "0efa03ae7bf4c2db00732614aa5179428c40a9ec0e833cf78893d7b92b91ab96",
69
+ "truthSha256": "af5bf46d19c7c7dd418f6da0b2d26b7708bf7e4ca659ea378641c424e2f3a1dd",
70
+ "truthMaskSha256": "0a82516a43057329a7b2cafa4fcbe1c714d997a87a9e1dbe6d84ffcbf1bbbe26",
71
+ "makeAnalysisScript": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/make-analysis-report.mjs",
72
+ "makeAnalysisScriptSha256": "d37c4ea642c2c20147b6a899dba2332eafcd3351c1a70f8854faff6812e8d352",
73
+ "analysisFirstPassManifestPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis/analysis-manifest.json",
74
+ "analysisFirstPassHtmlPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis/comparison.html",
75
+ "analysisFirstPassHtmlSha256": "971dee36e3b8b4522920a8c6b049fa9aa09e0b850fb37c953b631707c37c5ebe",
76
+ "analysisPriorFinalManifestPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-final/analysis-manifest.json",
77
+ "analysisPriorFinalManifestSha256": "98cc626c6fe903360156af122fa28816edfabf1f378320381faaaf1ef2d58ed1",
78
+ "analysisPriorFinalHtmlPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-final/comparison.html",
79
+ "analysisPriorFinalHtmlSha256": "6d27e7fc9a6ce6ce264af41da770aabcdf764a074350a58763c13c36438112a4",
80
+ "analysisPriorFinalOverviewSha256": "c6e7c135ec666312207a94f91631a4a1f7cd9c65adf2d90a720b91c8e3df6f23",
81
+ "analysisPriorReadableManifestPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-readable/analysis-manifest.json",
82
+ "analysisPriorReadableManifestSha256": "3c04539f4a55c440bc500c34abba17a54d1749f3b2901bf2e141ca23f24840ac",
83
+ "analysisPriorReadableHtmlPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-readable/comparison.html",
84
+ "analysisPriorReadableHtmlSha256": "bb1197b772ba8c5a2fb70a0d25cfac93d41a73a27a7a8a58ceb16049808a945a",
85
+ "analysisPriorReadableOverviewSha256": "9b91e913b24c02a78321d11d6de689b17aac2b2738e3275253531af23cb268eb",
86
+ "analysisManifestPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-ru/analysis-manifest.json",
87
+ "analysisManifestSha256": "58ee884e9043a9560101b07397d453adcdf78f5924ff565f42a24a5a938655fc",
88
+ "analysisHtmlPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-ru/comparison.html",
89
+ "analysisHtmlSha256": "f5e2c1cb0087fa7f41e771f980c66c48b0cc19116f1a7da12a4c2b1a2cd3874b",
90
+ "analysisOverviewSha256": "9b91e913b24c02a78321d11d6de689b17aac2b2738e3275253531af23cb268eb",
91
+ "analysisCasePhoto01Sha256": "a1eb771d8a14f377bcc10e120fcb6f2b2249e1c9267c22a2c304a9511683d62e",
92
+ "analysisCasePhoto02Sha256": "c9e125bb2fcb684643b5a65a0911ce3fa7f91995af429082c9ba8f914798e670",
93
+ "analysisCaseUi01Sha256": "4a7152efc563558db302697a54a6640ee78a7511dbdce776d20d4d4148fd3509",
94
+ "analysisCaseMap01Sha256": "c4498625946778c0225841b8c737df0e81c0f91a7559125f3563d2fad133af67",
95
+ "analysisReadableLogPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/make-analysis-readable.log",
96
+ "analysisReadableReceiptPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/composer-make-analysis-readable-receipt.json",
97
+ "analysisRuLogPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/make-analysis-ru.log",
98
+ "analysisRuReceiptPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/composer-make-analysis-ru-receipt.json",
99
+ "researchDoc": "docs/research/v03-contour-completion-v1.ru.md",
100
+ "scope": "offline geometry on frozen v1 HSV12 component maps; 72361 components; 9 unique images; 12 case rows; no truth or corpus images in producer",
101
+ "providerCalls": 0,
102
+ "resultsMeasured": true,
103
+ "note": "One complete offline DEV producer/evaluator run; independent artifact audit passed; canonical Russian presentation (make-analysis-report.mjs --output-dir analysis-ru) from frozen receipts only; analysis/, analysis-final/, analysis-readable/ preserved as prior drafts; raw evaluator visuals unchanged; no promotion, no quality qualification, no heldout."
104
+ },
105
+ {
106
+ "status": "scoped-verified-offline-dev",
107
+ "experiment": "directed-boundary-v1",
108
+ "prospectiveFreezeSha256": "5f056f97d0d6eda4ec2df3f47ee392f2999b1bc9b9f599e2037d615bca5ffd54",
109
+ "producerInputsSha256": "90449b819df88233bf847f449604cfe1b2fe707fcbc73ecd43f467225e96cece",
110
+ "v1RunManifestSha256": "2713a85e2833865ae11c189069459ad74862a4005228e0ba99d32685cce33fc7",
111
+ "sourceCommit": "167e6e2c50465e79649a4d1dca59cbf6b878c071",
112
+ "artifactRoot": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025",
113
+ "producerScript": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/producer.py",
114
+ "evaluatorScript": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/evaluator.py",
115
+ "evaluatorCodeFreezeSha256": "1fade929b325ec322f28ad39ea184c8af74b3bd50912888de989416571f9b68b",
116
+ "syntheticProducerTests": 32,
117
+ "syntheticEvaluatorTests": 18,
118
+ "runManifestPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/run/run-manifest.json",
119
+ "runManifestSha256": "ba6c26c6bee06766aa0dcc2e3fc5bb95dc2286a25237c89f5ad56d44dca31a91",
120
+ "evaluationReportPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/evaluation/evaluation-report.json",
121
+ "evaluationReportSha256": "b0d375ac58eba198ff8ffe8f27c10da2d62ab74ce6bf7b5dfe85a1a6f1ab6a5e",
122
+ "independentAuditPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/root-independent-audit.json",
123
+ "independentAuditSha256": "a63c3501407ed2d0dde69a639968af6dc7a8eb9b7bfa09d5d1b64b9195833a7e",
124
+ "firstHitAuditPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/root-first-hit-audit.json",
125
+ "firstHitAuditSha256": "c8bb2e8b2d2bcaef8b0a644f4c07615862cb320c879cefedb24a792a3d0ceac1",
126
+ "metricsAuditPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/root-metrics-audit.json",
127
+ "metricsAuditSha256": "71ddee66b9d519f8a979c62b553b4e2cc53e3d1257b7ba522ed6bdc846455ffc",
128
+ "evaluationAgreementPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/root-evaluation-agreement.json",
129
+ "evaluationAgreementSha256": "b10270de1f33a1af548f738b6a08e682a3951c882d9b5f6114df2e65540de059",
130
+ "truthSha256": "af5bf46d19c7c7dd418f6da0b2d26b7708bf7e4ca659ea378641c424e2f3a1dd",
131
+ "truthMaskSha256": "0a82516a43057329a7b2cafa4fcbe1c714d997a87a9e1dbe6d84ffcbf1bbbe26",
132
+ "makeReportScript": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/make_report.py",
133
+ "makeReportScriptSha256": "8920e273b8f6f201bcc418f84c83a15022619e86f6cf49c7ba198b2f7295f45d",
134
+ "analysisManifestPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/analysis-final-v3/outputs-manifest.json",
135
+ "analysisManifestSha256": "1a3fbb39de305a56314ae2ec84fb555719d9017effc7b1fae86791ff60c0625f",
136
+ "analysisHtmlPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/analysis-final-v3/comparison.html",
137
+ "analysisHtmlSha256": "aa7c4da3eaaa37fca3cba26c739dc5d9da071f264be64a163331cc94c7a7ac3a",
138
+ "priorAnalysisDirsPreserved": [
139
+ "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/analysis",
140
+ "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/analysis-final",
141
+ "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/analysis-final-v2"
142
+ ],
143
+ "contourCompletionHtmlPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-ru/comparison.html",
144
+ "researchDoc": "docs/research/v03-directed-boundary-v1.ru.md",
145
+ "scope": "offline directed rays and same-parent partition on frozen v1 HSV12 maps; 72361 components to 85012 fragments; 9 unique images; 12 case rows; no truth in producer",
146
+ "providerCalls": 0,
147
+ "resultsMeasured": true,
148
+ "repositoryCheckNote": "npm run check passed Linux Node 22.23.2 (800/800, build passed); receipt /root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/root-repo-check.log. /root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/root-final-verification.json will record format/secrets/installed-archive pack checks after doc-only pass; those not claimed passed yet.",
149
+ "note": "One complete offline DEV producer/evaluator run each; independent partition and metrics audits passed; canonical Russian presentation (make_report.py → analysis-final-v3) from frozen receipts only; factual UI02/UI03 clarification (gate-pass vs highest-IoU card candidates, no PNG/cutout regen); prior analysis/, analysis-final/, analysis-final-v2/ preserved; no promotion, no heldout qualification."
150
+ },
151
+ {
152
+ "status": "scoped-verified-retrospective",
153
+ "experiment": "v03-method-comparison-dev12",
154
+ "selectedExperimentalBaseline": "color-normalization-hsv12-v1",
155
+ "baselineStatus": "experimental-reference-only; not a library default",
156
+ "sourceCommit": "167e6e2c50465e79649a4d1dca59cbf6b878c071",
157
+ "prospectiveFreezeSha256": "0f2fef5754e83e7d3999a0f3a725c059f746519b222c2b3005fcd47806480b1f",
158
+ "producerInputsSha256": "d72afa66096ea353d43f50fa01acbf03bf6875278ab4ea235051a0a6d5025009",
159
+ "codeFreezeSha256": "e7dd607ce2f47545f4bd9eec978c12b3fe828f913867911218d003f03a5d3d03",
160
+ "v1RunManifestSha256": "2713a85e2833865ae11c189069459ad74862a4005228e0ba99d32685cce33fc7",
161
+ "v1EvaluationReportSha256": "f7c02ec50aebaa52e5758a94594d6e03270fa529d21941d10eb7073710d12e08",
162
+ "truthSha256": "af5bf46d19c7c7dd418f6da0b2d26b7708bf7e4ca659ea378641c424e2f3a1dd",
163
+ "v1IndependentAuditSha256": "01cba09b45c99acddd9f051524408500897e75aa41794e15ab2d7bd97e372e29",
164
+ "visualsManifestSha256": "4c50c070fbf28382d20aef6ba95d3fa9fc817010a232da7aac1e0c3613dc3d10",
165
+ "artifactRoot": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025",
166
+ "frozenComparisonAuditPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/root-frozen-comparison-audit.json",
167
+ "frozenComparisonAuditSha256": "3092d167bee31203469fb21629dee58bf1a23d63d3abc305e6dd23d57e597339",
168
+ "h8aRunPath": "/root/projects/Zorya/.migration/20261022-r1/classifier/aux/runs/v03/h8a-luna-chat-8633fe55-47af-441b-9265-a159d3e4efc8/run.json",
169
+ "h8aRunSha256": "1def8b64894f520e6e3ddd9c432212e1333684ae5db1e7c5747485c185cbb98a",
170
+ "h8aIndependentAuditPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/root-h8a-audit.json",
171
+ "h8aIndependentAuditSha256": "90bf5f53ba01523ad3e410d48b8dd1a54cf11770bad81a8b62353ecab8a61179",
172
+ "h8aCutoutAuditPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/root-h8a-cutout-audit.json",
173
+ "h8aCutoutAuditSha256": "e0acfa8e2b54e142c1b68a8753e47fbe79a1b94d6dec97bda33d9c9f6fd247a9",
174
+ "makeMethodComparisonScript": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/report/make-method-comparison.mjs",
175
+ "makeMethodComparisonScriptSha256": "4759d04cf88bcdb4b8c4086cbbde36a3d3a27fc4116b36e1e1b3d10a8e0b5888",
176
+ "firstPassComparisonHtmlPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/report/comparison.html",
177
+ "firstPassComparisonHtmlSha256": "16d1d7f92549253a14120906bfadfc88633140c4736a172a4259ddaf83167d7d",
178
+ "firstPassReportManifestPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/report/report-manifest.json",
179
+ "firstPassReportManifestSha256": "c22c383f7cd1e7f81e2ab444988fa77b653660a88869bdacc789ac4d9ea20f7b",
180
+ "firstPassGeneratorScriptSha256": "83019ab0f7d49edb9e24549304bf91206726a8db41ea2d5f06d1b2f824b4c566",
181
+ "selectedBaselinePath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/report-final/selected-baseline.json",
182
+ "selectedBaselineSha256": "f201c45064df827b4a7f99810be9366b06616fb15654b85c7d62af95263b2a90",
183
+ "comparisonHtmlPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/report-final/comparison.html",
184
+ "comparisonHtmlSha256": "b7056e509337d5f03be156572e42385eb8c513d2fbbf28254faa200c52535855",
185
+ "reportManifestPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/report-final/report-manifest.json",
186
+ "reportManifestSha256": "9aac44273386bcbb0a95a140b72b47d1c4d816112f8fbf997c1590ebc2cd82d8",
187
+ "finalReceiptPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/logs/make-method-comparison-final-receipt.json",
188
+ "presentationCorrectionReceiptPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/root-presentation-correction-receipt.json",
189
+ "researchDocSha256": "175ed38285edf614ab3f2a3b9cd7a68f5e45baaaa723b8ec5aa1a6018e1b9b23",
190
+ "directedAnalysisManifestPath": "/root/.codex/artifacts/zorya-classifier-directed-boundary-20261025/analysis-final-v3/outputs-manifest.json",
191
+ "hullAnalysisManifestPath": "/root/.codex/artifacts/zorya-classifier-contour-completion-20261025/analysis-ru/analysis-manifest.json",
192
+ "researchDoc": "docs/research/v03-method-comparison.ru.md",
193
+ "providerCalls": 0,
194
+ "resultsMeasured": true,
195
+ "photo01CutoutProseCorrectionReceiptPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/root-photo01-cutout-prose-correction-receipt.json",
196
+ "note": "Retrospective DEV12 method comparison from frozen audits and copied visuals only; canonical presentation in report-final/ with report/ first pass preserved; H8a/H8b 7/9 mask-derived box gate not pixel-mask IoU; repo hrefs path.relative; bird IoU same reference mask; h8a-cutout audit e0acfa8e…; H4b omitted; photo01 H8a vs HSV12 cutout interpretation corrected (H8a better wall separation, not more road/wall bleed); manifest 41 outputs verify 0 mismatches; image asset hashes unchanged vs prior report-final; no producer/evaluator reran; no promotion or heldout."
197
+ },
198
+ {
199
+ "status": "scoped-verified-offline",
200
+ "experiment": "public-experimental-text-image-removal",
201
+ "sourceCommit": "167e6e2c50465e79649a4d1dca59cbf6b878c071",
202
+ "artifactRoot": "/root/.codex/artifacts/zorya-classifier-remove-text-image-20261025",
203
+ "preRemovalSnapshotPath": "/root/.codex/artifacts/zorya-classifier-remove-text-image-20261025/pre-removal-state.json",
204
+ "migrationDoc": "docs/migrations/experimental-text-image-removal.ru.md",
205
+ "ownedPaths": [
206
+ "src/entities/image.ts",
207
+ "src/entities/representation.ts",
208
+ "src/app/create-classifier.ts",
209
+ "src/app/classifier-representation.ts",
210
+ "benchmarks/experiments/research-representation-contract.ts",
211
+ "benchmarks/experiments/create-research-classifier.ts",
212
+ "benchmarks/experiments/text-representation.ts",
213
+ "scripts/pack-check.mjs",
214
+ "test/v02-contracts.test.ts",
215
+ "test/v02-integration.test.ts",
216
+ "test/proposal-ownership.test.ts",
217
+ "test/whole-object-boundary-view.test.ts"
218
+ ],
219
+ "providerCalls": 0,
220
+ "note": "Public IMAGE-AS-TEXT selector removed; strict INVALID_INPUT before DecisionPort; benchmark-only research schemas and createResearchClassifier composition preserved; historical v02 text evidence unchanged."
221
+ },
222
+ {
223
+ "status": "owner-selected-development-direction",
224
+ "experiment": "h8a-openai-luna-chat-primary-development",
225
+ "selectedArm": "h8a-openai-luna-chat",
226
+ "sourceCommit": "167e6e2c50465e79649a4d1dca59cbf6b878c071",
227
+ "selectionDate": "2026-10-25",
228
+ "selectedBy": "owner",
229
+ "artifactRoot": "/root/.codex/artifacts/zorya-classifier-h8a-selection-20261025",
230
+ "beforeFilesSnapshotPath": "/root/.codex/artifacts/zorya-classifier-h8a-selection-20261025/before-files.json",
231
+ "beforeStateSnapshotPath": "/root/.codex/artifacts/zorya-classifier-h8a-selection-20261025/before-state.json",
232
+ "h8aRunPath": "/root/projects/Zorya/.migration/20261022-r1/classifier/aux/runs/v03/h8a-luna-chat-8633fe55-47af-441b-9265-a159d3e4efc8/run.json",
233
+ "h8aRunSha256": "1def8b64894f520e6e3ddd9c432212e1333684ae5db1e7c5747485c185cbb98a",
234
+ "h8aFreezeSha256": "d371f64a76effb8b96951709c03a4801e1751f8f8032d363623ba1903b33ed27",
235
+ "h8aIndependentEvaluationPath": "docs/evidence/v03/h8a-ordinary-vision-independent-evaluation.json",
236
+ "h8aIndependentEvaluationSha256": "1a6850b69d4f5ce52d0531594ede845ba0aeb3698b844f5946c33da46c3fbab2",
237
+ "h8aIndependentAuditPath": "docs/evidence/v03/h8a-ordinary-vision-independent-audit.md",
238
+ "h8aIndependentAuditSha256": "707c47f7f5efffc94ee6375cbfa795df1689ee26e3481bffe1795ac815da5fca",
239
+ "h8aExternalArtifactAuditPath": "/root/.codex/artifacts/zorya-classifier-method-comparison-20261025/root-h8a-audit.json",
240
+ "h8aExternalArtifactAuditSha256": "90bf5f53ba01523ad3e410d48b8dd1a54cf11770bad81a8b62353ecab8a61179",
241
+ "selectionRecordPath": "docs/evidence/v03/h8a-development-selection-20261025.json",
242
+ "selectionRecordSha256": "d6f00e0947933fbada045812dff5f9815bcb057b35d92d0174a3dbaa0461bf0b",
243
+ "researchDoc": "docs/research/v03-h8a-development-baseline.ru.md",
244
+ "researchDocSha256": "a23dbc79e169704777873e5f31ad55a796bb00c701d1ee45ddcb5d47d2da78e5",
245
+ "implementationReference": "benchmarks/v03/run-h8-ordinary-vision.ts",
246
+ "selectedForDevelopment": true,
247
+ "productionPromotion": false,
248
+ "libraryDefaultChanged": false,
249
+ "implementationChanged": false,
250
+ "providerCalls": 0,
251
+ "newInferenceCalls": 0,
252
+ "positiveSameMaskBoxGate": "7/9",
253
+ "negativeFalseOutputs": "2/3",
254
+ "advancementGatePass": false,
255
+ "note": "Owner recorded H8a as primary development direction from verified frozen DEV12 evidence only; no reruns, tuning, qualification, or library default; H8b and failed H9–H11 records preserved; next work is diagnostic sequencing documented in research baseline, not authorization for paid inference."
256
+ },
257
+ {
258
+ "status": "prepared-not-executed",
259
+ "experiment": "jev-native-box-dev12-v1",
260
+ "profileId": "jev-native-box-dev12-v1",
261
+ "producerInputsSha256": "f5c5cba9cd15c3ed1e027d8f8e705bcc723ccf86e08862edfcd75b05b1e9c2ed",
262
+ "truthSha256": "af5bf46d19c7c7dd418f6da0b2d26b7708bf7e4ca659ea378641c424e2f3a1dd",
263
+ "researchDoc": "docs/research/v03-jev-native-box-comparison-plan.ru.md",
264
+ "researchDocSha256": "aad610cf236a4d48157ec606074bab0e5c3a0b6f67a7499aa304cd1a17ba2e35",
265
+ "producerScript": "benchmarks/v03/run-jev-native-box.ts",
266
+ "evaluatorScript": "benchmarks/v03/evaluate-jev-native-box.ts",
267
+ "providerCalls": 0,
268
+ "newInferenceCalls": 0,
269
+ "note": "Prospective DEV12 native Box+Noul arm: evaluator join/receipt audit and H8 mask visual contract prepared offline; no live producer/evaluator CLI run, no evaluation metrics or promotion."
270
+ },
271
+ {
272
+ "status": "scoped-verified-dev",
273
+ "experiment": "jev-native-box-dev12-v1",
274
+ "profileId": "jev-native-box-dev12-v1",
275
+ "producerInputsSha256": "f5c5cba9cd15c3ed1e027d8f8e705bcc723ccf86e08862edfcd75b05b1e9c2ed",
276
+ "truthSha256": "af5bf46d19c7c7dd418f6da0b2d26b7708bf7e4ca659ea378641c424e2f3a1dd",
277
+ "freezeFilePath": "/root/.codex/artifacts/zorya-classifier-jev-native-box-20261025/offline-pipeline-v2/freeze/freeze.json",
278
+ "freezeFileSha256": "ed73aa7cb0cc683e8a36353fecd3e556a132dab7ddb083c4a2a50fd2d244ddb7",
279
+ "freezeContentSha256": "ce9de928ffc22ff593046a9e42e17352ec4492479bae0d833a739e4e036e7b6d",
280
+ "runManifestPath": "/root/.codex/artifacts/zorya-classifier-jev-native-box-20261025/live-run-20261025T173530/run-manifest.json",
281
+ "runManifestSha256": "75d5a7932ac7c8c4244404f89e7e5f91886120843a742d3dcfddfc8ad3c6324b",
282
+ "evaluationPath": "/root/.codex/artifacts/zorya-classifier-jev-native-box-20261025/live-evaluation-20261025T173530/evaluation.json",
283
+ "evaluationSha256": "7c147472a4aefdd5309a71753f1affa73a185e7f19c2ea6619dc29356185f52a",
284
+ "h8aRunSha256": "1def8b64894f520e6e3ddd9c432212e1333684ae5db1e7c5747485c185cbb98a",
285
+ "h8aEvaluationSha256": "1a6850b69d4f5ce52d0531594ede845ba0aeb3698b844f5946c33da46c3fbab2",
286
+ "researchDoc": "docs/research/v03-jev-native-box-results.ru.md",
287
+ "evidenceRecord": "docs/evidence/v03/jev-native-box-dev12-20261025.json",
288
+ "finalReportManifestPath": "/root/.codex/artifacts/zorya-classifier-jev-native-box-20261025/final-report/output-manifest.json",
289
+ "finalReportManifestSha256": "9da113e8934d39d5a7d5359b5d86097e3ce432f7e5e43b80687e6fd6878fd2be",
290
+ "providerCalls": 12,
291
+ "newInferenceCalls": 12,
292
+ "knownCostUsd": 0.00140553,
293
+ "unknownCostUsd": 0,
294
+ "unknownCostCalls": 0,
295
+ "jevStrictPositiveBoxGate": "3/9",
296
+ "h8aStrictPositiveBoxGate": "7/9",
297
+ "jevPositiveIoUOnlyDiagnostic": "8/9",
298
+ "h8aPositiveIoUOnlyDiagnostic": "7/9",
299
+ "productionPromotion": false,
300
+ "libraryDefaultChanged": false,
301
+ "note": "Completed single DEV12 exposed pilot: native Jev Box+Noul vs historical H8a on frozen cohort; independent evaluation and root audit verified; final HTML/PNG report under external artifact final-report/; no heldout qualification."
302
+ }
303
+ ],
21
304
  "changes": [
22
305
  "Standalone ports and lifecycle; no game/application dependencies",
23
306
  "Multiple targets allowed, returning one candidate",
package/docs/v02-usage.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Region-seeded masks and extraction (0.2)
2
2
 
3
- Everything in this guide—default region `locate`, `locate({ mode: 'whole-object' })`, `extract`, optional `RefinementPort`, `SegmentationPort`, box-check composition, `objectProposals`, and exported native factories—is **experimental and unqualified** for general use. Passing structural or lifecycle checks does not establish semantic object accuracy or mask quality. Further accuracy experiments on these paths are stopped; no spatial or extraction strategy is promoted. Historical metrics in `docs/evidence/**` are unchanged.
3
+ Everything in this guide—default region `locate`, `locate({ mode: 'whole-object' })`, `extract`, optional `RefinementPort`, `SegmentationPort`, box-check composition, `objectProposals`, and exported native factories—is implemented and caller-configured. Passing structural or lifecycle checks does not establish semantic object accuracy or mask quality. The [H8a vs Jev DEV12 comparison](research/v03-jev-native-box-results.ru.md) documents one research box recipe; it is not default locate/extract. Historical metrics in `docs/evidence/**` are unchanged.
4
4
 
5
5
  The [accepted plan](0.2.0-plan.md) and [acceptance status](acceptance.md) distinguish implementation, offline checks, live quality and platform qualification. The frozen caller recipe passed admission with only 8/60 complete positive object boxes; 19/30 mask references had no prediction. Configure and test the model and segmenter for your own data. No text-image encoder qualified.
6
6
 
@@ -8,12 +8,12 @@ The library does not select or connect a model. Supply a `DecisionPort` to `crea
8
8
 
9
9
  ## Choose the operation
10
10
 
11
- | Operation | Status | Result | Model requests |
12
- | ------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------- | ---------------------------------------------- |
13
- | `classify` | Supported | One supplied class | One |
14
- | `locate` (default / `mode: 'region'`) | Experimental | A grid cell that may contain an object fragment | Up to three |
15
- | `locate` with `mode: 'whole-object'` and `segmentation` | Experimental | Visible bounds and center derived from a mask | Up to five, plus local segmentation/correction |
16
- | `extract` with `segmentation` | Experimental | Mask-derived bounds, center, transparent PNG, cropped mask and source offset | Up to five, plus local segmentation/correction |
11
+ | Operation | Status | Result | Model requests |
12
+ | ------------------------------------------------------- | --------- | ---------------------------------------------------------------------------- | ---------------------------------------------- |
13
+ | `classify` | Supported | One supplied class | One |
14
+ | `locate` (default / `mode: 'region'`) | Available | A grid cell that may contain an object fragment | Up to three |
15
+ | `locate` with `mode: 'whole-object'` and `segmentation` | Available | Visible bounds and center derived from a mask | Up to five, plus local segmentation/correction |
16
+ | `extract` with `segmentation` | Available | Mask-derived bounds, center, transparent PNG, cropped mask and source offset | Up to five, plus local segmentation/correction |
17
17
 
18
18
  The primary object workflow is the unchanged region locator followed by an explicitly configured segmenter. Segmentation receives the locator's seed prompt on the full EXIF-oriented source image; it does not receive a seed crop or treat the seed as an object box. Bounds and center come from actual foreground mask pixels. After the initial mask, a closed decision checks the original image with the actual mask box and original seed anchor: `complete`, `needs-expansion`, or `unknown`. It reuses the caller-supplied `DecisionPort`. An incomplete box permits one actual enclosing-mask correction and one final check; there is no separate extent search or generated model geometry. Default `locate` behavior remains compatible.
19
19
 
@@ -157,7 +157,7 @@ Successful extraction writes `<prefix>.png`, `<prefix>.mask.u8` and `<prefix>.js
157
157
 
158
158
  ## Experimental text-only images
159
159
 
160
- The reserved selector is `representation: { type: 'experimental-text', profile: 'text-image-v1' }`. Public composition currently rejects image operations with `UNSUPPORTED` before dispatch because no encoder is qualified. Ordinary text classification remains usable.
160
+ The former experimental selector `representation: { type: 'experimental-text', profile: 'text-image-v1' }` was removed from the public runtime. Requests that include it fail strict validation with `INVALID_INPUT` before any `DecisionPort` call. Text-image encoders remain under `benchmarks/experiments/` only and are not pending public qualification. Ordinary string/`{ text }` classification and vision inputs (`{ type: 'vision' }` or omitted) remain supported. See [migration note (RU)](migrations/experimental-text-image-removal.ru.md).
161
161
 
162
162
  Research candidates compare normalized luma ASCII, color palette grids, SVG color runs, strict pixel RLE, binary/edge ASCII, and layered ASCII + SVG. No OCR, semantic helper or hidden vision call supplies object facts. Text adapters reject image parts rather than silently dropping them. Complete encoded views and metadata have a 64 KiB UTF-8 budget, allocated before encoding; output is never truncated to fit. Indistinguishable geometry returns a named unknown.
163
163
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Current 0.2 region and extraction evidence
4
4
 
5
- Region `locate`, whole-object location, `extract`, proposal/refinement strategies, and native segmentation adapters are **experimental and unqualified** for general use; figures below are historical evidence for one documented recipe, not a promotion or universal accuracy claim. Further spatial accuracy experiments are stopped. H8 DEV recorded 7/9 positives with 2/3 false outputs and did not qualify.
5
+ Region `locate`, whole-object location, `extract`, proposal/refinement strategies and native segmentation adapters are available public APIs. Results below describe specific model recipes, not general accuracy. In one exposed DEV12 pilot, the historical H8a output passed the strict same-instance box criterion on 7/9 positive tasks; a single native Jev 1.14 run passed on 3/9. The criterion requires IoU ≥0.5 and at least 90% reference-box coverage. See the [full v03 comparison (RU)](research/v03-jev-native-box-results.ru.md); H8a was not rerun for this comparison. The same H8a run produced false outputs on 2/3 tasks where the target was absent, so it failed its full gate; the single Jev run produced one such false output on 1/3 tasks.
6
6
 
7
7
  The final [frozen v3 heldout report](evidence/v02/region-seeded-heldout-v3/README.md) evaluates all 80 cases per profile. Classification is 65/80; positive seed hits 26/60; complete object boxes 8/60; false seeds and extractions 0/20 negatives. Of 30 exact-canvas mask references, eight pass IoU 0.8, three fail and 19 have no prediction. Both positive-photo paired seed intervals are [0.500, 0.833]. These are separate metrics; a successful seed or containment decision does not guarantee a tight mask. Candidate accounting includes 266 physical calls, two HTTP 502 failures and two unknown charges. The control made 80 image-free calls. This one controlled corpus admission and the resource/native checks qualify the documented recipe only; model choice stays with the caller. Development and failed historical evidence below is preserved.
8
8
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zorya-classifier",
3
- "version": "0.2.2",
4
- "description": "Provider-independent classification with experimental localization and object extraction for Node.js",
3
+ "version": "0.2.3",
4
+ "description": "Provider-independent Node.js classification, spatial localization, and caller-owned mask-based object extraction",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "engines": {
@@ -1,5 +0,0 @@
1
- import type { Representation } from '../entities/contracts.js';
2
- import type { ImageRepresentationPort } from '../entities/representation.js';
3
- export declare function createClassifierRepresentation(experimental: ImageRepresentationPort | undefined): {
4
- representationFor(value: Representation | undefined): ImageRepresentationPort | undefined;
5
- };
@@ -1,33 +0,0 @@
1
- import { ClassifierError } from '../entities/errors.js';
2
- import { preparedTextSchema, representationLimits } from '../entities/representation.js';
3
- import { parse } from '../entities/contracts.js';
4
- export function createClassifierRepresentation(experimental) {
5
- const textRepresentation = experimental
6
- ? {
7
- async prepare(input) {
8
- const result = parse(preparedTextSchema, await experimental.prepare(input), 'INVALID_RESPONSE');
9
- const bytes = result.state.reduce((sum, part) => sum + Buffer.byteLength(part, 'utf8'), 0);
10
- if (bytes > representationLimits.totalBytes || bytes !== result.metadata.bytes)
11
- throw new ClassifierError('INVALID_RESPONSE', 'Representation byte accounting is inconsistent');
12
- return {
13
- state: result.state,
14
- metadata: {
15
- ...result.metadata,
16
- views: result.metadata.views.map(({ content, ...view }) => ({
17
- ...view,
18
- ...(content === undefined ? {} : { content }),
19
- })),
20
- },
21
- };
22
- },
23
- }
24
- : undefined;
25
- function representationFor(value) {
26
- if (value?.type !== 'experimental-text')
27
- return undefined;
28
- if (!textRepresentation)
29
- throw new ClassifierError('UNSUPPORTED', 'No text-image profile has passed release qualification yet');
30
- return textRepresentation;
31
- }
32
- return { representationFor };
33
- }