skybridge 0.9.4 → 0.9.5

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
@@ -22,7 +22,7 @@ Skybridge is a fullstack library. It comes with modular packages aiming at simpl
22
22
 
23
23
  ## Get Involved
24
24
 
25
- We welcome issues and pull requests!
26
- Participate in [GitHub discussions](https://github.com/alpic-ai/skybridge/discussions)
27
- Chat with the community on [Discord](https://discord.com/invite/gNAazGueab)
25
+ We welcome issues and pull requests!</br>
26
+ Participate in [GitHub discussions](https://github.com/alpic-ai/skybridge/discussions)</br>
27
+ Chat with the community on [Discord](https://discord.com/invite/gNAazGueab)</br>
28
28
  See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions
@@ -1,2 +1,2 @@
1
- import { type OpenAiGlobals } from "../types.js";
2
- export declare function useOpenAiGlobal<K extends keyof OpenAiGlobals>(key: K): OpenAiGlobals[K] | undefined;
1
+ import { type OpenAiProperties } from "../types.js";
2
+ export declare function useOpenAiGlobal<K extends keyof OpenAiProperties>(key: K): OpenAiProperties[K] | undefined;
@@ -28,13 +28,13 @@ export declare class ToolResponseEvent extends CustomEvent<{
28
28
  }
29
29
  declare global {
30
30
  interface Window {
31
- openai: API<WidgetState> & OpenAiGlobals;
31
+ openai: OpenAiMethods<WidgetState> & OpenAiProperties;
32
32
  }
33
33
  interface WindowEventMap {
34
34
  [SET_GLOBALS_EVENT_TYPE]: SetGlobalsEvent;
35
35
  }
36
36
  }
37
- export type OpenAiGlobals<ToolInput extends UnknownObject = {}, ToolOutput extends UnknownObject = UnknownObject, ToolResponseMetadata extends UnknownObject = UnknownObject, WidgetState extends UnknownObject = UnknownObject> = {
37
+ export type OpenAiProperties<ToolInput extends UnknownObject = {}, ToolOutput extends UnknownObject = UnknownObject, ToolResponseMetadata extends UnknownObject = UnknownObject, WidgetState extends UnknownObject = UnknownObject> = {
38
38
  theme: Theme;
39
39
  userAgent: UserAgent;
40
40
  locale: string;
@@ -59,7 +59,7 @@ export type CallToolResponse = {
59
59
  result: string;
60
60
  meta: Record<string, unknown>;
61
61
  };
62
- type API<WidgetState extends UnknownObject> = {
62
+ export type OpenAiMethods<WidgetState extends UnknownObject = UnknownObject> = {
63
63
  /** Calls a tool on your MCP. Returns the full response. */
64
64
  callTool: <ToolArgs extends CallToolArgs = null, ToolResponse extends CallToolResponse = CallToolResponse>(name: string, args: ToolArgs) => Promise<ToolResponse>;
65
65
  /** Triggers a followup turn in the ChatGPT conversation */
@@ -104,7 +104,7 @@ type API<WidgetState extends UnknownObject> = {
104
104
  };
105
105
  export declare const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
106
106
  export declare class SetGlobalsEvent extends CustomEvent<{
107
- globals: Partial<OpenAiGlobals>;
107
+ globals: Partial<OpenAiProperties>;
108
108
  }> {
109
109
  readonly type = "openai:set_globals";
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skybridge",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Skybridge is a framework for building ChatGPT apps",
5
5
  "type": "module",
6
6
  "files": [