icoa-cli 2.19.457 → 2.19.459

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.
Files changed (122) hide show
  1. package/dist/commands/ai4ctf.js +1 -1
  2. package/dist/commands/ctf4ai-demo.js +1 -1
  3. package/dist/commands/ctf4vla.js +1 -1
  4. package/dist/commands/exam.js +1 -1
  5. package/dist/commands/learn.js +1 -1
  6. package/dist/lib/py-syntax.js +1 -1
  7. package/package.json +1 -1
  8. package/dist/commands/ai4ctf.d.ts +0 -4
  9. package/dist/commands/ai4ioai.d.ts +0 -29
  10. package/dist/commands/aienv.d.ts +0 -23
  11. package/dist/commands/arena-eai.d.ts +0 -37
  12. package/dist/commands/arena.d.ts +0 -8
  13. package/dist/commands/board.d.ts +0 -2
  14. package/dist/commands/challenge.d.ts +0 -9
  15. package/dist/commands/comms.d.ts +0 -2
  16. package/dist/commands/connect.d.ts +0 -15
  17. package/dist/commands/ctf.d.ts +0 -3
  18. package/dist/commands/ctf4ai-demo.d.ts +0 -4
  19. package/dist/commands/ctf4vla.d.ts +0 -34
  20. package/dist/commands/demo2.d.ts +0 -31
  21. package/dist/commands/demo4.d.ts +0 -3
  22. package/dist/commands/demo5.d.ts +0 -3
  23. package/dist/commands/doctor.d.ts +0 -2
  24. package/dist/commands/env.d.ts +0 -5
  25. package/dist/commands/exam.d.ts +0 -13
  26. package/dist/commands/files.d.ts +0 -2
  27. package/dist/commands/ioailab.d.ts +0 -1
  28. package/dist/commands/ipynb.d.ts +0 -20
  29. package/dist/commands/kaggle.d.ts +0 -12
  30. package/dist/commands/lang.d.ts +0 -2
  31. package/dist/commands/learn.d.ts +0 -16
  32. package/dist/commands/log.d.ts +0 -2
  33. package/dist/commands/note.d.ts +0 -25
  34. package/dist/commands/ref.d.ts +0 -2
  35. package/dist/commands/setup.d.ts +0 -2
  36. package/dist/commands/shell.d.ts +0 -35
  37. package/dist/commands/sim.d.ts +0 -32
  38. package/dist/commands/sprint.d.ts +0 -7
  39. package/dist/commands/teleload.d.ts +0 -8
  40. package/dist/commands/theme.d.ts +0 -13
  41. package/dist/commands/view.d.ts +0 -2
  42. package/dist/index.d.ts +0 -2
  43. package/dist/lib/access.d.ts +0 -14
  44. package/dist/lib/aienv.d.ts +0 -118
  45. package/dist/lib/arena-edit-dynamics.d.ts +0 -55
  46. package/dist/lib/arena-submit.d.ts +0 -23
  47. package/dist/lib/banner.d.ts +0 -9
  48. package/dist/lib/bgtasks.d.ts +0 -21
  49. package/dist/lib/board-render.d.ts +0 -14
  50. package/dist/lib/budget.d.ts +0 -1
  51. package/dist/lib/card-engine.d.ts +0 -45
  52. package/dist/lib/challenge-dir.d.ts +0 -1
  53. package/dist/lib/colors.d.ts +0 -11
  54. package/dist/lib/commands.d.ts +0 -53
  55. package/dist/lib/comms.d.ts +0 -40
  56. package/dist/lib/config.d.ts +0 -8
  57. package/dist/lib/countdown.d.ts +0 -4
  58. package/dist/lib/country-lang.d.ts +0 -1
  59. package/dist/lib/ctfd-client.d.ts +0 -33
  60. package/dist/lib/deck-cooldown.d.ts +0 -7
  61. package/dist/lib/demo-exam.d.ts +0 -28
  62. package/dist/lib/demo-flags.d.ts +0 -8
  63. package/dist/lib/demo-stats.d.ts +0 -17
  64. package/dist/lib/docker-probe.d.ts +0 -45
  65. package/dist/lib/drafts.d.ts +0 -11
  66. package/dist/lib/editor-spawn.d.ts +0 -28
  67. package/dist/lib/exam-client.d.ts +0 -15
  68. package/dist/lib/exam-sandbox.d.ts +0 -15
  69. package/dist/lib/exam-setup.d.ts +0 -19
  70. package/dist/lib/exam-state.d.ts +0 -42
  71. package/dist/lib/gemini.d.ts +0 -16
  72. package/dist/lib/gpu.d.ts +0 -51
  73. package/dist/lib/http.d.ts +0 -35
  74. package/dist/lib/i18n.d.ts +0 -215
  75. package/dist/lib/input-dynamics.d.ts +0 -38
  76. package/dist/lib/integrity-snapshot.d.ts +0 -22
  77. package/dist/lib/interactive-spawn.d.ts +0 -25
  78. package/dist/lib/ipynb-input.d.ts +0 -25
  79. package/dist/lib/kaggle.d.ts +0 -115
  80. package/dist/lib/kernel-protocol.d.ts +0 -92
  81. package/dist/lib/kernel.d.ts +0 -81
  82. package/dist/lib/learn-ai.d.ts +0 -159
  83. package/dist/lib/learn-contest.d.ts +0 -141
  84. package/dist/lib/learn-curricula.d.ts +0 -274
  85. package/dist/lib/learn-i18n.d.ts +0 -8
  86. package/dist/lib/learn-input.d.ts +0 -40
  87. package/dist/lib/learn-outcome.d.ts +0 -1
  88. package/dist/lib/learn-render.d.ts +0 -107
  89. package/dist/lib/learn-replies.d.ts +0 -42
  90. package/dist/lib/learn-state.d.ts +0 -66
  91. package/dist/lib/log-sync.d.ts +0 -2
  92. package/dist/lib/logger.d.ts +0 -12
  93. package/dist/lib/main-rl.d.ts +0 -20
  94. package/dist/lib/md-term.d.ts +0 -17
  95. package/dist/lib/menu-nav.d.ts +0 -25
  96. package/dist/lib/notebook-doc.d.ts +0 -38
  97. package/dist/lib/open-file.d.ts +0 -35
  98. package/dist/lib/paper-upgrade.d.ts +0 -27
  99. package/dist/lib/platform.d.ts +0 -110
  100. package/dist/lib/py-syntax.d.ts +0 -36
  101. package/dist/lib/render-card.d.ts +0 -17
  102. package/dist/lib/repl-asker.d.ts +0 -7
  103. package/dist/lib/resume.d.ts +0 -7
  104. package/dist/lib/sample-runner.d.ts +0 -14
  105. package/dist/lib/sandbox.d.ts +0 -30
  106. package/dist/lib/secure-store.d.ts +0 -18
  107. package/dist/lib/shell-split.d.ts +0 -17
  108. package/dist/lib/sim-cooldown.d.ts +0 -14
  109. package/dist/lib/sprint-meta.d.ts +0 -72
  110. package/dist/lib/statusline.d.ts +0 -1
  111. package/dist/lib/terminal-cleanup.d.ts +0 -35
  112. package/dist/lib/theme.d.ts +0 -4
  113. package/dist/lib/token-format.d.ts +0 -41
  114. package/dist/lib/tool-man.d.ts +0 -11
  115. package/dist/lib/toolset-hash.d.ts +0 -15
  116. package/dist/lib/translation.d.ts +0 -1
  117. package/dist/lib/translations-fetcher.d.ts +0 -6
  118. package/dist/lib/ui.d.ts +0 -12
  119. package/dist/lib/update-check.d.ts +0 -1
  120. package/dist/lib/version.d.ts +0 -8
  121. package/dist/repl.d.ts +0 -4
  122. package/dist/types/index.d.ts +0 -221
