@north-light/crouter 0.3.296 → 0.3.297
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/dist/clients/attach/render/card-presentation.js +23 -6
- package/dist/clients/attach/viewer.js +996 -1044
- package/dist/clients/inbox/review/document-surface.d.ts +14 -0
- package/dist/clients/inbox/review/document-surface.js +84 -4
- package/dist/clients/inbox/review/frame.js +1 -1
- package/dist/clients/inbox/review/state.d.ts +10 -1
- package/dist/clients/inbox/review/state.js +45 -1
- package/dist/core/__tests__/fixtures/fake-engine.d.ts +6 -0
- package/dist/core/__tests__/fixtures/fake-engine.js +53 -8
- package/dist/core/__tests__/seam/broker-attach-multiclient.test.js +11 -5
- package/dist/core/__tests__/seam/broker-provider-retry.test.js +80 -4
- package/dist/core/runtime/broker/fault-retry.d.ts +20 -4
- package/dist/core/runtime/broker/fault-retry.js +59 -10
- package/dist/core/runtime/broker.js +15 -5
- package/dist/core/runtime/fault.d.ts +11 -1
- package/dist/core/runtime/fault.js +16 -1
- package/dist/core/runtime/launch.js +2 -2
- package/dist/types.js +1 -1
- package/package.json +8 -8
- package/runtime.lock.json +1429 -467
|
@@ -86,12 +86,29 @@ function inboxSummary(card) {
|
|
|
86
86
|
* model-fallback prompt names its two routes, so it is recognized by the one
|
|
87
87
|
* clause both of its variants build around. */
|
|
88
88
|
function recoverySummary(card) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
const base = (() => {
|
|
90
|
+
switch (card.body) {
|
|
91
|
+
case AUTH_FAULT_RECOVERY_BODY: return 'provider credentials updated';
|
|
92
|
+
case CONNECTION_FAULT_RECOVERY_BODY: return 'network connection restored';
|
|
93
|
+
case PROVIDER_FAULT_RECOVERY_BODY: return 'provider retry';
|
|
94
|
+
default: return card.body.includes('automatically switched to ') ? 'model route changed' : 'runtime recovery';
|
|
95
|
+
}
|
|
96
|
+
})();
|
|
97
|
+
return `${base}${retryAttemptSuffix(card)}`;
|
|
98
|
+
}
|
|
99
|
+
/** A provider-fault retry rolls the conversation back to where the attempt
|
|
100
|
+
* began, so every superseded attempt leaves the active branch and this one
|
|
101
|
+
* card is the whole visible record of the sequence. The attempt facts are what
|
|
102
|
+
* tell a reader which attempt they are looking at; a card without them (an
|
|
103
|
+
* auth reload, a model-route change) reads exactly as it did before. */
|
|
104
|
+
function retryAttemptSuffix(card) {
|
|
105
|
+
const attempt = Number(card.facts['attempt']);
|
|
106
|
+
const max = Number(card.facts['max']);
|
|
107
|
+
if (!Number.isInteger(attempt) || attempt < 1)
|
|
108
|
+
return '';
|
|
109
|
+
return Number.isInteger(max) && max >= attempt
|
|
110
|
+
? ` — attempt ${attempt} of ${max}`
|
|
111
|
+
: ` — attempt ${attempt}`;
|
|
95
112
|
}
|
|
96
113
|
/** The comment notice opens by naming what happened to the comment
|
|
97
114
|
* (daemon/review/comment-notify.ts). */
|