@patchedcodes/hackathon-widget 0.1.2 → 0.1.4

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/dist/index.d.ts CHANGED
@@ -44,19 +44,10 @@ export declare interface ChatMessage {
44
44
  * The payload sent to the backend when the user issues a command.
45
45
  */
46
46
  export declare interface CommandRequest {
47
- /** The user's natural language command */
48
- command: string;
49
- /** Base64-encoded screenshot of the current page */
50
- screenshot: string;
51
- /** Viewport dimensions */
52
- viewport: {
53
- width: number;
54
- height: number;
55
- };
56
- /** Project identifier */
57
- projectId: string;
58
- /** Optional conversation context for multi-turn editing */
59
- conversationId?: string;
47
+ /** API key for authenticating with the backend */
48
+ apiKey: string;
49
+ /** The user's natural language prompt */
50
+ prompt: string;
60
51
  }
61
52
 
62
53
  /**
@@ -64,12 +55,12 @@ export declare interface CommandRequest {
64
55
  * The backend only responds once the deploy is complete.
65
56
  */
66
57
  export declare interface CommandResponse {
58
+ /** The commit SHA that was pushed to main */
59
+ commitId: string;
67
60
  /** AI's explanation of what was changed */
68
- message: string;
69
- /** The branch name that was deployed */
70
- branch?: string;
71
- /** The URL where the changes are live (may be same domain) */
72
- previewUrl?: string;
61
+ transcript: string;
62
+ /** Short descriptive commit message for the changes */
63
+ commitMessage: string;
73
64
  }
74
65
 
75
66
  /**
@@ -191,7 +182,7 @@ export declare class DevloyedWidget extends HTMLElement {
191
182
  *
192
183
  * init({
193
184
  * endpoint: 'https://api.devloyed.com/command',
194
- * projectId: 'my-project',
185
+ * apiKey: 'your-api-key',
195
186
  * position: 'bottom-right',
196
187
  * theme: 'light',
197
188
  * });
@@ -202,7 +193,7 @@ export declare function init(config: WidgetConfig): DevloyedWidget;
202
193
  /**
203
194
  * Internal resolved configuration with defaults applied.
204
195
  */
205
- export declare interface ResolvedConfig extends Required<Pick<WidgetConfig, "endpoint" | "projectId" | "position" | "theme">> {
196
+ export declare interface ResolvedConfig extends Required<Pick<WidgetConfig, "endpoint" | "apiKey" | "position" | "theme">> {
206
197
  headers: Record<string, string>;
207
198
  onDeployReady?: (branch: string, previewUrl: string) => void;
208
199
  onError?: (error: Error) => void;
@@ -241,8 +232,8 @@ export declare class TransportClient {
241
232
  export declare interface WidgetConfig {
242
233
  /** Backend endpoint URL for sending commands (POST) */
243
234
  endpoint: string;
244
- /** Project identifier sent with each request so the backend knows which repo to modify */
245
- projectId: string;
235
+ /** API key sent in the request body to authenticate with the backend */
236
+ apiKey: string;
246
237
  /** Position of the floating widget button */
247
238
  position?: "bottom-right" | "bottom-left" | "top-right" | "top-left";
248
239
  /** Widget color theme */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patchedcodes/hackathon-widget",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "AI-powered frontend editor widget — modify live web interfaces using natural language",
5
5
  "type": "module",
6
6
  "main": "./dist/devloyed-widget.js",