@docmana/sdk 0.46.0 → 0.47.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/CHANGELOG.md +9 -0
- package/LICENSE +21 -21
- package/README.md +23 -0
- package/dist/cli.mjs +413 -219
- package/dist/cli.mjs.map +1 -1
- package/dist/execution-events.d.ts +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +437 -235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +433 -235
- package/dist/index.mjs.map +1 -1
- package/dist/resume-progress.d.ts +81 -0
- package/dist/reviews.d.ts +11 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.47.0 - 2026-11-21
|
|
4
|
+
|
|
5
|
+
- Add review item kind `verdict` for explicit native Receivability `__decision__` corrections (`accepted`/`rejected`), independent of formula-defined properties. Requires DOC-2786-compatible Document API and Consumer Edge; no new endpoint.
|
|
6
|
+
|
|
7
|
+
- Add signed `execution.progress` callbacks, the closed 23-message catalogue and `reviews.progress()` for one scoped recovery snapshot with labels. Order by `stateVersion` across resume attempts; current review/terminal execution state remains authoritative. No polling or consuming result read.
|
|
8
|
+
|
|
9
|
+
- Add optional `ReviewDecision.outcome` and approved `ReviewTask.outcome` for a final human acceptance/refusal with a required reason, without recalculating the conclusion. Requires DOC-2782-compatible Document API and Consumer Edge.
|
|
10
|
+
- Document optional correction reasons when changing Receivability from false to true; existing validation derogations still require a reason.
|
|
11
|
+
|
|
3
12
|
## 0.46.0 - 2026-11-20
|
|
4
13
|
|
|
5
14
|
- Add `reviews.listExecutions` for sortable, offset-paginated HITL execution metadata, including runs submitted directly to DocMana.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Docmana
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Docmana
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @docmana/sdk
|
|
2
2
|
|
|
3
|
+
DOC-2786 adds review items of kind `verdict`, field `__decision__`, on executed Receivability nodes. Submit the returned opaque `itemId` through `reviews.decide()` with value `accepted` or `rejected`; an optional reason is allowed for rejected-to-accepted overrides. This native verdict is independent of formula-defined boolean properties, which an application may correct separately in the same decision. Node status and downstream routing follow the human verdict without rejudging the corrected node. Requires compatible Document API and Consumer Edge; downstream items and `status` items stay read-only.
|
|
4
|
+
|
|
3
5
|
The HITL pilot uses the explicit prerelease `0.36.0-hitl.2` and the npm `hitl`
|
|
4
6
|
distribution tag. Install the exact version for reproducible pilot builds:
|
|
5
7
|
|
|
@@ -581,6 +583,15 @@ evidence or to a tool name and zero-based call index. Tool-only values have
|
|
|
581
583
|
empty page evidence. Older Consumer versions can omit `tools`, and an extraction
|
|
582
584
|
can omit `grounding` entirely.
|
|
583
585
|
|
|
586
|
+
With DOC-2782-compatible Document API and Consumer Edge, a Receivability
|
|
587
|
+
`false` → `true` correction accepts an optional per-correction `reason`.
|
|
588
|
+
To record a final human decision on a `Finish` review, send `decision: "continue"`,
|
|
589
|
+
`outcome: "accepted"` or `"refused"`, a nonblank `reason`, and no value corrections.
|
|
590
|
+
This closes the existing review without recalculating the conclusion; a refused
|
|
591
|
+
business outcome does not technically reject the execution. The approved task's
|
|
592
|
+
optional `outcome` and protected history/final review block retain the decision.
|
|
593
|
+
Deploy Document API, then Consumer compatibility before using this additive field.
|
|
594
|
+
|
|
584
595
|
`reviews.decide()` accepts optional `pageReassignments`, for example
|
|
585
596
|
`[{ docKey: "receipt", page: 2, documentType: "payment_proof", group: "payment" }]`.
|
|
586
597
|
Pages are one-based and each moved page has one target type. The optional group
|
|
@@ -793,3 +804,15 @@ stable review-scoped `id`, `code`, `message`, resolved `itemIds`, and optional
|
|
|
793
804
|
explanation text. Missing or empty findings preserve the existing presentation.
|
|
794
805
|
These are frozen evidence, not per-field decisions; editing a value does not
|
|
795
806
|
erase its finding. Continue using the same global, versioned decision call.
|
|
807
|
+
|
|
808
|
+
### Resume progress callbacks
|
|
809
|
+
|
|
810
|
+
`verifyExecutionEventCallback` also validates `execution.progress`: opaque `revision`,
|
|
811
|
+
monotonic `stateVersion`, phase, node/item counters and the closed `PROGRESS_MESSAGE_KEYS`.
|
|
812
|
+
Order by `stateVersion` across attempts; deduplicate equal/lower snapshots. Callback
|
|
813
|
+
payloads contain identifiers and codes only. Resolve display labels with one
|
|
814
|
+
`client.reviews.progress(executionId, { organization, signal })` read when opening
|
|
815
|
+
or reconnecting; this never polls or consumes the result. Progress describes a
|
|
816
|
+
resume after a correction, not initial execution or human confirmation. Missing
|
|
817
|
+
or partial snapshots are possible. The current pending task and terminal execution
|
|
818
|
+
status override an older running progress snapshot.
|