ep_reference 0.1.1 → 0.1.2

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 (2) hide show
  1. package/AGENTS.md +66 -0
  2. package/package.json +1 -1
package/AGENTS.md ADDED
@@ -0,0 +1,66 @@
1
+ # Agent Guide — ep_reference
2
+
3
+ Reference content from other Pads.
4
+
5
+ ## Tech stack
6
+
7
+ * Etherpad plugin framework (hooks declared in `ep.json`)
8
+ * EJS templates rendered server-side via `eejsBlock_*` hooks
9
+ * `ep_plugin_helpers` for shared boilerplate
10
+
11
+ ## Project structure
12
+
13
+ ```
14
+ ep_reference/
15
+ ├── AGENTS.md
16
+ ├── CONTRIBUTING.md
17
+ ├── LICENSE.md
18
+ ├── ep.json
19
+ ├── index.js
20
+ ├── package.json
21
+ ├── static/
22
+ │ ├── css/
23
+ │ ├── js/
24
+ │ ├── tests/
25
+ ├── templates/
26
+ │ ├── reference.ejs
27
+ ```
28
+
29
+ ## Helpers used
30
+
31
+ * `pad-toggle` from `ep_plugin_helpers`
32
+ * `pad-toggle-server` from `ep_plugin_helpers`
33
+
34
+
35
+ ## Helpers NOT used
36
+
37
+ _To be audited in the helpers-adoption sweep (Phase 4)._
38
+
39
+
40
+ ## Running tests locally
41
+
42
+ `ep_reference` runs inside Etherpad's test harness. From an etherpad checkout that has installed this plugin via `pnpm run plugins i --path ../ep_reference`:
43
+
44
+ ```bash
45
+ # Backend (Mocha) — harness boots its own server
46
+ pnpm --filter ep_etherpad-lite run test
47
+
48
+ # Playwright — needs `pnpm run dev` in a second terminal
49
+ pnpm --filter ep_etherpad-lite run test-ui
50
+ ```
51
+
52
+ ## Standing rules for agent edits
53
+
54
+ * PRs target `main`. Linear commits, no merge commits.
55
+ * Every bug fix includes a regression test in the same commit.
56
+ * All user-facing strings in `locales/`. No hardcoded English in templates.
57
+ * No hardcoded `aria-label` on icon-only controls — etherpad's html10n auto-populates `aria-label` from the localized string when (a) the element has a `data-l10n-id` and (b) no author-supplied `aria-label` is present. Adding a hardcoded English `aria-label` blocks that and leaves it untranslated. (See `etherpad-lite/src/static/js/vendors/html10n.ts:665-678`.)
58
+ * No nested interactive elements (no `<button>` inside `<a>`).
59
+ * LLM/Agent contributions are explicitly welcomed by maintainers.
60
+
61
+ ## Quick reference: hooks declared in `ep.json`
62
+
63
+ * Server: `loadSettings`, `clientVars`, `eejsBlock_body`, `eejsBlock_mySettings`, `eejsBlock_padSettings`, `eejsBlock_dd_help`
64
+ * Client: `postAceInit`, `handleClientMessage_CUSTOM`, `handleClientMessage_CLIENT_MESSAGE`, `aceInitialized`, `aceAttribsToClasses`, `aceDomLineProcessLineAttributes`, `aceRegisterBlockElements`, `aceEditorCSS`, `aceCreateDomLine`, `aceGetFilterStack`, `aceRegisterLineAttributes`
65
+
66
+ When adding a hook, register it in both `ep.json` *and* the matching `exports.<hook> = ...` in the JS file.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep_reference",
3
3
  "description": "Reference content from other Pads",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "author": "johnyma22 (John McLear) <john@mclear.co.uk>",
6
6
  "repository": {
7
7
  "type": "git",