@atlassian/chippy 0.0.0-stage → 0.0.1-beta.1
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/LICENSE +201 -0
- package/README.md +188 -2
- package/bin/chippy.mjs +134 -0
- package/bin/pack.mjs +184 -0
- package/lib/avalanche.js +2570 -0
- package/lib/avalanche.js.map +7 -0
- package/lib/bootstrap.d.ts +1 -0
- package/lib/bootstrap.js +51 -0
- package/lib/bootstrap.js.map +7 -0
- package/lib/browser.js +15 -0
- package/lib/browser.js.map +7 -0
- package/lib/extension/avalanche.es.js +5396 -0
- package/lib/extension/avalanche.es.js.map +1 -0
- package/lib/extension/chippy-page-bridge.js +1833 -0
- package/lib/extension/inspect-react.js +216 -0
- package/lib/extension/layout-lab.js +1453 -0
- package/lib/extension/panel-dom.js +90 -0
- package/lib/extension/resolve-probes.js +342 -0
- package/lib/mcp-skill/LICENSE +201 -0
- package/lib/mcp-skill/README.md +150 -0
- package/lib/mcp-skill/SKILL.md +330 -0
- package/lib/mcp-skill/browser-scripts/playwright-probes.js +368 -0
- package/lib/mcp-skill/browser-scripts/playwright-session.js +114 -0
- package/lib/mcp-skill/extension/avalanche.es.js +5396 -0
- package/lib/mcp-skill/extension/avalanche.es.js.map +1 -0
- package/lib/mcp-skill/extension/avalanche.iife.js +5397 -0
- package/lib/mcp-skill/extension/avalanche.iife.js.map +1 -0
- package/lib/mcp-skill/extension/background.js +323 -0
- package/lib/mcp-skill/extension/chippy-page-bridge.js +1833 -0
- package/lib/mcp-skill/extension/content-script.js +167 -0
- package/lib/mcp-skill/extension/devtools-hook-shim.js +68 -0
- package/lib/mcp-skill/extension/early-bootstrap.js +47 -0
- package/lib/mcp-skill/extension/icon-128.png +0 -0
- package/lib/mcp-skill/extension/icon-16.png +0 -0
- package/lib/mcp-skill/extension/icon-32.png +0 -0
- package/lib/mcp-skill/extension/icon-48.png +0 -0
- package/lib/mcp-skill/extension/inspect-react.js +216 -0
- package/lib/mcp-skill/extension/layout-lab.js +1453 -0
- package/lib/mcp-skill/extension/logo.svg +14 -0
- package/lib/mcp-skill/extension/manifest.json +69 -0
- package/lib/mcp-skill/extension/panel-dom.js +90 -0
- package/lib/mcp-skill/extension/panel-settings.js +191 -0
- package/lib/mcp-skill/extension/popup.html +41 -0
- package/lib/mcp-skill/extension/popup.js +80 -0
- package/lib/mcp-skill/extension/probe-descriptor.js +241 -0
- package/lib/mcp-skill/extension/resolve-probes.js +342 -0
- package/lib/mcp-skill/package.json +1 -0
- package/lib/mcp-skill/references/README.md +56 -0
- package/lib/mcp-skill/references/active-stimulus.md +85 -0
- package/lib/mcp-skill/references/avalanche-detector.md +731 -0
- package/lib/mcp-skill/references/bdd-router.md +310 -0
- package/lib/mcp-skill/references/browser-runtime-api.md +193 -0
- package/lib/mcp-skill/references/command-output-formats.md +1075 -0
- package/lib/mcp-skill/references/command-surface.md +183 -0
- package/lib/mcp-skill/references/cynefin.md +99 -0
- package/lib/mcp-skill/references/debug-hook.md +161 -0
- package/lib/mcp-skill/references/fixing-performance.md +490 -0
- package/lib/mcp-skill/references/hook-metrics.md +199 -0
- package/lib/mcp-skill/references/hooks-inspection.md +61 -0
- package/lib/mcp-skill/references/jira-taxonomy.md +81 -0
- package/lib/mcp-skill/references/mcp.md +122 -0
- package/lib/mcp-skill/references/mode-a-injection.md +68 -0
- package/lib/mcp-skill/references/operating-model.md +128 -0
- package/lib/mcp-skill/references/playwright-cli-setup.md +105 -0
- package/lib/mcp-skill/references/playwright-probes.md +205 -0
- package/lib/mcp-skill/references/procedures.md +545 -0
- package/lib/mcp-skill/references/recipes.txt +114 -0
- package/lib/mcp-skill/references/stability-render.md +428 -0
- package/lib/mcp-skill/references/test-mode-playbook.md +193 -0
- package/lib/mcp-skill/references/troubleshooting.md +54 -0
- package/lib/mcp-skill/scripts/avalanche-analyze.cjs +495 -0
- package/lib/mcp-skill/scripts/build-avalanche-command.js +34 -0
- package/lib/mcp-skill/scripts/build-fiber-state-command.js +19 -0
- package/lib/mcp-skill/scripts/chippy-helper-server.js +1710 -0
- package/lib/mcp-skill/scripts/chippy-mcp.cjs +273 -0
- package/lib/mcp-skill/scripts/chippy.sh +1218 -0
- package/lib/mcp-skill/scripts/format-probe-result.js +34 -0
- package/lib/mcp-skill/scripts/helper-access.js +144 -0
- package/lib/mcp-skill/scripts/probe-annotation-channel.js +116 -0
- package/lib/mcp-skill/scripts/search-recipes.js +248 -0
- package/lib/mcp-skill/snippets/README.md +89 -0
- package/lib/mcp-skill/snippets/count-context-consumers.js +40 -0
- package/lib/mcp-skill/snippets/find-context-providers.js +38 -0
- package/lib/mcp-skill/snippets/find-legacy-context.js +47 -0
- package/lib/mcp-skill/snippets/find-prop.js +83 -0
- package/lib/mcp-skill/snippets/hook-metrics-sample.js +69 -0
- package/lib/mcp-skill/snippets/hook-metrics.js +60 -0
- package/lib/mcp-skill/snippets/hook-tracker.js +198 -0
- package/lib/mcp-skill/snippets/stability-nudge.js +101 -0
- package/lib/package.json +1 -0
- package/lib/plugin.js +119 -0
- package/lib/plugin.js.map +7 -0
- package/lib/storybook/avalanche-panel-model.js +79 -0
- package/lib/storybook/brand.jsx +6 -0
- package/lib/storybook/connection-fallback.jsx +47 -0
- package/lib/storybook/constants.js +15 -0
- package/lib/storybook/context-card.jsx +171 -0
- package/lib/storybook/manager.jsx +403 -0
- package/lib/storybook/preset.js +7 -0
- package/lib/storybook/preview.js +263 -0
- package/lib/storybook/probe-annotation-editor.jsx +52 -0
- package/lib/storybook/probe-intent.js +23 -0
- package/lib/storybook/setup.js +93 -0
- package/lib/types/avalanche/commit-metrics-adapter.d.ts +76 -0
- package/lib/types/avalanche/commit-stats-indices.d.ts +41 -0
- package/lib/types/avalanche/commit-surface-ownership.d.ts +9 -0
- package/lib/types/avalanche/detector.d.ts +183 -0
- package/lib/types/avalanche/interaction-capture.d.ts +25 -0
- package/lib/types/avalanche/internals.d.ts +189 -0
- package/lib/types/avalanche/report-serializer.d.ts +283 -0
- package/lib/types/avalanche/reporter.d.ts +610 -0
- package/lib/types/chippy-bridge/fiber-source.d.ts +37 -0
- package/lib/types/chippy-bridge/react-renderer.d.ts +49 -0
- package/lib/types/chippy-bridge/source-map.d.ts +30 -0
- package/lib/types/debug-render/core.d.ts +72 -0
- package/lib/types/layout-lab/fiber-boundaries.d.ts +51 -0
- package/lib/types/layout-lab/fiber-walk.d.ts +131 -0
- package/lib/types/layout-lab/marker-context.d.ts +94 -0
- package/lib/types/package/avalanche.d.ts +6 -0
- package/lib/types/package/browser.d.ts +10 -0
- package/lib/types/package/plugin.d.ts +15 -0
- package/lib/types/plugins/atl/commit-metrics-adapter.d.ts +65 -0
- package/lib/types/plugins/atl/metrics-slot.d.ts +37 -0
- package/lib/types/plugins/index.d.ts +49 -0
- package/lib/types/plugins/jira/context-provider.d.ts +36 -0
- package/package.json +104 -4
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Active Stimulus — Page Click, Fiber Invoke, Stability Nudge
|
|
2
|
+
|
|
3
|
+
Active-stimulus commands deliberately change the running page so Chippy can observe the result. They are for reproduction, verification, and observability — never for patching behavior in place instead of editing source.
|
|
4
|
+
|
|
5
|
+
## Debug replay preflight
|
|
6
|
+
|
|
7
|
+
`explain-component`, `describe-component`, and `inspect-fiber-structure` are read-oriented commands, but their dispatcher-based debug replay may execute component and hook bodies. Replay does not schedule an application update; render-time side effects can still run.
|
|
8
|
+
|
|
9
|
+
Before any of these commands:
|
|
10
|
+
|
|
11
|
+
1. Name the exact component/fiber target.
|
|
12
|
+
2. Disclose the render-time execution boundary.
|
|
13
|
+
3. If that execution is unsafe or cannot be accepted, use `probe-hooks-summary` / `inspect-fiber-hooks-summary`, props, and owners instead; report that custom-hook ancestry was not replayed.
|
|
14
|
+
4. After replay, read `replayStatus` and `warnings`; when replay is unavailable, treat the result as fiber-only evidence.
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
- `page-click <clientId> <selector|probeId|fiberId>` — click exactly one DOM target.
|
|
19
|
+
- `fiber-prop-contract <clientId> <fiberId> <propName>` — inspect a prop's callable shape without invoking it.
|
|
20
|
+
- `fiber-invoke <clientId> <fiberId> <propName> [--args JSON]` — invoke exactly one already-understood function prop from `memoizedProps`.
|
|
21
|
+
- `fiber-schedule-update <clientId> <fiberId> [--ownerIndex N]` — force exactly one re-render on a fiber via the DevTools renderer's `scheduleUpdate`. Works on any component (function, hookless, memo, forwardRef, class) and mutates no hook/prop. The capability behind `stability-nudge`.
|
|
22
|
+
- `eval-page <clientId> stability-nudge ...` — synthetic single-fiber stimulus (the procedure that composes `fiber-schedule-update` with probe/testId resolution).
|
|
23
|
+
|
|
24
|
+
## Anchor contract
|
|
25
|
+
|
|
26
|
+
Before running an active stimulus, state all three:
|
|
27
|
+
|
|
28
|
+
1. **Exact target** — the one DOM node, one probe target, one fiber, or one hook anchor you intend to stimulate.
|
|
29
|
+
2. **Exact stimulus** — what Chippy will do (`click`, invoke `onClick`, schedule one render on a target fiber, etc.).
|
|
30
|
+
3. **Pollution boundary** — what state may become changed, ambiguous, or no longer representative afterward.
|
|
31
|
+
|
|
32
|
+
If any of the three are missing, do not stimulate yet.
|
|
33
|
+
|
|
34
|
+
## `page-click`
|
|
35
|
+
|
|
36
|
+
Use when the target behavior is best represented by a browser click on the rendered DOM.
|
|
37
|
+
|
|
38
|
+
Rules:
|
|
39
|
+
- selector must resolve to **exactly one** element; ambiguous selectors refuse
|
|
40
|
+
- probe target uses the resolved probe DOM node
|
|
41
|
+
- fiber target uses the first DOM-backed node reachable from that remembered fiber
|
|
42
|
+
- no multi-click mode
|
|
43
|
+
|
|
44
|
+
Pollution:
|
|
45
|
+
- all page state reachable from the click handler may change
|
|
46
|
+
- focus, selection, open/closed UI state, and network activity may change
|
|
47
|
+
- subsequent probe reads are about the post-click page, not the pre-click page
|
|
48
|
+
|
|
49
|
+
## `fiber-invoke`
|
|
50
|
+
|
|
51
|
+
Use when the final application boundary matters more than browser mechanics — for example invoking `onClick`, `onChange`, or a callback prop directly to tap the product system without reproducing browser ceremony.
|
|
52
|
+
|
|
53
|
+
Rules:
|
|
54
|
+
- target fiber is explicit (`fiberId` only)
|
|
55
|
+
- run `fiber-prop-contract` first to inspect `fn.length`, function name/source preview, prop names, and source hints
|
|
56
|
+
- read the component/owner source to determine the real callback contract
|
|
57
|
+
- prop must exist on `memoizedProps`
|
|
58
|
+
- prop must be a function
|
|
59
|
+
- arguments are explicit JSON only; do not infer them from prop names
|
|
60
|
+
|
|
61
|
+
Pollution:
|
|
62
|
+
- component/app state may change without matching browser focus, pointer, or default-event semantics
|
|
63
|
+
- side effects triggered by the callback still run
|
|
64
|
+
- this proves application behavior, not browser behavior
|
|
65
|
+
|
|
66
|
+
## Choosing between them
|
|
67
|
+
|
|
68
|
+
Prefer `page-click` when:
|
|
69
|
+
- browser semantics matter
|
|
70
|
+
- the handler depends on actual DOM click wiring
|
|
71
|
+
- you want the closest equivalent to a user click
|
|
72
|
+
|
|
73
|
+
Prefer `fiber-invoke` when:
|
|
74
|
+
- the browser ceremony is irrelevant noise
|
|
75
|
+
- the real question is whether the app callback changes state correctly
|
|
76
|
+
- you want a small white-box repro that taps directly into the final system
|
|
77
|
+
|
|
78
|
+
## Never
|
|
79
|
+
|
|
80
|
+
- never use active stimulus before finishing Observe/Define
|
|
81
|
+
- never hide that the page was mutated
|
|
82
|
+
- never treat post-stimulus state as if it were pristine baseline state
|
|
83
|
+
- never use `fiber-invoke` to claim browser behavior was proven
|
|
84
|
+
- never invoke a function prop before understanding its contract from `fiber-prop-contract` and source inspection
|
|
85
|
+
- never synthesize callback arguments from prop names alone
|