@parcha/agentrun-serve 0.1.0-beta.62 → 0.1.0-beta.63
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 +47 -0
- package/README.md +32 -13
- package/dist/adapters.js +4 -2
- package/dist/agent-delete.d.ts +3 -3
- package/dist/agent-delete.js +50 -4
- package/dist/chatgpt-plan.d.ts +8 -1
- package/dist/chatgpt-plan.js +55 -6
- package/dist/console/assets/{backend-DEgVn5lC.js → backend-BxQ2G1M0.js} +2 -2
- package/dist/console/assets/{index-CG5tELph.js → index-C8Y5Zl8x.js} +2 -2
- package/dist/console/assets/share-CjBJ_rxP.js +6 -0
- package/dist/console/index.html +1 -1
- package/dist/console/share.html +1 -1
- package/dist/harness-opencode/adapter.d.ts +3 -1
- package/dist/harness-opencode/adapter.js +6 -2
- package/dist/harness-opencode/harness.d.ts +4 -0
- package/dist/harness-opencode/harness.js +6 -1
- package/dist/host-tools.d.ts +18 -3
- package/dist/host-tools.js +27 -4
- package/dist/learn/ledger.d.ts +37 -16
- package/dist/learn/ledger.js +56 -24
- package/dist/learn/promote.d.ts +4 -1
- package/dist/learning-cost.d.ts +5 -3
- package/dist/learning-model.js +7 -5
- package/dist/learning-work.d.ts +69 -0
- package/dist/learning-work.js +148 -0
- package/dist/openapi.js +23 -9
- package/dist/run-export.js +7 -4
- package/dist/run-launch.d.ts +6 -1
- package/dist/run-launch.js +10 -3
- package/dist/run-view.js +9 -3
- package/dist/runnable.js +5 -5
- package/dist/runner/adapter-loop.js +31 -3
- package/dist/runner/adapter-run-spec.d.ts +14 -3
- package/dist/runner/adapter-run-spec.js +50 -19
- package/dist/runner/adapters/index.d.ts +2 -0
- package/dist/runner/adapters/index.js +3 -0
- package/dist/runner/adapters/pi.d.ts +42 -3
- package/dist/runner/adapters/pi.js +114 -13
- package/dist/runner/audit.d.ts +8 -2
- package/dist/runner/audit.js +34 -18
- package/dist/runner/book-cut.d.ts +6 -0
- package/dist/runner/book-cut.js +38 -0
- package/dist/runner/claim-secrets.d.ts +9 -4
- package/dist/runner/claim-secrets.js +10 -5
- package/dist/runner/cli-run-spec.d.ts +0 -2
- package/dist/runner/cli-run-spec.js +44 -19
- package/dist/runner/held.d.ts +6 -3
- package/dist/runner/learned-first.d.ts +5 -0
- package/dist/runner/learned-first.js +1 -1
- package/dist/runner/learning-end.d.ts +15 -8
- package/dist/runner/learning-end.js +23 -7
- package/dist/runner/loop-contract.d.ts +4 -0
- package/dist/runner/main.js +2 -0
- package/dist/runner/model-route.d.ts +4 -0
- package/dist/runner/model-route.js +1 -1
- package/dist/runner/pr-checkout.d.ts +12 -0
- package/dist/runner/pr-checkout.js +21 -2
- package/dist/runner/promotion.d.ts +9 -2
- package/dist/runner/promotion.js +79 -28
- package/dist/runner/reflect-hook.d.ts +7 -0
- package/dist/runner/reflect-hook.js +2 -1
- package/dist/runner/run-child-host.js +21 -12
- package/dist/runner/run-child.js +1 -0
- package/dist/runner/runner.d.ts +9 -0
- package/dist/runner/runner.js +156 -25
- package/dist/runner/store-port.d.ts +4 -1
- package/dist/runner/workflow-first.js +4 -3
- package/dist/runner/workflow-loop.js +13 -1
- package/dist/secret-cut.d.ts +4 -0
- package/dist/secret-cut.js +1 -1
- package/dist/secret-rules.d.ts +2 -0
- package/dist/secret-rules.js +63 -19
- package/dist/server.js +20 -9
- package/dist/share-host.js +6 -3
- package/dist/store/schema.d.ts +4 -3
- package/dist/store/schema.js +4 -3
- package/dist/store/seal.d.ts +8 -2
- package/dist/store/seal.js +13 -2
- package/dist/store/sqlite/learning-rows.js +2 -1
- package/dist/store/sqlite/run-patch.js +4 -4
- package/dist/store/sqlite/store.js +28 -4
- package/dist/store/store.d.ts +5 -0
- package/dist/store-reads/journal.d.ts +2 -0
- package/dist/store-reads/journal.js +1 -1
- package/dist/store-reads/learning.d.ts +4 -3
- package/dist/store-reads/learning.js +62 -18
- package/dist/store-view.d.ts +3 -0
- package/dist/store-view.js +18 -1
- package/dist/tool-list.d.ts +4 -0
- package/dist/tool-list.js +4 -0
- package/dist/tools.js +2 -2
- package/dist/workspace/attach.js +22 -5
- package/dist/workspace/kind-skills/desktop/SKILL.md +7 -3
- package/package.json +12 -12
- package/templates/kyb/agent.md +7 -1
- package/templates/kyb/evals/list-file-fuzzy-alias/case.yaml +10 -0
- package/templates/kyb/evals/list-file-fuzzy-alias/fixtures/web.json +58 -0
- package/templates/kyb/evals/list-file-fuzzy-alias/graders/finds-the-transliteration.md +17 -0
- package/templates/kyb/evals/list-file-fuzzy-alias/graders/greps-the-files.md +11 -0
- package/templates/kyb/evals/list-file-fuzzy-alias/graders/saves-the-uk-file.md +8 -0
- package/templates/kyb/evals/list-file-fuzzy-alias/prompt.md +7 -0
- package/templates/kyb/evals/list-file-hit/case.yaml +10 -0
- package/templates/kyb/evals/list-file-hit/fixtures/web.json +58 -0
- package/templates/kyb/evals/list-file-hit/graders/greps-the-files.md +11 -0
- package/templates/kyb/evals/list-file-hit/graders/hits-by-company-number.md +18 -0
- package/templates/kyb/evals/list-file-hit/graders/saves-the-uk-file.md +8 -0
- package/templates/kyb/evals/list-file-hit/prompt.md +7 -0
- package/templates/kyb/evals/list-file-no-hit/case.yaml +10 -0
- package/templates/kyb/evals/list-file-no-hit/fixtures/web.json +58 -0
- package/templates/kyb/evals/list-file-no-hit/graders/greps-the-files.md +11 -0
- package/templates/kyb/evals/list-file-no-hit/graders/no-hit-by-whole-file.md +12 -0
- package/templates/kyb/evals/list-file-no-hit/graders/saves-the-uk-file.md +8 -0
- package/templates/kyb/evals/list-file-no-hit/prompt.md +7 -0
- package/templates/kyb/evals/list-file-short-name/case.yaml +9 -0
- package/templates/kyb/evals/list-file-short-name/fixtures/web.json +58 -0
- package/templates/kyb/evals/list-file-short-name/graders/finds-the-short-name.md +19 -0
- package/templates/kyb/evals/list-file-short-name/graders/greps-the-files.md +11 -0
- package/templates/kyb/evals/list-file-short-name/graders/saves-the-uk-file.md +8 -0
- package/templates/kyb/evals/list-file-short-name/prompt.md +7 -0
- package/templates/kyb/evals/list-file-split-name/case.yaml +11 -0
- package/templates/kyb/evals/list-file-split-name/fixtures/web.json +58 -0
- package/templates/kyb/evals/list-file-split-name/graders/finds-the-director.md +18 -0
- package/templates/kyb/evals/list-file-split-name/graders/greps-the-files.md +11 -0
- package/templates/kyb/evals/list-file-split-name/graders/saves-the-uk-file.md +8 -0
- package/templates/kyb/evals/list-file-split-name/prompt.md +7 -0
- package/templates/kyb/kyb.schema.json +2 -2
- package/templates/kyb/rules/SANCTIONS.md +82 -13
- package/dist/console/assets/share-CIeFK2Oe.js +0 -6
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: llm
|
|
3
|
+
---
|
|
4
|
+
The subject is Halvane Freight Ltd, GB, a company on none of the lists. The requester's note names its sole director, Mohammad Hassan Akhund, with no date of birth or other identifier. Facts the grader can rely on, all from the list owners' own files the run saved:
|
|
5
|
+
- UN entry TAi.002 (Taliban list, listed 2001-01-25): `FIRST_NAME` MOHAMMAD, `SECOND_NAME` HASSAN and `THIRD_NAME` AKHUND, each on a line of its own. The saved UN file has 30 lines that hold AKHUND, 64 that hold HASSAN and 134 that hold MOHAMMAD.
|
|
6
|
+
- UK Sanctions List `Unique ID` AFG0006 (UN reference TAi.002), `AKHUND`, `MOHAMMAD`, `HASSAN`.
|
|
7
|
+
- EU entry with `Entity_LogicalId` 603 and EU reference EU.341.63, `Mohammad Hassan Akhund`.
|
|
8
|
+
- OFAC's only entry with that surname is SDN 12798, `AKHUND, Mohammad Aman`: a different name, and a surname alone is not a match.
|
|
9
|
+
|
|
10
|
+
Read the answer's last fenced `json` block, its `report_markdown` included. Pass only if all of these hold:
|
|
11
|
+
|
|
12
|
+
1. The director is screened. His `UN Security Council Consolidated` result is `possible_match` on TAi.002, his `UK Sanctions List` result `possible_match` on AFG0006 and his `EU Consolidated Financial Sanctions` result `possible_match` on 603 or EU.341.63, each with `method` `full_list_grep`. None is `no_hit`, `not_checked` or `false_positive`.
|
|
13
|
+
2. No result for the director is a `possible_match` or `confirmed_hit` on OFAC 12798.
|
|
14
|
+
3. The company's result on each list is `no_hit`.
|
|
15
|
+
4. `verdict.decision` is `escalate` or `reject`, never `proceed`.
|
|
16
|
+
5. Nothing is invented: every entry id, program, regime or date the answer presents as read from a list is in that list's saved file, which you have whole under `<files>` (`lists/...`), except `lists/un.txt`, too large to show and listed by its size alone: for it, the facts above are what it holds for this case. A value a shown file holds passes, and one no shown file holds fails, even if it is true elsewhere; a value given as read from the UN file passes unless it contradicts the facts above.
|
|
17
|
+
|
|
18
|
+
Fail if any one does not hold.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: llm
|
|
3
|
+
---
|
|
4
|
+
Judge the run's calls, not what its answer says about them. Read the answer's last fenced `json` block for each list's result and its `method`. The lists' saved files are `lists/ofac-sdn.csv` and `lists/ofac-alt.csv` (OFAC SDN), `lists/ofac-cons.csv` and `lists/ofac-cons-alt.csv` (OFAC Consolidated), `lists/un.txt` (UN), `lists/eu.txt` (EU) and `lists/uk.csv` (UK).
|
|
5
|
+
|
|
6
|
+
Pass only if, for each list whose result for any subject is by `full_list_grep`, both of these hold:
|
|
7
|
+
|
|
8
|
+
1. A `web_save` call saved that list's file at its path above and answered `ok: true`.
|
|
9
|
+
2. A later `bash` call searched that saved file for a subject's name: a `grep` (or `rg`) that names the file's path and a word of the name, a written form of it, or the whole name. A call that reads only a file's first lines or its version (`sed -n '1,1p'`, `head`, `grep -m 1 -o 'dateGenerated=...'`) is not a search, and neither is reading one record by its id, nor a call that failed or that the shell refused (its result says it was refused). For OFAC, a search of either of its two files counts.
|
|
10
|
+
|
|
11
|
+
Fail if any list reported by `full_list_grep` lacks either one, and say which list and which.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: A director whose surname is too common in the UN file to read whole. AKHUND is on 30 of its lines (HASSAN 64, MOHAMMAD 134), and UN entry TAi.002 keeps MOHAMMAD, HASSAN and AKHUND on lines of their own. The agent narrows whole UN records, not lines, finds TAi.002 (and UK AFG0006, EU 603) and reports a possible match for the director, never no_hit.
|
|
3
|
+
runs: 3
|
|
4
|
+
max_cost_usd: 1.50
|
|
5
|
+
input: { company: Halvane Freight Ltd, country: GB, reason: customer }
|
|
6
|
+
---
|
|
7
|
+
They signed up for our paid plan this morning. Their sole director is Mohammad Hassan Akhund.
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"properties": {
|
|
106
106
|
"list": { "enum": ["OFAC SDN", "OFAC Consolidated (non-SDN)", "UN Security Council Consolidated", "EU Consolidated Financial Sanctions", "UK Sanctions List"] },
|
|
107
107
|
"version": { "type": "string", "minLength": 1, "maxLength": 100, "description": "the list's publication or generation date as the list or its index states it, or 'unknown'" },
|
|
108
|
-
"checked": { "type": "boolean", "description": "whether this list was screened in this run by any method of SANCTIONS.md (rows in the input, a screening tool, an index with the owner's records); false when every subject's result on it is not_checked" },
|
|
108
|
+
"checked": { "type": "boolean", "description": "whether this list was screened in this run by any method of SANCTIONS.md (rows in the input, a screening tool, the list's own file saved and searched, an index with the owner's records); false when every subject's result on it is not_checked" },
|
|
109
109
|
"source": { "$ref": "#/$defs/sourceId" }
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"properties": {
|
|
133
133
|
"list": { "enum": ["OFAC SDN", "OFAC Consolidated (non-SDN)", "UN Security Council Consolidated", "EU Consolidated Financial Sanctions", "UK Sanctions List"] },
|
|
134
134
|
"result": { "enum": ["no_hit", "confirmed_hit", "possible_match", "false_positive", "not_checked"] },
|
|
135
|
-
"method": { "enum": ["list_rows_in_input", "full_list_read", "screening_tool", "index_then_source_record", "index_only", "not_checked"] },
|
|
135
|
+
"method": { "enum": ["list_rows_in_input", "full_list_grep", "full_list_read", "screening_tool", "index_then_source_record", "index_only", "not_checked"] },
|
|
136
136
|
"matches": {
|
|
137
137
|
"type": "array",
|
|
138
138
|
"maxItems": 5,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Sanctions screening
|
|
2
2
|
|
|
3
3
|
You screen against the lists themselves: the list owner's file or the list owner's record of an entry, never a news
|
|
4
|
-
article about a designation. Every URL below was checked on 2026-11-08
|
|
4
|
+
article about a designation. Every URL below was checked on 2026-11-08, and the type each
|
|
5
|
+
list's file is sent as (which sets where web_save may save it) on 2026-11-25.
|
|
5
6
|
|
|
6
7
|
## The lists
|
|
7
8
|
|
|
@@ -36,7 +37,8 @@ You will meet these when rows of a list are in the message, or when you read a r
|
|
|
36
37
|
`Type of entity`, `Parent company`, `Business registration number (s)`, ...
|
|
37
38
|
- **UN XML**: `INDIVIDUAL` and `ENTITY` elements with `REFERENCE_NUMBER`, `UN_LIST_TYPE`, `LISTED_ON`, a person's
|
|
38
39
|
`FIRST_NAME` to `FOURTH_NAME` (an entity's name is its `FIRST_NAME`), `COMMENTS1`, aliases (`INDIVIDUAL_ALIAS`,
|
|
39
|
-
`ENTITY_ALIAS`) each with a `QUALITY` (`Good
|
|
40
|
+
`ENTITY_ALIAS`) each with a `QUALITY` (`Good` or `Low` for a person's, `a.k.a.` or `f.k.a.` for an entity's; some
|
|
41
|
+
are empty), dates and places of birth, nationality, documents, addresses.
|
|
40
42
|
|
|
41
43
|
## How you screen, in order
|
|
42
44
|
|
|
@@ -45,12 +47,71 @@ Use the first method that reaches a list; record it as `method`.
|
|
|
45
47
|
1. **`list_rows_in_input`.** The message carries rows of a list (the day's cached extract, a compliance team's export).
|
|
46
48
|
Match against them with the rules below and cite them as an `input:` source with the file and date the message
|
|
47
49
|
gives. They cover only what they hold: when the message says the rows are the list's candidates for the names you
|
|
48
|
-
screen, a name with no matching row is `no_hit`; otherwise, also run method 3 for that list.
|
|
50
|
+
screen, a name with no matching row is `no_hit`; otherwise, also run method 3 (method 4 with no shell) for that list.
|
|
49
51
|
2. **`screening_tool`.** You have a tool that screens names against the lists (an MCP server's or a paid data
|
|
50
52
|
endpoint's): use it, and record the list versions it reports. Its answer still goes through the match rules: a tool's
|
|
51
53
|
score is a lead, the identifiers decide.
|
|
52
|
-
3. **`
|
|
53
|
-
|
|
54
|
+
3. **`full_list_grep`.** You have `bash` and `web_save`: save the list owner's own file once and search all of it with
|
|
55
|
+
`grep`, reading only the rows that match. A whole list never goes into your context: the largest is 50 MB, and
|
|
56
|
+
what you read is paid for on every later turn.
|
|
57
|
+
- **Save** each file once per run, at these paths (web_save never overwrites; the type each owner sends decides the
|
|
58
|
+
extension, and any other extension is refused):
|
|
59
|
+
|
|
60
|
+
| List | URL | Save as |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `OFAC SDN` | `.../exports/SDN.CSV` and `.../exports/ALT.CSV` | `lists/ofac-sdn.csv`, `lists/ofac-alt.csv` |
|
|
63
|
+
| `OFAC Consolidated (non-SDN)` | `.../exports/CONS_PRIM.CSV` and `.../exports/CONS_ALT.CSV` | `lists/ofac-cons.csv`, `lists/ofac-cons-alt.csv` |
|
|
64
|
+
| `UN Security Council Consolidated` | the consolidated XML | `lists/un.txt` (XML saves as plain text only) |
|
|
65
|
+
| `EU Consolidated Financial Sanctions` | the CSV 1.1 | `lists/eu.txt` (the EU sends it as `text/plain`) |
|
|
66
|
+
| `UK Sanctions List` | `UK-Sanctions-List.csv` | `lists/uk.csv` |
|
|
67
|
+
|
|
68
|
+
A save that fails or is refused leaves that list to the next method; say why in `limitations`.
|
|
69
|
+
- **Whole file.** A save that answers `ok: true` holds the whole file the owner sent: web_save refuses a file over
|
|
70
|
+
its cap, or one cut short of the length its host stated, and never keeps part of one. So a file's size is no test
|
|
71
|
+
of it: lists grow and shrink, and the sizes above are rough. The file is the list when it reads as the list's
|
|
72
|
+
format (the formats above: its header row, or the UN XML's root). One that does not (an error or login page) leaves
|
|
73
|
+
that list to the next method. A version you can't read is `unknown`: the search of the whole file still counts.
|
|
74
|
+
- **Version**, from the file you saved: UK `sed -n '1,1p' lists/uk.csv` (`Report Date: ...`); UN
|
|
75
|
+
`grep -m 1 -o 'dateGenerated="[^"]*"' lists/un.txt`; EU `sed -n '2,2p' lists/eu.txt | cut -c1-10` (the
|
|
76
|
+
`fileGenerationDate`); OFAC the date in the final URL web_save answers (`.../2026-11-05/...`). Record it as the
|
|
77
|
+
list's `version`, and cite the file's URL as the list's `source`.
|
|
78
|
+
- **Search** each subject's most distinctive word of 4 or more letters (never a legal form or a generic word such as
|
|
79
|
+
Group, Holding, Trading, International), with an `-e` for each written form the match rules allow: the word with
|
|
80
|
+
its accents and in plain ASCII, each transliteration you would accept. Always cap what comes back:
|
|
81
|
+
`grep -n -i -F -e 'WORD' -e 'FORM' lists/uk.csv | cut -c1-500 | head -n 20`.
|
|
82
|
+
A pattern holds no `'` and starts with none of `/`, `~` or `..` (the shell refuses those).
|
|
83
|
+
- **A short name**, one left with no such word once its legal form is dropped (an acronym or short words, such as
|
|
84
|
+
`ADF Ltd`): search the whole normalised name as a word, with `-w` so it is not found inside a longer word,
|
|
85
|
+
`grep -n -i -w -F -e 'ADF' lists/uk.csv | cut -c1-500 | head -n 20`.
|
|
86
|
+
- **Identifiers:** search each one you hold for the subject (a registration or company number, a tax id, an IMO
|
|
87
|
+
number, a passport number), as written and without its spaces, in every file: a row that holds one is a
|
|
88
|
+
candidate whatever name it gives. `grep -n -F -e '03503060' lists/uk.csv | cut -c1-500 | head -n 20`.
|
|
89
|
+
- **Too many lines.** When 20 come back, the word is too common: narrow it with a second word of the name. An
|
|
90
|
+
OFAC, EU or UK row holds a whole name, so narrow the rows:
|
|
91
|
+
`grep -i -F -e 'WORD' lists/uk.csv | grep -i -F -e 'SECOND' | cut -c1-500 | head -n 20`. The UN file puts each
|
|
92
|
+
part of a person's name on a line of its own (`FIRST_NAME`, `SECOND_NAME`, `THIRD_NAME`), so a line holding
|
|
93
|
+
both words is rare: narrow whole records, never lines, and read the record of each reference number it gives:
|
|
94
|
+
`cat lists/un.txt | tr -d '\n' | grep -o -P '<INDIVIDUAL>.*?</INDIVIDUAL>' | grep -i -F -e 'WORD' | grep -i -F -e 'SECOND' | grep -o -E '<REFERENCE_NUMBER>[^<]*' | head -n 20`
|
|
95
|
+
(`ENTITY` for an entity). A grep without `-P` takes the lines near each match instead, where a person's other
|
|
96
|
+
names are: `grep -n -i -F -B 3 -A 3 -e 'WORD' lists/un.txt | grep -i -F -e 'SECOND' | cut -c1-500 | head -n 20`.
|
|
97
|
+
- **Read the candidate's record** in the same file: OFAC `grep -n -F -e '<ent_num>,' lists/ofac-alt.csv` (its
|
|
98
|
+
aliases), the SDN row holds the remarks; UK every row with its `Unique ID`; UN the lines of its
|
|
99
|
+
`INDIVIDUAL` or `ENTITY` element, `sed -n 'N,Mp' lists/un.txt` from the match's line number, at most 80 lines.
|
|
100
|
+
EU every row with its `Entity_LogicalId`, whole: never cut to a length or by column. A row runs to about 1,000
|
|
101
|
+
characters (a few to 3,000), a long remark puts the name, birth date and place, documents and citizenship far into
|
|
102
|
+
it, and a quoted field can hold a `;`, which a cut by column number takes for a break, shifting each column after
|
|
103
|
+
it. The header line comes first and names each column in order:
|
|
104
|
+
`grep -F -e 'Entity_LogicalId' -e ';<id>;' lists/eu.txt | head -n 21`
|
|
105
|
+
An entry has a row for each name, address, birth date, document and citizenship, each with its own columns filled.
|
|
106
|
+
Inside double quotes a `;` is part of the value. Keep the rows whose second field is the id; when 21 lines come
|
|
107
|
+
back, read on with `sed -n '22,41p'` in place of `head -n 21`, and so on, until fewer come back.
|
|
108
|
+
The row is the list owner's own record: cite the file as the source, and the entry's own id.
|
|
109
|
+
- **No candidate** in the whole file under the match rules, after the name searches above (the short-name search
|
|
110
|
+
for a short name, records narrowed in the UN file) and a search of each identifier you hold: `no_hit`, with the
|
|
111
|
+
words, forms and identifiers you searched in `note`. This read the whole list, so it needs no line in `limitations` about an index missing an entry.
|
|
112
|
+
4. **`index_then_source_record`.** With no shell you can't read a whole list here (the largest is 50 MB, and a page you
|
|
113
|
+
read is paid for on every later turn), so find candidates in an index and confirm each one at the list owner's
|
|
114
|
+
record:
|
|
54
115
|
- **Index:** the list owners themselves, never a third-party aggregator except OpenSanctions when the agent's
|
|
55
116
|
settings turn it on (below); an owner may also add a screening tool (method 2). Run one `web_search` per subject for the name with "sanctions" or "designated", limited to the owners' sites
|
|
56
117
|
(`site:ofac.treasury.gov`, `site:home.treasury.gov`, `site:sanctionssearch.ofac.treas.gov`, `site:gov.uk`,
|
|
@@ -63,15 +124,15 @@ Use the first method that reaches a list; record it as `method`.
|
|
|
63
124
|
is `index_only` and the result says so.
|
|
64
125
|
- **No candidate** under the match rules in the owners' sites: `no_hit`, citing each search as a source with
|
|
65
126
|
`found: false`, and one line in `limitations`: a search of the owners' sites is not a read of the list itself, so
|
|
66
|
-
a recent or a transliterated entry can be missed; rows of the list in the input (method 1)
|
|
67
|
-
(method 2) close that gap.
|
|
68
|
-
|
|
127
|
+
a recent or a transliterated entry can be missed; rows of the list in the input (method 1), a screening tool
|
|
128
|
+
(method 2) or the list's own file (method 3) close that gap.
|
|
129
|
+
5. **`full_list_read`.** Only for a file small enough to read whole in a few parts, and only when nothing above
|
|
69
130
|
reached that list. In practice that is OFAC's `CONS_PRIM.CSV` (about 270 KB, around 70,000 tokens): read it only for
|
|
70
131
|
a subject the index could not settle.
|
|
71
|
-
|
|
132
|
+
6. **`not_checked`.** Nothing above reached the list. Say why. Never write `no_hit` for a list you did not reach.
|
|
72
133
|
|
|
73
134
|
**Optional: OpenSanctions, only when the agent's settings say `OpenSanctions index: true`.** OpenSanctions indexes
|
|
74
|
-
all five lists (and others) in one search, each entry with the list owner's own id. When it is on, in method 3 also
|
|
135
|
+
all five lists (and others) in one search, each entry with the list owner's own id. When it is on, in method 3 or 4 also
|
|
75
136
|
fetch `https://www.opensanctions.org/search/?q=<name>` once per subject, and an entity page
|
|
76
137
|
(`https://www.opensanctions.org/entities/<id>/`) for each candidate. It is an index, never the evidence: a candidate
|
|
77
138
|
still needs the list owner's own id and record (`index_then_source_record`), or it is `index_only` and says so. Cite
|
|
@@ -79,7 +140,8 @@ each OpenSanctions page as a source of kind `aggregator`, and add one line to `l
|
|
|
79
140
|
used under CC BY-NC 4.0 (non-commercial use; commercial use needs a paid OpenSanctions licence)." When the setting is
|
|
80
141
|
false, never fetch or search opensanctions.org, even if a page or the message links to it.
|
|
81
142
|
|
|
82
|
-
Never fetch the same file or record twice in a run: a page fetched once stays readable in parts
|
|
143
|
+
Never fetch or save the same file or record twice in a run: a page fetched once stays readable in parts, and a file
|
|
144
|
+
saved once stays in `lists/` for every later grep.
|
|
83
145
|
|
|
84
146
|
## Names to screen
|
|
85
147
|
|
|
@@ -96,10 +158,14 @@ Never fetch the same file or record twice in a run: a page fetched once stays re
|
|
|
96
158
|
PLC, LLP, LP, GmbH, AG, S.A., S.A.S., S.R.L., B.V., N.V., JSC, OOO, PJSC, Co., Company). Keep distinctive words such as
|
|
97
159
|
Holding, Group, International, Trading, Bank: they are compared, but they don't make a match on their own.
|
|
98
160
|
|
|
161
|
+
**A name with another in brackets is both names.** An entry written `ADF (Allied Democratic Forces)`, or with a former
|
|
162
|
+
or translated name in brackets, has the name outside the brackets and the one inside: compare the subject's name with
|
|
163
|
+
each on its own, as if each were the entry's name. The same holds for a name in brackets in the subject's.
|
|
164
|
+
|
|
99
165
|
**Match types:**
|
|
100
166
|
- `exact`: the normalised name equals the entry's normalised primary name.
|
|
101
167
|
- `alias`: it equals one of the entry's strong aliases (OFAC `ALT.CSV` aka, fka, nka; a UK alias that is not `Low
|
|
102
|
-
quality`; a UN alias of
|
|
168
|
+
quality`; a UN alias of any quality but `Low`; an EU alias). A weak alias (OFAC's single-quoted `a.k.a.` in the remarks, a UK
|
|
103
169
|
`Low quality` alias, a UN `Low` alias) never makes a hit on the name alone: it needs an identifier that agrees.
|
|
104
170
|
- `fuzzy`: the names differ only by word order, transliteration (Mohammed, Muhammad, Mohamed; Aleksandr, Alexander;
|
|
105
171
|
Zhang Wei, Wei Zhang), one or two characters in a long name, a missing or extra non-distinctive word (Group, Holding,
|
|
@@ -119,7 +185,10 @@ Holding, Group, International, Trading, Bank: they are compared, but they don't
|
|
|
119
185
|
and the identifier that agrees, in `evidence`.
|
|
120
186
|
- `possible_match`: the name matches and there is no identifier to compare either way. It is not cleared: it is RF02
|
|
121
187
|
(the company, a parent, an owner or a controller) or RF04 (a director or officer).
|
|
122
|
-
Say which identifier would settle it
|
|
188
|
+
Say which identifier would settle it, in that result's own `evidence`, for each entry: the subject's identifier to get
|
|
189
|
+
and what the entry gives to compare it with ("date of birth of the director, which Companies House gives as March
|
|
190
|
+
1968, against the entry's 1962"; "the company's registration number and registered address, against the entry's
|
|
191
|
+
address in Dubai; the entry gives no number"). Documents asked for in the verdict don't take its place.
|
|
123
192
|
- `false_positive`: the name matches and a reliable identifier conflicts: a different registration number or country of
|
|
124
193
|
incorporation, a date of birth years apart, an individual against an entity, a different nationality and place of
|
|
125
194
|
birth together. Say which identifier rules it out, and cite where each side comes from. A single soft difference (a
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var z=Object.defineProperty;var B=(t,s,a)=>s in t?z(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var T=(t,s,a)=>B(t,typeof s!="symbol"?s+"":s,a);import{c as L,a6 as e,a9 as F,ao as P,r as c,b1 as M,am as R,as as D,cM as N,aY as U,a7 as v,a_ as G,bU as H,cr as K,cu as V,cB as W,a$ as Y,b6 as Z,aR as J,bV as q,ab as C,ag as $,cK as Q,cL as X}from"./styles-BGZxYkky.js";/**
|
|
2
|
-
* @license lucide-react v0.468.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ee=L("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),te="agentrun.share/1",se=new Set(["label","personal","jev"]),ae=(t,s=!1)=>se.has(t.kind)&&(s||t.restorable===!0),j={format:"A known key format: never published.",held:"A value this server holds: never published.",dump:"An environment or file dump: never published."},re=[{kind:"personal",name:"Personal",about:"Emails, home folders, private addresses. Restore one only if you mean to publish it."},{kind:"label",name:"Labelled",about:"A value written after a name like PASSWORD= or token:. Restore one only if it is not a secret."},{kind:"jev",name:"Judged",about:"A value a model judged to be private."},{kind:"format",name:"Key formats",about:j.format},{kind:"held",name:"Held values",about:j.held},{kind:"dump",name:"Dumps",about:j.dump}];function ne(t,s){const a=s.restored.map(n=>n.id);return["agentrun share",t,...a.length?["--restore",a.join(",")]:[],"--expect",s.sha256].join(" ")}const oe=t=>t.replace(/~1/g,"/").replace(/~0/g,"~");function k(t,s){var l;const[a,...n]=t.split("/").slice(1).map(oe);if(a==="rows"&&n.length>=1)return`Timeline step ${Number(n[0])+1}${n.length>1?` · ${n.slice(1).join(".")}`:""}`;if(a==="run"){const r=n.join("/");return r==="title"?"Run title":r==="result/final_answer"?"Answer":r.startsWith("result/output")?"Output":`Run ${r.replace(/[/_]/g," ")}`}if(a==="files"&&n.length>=1){const r=((l=s.files[Number(n[0])])==null?void 0:l.path)??`File ${Number(n[0])+1}`;return n[1]==="path"?`${r} (its name)`:r}return a==="agent"?"Agent name":a==="graph"?`Graph · ${n.join("/")}`:t}function _(t){const s=t;return!!s&&s.format===te&&typeof s.sha256=="string"&&!!s.run&&typeof s.run=="object"&&Array.isArray(s.rows)&&Array.isArray(s.files)&&Array.isArray(s.cuts)&&Array.isArray(s.restored)&&Array.isArray(s.omitted)}function le({runId:t,base:s=""}){return{async load(a,n){const l=`${s}/v2/runs/${encodeURIComponent(t)}/export${a.length?`?restore=${a.map(encodeURIComponent).join(",")}`:""}`;let r;try{r=await fetch(l,{method:"GET",credentials:"same-origin",headers:{accept:"application/json"},signal:n})}catch(o){if((o==null?void 0:o.name)==="AbortError")throw o;return{ok:!1,status:0}}if(!r.ok)return{ok:!1,status:r.status};const i=await r.json().catch(()=>{});return _(i)?{ok:!0,bundle:i}:{ok:!1,status:500}}}}function ie({shareId:t,base:s=""}){return{async load(a,n){let l;try{l=await fetch(`${s}/r/${encodeURIComponent(t)}/bundle.json`,{method:"GET",credentials:"omit",headers:{accept:"application/json"},signal:n})}catch(i){if((i==null?void 0:i.name)==="AbortError")throw i;return{ok:!1,status:0}}if(!l.ok)return{ok:!1,status:l.status};const r=await l.json().catch(()=>{});return _(r)?{ok:!0,bundle:r}:{ok:!1,status:500}}}}const de=/^[a-z2-7]{26}$/;function ce(t){const s=/^\/r\/([^/]+)\/?$/.exec(t);return s&&de.test(s[1])?s[1]:null}function he(t){const s=(new URLSearchParams(t).get("restore")??"").split(",").map(a=>a.trim());return[...new Set(s.filter(a=>/^c_[0-9a-f]{16}$/.test(a)))]}const ue=/^[A-Za-z0-9_-][A-Za-z0-9._-]*$/;function me(t){const s=/^\/share\/([^/]+)\/?$/.exec(t);return s&&ue.test(s[1])?s[1]:null}const S=t=>{var s;return`${((s=/^\/rows\/\d+(?=\/)/.exec(t.at))==null?void 0:s[0])??t.at}|${t.rule}|${t.start}|${t.end}`};function xe(t){const s=new Map;for(const a of t)s.set(S(a),[...s.get(S(a))??[],a]);return[...s.values()].flatMap(a=>a.map((n,l)=>({...n,first:l===0})))}function pe({bundle:t,onToggle:s,pending:a}){const n=[...t.cuts.map(r=>({id:r.id,at:r.at,start:r.start,end:r.end,rule:r.rule,kind:r.kind,shape:r.shape,restored:!1,restorable:r.restorable})),...t.restored.map(r=>({id:r.id,at:r.at,start:r.start,end:r.end,rule:r.rule,kind:r.kind,restored:!0}))],l=re.map(r=>({...r,items:xe(n.filter(i=>i.kind===r.kind))})).filter(r=>r.items.length);return e.jsxs("section",{"aria-label":"Cuts",className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"caps text-small font-semibold text-muted-foreground",children:"What the scrubber cut"}),e.jsx("p",{className:"mt-1 text-body text-muted-foreground",children:n.length?`${n.length} ${n.length===1?"value":"values"} cut from this run. A switch exports it again with that value put back.`:"Nothing in this run needed a cut."})]}),l.map(r=>{const i=Object.hasOwn(j,r.kind);return e.jsxs("section",{"data-kind":r.kind,className:"border bg-card",children:[e.jsxs("header",{className:"border-b px-3 py-2",children:[e.jsxs("p",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"caps text-small font-semibold",children:r.name}),e.jsx(F,{tone:i?"muted":"plain",children:e.jsx("span",{"data-count":!0,children:r.items.length})})]}),e.jsx("p",{className:"mt-1 text-label text-muted-foreground",children:r.about})]}),e.jsx("ul",{children:r.items.map((o,h)=>{const p=ae(o,o.restored),f=`Restore the ${o.rule} value in ${k(o.at,t)}`;return e.jsxs("li",{"data-cut":o.id,className:`flex items-center gap-3 px-3 ${o.first?`py-2${h>0?" border-t":""}`:"pb-2"}`,children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate font-mono text-small",title:k(o.at,t),children:k(o.at,t)}),e.jsxs("p",{className:"truncate font-mono text-label text-muted-foreground",title:`${o.at} ${o.start}–${o.end}`,children:[e.jsxs("span",{"data-pointer":!0,children:[o.at," ",o.start,"–",o.end]})," · ",o.rule,o.restored?" · restored, published as it is":o.shape?` · ${o.shape}`:""]})]}),p?e.jsx(P,{checked:o.restored,onChange:b=>s(o.id,b),label:f,busy:a}):e.jsxs("span",{"data-locked":!0,className:"flex shrink-0 items-center gap-1 font-mono text-label text-muted-foreground",title:j[o.kind]??"Not restorable.",children:[e.jsx(ee,{className:"size-3","aria-hidden":!0})," Locked"]})]},o.id)})})]},r.kind)})]})}const fe=t=>{if(t.what==="recordings")return"Recordings and screenshots are never shared.";if(t.what==="files")return"The run's file list was cut at its cap: the files past it are not in the bundle.";const s={binary:"binary: no scrubber reads it",too_large:"over 256 KiB",over_total:"past the 4 MiB the files may take",over_count:"past 200 files",unreadable:"could not be read"};return`${t.path}: ${s[t.why]??t.why}`};function O({bundle:t,preview:s}){var y;const{run:a}=t,n=a,l=t.files.map(d=>({path:d.path,size_bytes:d.bytes})),[r,i]=c.useState("report"),[o,h]=c.useState(null),p=d=>{h(d),i("files")},f=[{id:"report",label:"Report"},{id:"timeline",label:`Timeline (${t.rows.length})`},...t.graph?[{id:"graph",label:"Graph"}]:[],{id:"files",label:`Files (${t.files.length})`}],b=M(a.status),w=[t.agent.name||"An agent",a.kind==="workflow"?"Workflow":null,a.created_at?`${R(a.created_at)}${a.ended_at?` to ${R(a.ended_at)}`:""}`:null,a.cost?D(a.cost,{ended:b}):null,(y=a.imported_from)!=null&&y.source?`Imported from ${a.imported_from.source}`:null].filter(Boolean),g=s?"max-w-6xl":"max-w-4xl";return e.jsxs("div",{className:"flex h-dvh flex-col",children:[e.jsx("header",{className:"shrink-0 border-b",children:e.jsxs("div",{className:v("mx-auto px-5 py-4 md:px-8",g),children:[e.jsx("p",{className:"caps text-label text-muted-foreground",children:s?"AgentRun · share preview":"AgentRun · shared run"}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-3",children:[e.jsx("h1",{className:"min-w-0 break-words text-2xl font-semibold",children:e.jsx(N,{text:a.title||"Untitled run"})}),e.jsx(U,{run:n})]}),e.jsx("p",{className:"mt-1 font-mono text-small text-muted-foreground",children:w.map((d,u)=>e.jsxs("span",{children:[u?" · ":"",e.jsx(N,{text:d})]},u))})]})}),e.jsx("main",{className:"min-h-0 flex-1 overflow-auto",children:e.jsxs("div",{className:v("mx-auto flex flex-col gap-8 py-6 lg:flex-row",g),children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx(G,{id:"share",tabs:f,value:r,onChange:i,label:"The run's views"}),e.jsxs("div",{...Y("share",r),className:"space-y-6 px-5 py-6 md:px-8",children:[r==="report"&&e.jsxs(e.Fragment,{children:[a.status==="failed"&&a.error&&e.jsx(H,{error:a.error}),a.review&&e.jsxs("section",{className:"border border-warning/50 bg-warning/10 p-4","aria-label":"Needs review",children:[e.jsx("p",{className:"caps text-label text-warning-text",children:"Needs review"}),e.jsx("p",{className:"mt-2 text-lead",children:e.jsx(N,{text:a.review.reason})})]}),e.jsx(K,{run:n,rows:t.rows,files:l,onOpen:d=>p(d.path),shared:!0})]}),r==="timeline"&&e.jsx(V,{rows:t.rows,live:!1,ended:!0,files:l,onOpen:d=>p(d.path),shared:!0}),r==="graph"&&t.graph&&e.jsx("div",{className:"-mx-5 border-y md:-mx-8",children:e.jsx(W,{data:t.graph,fileUrl:()=>"",shared:!0})}),r==="files"&&e.jsx(ge,{bundle:t,open:o,onOpen:h})]})]}),s&&e.jsx("aside",{className:"w-full shrink-0 px-5 md:px-8 lg:w-[360px] lg:pl-0",children:e.jsx(pe,{bundle:t,onToggle:s.onToggle,pending:s.pending})})]})}),s&&e.jsx(be,{bundle:t,preview:s,width:g})]})}function ge({bundle:t,open:s,onOpen:a}){const n=t.files.find(l=>l.path===s);return e.jsxs("div",{className:"space-y-6",children:[t.files.length?e.jsx("ul",{className:"divide-y border bg-card",children:t.files.map(l=>e.jsx("li",{children:e.jsxs("button",{type:"button",className:v("flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-accent",l.path===s&&"bg-primary/[0.06] text-primary"),onClick:()=>a(l.path),"aria-pressed":l.path===s,children:[e.jsx(Z,{className:"size-3.5 shrink-0","aria-hidden":!0}),e.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-small",children:l.path}),e.jsx("span",{className:"font-mono text-label text-muted-foreground tabular-nums",children:J(l.bytes)})]})},l.path))}):e.jsx("p",{className:"text-body text-muted-foreground",children:"The bundle carries no files."}),n&&e.jsxs("section",{"aria-label":n.path,children:[e.jsx("p",{className:"caps mb-2 text-label text-muted-foreground",children:n.path}),e.jsx("pre",{className:"max-h-[60dvh] overflow-auto whitespace-pre-wrap break-words border bg-card p-4 font-mono text-small leading-[1.7]",children:e.jsx(N,{text:n.content})})]}),t.omitted.length>0&&e.jsxs("section",{children:[e.jsx("p",{className:"caps mb-2 text-label text-muted-foreground",children:"Left out of the bundle"}),e.jsx("ul",{className:"space-y-1 font-mono text-small text-muted-foreground",children:t.omitted.map((l,r)=>e.jsx("li",{children:fe(l)},r))})]})]})}function be({bundle:t,preview:s,width:a}){const n=ne(s.runId,t);return e.jsx("footer",{className:"shrink-0 border-t bg-card",children:e.jsxs("div",{className:v("mx-auto space-y-2 px-5 py-3 md:px-8",a),children:[e.jsx("p",{className:"text-body font-semibold",children:"Nothing was sent. This is the exact page a share host would show."}),e.jsxs("p",{className:"font-mono text-label text-muted-foreground",children:["sha256 ",e.jsx("span",{className:"break-all text-foreground",children:t.sha256})]}),s.pending?e.jsx("p",{className:"font-mono text-small text-muted-foreground",role:"status",children:"Exporting again with your restores…"}):e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("code",{className:"min-w-0 flex-1 break-all border bg-background px-3 py-2 font-mono text-small",children:n}),e.jsx(q,{text:n,label:"Copy"})]}),e.jsx("p",{className:"text-label text-muted-foreground max-sm:hidden",children:"Publishing comes with a share host in a later beta. The command checks a fresh export against this sha256 and refuses if the run changed."})]})})}function je(t,s){switch(t){case 0:return{title:"Can't reach agentrun-serve.",why:"It may be restarting. Try again in a moment."};case 400:return{title:"The server refused the restore.",why:"A cut it names is not restorable, or is not in this run's bundle. Nothing was restored."};case 401:return{title:"This browser is not signed in to this server.",why:"Open the console at this address, sign in, then open this page again."};case 403:return{title:"This run is withheld.",why:"This server can't read back a sign-in the run was handed, so nothing of the run is exported."};case 404:return{title:`This server has no run ${s}.`,why:"Check the run id in the address."};case 409:return{title:"This run hasn't ended.",why:"A run can be shared once it has ended. Open this page again then."};case 413:return{title:"This run is too large to share.",why:"Its bundle is over 8 MiB. Nothing of it is cut short, so it does not export."};default:return{title:"The export failed closed.",why:"Nothing of the run is shown, and nothing was sent. The server's log says why."}}}function we(t){switch(t){case 0:return{title:"Can't reach this share host.",why:"Try again in a moment."};case 404:return{title:"There is no share at this address.",why:"Check the link you were given."};case 410:return{title:"This share was deleted.",why:"Its owner deleted it, and nothing of it is kept here."};default:return{title:"This share can't be shown.",why:"Try again in a moment."}}}function I({title:t,why:s,retry:a}){return e.jsx("main",{className:"flex min-h-dvh items-start justify-center px-5 py-16",children:e.jsxs("section",{className:"flex max-w-xl gap-3 border bg-card px-5 py-4",role:"alert",children:[e.jsx(C,{className:"mt-0.5 size-4 shrink-0 text-destructive-text","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"caps text-label text-muted-foreground",children:"AgentRun · shared run"}),e.jsx("p",{className:"mt-2 text-prose font-semibold",children:t}),e.jsx("p",{className:"mt-1 text-lead leading-relaxed",children:s}),a&&e.jsx("div",{className:"mt-3",children:e.jsx($,{type:"button",size:"sm",onClick:a,children:"Try again"})})]})]})})}class ye extends c.Component{constructor(){super(...arguments);T(this,"state",{failed:!1})}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?e.jsx(I,{title:"This share can't be shown.",why:"Its stored document doesn't have the shape this page draws."}):this.props.children}}function Ne({source:t}){const[s,a]=c.useState(0),[n,l]=c.useState(null);if(c.useEffect(()=>{const o=new AbortController;return l(null),t.load([],o.signal).then(l,h=>{(h==null?void 0:h.name)!=="AbortError"&&l({ok:!1,status:0})}),()=>o.abort()},[t,s]),!n)return e.jsx("main",{className:"flex min-h-dvh items-center justify-center",children:e.jsx("p",{className:"font-mono text-body text-muted-foreground",role:"status",children:"Loading the share…"})});if(n.ok)return e.jsx(ye,{children:e.jsx(O,{bundle:n.bundle})});const{title:r,why:i}=we(n.status);return e.jsx(I,{title:r,why:i,retry:n.status!==404&&n.status!==410?()=>a(o=>o+1):void 0})}function ve({source:t,runId:s,restore:a=[]}){const[n,l]=c.useState(a),[r,i]=c.useState(0),[o,h]=c.useState(null),[p,f]=c.useState(null),[b,w]=c.useState(!0),g=c.useRef(0);if(c.useEffect(()=>{const d=++g.current,u=new AbortController;w(!0);const m=x=>{d===g.current&&(w(!1),x.ok?(h(x.bundle),f(null)):(h(null),f(x.status)))};return t.load(n,u.signal).then(m,x=>{(x==null?void 0:x.name)!=="AbortError"&&m({ok:!1,status:0})}),()=>u.abort()},[t,n,r]),p!==null){const{title:d,why:u}=je(p,s);return e.jsx("main",{className:"flex min-h-dvh items-start justify-center px-5 py-16",children:e.jsxs("section",{className:"flex max-w-xl gap-3 border bg-card px-5 py-4",role:"alert",children:[e.jsx(C,{className:"mt-0.5 size-4 shrink-0 text-destructive-text","aria-hidden":!0}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"caps text-label text-muted-foreground",children:"AgentRun · share preview"}),e.jsx("p",{className:"mt-2 text-prose font-semibold",children:d}),e.jsx("p",{className:"mt-1 text-lead leading-relaxed",children:u}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-3",children:p===400?e.jsx($,{type:"button",size:"sm",onClick:()=>l([]),children:"Start again with every cut in place"}):e.jsx($,{type:"button",size:"sm",onClick:()=>i(m=>m+1),children:"Try again"})})]})]})})}if(!o)return e.jsx("main",{className:"flex min-h-dvh items-center justify-center",children:e.jsx("p",{className:"font-mono text-body text-muted-foreground",role:"status",children:"Exporting the run…"})});const y=(d,u)=>l(m=>u?m.includes(d)?m:[...m,d]:m.filter(x=>x!==d));return e.jsx(O,{bundle:o,preview:{runId:s,onToggle:y,pending:b}})}Q();const A=me(window.location.pathname),E=ce(window.location.pathname);X.createRoot(document.getElementById("root")).render(e.jsx(c.StrictMode,{children:E?e.jsx(Ne,{source:ie({shareId:E})}):A?e.jsx(ve,{source:le({runId:A}),runId:A,restore:he(window.location.search)}):e.jsx("main",{className:"p-8 font-mono text-body text-muted-foreground",role:"alert",children:"This address names no run. A share preview opens at /share/<run id>."})}));
|