@happyvertical/smrt-ingestion 0.57.20 → 0.57.21
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/FEEDBACK.md +33 -0
- package/PROPOSALS.md +127 -5
- package/README.md +42 -2
- package/REVIEW.md +339 -3
- package/agents/execution.md +15 -0
- package/dist/chunks/{execution-NoDh3pjs.js → execution-9CfjxX8I.js} +110 -22
- package/dist/chunks/execution-9CfjxX8I.js.map +1 -0
- package/dist/chunks/{proposal-errors-VxcTU6Db.js → extraction-CJ-zrbg0.js} +4 -10
- package/dist/chunks/extraction-CJ-zrbg0.js.map +1 -0
- package/dist/chunks/{feedback-CJB900iG.js → feedback-CuUzWKzP.js} +59 -18
- package/dist/chunks/feedback-CuUzWKzP.js.map +1 -0
- package/dist/chunks/reviewer-instruction-Db3jDN9a.js +33 -0
- package/dist/chunks/reviewer-instruction-Db3jDN9a.js.map +1 -0
- package/dist/dto.d.ts +6 -0
- package/dist/dto.d.ts.map +1 -1
- package/dist/execution-internal.d.ts +2 -0
- package/dist/execution-internal.d.ts.map +1 -1
- package/dist/execution.d.ts +43 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/feedback-dto.d.ts +6 -0
- package/dist/feedback-dto.d.ts.map +1 -1
- package/dist/feedback.d.ts +7 -0
- package/dist/feedback.d.ts.map +1 -1
- package/dist/manifest.json +19 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +10 -1
- package/dist/models.js.map +1 -1
- package/dist/presented-filename.d.ts +11 -0
- package/dist/presented-filename.d.ts.map +1 -0
- package/dist/proposal-contracts.d.ts +31 -6
- package/dist/proposal-contracts.d.ts.map +1 -1
- package/dist/proposal-dto.d.ts +17 -0
- package/dist/proposal-dto.d.ts.map +1 -1
- package/dist/proposal-errors.d.ts +16 -0
- package/dist/proposal-errors.d.ts.map +1 -1
- package/dist/proposal-validation.d.ts +26 -0
- package/dist/proposal-validation.d.ts.map +1 -1
- package/dist/proposals.d.ts +5 -1
- package/dist/proposals.d.ts.map +1 -1
- package/dist/proposals.js +261 -69
- package/dist/proposals.js.map +1 -1
- package/dist/review-dto.d.ts +95 -2
- package/dist/review-dto.d.ts.map +1 -1
- package/dist/review-host.d.ts +52 -3
- package/dist/review-host.d.ts.map +1 -1
- package/dist/review-instruction-view.d.ts +12 -0
- package/dist/review-instruction-view.d.ts.map +1 -0
- package/dist/review-summary.d.ts.map +1 -1
- package/dist/reviewer-instruction.d.ts +20 -0
- package/dist/reviewer-instruction.d.ts.map +1 -0
- package/dist/server.d.ts +171 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +835 -49
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +29 -21
- package/dist/sources/common.d.ts +11 -0
- package/dist/sources/common.d.ts.map +1 -1
- package/dist/sources/email.d.ts.map +1 -1
- package/dist/sources/http.d.ts.map +1 -1
- package/dist/sources/watch-folder.d.ts.map +1 -1
- package/dist/svelte/components/ActionReview.svelte +15 -46
- package/dist/svelte/components/ActionReview.svelte.d.ts.map +1 -1
- package/dist/svelte/components/CandidatePicker.svelte +72 -0
- package/dist/svelte/components/CandidatePicker.svelte.d.ts +15 -0
- package/dist/svelte/components/CandidatePicker.svelte.d.ts.map +1 -0
- package/dist/svelte/components/InboxView.svelte +14 -3
- package/dist/svelte/components/InboxView.svelte.d.ts +8 -1
- package/dist/svelte/components/InboxView.svelte.d.ts.map +1 -1
- package/dist/svelte/components/IntakeInbox.svelte +6 -3
- package/dist/svelte/components/IntakeInbox.svelte.d.ts +4 -1
- package/dist/svelte/components/IntakeInbox.svelte.d.ts.map +1 -1
- package/dist/svelte/components/IntakeReview.svelte +4 -2
- package/dist/svelte/components/IntakeReview.svelte.d.ts +2 -0
- package/dist/svelte/components/IntakeReview.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ReviewView.svelte +403 -62
- package/dist/svelte/components/ReviewView.svelte.d.ts +2 -0
- package/dist/svelte/components/ReviewView.svelte.d.ts.map +1 -1
- package/dist/svelte/i18n.d.ts +17 -0
- package/dist/svelte/i18n.d.ts.map +1 -1
- package/dist/svelte/i18n.js +17 -0
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/view-utils.d.ts +2 -0
- package/dist/svelte/view-utils.d.ts.map +1 -1
- package/dist/svelte/view-utils.js +12 -0
- package/package.json +13 -13
- package/dist/chunks/execution-NoDh3pjs.js.map +0 -1
- package/dist/chunks/execution-internal-DWteDHM2.js +0 -7
- package/dist/chunks/execution-internal-DWteDHM2.js.map +0 -1
- package/dist/chunks/feedback-CJB900iG.js.map +0 -1
- package/dist/chunks/proposal-errors-VxcTU6Db.js.map +0 -1
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Input,
|
|
2
|
+
import { Input, Textarea } from '@happyvertical/smrt-ui/forms';
|
|
3
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
4
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
5
5
|
import { onDestroy, untrack } from 'svelte';
|
|
6
6
|
import type { ReviewInput } from '../../execution-dto.js';
|
|
7
|
-
import type {
|
|
8
|
-
CandidatePage,
|
|
9
|
-
ProposalCatalogEntry,
|
|
10
|
-
} from '../../proposal-dto.js';
|
|
7
|
+
import type { ProposalCatalogEntry } from '../../proposal-dto.js';
|
|
11
8
|
import type { IntakeReviewHost, ReviewAction } from '../../review-dto.js';
|
|
12
9
|
import { M } from '../i18n.js';
|
|
13
|
-
import { argumentsObject } from '../view-utils.js';
|
|
10
|
+
import { argumentsObject, missingRequired } from '../view-utils.js';
|
|
11
|
+
import CandidatePicker from './CandidatePicker.svelte';
|
|
14
12
|
export interface Props {
|
|
15
13
|
host: IntakeReviewHost;
|
|
16
14
|
itemId: string;
|
|
@@ -26,10 +24,6 @@ const { t } = useI18n();
|
|
|
26
24
|
// ReviewView keys this editor by action/revision/reviewVersion; edits are local to that binding.
|
|
27
25
|
let args = $state(untrack(() => JSON.stringify(action.args, null, 2) ?? '')),
|
|
28
26
|
reason = $state(''),
|
|
29
|
-
query = $state(''),
|
|
30
|
-
field = $state(''),
|
|
31
|
-
candidates = $state<CandidatePage>(),
|
|
32
|
-
searching = $state(false),
|
|
33
27
|
invalid = $state(false),
|
|
34
28
|
comment = $state(''),
|
|
35
29
|
planArgs = $state(
|
|
@@ -64,6 +58,13 @@ const editable = $derived(
|
|
|
64
58
|
const planEditable = $derived(
|
|
65
59
|
action.args !== undefined && (waiting || revisable),
|
|
66
60
|
);
|
|
61
|
+
// Required handler arguments absent from the current draft; a hint only,
|
|
62
|
+
// the server-side preview still validates the published arguments (#4208).
|
|
63
|
+
const missing = $derived(
|
|
64
|
+
catalog && editable && !action.plan
|
|
65
|
+
? missingRequired(catalog.argsSchema, args)
|
|
66
|
+
: [],
|
|
67
|
+
);
|
|
67
68
|
async function decide(decision: ReviewInput['decision']) {
|
|
68
69
|
if (!waiting) return;
|
|
69
70
|
let correctedArgs: ReviewInput['correctedArgs'];
|
|
@@ -120,24 +121,6 @@ async function saveEdits() {
|
|
|
120
121
|
};
|
|
121
122
|
await run(() => host.editAction?.(input) ?? Promise.resolve());
|
|
122
123
|
}
|
|
123
|
-
async function search() {
|
|
124
|
-
if (!action.handlerId || !action.handlerVersion || searching) return;
|
|
125
|
-
searching = true;
|
|
126
|
-
candidates = undefined;
|
|
127
|
-
try {
|
|
128
|
-
const result = await host.candidates({
|
|
129
|
-
itemId,
|
|
130
|
-
handlerId: action.handlerId,
|
|
131
|
-
handlerVersion: action.handlerVersion,
|
|
132
|
-
query,
|
|
133
|
-
});
|
|
134
|
-
if (alive) candidates = result;
|
|
135
|
-
} catch {
|
|
136
|
-
if (alive) deny();
|
|
137
|
-
} finally {
|
|
138
|
-
if (alive) searching = false;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
124
|
async function editPlan() {
|
|
142
125
|
const plan = action.plan ?? action.stalePlan;
|
|
143
126
|
const attemptId = action.plan?.attemptId ?? currentAttemptId;
|
|
@@ -168,18 +151,9 @@ async function editPlan() {
|
|
|
168
151
|
};
|
|
169
152
|
await run(() => host.editPlan?.(input) ?? Promise.resolve());
|
|
170
153
|
}
|
|
171
|
-
function choose(id: string) {
|
|
154
|
+
function choose(field: string, id: string) {
|
|
172
155
|
try {
|
|
173
|
-
|
|
174
|
-
const ref = catalog?.references[field];
|
|
175
|
-
if (
|
|
176
|
-
ref?.kind !== 'candidate' ||
|
|
177
|
-
!candidates?.items.some(
|
|
178
|
-
(candidate) => candidate.id === id && candidate.model === ref.model,
|
|
179
|
-
)
|
|
180
|
-
)
|
|
181
|
-
return;
|
|
182
|
-
args = JSON.stringify({ ...values, [field]: id }, null, 2);
|
|
156
|
+
args = JSON.stringify({ ...argumentsObject(args), [field]: id }, null, 2);
|
|
183
157
|
} catch {
|
|
184
158
|
invalid = true;
|
|
185
159
|
}
|
|
@@ -192,14 +166,9 @@ function choose(id: string) {
|
|
|
192
166
|
<h4>{t(M['ingestion.effects'])}</h4><pre>{JSON.stringify(action.review.display,null,2)}</pre>
|
|
193
167
|
<Textarea aria-label={t(M['ingestion.args'])} bind:value={args} readonly={!editable || !!action.plan} rows={8} />
|
|
194
168
|
{#if editable}
|
|
169
|
+
{#if missing.length}<h4>{t(M['ingestion.missing'])}</h4><ul>{#each missing as name (name)}<li>{name}</li>{/each}</ul>{/if}
|
|
195
170
|
<Input aria-label={t(M['ingestion.reason'])} bind:value={reason} />
|
|
196
|
-
{#if !action.plan && catalog
|
|
197
|
-
<h4>{t(M['ingestion.candidates'])}</h4>
|
|
198
|
-
<Select aria-label={t(M['ingestion.field'])} bind:value={field}><option value="">{t(M['ingestion.field'])}</option>{#each Object.entries(catalog.references) as [name,ref]}{#if ref.kind === 'candidate'}<option value={name}>{name}</option>{/if}{/each}</Select>
|
|
199
|
-
<Input aria-label={t(M['ingestion.query'])} bind:value={query} />
|
|
200
|
-
<Button onclick={search} disabled={searching}>{t(M['ingestion.search'])}</Button>
|
|
201
|
-
{#if candidates}<ul>{#each candidates.items as candidate (candidate.key)}<li>{candidate.label} <Button disabled={!field} onclick={() => choose(candidate.id)}>{t(M['ingestion.choose'])}</Button></li>{/each}</ul>{#if candidates.truncated}<p>{t(M['ingestion.truncated'])}</p>{/if}{/if}
|
|
202
|
-
{/if}
|
|
171
|
+
{#if !action.plan && catalog}<CandidatePicker {host} {itemId} {catalog} {deny} onchoose={choose} />{/if}
|
|
203
172
|
{#if dirty}<p>{t(M['ingestion.reviewAgain'])}</p>{/if}
|
|
204
173
|
{#if invalid}<p role="alert">{t(M['ingestion.invalid'])}</p>{/if}
|
|
205
174
|
<div class="controls">{#if waiting}<Button disabled={dirty} onclick={() => decide('approve')}>{t(M['ingestion.approve'])}</Button>{/if}{#if !action.plan}<Button disabled={!dirty} onclick={saveEdits}>{t(M['ingestion.correct'])}</Button>{/if}{#if waiting}<Button onclick={() => decide('reject')}>{t(M['ingestion.reject'])}</Button><Button onclick={() => decide('defer')}>{t(M['ingestion.defer'])}</Button>{/if}</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionReview.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ActionReview.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ActionReview.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ActionReview.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAK1E,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAmMD,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Input, Select } from '@happyvertical/smrt-ui/forms';
|
|
3
|
+
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
5
|
+
import { onDestroy } from 'svelte';
|
|
6
|
+
import type {
|
|
7
|
+
CandidatePage,
|
|
8
|
+
ProposalCatalogEntry,
|
|
9
|
+
} from '../../proposal-dto.js';
|
|
10
|
+
import type { IntakeReviewHost } from '../../review-dto.js';
|
|
11
|
+
import { M } from '../i18n.js';
|
|
12
|
+
export interface Props {
|
|
13
|
+
host: IntakeReviewHost;
|
|
14
|
+
itemId: string;
|
|
15
|
+
catalog: ProposalCatalogEntry;
|
|
16
|
+
/** A failed search fails closed: the owning view discards its payloads. */
|
|
17
|
+
deny: () => void;
|
|
18
|
+
/** Called only with a declared candidate field and an id from the current authorized page. */
|
|
19
|
+
onchoose: (field: string, id: string) => void;
|
|
20
|
+
}
|
|
21
|
+
let { host, itemId, catalog, deny, onchoose }: Props = $props();
|
|
22
|
+
const { t } = useI18n();
|
|
23
|
+
let query = $state(''),
|
|
24
|
+
field = $state(''),
|
|
25
|
+
candidates = $state<CandidatePage>(),
|
|
26
|
+
searching = $state(false);
|
|
27
|
+
let alive = true;
|
|
28
|
+
onDestroy(() => {
|
|
29
|
+
alive = false;
|
|
30
|
+
});
|
|
31
|
+
const fields = $derived(
|
|
32
|
+
Object.entries(catalog.references)
|
|
33
|
+
.filter(([, ref]) => ref.kind === 'candidate')
|
|
34
|
+
.map(([name]) => name),
|
|
35
|
+
);
|
|
36
|
+
async function search() {
|
|
37
|
+
if (searching) return;
|
|
38
|
+
searching = true;
|
|
39
|
+
candidates = undefined;
|
|
40
|
+
try {
|
|
41
|
+
const result = await host.candidates({
|
|
42
|
+
itemId,
|
|
43
|
+
handlerId: catalog.id,
|
|
44
|
+
handlerVersion: catalog.version,
|
|
45
|
+
query,
|
|
46
|
+
});
|
|
47
|
+
if (alive) candidates = result;
|
|
48
|
+
} catch {
|
|
49
|
+
if (alive) deny();
|
|
50
|
+
} finally {
|
|
51
|
+
if (alive) searching = false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function choose(id: string) {
|
|
55
|
+
const ref = catalog.references[field];
|
|
56
|
+
if (
|
|
57
|
+
ref?.kind !== 'candidate' ||
|
|
58
|
+
!candidates?.items.some(
|
|
59
|
+
(candidate) => candidate.id === id && candidate.model === ref.model,
|
|
60
|
+
)
|
|
61
|
+
)
|
|
62
|
+
return;
|
|
63
|
+
onchoose(field, id);
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
{#if fields.length}
|
|
67
|
+
<h4>{t(M['ingestion.candidates'])}</h4>
|
|
68
|
+
<Select aria-label={t(M['ingestion.field'])} bind:value={field}><option value="">{t(M['ingestion.field'])}</option>{#each fields as name (name)}<option value={name}>{name}</option>{/each}</Select>
|
|
69
|
+
<Input aria-label={t(M['ingestion.query'])} bind:value={query} />
|
|
70
|
+
<Button onclick={search} disabled={searching}>{t(M['ingestion.search'])}</Button>
|
|
71
|
+
{#if candidates}<ul>{#each candidates.items as candidate (candidate.key)}<li>{candidate.label} <Button disabled={!field} onclick={() => choose(candidate.id)}>{t(M['ingestion.choose'])}</Button></li>{/each}</ul>{#if candidates.truncated}<p>{t(M['ingestion.truncated'])}</p>{/if}{/if}
|
|
72
|
+
{/if}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ProposalCatalogEntry } from '../../proposal-dto.js';
|
|
2
|
+
import type { IntakeReviewHost } from '../../review-dto.js';
|
|
3
|
+
export interface Props {
|
|
4
|
+
host: IntakeReviewHost;
|
|
5
|
+
itemId: string;
|
|
6
|
+
catalog: ProposalCatalogEntry;
|
|
7
|
+
/** A failed search fails closed: the owning view discards its payloads. */
|
|
8
|
+
deny: () => void;
|
|
9
|
+
/** Called only with a declared candidate field and an id from the current authorized page. */
|
|
10
|
+
onchoose: (field: string, id: string) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const CandidatePicker: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type CandidatePicker = ReturnType<typeof CandidatePicker>;
|
|
14
|
+
export default CandidatePicker;
|
|
15
|
+
//# sourceMappingURL=CandidatePicker.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CandidatePicker.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/CandidatePicker.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,oBAAoB,CAAC;IAC9B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,8FAA8F;IAC9F,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAiED,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
import { FilePicker, Input, Select } from '@happyvertical/smrt-ui/forms';
|
|
3
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
4
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
5
|
-
import { onDestroy, onMount } from 'svelte';
|
|
5
|
+
import { onDestroy, onMount, type Snippet } from 'svelte';
|
|
6
6
|
import type {
|
|
7
7
|
InboxEntry,
|
|
8
8
|
InboxState,
|
|
9
9
|
IntakeReviewHost,
|
|
10
10
|
} from '../../review-dto.js';
|
|
11
11
|
import { M } from '../i18n.js';
|
|
12
|
+
import { evidenceUrl } from '../view-utils.js';
|
|
12
13
|
export interface Props {
|
|
13
14
|
host: IntakeReviewHost;
|
|
14
15
|
onselect?: (itemId: string) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Optional per-row aside; without it a row shows the host's original
|
|
18
|
+
* link/preview. Rendered in a plain `div`, not an `aside` landmark, so a
|
|
19
|
+
* page of rows does not add one complementary landmark per row.
|
|
20
|
+
*/
|
|
21
|
+
rowAside?: Snippet<[InboxEntry]>;
|
|
15
22
|
}
|
|
16
|
-
let { host, onselect }: Props = $props();
|
|
23
|
+
let { host, onselect, rowAside }: Props = $props();
|
|
17
24
|
const { t } = useI18n();
|
|
18
25
|
const states: InboxState[] = [
|
|
19
26
|
'processing',
|
|
@@ -121,6 +128,10 @@ onMount(() => {
|
|
|
121
128
|
{#if !pending && !error && !items.length}<p>{t(M['ingestion.empty'])}</p>{/if}
|
|
122
129
|
<ul>{#each items as entry (entry.item.id)}<li>
|
|
123
130
|
<h2>{entry.label}</h2><p>{t(M[`ingestion.${entry.state}`])}</p>
|
|
131
|
+
{#if rowAside}<div class="row-aside">{@render rowAside(entry)}</div>{:else if entry.evidence}{@const original = evidenceUrl(entry.evidence.viewUrl)}{@const thumbnail = evidenceUrl(entry.evidence.thumbnailUrl)}{#if thumbnail || original}<div class="row-aside">
|
|
132
|
+
{#if thumbnail}<img src={thumbnail} alt={entry.evidence.label} loading="lazy" />{/if}
|
|
133
|
+
{#if original}<a href={original} target="_blank" rel="noopener noreferrer" aria-label={`${t(M['ingestion.original'])}: ${entry.label}`}>{t(M['ingestion.original'])}</a>{/if}
|
|
134
|
+
</div>{/if}{/if}
|
|
124
135
|
<Button onclick={() => onselect?.(entry.item.id)} disabled={pending}>{t(M['ingestion.open'])}</Button>
|
|
125
136
|
<Input aria-label={`${t(M['ingestion.assignee'])}: ${entry.label}`} bind:value={assignments[entry.item.id]} disabled={pending} />
|
|
126
137
|
<Button disabled={pending} onclick={() => mutate(() => host.assign({itemId:entry.item.id,expectedVersion:entry.assignment.version,assigneeId:assignments[entry.item.id] || null,requestId:crypto.randomUUID()}))}>{t(M['ingestion.assign'])}</Button>
|
|
@@ -130,6 +141,6 @@ onMount(() => {
|
|
|
130
141
|
<style>
|
|
131
142
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
132
143
|
@layer smrt.theme {
|
|
133
|
-
section{max-width:72rem;margin-inline:auto;padding:1rem;color:var(--smrt-color-on-surface)}.toolbar{display:flex;flex-wrap:wrap;gap:.75rem;margin-block:1rem}ul{list-style:none;padding:0}li{padding:1rem;border-block-end:var(--smrt-hairline);display:grid;gap:.75rem}h2{font-size:1.1rem}
|
|
144
|
+
section{max-width:72rem;margin-inline:auto;padding:1rem;color:var(--smrt-color-on-surface)}.toolbar{display:flex;flex-wrap:wrap;gap:.75rem;margin-block:1rem}ul{list-style:none;padding:0}li{padding:1rem;border-block-end:var(--smrt-hairline);display:grid;gap:.75rem}h2{font-size:1.1rem}.row-aside{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.row-aside img{max-block-size:6rem;max-inline-size:100%;object-fit:contain}
|
|
134
145
|
}
|
|
135
146
|
</style>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Snippet } from 'svelte';
|
|
2
|
+
import type { InboxEntry, IntakeReviewHost } from '../../review-dto.js';
|
|
2
3
|
export interface Props {
|
|
3
4
|
host: IntakeReviewHost;
|
|
4
5
|
onselect?: (itemId: string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Optional per-row aside; without it a row shows the host's original
|
|
8
|
+
* link/preview. Rendered in a plain `div`, not an `aside` landmark, so a
|
|
9
|
+
* page of rows does not add one complementary landmark per row.
|
|
10
|
+
*/
|
|
11
|
+
rowAside?: Snippet<[InboxEntry]>;
|
|
5
12
|
}
|
|
6
13
|
declare const InboxView: import("svelte").Component<Props, {}, "">;
|
|
7
14
|
type InboxView = ReturnType<typeof InboxView>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxView.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InboxView.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InboxView.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/InboxView.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EACV,UAAU,EAEV,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CAClC;AAoID,QAAA,MAAM,SAAS,2CAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { InboxEntry, IntakeReviewHost } from '../../review-dto.js';
|
|
3
4
|
import InboxView from './InboxView.svelte';
|
|
4
5
|
export interface Props {
|
|
5
6
|
host: IntakeReviewHost;
|
|
6
7
|
contextKey?: string;
|
|
7
8
|
onselect?: (itemId: string) => void;
|
|
9
|
+
/** Optional per-row aside (preview, original link); receives the page entry. */
|
|
10
|
+
rowAside?: Snippet<[InboxEntry]>;
|
|
8
11
|
}
|
|
9
|
-
let { host, contextKey = '', onselect }: Props = $props();
|
|
12
|
+
let { host, contextKey = '', onselect, rowAside }: Props = $props();
|
|
10
13
|
</script>
|
|
11
|
-
{#key host}{#key contextKey}<InboxView {host} {onselect} />{/key}{/key}
|
|
14
|
+
{#key host}{#key contextKey}<InboxView {host} {onselect} {rowAside} />{/key}{/key}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { InboxEntry, IntakeReviewHost } from '../../review-dto.js';
|
|
2
3
|
export interface Props {
|
|
3
4
|
host: IntakeReviewHost;
|
|
4
5
|
contextKey?: string;
|
|
5
6
|
onselect?: (itemId: string) => void;
|
|
7
|
+
/** Optional per-row aside (preview, original link); receives the page entry. */
|
|
8
|
+
rowAside?: Snippet<[InboxEntry]>;
|
|
6
9
|
}
|
|
7
10
|
declare const IntakeInbox: import("svelte").Component<Props, {}, "">;
|
|
8
11
|
type IntakeInbox = ReturnType<typeof IntakeInbox>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntakeInbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/IntakeInbox.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"IntakeInbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/IntakeInbox.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGxE,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CAClC;AAYD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -5,7 +5,9 @@ export interface Props {
|
|
|
5
5
|
host: IntakeReviewHost;
|
|
6
6
|
itemId: string;
|
|
7
7
|
contextKey?: string;
|
|
8
|
+
/** Reload interval while the host reports the item as processing. */
|
|
9
|
+
pollMs?: number;
|
|
8
10
|
}
|
|
9
|
-
let { host, itemId, contextKey = '' }: Props = $props();
|
|
11
|
+
let { host, itemId, contextKey = '', pollMs = 2000 }: Props = $props();
|
|
10
12
|
</script>
|
|
11
|
-
{#key host}{#key contextKey}{#key itemId}<ReviewView {host} {itemId} />{/key}{/key}{/key}
|
|
13
|
+
{#key host}{#key contextKey}{#key itemId}<ReviewView {host} {itemId} {pollMs} />{/key}{/key}{/key}
|
|
@@ -3,6 +3,8 @@ export interface Props {
|
|
|
3
3
|
host: IntakeReviewHost;
|
|
4
4
|
itemId: string;
|
|
5
5
|
contextKey?: string;
|
|
6
|
+
/** Reload interval while the host reports the item as processing. */
|
|
7
|
+
pollMs?: number;
|
|
6
8
|
}
|
|
7
9
|
declare const IntakeReview: import("svelte").Component<Props, {}, "">;
|
|
8
10
|
type IntakeReview = ReturnType<typeof IntakeReview>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntakeReview.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/IntakeReview.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"IntakeReview.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/IntakeReview.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAWD,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|