@nexface/tools 0.1.1-alpha.6 → 0.1.1-alpha.7
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.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ToolRuntime } from "./runtime.js";
|
|
2
|
+
interface OperationHost {
|
|
3
|
+
toolRuntime: ToolRuntime;
|
|
4
|
+
operationSurface: {
|
|
5
|
+
current: object | null;
|
|
6
|
+
};
|
|
7
|
+
sessionId: string;
|
|
8
|
+
turnId: string;
|
|
9
|
+
taskLabel?: string;
|
|
10
|
+
running: boolean;
|
|
11
|
+
waiting: boolean;
|
|
12
|
+
failed: boolean;
|
|
13
|
+
cancel(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const OperationHostContext: import("react").Context<OperationHost | null>;
|
|
16
|
+
export declare function useOperationHost(): OperationHost;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
export const OperationHostContext = createContext(null);
|
|
3
|
+
export function useOperationHost() {
|
|
4
|
+
const host = useContext(OperationHostContext);
|
|
5
|
+
if (!host)
|
|
6
|
+
throw new Error("AgentOperationSurface must be rendered inside NexfaceProvider.");
|
|
7
|
+
return host;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=operation-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-host.js","sourceRoot":"","sources":["../src/operation-host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAelD,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAuB,IAAI,CAAC,CAAC;AAE9E,MAAM,UAAU,gBAAgB;IAC9B,MAAM,IAAI,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC9C,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IAC7F,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-entry.js","sourceRoot":"","sources":["../src/react-entry.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAmC,MAAM,wBAAwB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexface/tools",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -33,7 +33,10 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"files": [
|
|
36
|
-
"dist"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "node ../../scripts/generate-browser-tools-skill.mjs --check && tsc -p tsconfig.json && cp src/styles.css dist/styles.css",
|
|
40
|
+
"typecheck": "node ../../scripts/generate-browser-tools-skill.mjs --check && tsc -p tsconfig.json --noEmit"
|
|
41
|
+
}
|
|
42
|
+
}
|