@inspecto-dev/core 0.2.0-alpha.3 → 0.3.0-alpha.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/README.md CHANGED
@@ -1,17 +1,26 @@
1
1
  # @inspecto-dev/core
2
2
 
3
- `@inspecto-dev/core` is the core browser runtime and server logic for Inspecto.
3
+ `@inspecto-dev/core` is the browser runtime for Inspecto.
4
4
 
5
5
  ## Overview
6
6
 
7
- This package handles two main responsibilities:
7
+ This package focuses on the browser-side runtime:
8
8
 
9
9
  1. **Browser Client**: A native Web Component (`<inspecto-overlay>`) utilizing Shadow DOM for style isolation. It captures DOM clicks, parses the injected source location attributes (`data-inspecto`), and provides the interactive UI menu.
10
- 2. **Local Development Server**: A local HTTP server that acts as a bridge between the browser client and the IDE extension, extracting code snippets from local source files based on the requested location and opening the IDE.
10
+ 2. **Prompt Assembly**: Builds inspect and annotate payloads in the browser, including optional runtime, screenshot, CSS, and snippet context.
11
+
12
+ The local development server, snippet extraction, and IDE dispatch runtime live in `@inspecto-dev/plugin`.
11
13
 
12
14
  ## Core Implementation
13
15
 
14
16
  - **Web Component**: Implemented with pure native DOM APIs and `goober` for CSS-in-JS inside the Shadow DOM, ensuring zero framework dependency and avoiding conflicts with user styles.
15
17
  - **Intent System**: Defines the default AI actions (Explain, Fix Bug, Code Review, etc.) and handles prompting.
16
- - **Snippet Extraction**: Reads local source files and returns the relevant AST-based or line-based code block.
17
- - **IDE Dispatch**: Generates custom URIs (e.g., `vscode://inspecto.inspecto/send`) to launch the user's preferred IDE extension or CLI tool.
18
+ - **Context Assembly**: Requests optional snippet/runtime/screenshot context and appends it to the outgoing prompt.
19
+ - **Overlay Runtime**: Mounts and configures the browser overlay via `mountInspector()` / `unmountInspector()`.
20
+
21
+ ## Modes
22
+
23
+ - `Inspect mode`: single-target inspect and immediate actions.
24
+ - `Annotate mode`: multi-target annotation, sidebar queueing, and batch AI dispatch.
25
+
26
+ Use inspect when you want to act on one element immediately. Use annotate when one problem spans multiple linked components.
@@ -0,0 +1,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __async = (__this, __arguments, generator) => {
21
+ return new Promise((resolve, reject) => {
22
+ var fulfilled = (value) => {
23
+ try {
24
+ step(generator.next(value));
25
+ } catch (e) {
26
+ reject(e);
27
+ }
28
+ };
29
+ var rejected = (value) => {
30
+ try {
31
+ step(generator.throw(value));
32
+ } catch (e) {
33
+ reject(e);
34
+ }
35
+ };
36
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
+ step((generator = generator.apply(__this, __arguments)).next());
38
+ });
39
+ };
40
+
41
+ export {
42
+ __spreadValues,
43
+ __spreadProps,
44
+ __async
45
+ };
46
+ //# sourceMappingURL=chunk-JPRRZPBL.js.map