@atlassian/chippy 0.0.0-stage → 0.0.1-beta.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.
- package/LICENSE +201 -0
- package/README.md +276 -2
- package/bin/chippy.mjs +92 -0
- package/bin/pack.mjs +204 -0
- package/bin/skill-dir.mjs +15 -0
- package/lib/avalanche.js +2601 -0
- package/lib/avalanche.js.map +7 -0
- package/lib/bootstrap.d.ts +1 -0
- package/lib/bootstrap.js +70 -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 +5535 -0
- package/lib/extension/avalanche.es.js.map +1 -0
- package/lib/extension/chippy-page-bridge.js +1953 -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 +148 -0
- package/lib/mcp-skill/SKILL.md +335 -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/armed-reload-startup.js +83 -0
- package/lib/mcp-skill/extension/avalanche.es.js +5535 -0
- package/lib/mcp-skill/extension/avalanche.es.js.map +1 -0
- package/lib/mcp-skill/extension/avalanche.iife.js +5536 -0
- package/lib/mcp-skill/extension/avalanche.iife.js.map +1 -0
- package/lib/mcp-skill/extension/background.js +325 -0
- package/lib/mcp-skill/extension/chippy-page-bridge.js +1953 -0
- package/lib/mcp-skill/extension/content-script.js +190 -0
- package/lib/mcp-skill/extension/devtools-hook-shim.js +85 -0
- package/lib/mcp-skill/extension/early-bootstrap.js +49 -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 +173 -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/extension/startup-handoff.js +30 -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 +1085 -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 +102 -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 +194 -0
- package/lib/mcp-skill/references/troubleshooting.md +59 -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 +1768 -0
- package/lib/mcp-skill/scripts/chippy-mcp.cjs +273 -0
- package/lib/mcp-skill/scripts/chippy.sh +1252 -0
- package/lib/mcp-skill/scripts/format-probe-result.js +34 -0
- package/lib/mcp-skill/scripts/helper-access.js +158 -0
- package/lib/mcp-skill/scripts/helper-proxy.js +87 -0
- package/lib/mcp-skill/scripts/page-socket-trust.js +81 -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-owner.js +42 -0
- package/lib/storybook/manager.jsx +425 -0
- package/lib/storybook/preset.js +7 -0
- package/lib/storybook/preview.js +298 -0
- package/lib/storybook/probe-annotation-editor.jsx +52 -0
- package/lib/storybook/probe-intent.js +23 -0
- package/lib/storybook/setup.js +104 -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 +48 -0
- package/lib/types/chippy-bridge/react-renderer.d.ts +74 -0
- package/lib/types/chippy-bridge/recorded-source.d.ts +44 -0
- package/lib/types/chippy-bridge/source-map.d.ts +30 -0
- package/lib/types/debug-render/core.d.ts +78 -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 +106 -4
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chippy plugin registry. The core runtime has no product knowledge; plugins
|
|
3
|
+
* add it through the context provider and commit metrics adapter seams.
|
|
4
|
+
*
|
|
5
|
+
* The bundle ships the built-in Jira and ATL plugins, and a packed build
|
|
6
|
+
* (`chippy pack`) appends more through `__AVALANCHE__.registerPlugin()`. A
|
|
7
|
+
* plugin runs only once it is both registered and enabled. A page enables
|
|
8
|
+
* plugins through the startup config (`plugins: ['jira', 'atl']`), the
|
|
9
|
+
* `__CHIPPY_PLUGINS` global, or `__AVALANCHE__.enablePlugins()`; a packed
|
|
10
|
+
* build can name defaults for pages that do neither.
|
|
11
|
+
*/
|
|
12
|
+
import { type CommitMetricsAdapter } from '../avalanche/commit-metrics-adapter.js';
|
|
13
|
+
import { type ContextProvider } from '../layout-lab/marker-context.js';
|
|
14
|
+
export type ChippyPlugin = {
|
|
15
|
+
/** Stable id used to enable the plugin, e.g. `'jira'`. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Short name shown in the extension's plugin settings. */
|
|
18
|
+
label?: string;
|
|
19
|
+
contextProvider?: ContextProvider;
|
|
20
|
+
commitMetricsAdapter?: CommitMetricsAdapter;
|
|
21
|
+
};
|
|
22
|
+
export type PluginStatus = {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const BUILTIN_PLUGINS: readonly ChippyPlugin[];
|
|
28
|
+
/**
|
|
29
|
+
* Register a plugin. It starts at once if its id was already enabled.
|
|
30
|
+
* Registering the same id again replaces the earlier plugin.
|
|
31
|
+
*/
|
|
32
|
+
export declare function registerPlugin(plugin: ChippyPlugin): () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Enable plugins by id. An id that is not registered yet starts when its
|
|
35
|
+
* plugin registers; non-string ids are ignored. Returns the running ids.
|
|
36
|
+
*/
|
|
37
|
+
export declare function enablePlugins(ids: unknown): string[];
|
|
38
|
+
/**
|
|
39
|
+
* Record the page's own plugin selection. Once a page has chosen, build
|
|
40
|
+
* defaults no longer apply, so a user who turned a default off keeps it off.
|
|
41
|
+
*/
|
|
42
|
+
export declare function selectPlugins(ids: unknown): string[];
|
|
43
|
+
/** Enable a packed build's default plugins unless the page made its own selection. */
|
|
44
|
+
export declare function enableDefaultPlugins(ids: unknown): string[];
|
|
45
|
+
export declare function listPlugins(): PluginStatus[];
|
|
46
|
+
/** Register the built-in plugins. Returns a function that removes them. */
|
|
47
|
+
export declare function registerBuiltinPlugins(): () => void;
|
|
48
|
+
/** Stop every plugin and forget all registrations and selections. Test helper. */
|
|
49
|
+
export declare function resetPlugins(): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jira context provider: recognizes Jira's OwnerMark/OwnershipMark ownership
|
|
3
|
+
* markers and JSErrorBoundary props, and layers them onto the generic marker
|
|
4
|
+
* context as an `owner` boundary kind and error-boundary enrichment.
|
|
5
|
+
*
|
|
6
|
+
* Registered by the bundle's composition root; the core marker context works
|
|
7
|
+
* without it.
|
|
8
|
+
*/
|
|
9
|
+
import { type Fiber } from '../../layout-lab/fiber-walk.js';
|
|
10
|
+
import { type ContextContribution, type ContextProvider, type MarkerContext } from '../../layout-lab/marker-context.js';
|
|
11
|
+
export type JiraOwnership = {
|
|
12
|
+
markerName: string;
|
|
13
|
+
type: string | null;
|
|
14
|
+
name: string | null;
|
|
15
|
+
packageName: string | null;
|
|
16
|
+
teamName: string | null;
|
|
17
|
+
variant: string | null;
|
|
18
|
+
source: 'display-name' | 'props';
|
|
19
|
+
};
|
|
20
|
+
export type JiraErrorBoundary = {
|
|
21
|
+
componentName: string;
|
|
22
|
+
id: string | null;
|
|
23
|
+
packageName: string | null;
|
|
24
|
+
fallback: string | null;
|
|
25
|
+
teamName: string | null;
|
|
26
|
+
};
|
|
27
|
+
export declare function parseOwnerMarkDisplayName(displayName: string | null | undefined): JiraOwnership | null;
|
|
28
|
+
export declare function describeOwnership(fiber: Fiber): JiraOwnership | null;
|
|
29
|
+
/**
|
|
30
|
+
* Scan the probed ancestry for OwnerMark ownership, the nearest JSErrorBoundary,
|
|
31
|
+
* and Jira's ErrorComponent fallback marker.
|
|
32
|
+
*/
|
|
33
|
+
export declare function describeJiraContribution(fibers: Fiber[]): ContextContribution | null;
|
|
34
|
+
export declare const jiraContextProvider: ContextProvider;
|
|
35
|
+
/** The marker context with the Jira fields always present. */
|
|
36
|
+
export declare function describeJiraContext(fiber: Fiber | null | undefined): MarkerContext | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,108 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/chippy",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1-beta.2",
|
|
4
|
+
"description": "React runtime inspection and Avalanche commit evidence",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/atlassian-labs/chippy.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/atlassian-labs/chippy#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/atlassian-labs/chippy/issues"
|
|
13
|
+
},
|
|
14
|
+
"packageManager": "yarn@4.8.1",
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=22.12.0"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"bin",
|
|
23
|
+
"lib"
|
|
24
|
+
],
|
|
25
|
+
"bin": {
|
|
26
|
+
"chippy": "./bin/chippy.mjs",
|
|
27
|
+
"chippy-mcp": "./lib/mcp-skill/scripts/chippy-mcp.cjs"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
"./avalanche": {
|
|
31
|
+
"types": "./lib/types/package/avalanche.d.ts",
|
|
32
|
+
"import": "./lib/avalanche.js"
|
|
33
|
+
},
|
|
34
|
+
"./bootstrap": {
|
|
35
|
+
"types": "./lib/bootstrap.d.ts",
|
|
36
|
+
"import": "./lib/bootstrap.js"
|
|
37
|
+
},
|
|
38
|
+
"./browser": {
|
|
39
|
+
"types": "./lib/types/package/browser.d.ts",
|
|
40
|
+
"import": "./lib/browser.js"
|
|
41
|
+
},
|
|
42
|
+
"./plugin": {
|
|
43
|
+
"types": "./lib/types/package/plugin.d.ts",
|
|
44
|
+
"import": "./lib/plugin.js"
|
|
45
|
+
},
|
|
46
|
+
"./storybook": "./lib/storybook/preset.js"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"storybook": "storybook dev -p 6006 --host 0.0.0.0",
|
|
50
|
+
"build-storybook": "storybook build",
|
|
51
|
+
"chippy:helper": "node .agents/skills/chippy/scripts/chippy-helper-server.js",
|
|
52
|
+
"avalanche:build": "vite build --config vite.avalanche.config.ts",
|
|
53
|
+
"avalanche:sync": "yarn avalanche:build && cp dist/avalanche.iife.js .agents/skills/chippy/extension/avalanche.iife.js && cp dist/avalanche.es.js .agents/skills/chippy/extension/avalanche.es.js && cp dist/avalanche.iife.js.map .agents/skills/chippy/extension/avalanche.iife.js.map && cp dist/avalanche.es.js.map .agents/skills/chippy/extension/avalanche.es.js.map",
|
|
54
|
+
"test": "vitest run",
|
|
55
|
+
"test:watch": "vitest",
|
|
56
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.helper.json",
|
|
57
|
+
"test:chippy-headless": "vitest run src/__tests__/chippy-capabilities.test.ts",
|
|
58
|
+
"chippy:zip": "node scripts/package-chippy.mjs skill",
|
|
59
|
+
"chippy:extension:zip": "node scripts/package-chippy.mjs extension",
|
|
60
|
+
"chippy:library:build": "node scripts/build-chippy-library.mjs",
|
|
61
|
+
"chippy:mcp:build": "node scripts/build-chippy-mcp.mjs",
|
|
62
|
+
"chippy:mcp": "node .agents/skills/chippy/scripts/chippy-mcp.cjs"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"esbuild": ">=0.20",
|
|
66
|
+
"react": ">=18 <20",
|
|
67
|
+
"react-dom": ">=18 <20",
|
|
68
|
+
"storybook": "^10.3.3"
|
|
69
|
+
},
|
|
70
|
+
"peerDependenciesMeta": {
|
|
71
|
+
"esbuild": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"react": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"react-dom": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"storybook": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@babel/core": "^7.27.1",
|
|
86
|
+
"@babel/plugin-transform-react-jsx-source": "^7.27.1",
|
|
87
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
88
|
+
"@playwright/cli": "^0.1.13",
|
|
89
|
+
"@storybook/react-vite": "^10.3.3",
|
|
90
|
+
"@testing-library/dom": "^10.4.1",
|
|
91
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
92
|
+
"@testing-library/react": "^16.3.0",
|
|
93
|
+
"@types/node": "^22",
|
|
94
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
95
|
+
"esbuild": "^0.25.12",
|
|
96
|
+
"jsdom": "^26.1.0",
|
|
97
|
+
"playwright": "^1.64.1",
|
|
98
|
+
"react": "^18.3.1",
|
|
99
|
+
"react-19": "npm:react@19.2.0",
|
|
100
|
+
"react-dom": "^18.3.1",
|
|
101
|
+
"react-dom-19": "npm:react-dom@19.2.0",
|
|
102
|
+
"storybook": "^10.3.3",
|
|
103
|
+
"typescript": "^5.9.3",
|
|
104
|
+
"vite": "^6.4.1",
|
|
105
|
+
"vitest": "^3.2.4",
|
|
106
|
+
"zod": "^4.6.7"
|
|
107
|
+
}
|
|
108
|
+
}
|