@@ -1,159 +0,0 @@
1
- export type TutorEvent = {
2
- kind: 'reasoning';
3
- text: string;
4
- } | {
5
- kind: 'content';
6
- text: string;
7
- };
8
- export type TutorTurn = {
9
- role: 'user' | 'assistant';
10
- content: string;
11
- };
12
- export type TutorResult = {
13
- ok: boolean;
14
- answer: string;
15
- message?: string;
16
- code?: string;
17
- offtopic?: boolean;
18
- spent?: number;
19
- cap?: number;
20
- };
21
- export type PqsResult = {
22
- ok: boolean;
23
- score?: number;
24
- tier?: 'green' | 'blue' | 'yellow' | 'red';
25
- manipulation?: boolean;
26
- feedback?: string;
27
- improve?: string;
28
- submissionIndex?: number;
29
- submissionsLeft?: number;
30
- rank?: number | null;
31
- entrants?: number;
32
- inTop3?: boolean;
33
- turns?: number;
34
- spent?: number;
35
- cap?: number;
36
- message?: string;
37
- code?: string;
38
- };
39
- export declare function submitPqs(opts: {
40
- token: string;
41
- cardNumber: number;
42
- }): Promise<PqsResult>;
43
- export type PqsTopEntry = {
44
- rank: number;
45
- score: number;
46
- tier: string;
47
- me: boolean;
48
- name?: string | null;
49
- questions: string[];
50
- };
51
- export type PqsTopResult = {
52
- ok: boolean;
53
- top3?: PqsTopEntry[];
54
- myRank?: number | null;
55
- entrants?: number;
56
- message?: string;
57
- code?: string;
58
- };
59
- export declare function viewPqsTop(opts: {
60
- token: string;
61
- cardNumber: number;
62
- }): Promise<PqsTopResult>;
63
- export type MyScoreEntry = {
64
- card: number;
65
- score: number;
66
- tier: string;
67
- };
68
- export declare function fetchMyScores(opts: {
69
- token: string;
70
- cardLo: number;
71
- cardHi: number;
72
- }): Promise<{
73
- ok: boolean;
74
- scores?: MyScoreEntry[];
75
- code?: string;
76
- message?: string;
77
- }>;
78
- export type HonorBoardEntry = {
79
- rank: number;
80
- score: number;
81
- tier: string;
82
- icon: string;
83
- me: boolean;
84
- name?: string | null;
85
- };
86
- export type HonorMine = {
87
- best_score: number;
88
- rank: number;
89
- entrants: number;
90
- submissions_left: number;
91
- };
92
- export type HonorCardMedal = {
93
- card: number;
94
- rank: number;
95
- icon: string;
96
- score: number;
97
- since: string;
98
- };
99
- export type HonorChapter = {
100
- chapter: number;
101
- gold: number;
102
- silver: number;
103
- bronze: number;
104
- cards: HonorCardMedal[];
105
- };
106
- export type HonorsResult = {
107
- ok: boolean;
108
- board?: HonorBoardEntry[];
109
- mine?: HonorMine | null;
110
- nickname?: string | null;
111
- totals?: {
112
- gold: number;
113
- silver: number;
114
- bronze: number;
115
- };
116
- chapters?: HonorChapter[];
117
- floor?: number;
118
- message?: string;
119
- code?: string;
120
- };
121
- export declare function viewHonors(opts: {
122
- token: string;
123
- curriculumId?: string;
124
- cardNumber?: number;
125
- }): Promise<HonorsResult>;
126
- export declare function setNickname(opts: {
127
- token: string;
128
- nickname: string;
129
- }): Promise<{
130
- ok: boolean;
131
- nickname?: string;
132
- code?: string;
133
- message?: string;
134
- }>;
135
- export declare function recallCoach(opts: {
136
- token: string;
137
- phase: number;
138
- slot: number;
139
- problemTitle: string;
140
- statement: string;
141
- code: string;
142
- level: 1 | 2 | 3;
143
- lang: 'en' | 'zh';
144
- }): Promise<{
145
- ok: boolean;
146
- hint?: string;
147
- level?: number;
148
- spent?: number;
149
- cap?: number;
150
- code?: string;
151
- message?: string;
152
- }>;
153
- export declare function streamLearnTutor(opts: {
154
- token: string;
155
- cardNumber: number;
156
- question: string;
157
- mode: 'deep' | 'fast';
158
- history?: TutorTurn[];
159
- }, onEvent: (ev: TutorEvent) => void): Promise<TutorResult>;
@@ -1,141 +0,0 @@
1
- export type ContestProblem = {
2
- id: string;
3
- title: string;
4
- statement: string;
5
- title_zh?: string;
6
- statement_zh?: string;
7
- samples?: Array<{
8
- in: string;
9
- out: string;
10
- }>;
11
- };
12
- export type ContestStartData = {
13
- phase: number;
14
- slot: number;
15
- group_count: number;
16
- title?: string;
17
- attempt: number;
18
- resumed: boolean;
19
- started_at: string;
20
- deadline: string;
21
- duration_minutes: number;
22
- n: number;
23
- need: number;
24
- solved: string[];
25
- carried?: string[];
26
- carryable_ac?: number;
27
- problems: ContestProblem[];
28
- };
29
- export type SlotRun = {
30
- ac?: number;
31
- ms: number | null;
32
- ts: string;
33
- attempt?: number;
34
- };
35
- export type SlotState = {
36
- slot: number;
37
- title?: string;
38
- passed: boolean;
39
- best_ac: number;
40
- need: number;
41
- n: number;
42
- attempts: number;
43
- duration_minutes: number;
44
- active_deadline: string | null;
45
- best?: SlotRun | null;
46
- perfect_runs?: SlotRun[];
47
- required?: number;
48
- carried_ac?: number;
49
- carried_pass?: boolean;
50
- carryable_ac?: number;
51
- };
52
- export type LinkData = {
53
- link_group: string;
54
- members: Array<{
55
- token: string;
56
- curriculum_id: string;
57
- }>;
58
- };
59
- export type LinkCandidate = {
60
- index: number;
61
- token: string;
62
- curriculum_id: string;
63
- carry_problems: number;
64
- };
65
- export type LinkSuggestData = {
66
- candidates: LinkCandidate[];
67
- };
68
- export type ContestSubmitData = {
69
- verdict: string;
70
- late?: boolean;
71
- already_ac?: boolean;
72
- test?: number | null;
73
- passed_tests?: number | null;
74
- total_tests?: number | null;
75
- time_ms?: number | null;
76
- ac_count: number;
77
- need: number;
78
- n: number;
79
- passed: boolean;
80
- deadline?: string;
81
- };
82
- export type GatePhase = {
83
- phase: number;
84
- configured: boolean;
85
- passed: boolean;
86
- contest?: {
87
- passed: boolean;
88
- best_ac?: number;
89
- need?: number;
90
- n?: number;
91
- attempts?: number;
92
- groups_passed?: number;
93
- group_count?: number;
94
- slots?: SlotState[];
95
- };
96
- research?: {
97
- good_cards: number;
98
- need_cards: number;
99
- min_score: number;
100
- passed: boolean;
101
- };
102
- checks?: {
103
- enabled: boolean;
104
- need: number;
105
- good: number;
106
- missing: number[];
107
- passed: boolean;
108
- };
109
- };
110
- export type GateData = {
111
- gated: number;
112
- unlocked_through_phase: number;
113
- phases: GatePhase[];
114
- link_offer?: {
115
- curricula: string[];
116
- problems: number;
117
- } | null;
118
- };
119
- type ApiResult<T> = {
120
- ok: boolean;
121
- data?: T;
122
- code?: string;
123
- message?: string;
124
- };
125
- export declare function contestStart(token: string, phase: number, slot?: number): Promise<ApiResult<ContestStartData>>;
126
- export declare function contestSubmit(token: string, phase: number, problemId: string, code: string, slot?: number, dyn?: Record<string, number>): Promise<ApiResult<ContestSubmitData>>;
127
- export declare function contestReset(token: string, phase: number, slot?: number): Promise<ApiResult<{
128
- reset_sessions: number;
129
- }>>;
130
- export declare function fetchGate(token: string): Promise<ApiResult<GateData>>;
131
- /**
132
- * Link a second token to this one so contest credit carries between tracks.
133
- * Ownership is proven by DEVICE BINDING, not by knowing the token string — the
134
- * server refuses a token bound to another machine, so a borrowed one is useless.
135
- */
136
- export declare function linkSuggest(token: string): Promise<ApiResult<LinkSuggestData>>;
137
- /** Link the nth candidate from `linkSuggest` — the student types a digit, never a token. */
138
- export declare function linkByIndex(token: string, index: number): Promise<ApiResult<LinkData>>;
139
- export declare function linkToken(token: string, otherToken: string): Promise<ApiResult<LinkData>>;
140
- export declare function timeLeft(deadlineIso: string): string | null;
141
- export {};
@@ -1,274 +0,0 @@
1
- /**
2
- * Learn-mode curriculum content.
3
- *
4
- * Phase 0: hardcoded LEARNDEMO01 (n=10 cards, free for everyone).
5
- * Phase 1+: full EAxxxxxxxx tokens load curriculum from server.
6
- *
7
- * Card types:
8
- * knowledge — text + diagram + "ok / next" to advance
9
- * mcq — 4-choice question with instant feedback + explanation
10
- * practical — drop into sandbox Python, return when done
11
- * sim_demo — open MuJoCo viewer, watch action play out
12
- * milestone — section completion celebration with ASCII trophy
13
- */
14
- export type CardKnowledge = {
15
- number: number;
16
- module: number;
17
- type: 'knowledge';
18
- title: string;
19
- body: string[];
20
- icoaConnection?: string;
21
- check?: {
22
- statement: string;
23
- answer: 'y' | 'n';
24
- };
25
- solution?: string[];
26
- key_point?: string;
27
- chart_ids?: string[];
28
- _zh?: {
29
- title?: string;
30
- body?: string[];
31
- icoaConnection?: string;
32
- checkStatement?: string;
33
- key_point?: string;
34
- solution?: string[];
35
- };
36
- };
37
- export type CardMCQ = {
38
- number: number;
39
- module: number;
40
- type: 'mcq';
41
- title: string;
42
- question: string;
43
- options: {
44
- A: string;
45
- B: string;
46
- C: string;
47
- D: string;
48
- };
49
- answer: 'A' | 'B' | 'C' | 'D';
50
- explanation: string;
51
- _zh?: {
52
- title?: string;
53
- question?: string;
54
- options?: {
55
- A: string;
56
- B: string;
57
- C: string;
58
- D: string;
59
- };
60
- explanation?: string;
61
- };
62
- };
63
- export type CardPractical = {
64
- number: number;
65
- module: number;
66
- type: 'practical';
67
- title: string;
68
- task: string;
69
- starterCode?: string;
70
- successHint: string;
71
- _zh?: {
72
- title?: string;
73
- task?: string;
74
- successHint?: string;
75
- };
76
- };
77
- export type CardSimDemo = {
78
- number: number;
79
- module: number;
80
- type: 'sim_demo';
81
- title: string;
82
- description: string;
83
- simAction: 'baseline' | 'prompt_injected' | 'patch_attacked' | 'modality_confused';
84
- _zh?: {
85
- title?: string;
86
- description?: string;
87
- };
88
- };
89
- export type CardMilestone = {
90
- number: number;
91
- module: number;
92
- type: 'milestone';
93
- badge: string;
94
- emoji: string;
95
- unlockedNext: string;
96
- realWorldLevel: string;
97
- _zh?: {
98
- badge?: string;
99
- unlockedNext?: string;
100
- realWorldLevel?: string;
101
- };
102
- };
103
- export type CardArenaTask = {
104
- number: number;
105
- module: number;
106
- type: 'arena_task';
107
- title: string;
108
- task_id: string;
109
- origin: string;
110
- domain: string;
111
- metric: string;
112
- statement: string[];
113
- core_delta: string[];
114
- baseline_ref: string;
115
- dataset_ref?: string;
116
- submission_format: string;
117
- hints?: {
118
- a: string;
119
- b: string;
120
- c: string;
121
- d: string;
122
- e: string;
123
- };
124
- _zh?: {
125
- title?: string;
126
- origin?: string;
127
- domain?: string;
128
- metric?: string;
129
- statement?: string[];
130
- core_delta?: string[];
131
- baseline_ref?: string;
132
- submission_format?: string;
133
- hints?: {
134
- a: string;
135
- b: string;
136
- c: string;
137
- d: string;
138
- e: string;
139
- };
140
- };
141
- };
142
- export type CardComingSoon = {
143
- number: number;
144
- module: number;
145
- type: 'coming_soon';
146
- title: string;
147
- note?: string;
148
- _zh?: {
149
- title?: string;
150
- note?: string;
151
- };
152
- };
153
- export type Card = CardKnowledge | CardMCQ | CardPractical | CardSimDemo | CardMilestone | CardArenaTask | CardComingSoon;
154
- export type ChartArt = {
155
- type?: 'chart' | 'code';
156
- art?: string;
157
- art_t0?: string;
158
- width_cols?: number;
159
- color_map?: Record<string, string>;
160
- lang?: string;
161
- code?: string;
162
- tier?: string;
163
- tags?: string[];
164
- embargo_ok?: boolean;
165
- first_used?: string;
166
- };
167
- /** Returns a copy of `card` with locale-aware fields applied.
168
- *
169
- * As of v2.19.204, all curriculum content is fetched from the server
170
- * with _zh and check fields already merged (see panda/seed-server-curricula.js).
171
- * This function just picks the localised text out of card._zh when
172
- * the requested locale starts with 'zh'. The auto-overlay maps that
173
- * used to live in learn-phases-zh.ts and learn-phases-checks.ts are
174
- * no longer client-side — they were merged at seed time.
175
- *
176
- * Spread-then-merge keeps undefined keys clean. */
177
- export declare function localized<T extends Card>(card: T, lang: string): T;
178
- export type Curriculum = {
179
- id: string;
180
- name: string;
181
- description: string;
182
- totalCards: number;
183
- modules: {
184
- number: number;
185
- name: string;
186
- cardRange: [number, number];
187
- }[];
188
- cards: Card[];
189
- charts?: Record<string, ChartArt>;
190
- };
191
- /**
192
- * Shape guard for a server curriculum payload.
193
- *
194
- * The learn-validate + curriculum endpoints are lenient: a NON-learn token
195
- * (e.g. an EXAM token typed into `learn`) can return success:true with a
196
- * payload that is not a curriculum. Before this guard, fetchCurriculum cast it
197
- * straight to Curriculum, it passed the `!curriculum` null-check in learn.ts,
198
- * then renderWelcome/newLearnState read `.cards` / `.totalCards` on undefined →
199
- * TypeError → uncaught → worker exit → "validating… processing… <crash> menu".
200
- *
201
- * Returning false makes loadCurriculumById yield null, so learn.ts shows a
202
- * clean error instead of crashing. Checks only stable core fields.
203
- */
204
- export declare function isValidCurriculum(data: unknown): data is Curriculum;
205
- import { type CardReply } from './learn-replies.js';
206
- export declare const LEARN_SERVER = "https://practice.icoa2026.au";
207
- export declare function getLastCurriculumFailure(): 'notfound' | 'offline' | null;
208
- /**
209
- * Resolves a curriculum by id. Order:
210
- * 1. Fresh cache (< 7 days) → instant return, no network
211
- * 2. Server fetch + cache write → if reachable; uses If-None-Match
212
- * 304 Not Modified → cache content unchanged, just refresh mtime
213
- * 200 OK → rewrite cache + etag
214
- * 3. Stale cache as fallback → if server unreachable but cache exists
215
- * 4. null → no cache, no server
216
- */
217
- export declare function loadCurriculumById(id: string, token?: string, force?: boolean): Promise<Curriculum | null>;
218
- /**
219
- * Server-side validation for EAxxxxxxxx tokens.
220
- * Returns curriculum identifier + status; the actual cards are still
221
- * shipped client-side in this Phase, but the token gates access.
222
- */
223
- type ValidateResult = {
224
- ok: boolean;
225
- curriculumId?: string;
226
- status?: string;
227
- validUntil?: string;
228
- message?: string;
229
- code?: string;
230
- aiEnabled?: boolean;
231
- gated?: boolean;
232
- replies?: CardReply[];
233
- };
234
- /** Pure shape of the validate payload — exported so the mapping is testable. */
235
- export declare function validateResultShape(d: Record<string, unknown>): Required<Pick<ValidateResult, 'curriculumId' | 'status' | 'validUntil' | 'aiEnabled' | 'gated' | 'replies'>>;
236
- export declare function validateEAToken(token: string): Promise<ValidateResult>;
237
- /**
238
- * Best-effort progress sync to server. Silent failure — local state is
239
- * always authoritative; server is for cross-device persistence + analytics.
240
- */
241
- export declare function syncProgress(token: string, event: {
242
- card_number: number;
243
- event_type: 'viewed' | 'mcq_answered' | 'practical_done' | 'bookmarked' | 'check_answered';
244
- mcq_answer?: 'A' | 'B' | 'C' | 'D';
245
- mcq_correct?: boolean;
246
- check_answer?: 'y' | 'n';
247
- check_correct?: boolean;
248
- time_on_card_ms?: number;
249
- }, replyAck?: number[]): Promise<void>;
250
- /**
251
- * Card-feedback submission (the `e` "report a problem" channel).
252
- * Crowdsourced card QA — a learner flags an error/confusion on a card; we
253
- * record it server-side bound to (curriculum_id, card_number) so the author
254
- * team can triage.
255
- *
256
- * Returns whether the server actually accepted the report, so the caller can
257
- * print an honest ack. (The route spent 43 days undeployed while an
258
- * unconditional "✓ recorded" hid every 404 — never fake delivery again.)
259
- *
260
- * Unlike syncProgress, demo (LEARNDEMO01) feedback IS sent — the demo is the
261
- * highest-traffic curriculum, so its cards benefit most from crowdsourced QA.
262
- * The server records feedback for any token-shaped string (no learn_tokens
263
- * membership required; feedback is low-risk user text).
264
- *
265
- * Card identity is the (curriculum_id, card_number) composite — card numbers
266
- * are curriculum-LOCAL, so curriculum_id is required to disambiguate.
267
- */
268
- export declare function syncCardFeedback(token: string, payload: {
269
- curriculum_id: string;
270
- card_number: number;
271
- feedback_text: string;
272
- time_on_card_ms?: number;
273
- }): Promise<boolean>;
274
- export {};
@@ -1,8 +0,0 @@
1
- /**
2
- * Chrome (UI scaffolding) i18n for learn mode.
3
- *
4
- * Card *content* localisation lives on each card via the `_zh` field on
5
- * Card types (see learn-curricula.ts). This file is for the rendered
6
- * frame around the content: welcome screen labels, prompts, dashboards.
7
- */
8
- export declare function t(key: string, lang: string): string;
@@ -1,40 +0,0 @@
1
- /**
2
- * Fuzzy resolver for the 🧠 Learn token-input picker.
3
- *
4
- * Problem: a first-time newbie at the prompt:
5
- *
6
- * Learn token (or blank to go back): _
7
- *
8
- * naturally tries any of the following (none of which used to work):
9
- *
10
- * learn LEARNDEMO01 (echoes the command they expect to type)
11
- * ctf4eai (the track-name they saw in the list)
12
- * 3 (the third listed option)
13
- * learndemo01 (lower-case the token they saw)
14
- * demo (it said "Free 12-card demos:")
15
- *
16
- * Only the correct input — bare upper-case LEARNDEMO01 — used to work.
17
- * That's a >20% bounce point on the new-user funnel. This resolver maps
18
- * all the above to the correct token (or returns a friendly hint).
19
- *
20
- * See [[reference-newbie-path-invariant]] + CLAUDE.md "Newbie Path
21
- * Invariant" rule. Gold standard for inline guidance + accept-many-
22
- * variants is the pre-v2.19.180 national-selection demo flow.
23
- */
24
- export type LearnInputResolution = {
25
- kind: 'back';
26
- } | {
27
- kind: 'token';
28
- token: string;
29
- from?: string;
30
- } | {
31
- kind: 'continue';
32
- which?: number | string;
33
- } | {
34
- kind: 'ambiguous';
35
- hint: string;
36
- } | {
37
- kind: 'unknown';
38
- hint: string;
39
- };
40
- export declare function resolveLearnInput(raw: string): LearnInputResolution;
@@ -1 +0,0 @@
1
- export declare function setLearnSessionStarted(v: boolean): void;