@skillre/dsh-plugin-work-dashboard 0.12.0 → 0.13.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/README.en.md +3 -3
- package/README.md +8 -15
- package/docs/POC-3.2-/350/277/233/345/261/225/345/245/221/347/272/246.md +21 -0
- package/docs/Super-Agent-3.2-/350/201/224/350/260/203/346/211/213/345/206/214.md +38 -0
- package/lib/client/css/detail.d.ts +1 -1
- package/lib/client/css/detail.js +4 -0
- package/lib/client/text.js +6 -10
- package/lib/client.js +72 -36
- package/lib/form.js +118 -35
- package/lib/gap.d.ts +2 -2
- package/lib/gap.js +21 -14
- package/lib/index.js +12 -13
- package/lib/progress.d.ts +8 -0
- package/lib/progress.js +20 -0
- package/lib/report-contract.d.ts +315 -0
- package/lib/report-contract.js +119 -0
- package/lib/report-form.d.ts +3 -0
- package/lib/report-form.js +41 -0
- package/lib/report-import.d.ts +9 -0
- package/lib/report-import.js +118 -0
- package/lib/report-page.d.ts +60 -0
- package/lib/report-page.js +3424 -0
- package/lib/report-style.d.ts +17 -0
- package/lib/report-style.js +459 -0
- package/lib/store.js +8 -4
- package/lib/timeline.js +7 -6
- package/lib/types.d.ts +38 -2
- package/package.json +1 -1
- package/skills/poc-export/SKILL.md +10 -125
- package/skills/poc-export/scripts/export-form.mjs +15 -69
- package/skills/poc-ledger/SKILL.md +14 -25
- package/skills/poc-submit/SKILL.md +13 -278
- package/skills/poc-submit/prepare-return.mjs +48 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POC 3.2 report page: the offline form a colleague edits, plus the read-only
|
|
3
|
+
* return receipt it produces.
|
|
4
|
+
*
|
|
5
|
+
* ## Contract
|
|
6
|
+
*
|
|
7
|
+
* The Host writes the shell and the data block; this module only supplies two
|
|
8
|
+
* strings:
|
|
9
|
+
*
|
|
10
|
+
* - `REPORT_STYLE` — embedded in a `<style>` element.
|
|
11
|
+
* - `REPORT_PAGE_SCRIPT` — embedded in a `<script>` element **after** the DOM
|
|
12
|
+
* nodes `<main id="app"></main>` and
|
|
13
|
+
* a `<script type="application/json" id="poc-report-input">` data block (with its
|
|
14
|
+
* matching closing tag) that carries the page payload.
|
|
15
|
+
*
|
|
16
|
+
* Everything else is built here. The page has to work from `file://` with no
|
|
17
|
+
* network, so there are no imports, no fonts, no images and no requests.
|
|
18
|
+
*
|
|
19
|
+
* ## Why the script is a function rendered through `toString()`
|
|
20
|
+
*
|
|
21
|
+
* The script is write-once plain JavaScript that runs inside the generated HTML
|
|
22
|
+
* page. If it were a template literal it would get no TypeScript checking at
|
|
23
|
+
* all — the first symptom of a typo would be a blank page on a colleague's
|
|
24
|
+
* laptop. So the browser code lives in `reportPage()`, a normal typed function,
|
|
25
|
+
* and is serialised with `Function.prototype.toString()`. Everything it needs is
|
|
26
|
+
* declared inside it: no module scope, no Host constants, no `Node` APIs.
|
|
27
|
+
*
|
|
28
|
+
* The generated return receipt is a self-contained HTML file. It repeats the
|
|
29
|
+
* payload in `<script type="application/json" id="poc-return-data">` (escaped,
|
|
30
|
+
* never executed) and lists the same facts as readable cards for a recipient
|
|
31
|
+
* who just double-clicks the file. The receipt carries no scripts beyond that
|
|
32
|
+
* inert JSON block.
|
|
33
|
+
*
|
|
34
|
+
* ## The payload (poc-report/1, ledger_version 3.2)
|
|
35
|
+
*
|
|
36
|
+
* `changes[]` is one entry per project the colleague actually filled in:
|
|
37
|
+
*
|
|
38
|
+
* - `new`: `{ poc_id, identity, gate0, stage_notes?, round? }`
|
|
39
|
+
* - `progress`: `{ poc_id, base, stage_notes?, round }`
|
|
40
|
+
*
|
|
41
|
+
* `round` is `{ submission_id, date, type, change, lines[], next_plans[] }`.
|
|
42
|
+
* Facts only: no `seq`, no Gate verdicts, no `review`. Execution state lives on
|
|
43
|
+
* each line and is not a result. Empty optional fields are omitted rather than
|
|
44
|
+
* sent as `null`, so "not answered" stays distinguishable from "answered empty".
|
|
45
|
+
*
|
|
46
|
+
* ## Host integration
|
|
47
|
+
*
|
|
48
|
+
* Drafts are stored under `poc-report-draft:<form_id>` and are discarded when
|
|
49
|
+
* the form's per-project `base` digests change, so a draft can never be applied
|
|
50
|
+
* on top of a different baseline.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* The page script, ready to embed inside a script element.
|
|
54
|
+
*
|
|
55
|
+
* `reportPage` is serialised rather than hand-written as a string so that
|
|
56
|
+
* TypeScript checks the browser code and a typo cannot silently ship as a blank
|
|
57
|
+
* page. The wrapper is an IIFE: the embedded script gets no globals, and the
|
|
58
|
+
* function's own `'use strict'` keeps accidental globals out.
|
|
59
|
+
*/
|
|
60
|
+
export declare const REPORT_PAGE_SCRIPT: string;
|