apteva 0.4.2 → 0.4.3

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.html CHANGED
@@ -11,6 +11,6 @@
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
14
- <script type="module" src="/App.hzycvt6c.js"></script>
14
+ <script type="module" src="/App.mbp9atpm.js"></script>
15
15
  </body>
16
16
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apteva",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Run AI agents locally. Multi-provider support for Claude, GPT, Gemini, Llama, and more.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1856,6 +1856,29 @@ function EditServerModal({
1856
1856
  const [pkg, setPkg] = useState(server.package || "");
1857
1857
  const [command, setCommand] = useState(server.command || "");
1858
1858
  const [args, setArgs] = useState(server.args || "");
1859
+ const [url, setUrl] = useState(server.url || "");
1860
+ // Extract username/password from existing Basic Auth header
1861
+ const [username, setUsername] = useState(() => {
1862
+ const authHeader = server.headers?.["Authorization"] || "";
1863
+ if (authHeader.startsWith("Basic ")) {
1864
+ try {
1865
+ const decoded = atob(authHeader.slice(6));
1866
+ return decoded.split(":")[0] || "";
1867
+ } catch { return ""; }
1868
+ }
1869
+ return "";
1870
+ });
1871
+ const [password, setPassword] = useState(() => {
1872
+ const authHeader = server.headers?.["Authorization"] || "";
1873
+ if (authHeader.startsWith("Basic ")) {
1874
+ try {
1875
+ const decoded = atob(authHeader.slice(6));
1876
+ const parts = decoded.split(":");
1877
+ return parts.slice(1).join(":") || "";
1878
+ } catch { return ""; }
1879
+ }
1880
+ return "";
1881
+ });
1859
1882
  const [envVars, setEnvVars] = useState<Array<{ key: string; value: string }>>(() => {
1860
1883
  // Convert env object to array format
1861
1884
  return Object.entries(server.env || {}).map(([key, value]) => ({ key, value }));
@@ -1865,7 +1888,7 @@ function EditServerModal({
1865
1888
  const [error, setError] = useState<string | null>(null);
1866
1889
 
1867
1890
  const hasProjects = projects && projects.length > 0;
1868
- const isRemote = server.type === "http" && server.url;
1891
+ const isRemote = server.type === "http";
1869
1892
 
1870
1893
  const addEnvVar = () => {
1871
1894
  setEnvVars([...envVars, { key: "", value: "" }]);
@@ -1905,10 +1928,27 @@ function EditServerModal({
1905
1928
  };
1906
1929
 
1907
1930
  // Only include fields that are relevant to the server type
1908
- if (!isRemote) {
1931
+ if (isRemote) {
1932
+ // HTTP server - update URL and headers
1933
+ if (url.trim()) {
1934
+ updates.url = url.trim();
1935
+ }
1936
+ // Build headers with Basic Auth if credentials provided
1937
+ const headers: Record<string, string> = {
1938
+ "Content-Type": "application/json",
1939
+ };
1940
+ if (username && password) {
1941
+ const credentials = btoa(`${username}:${password}`);
1942
+ headers["Authorization"] = `Basic ${credentials}`;
1943
+ }
1944
+ updates.headers = headers;
1945
+ } else {
1909
1946
  if (server.type === "npm" && pkg.trim()) {
1910
1947
  updates.package = pkg.trim();
1911
1948
  }
1949
+ if (server.type === "pip" && pkg.trim()) {
1950
+ updates.package = pkg.trim();
1951
+ }
1912
1952
  if (server.type === "custom") {
1913
1953
  if (command.trim()) updates.command = command.trim();
1914
1954
  if (args.trim()) updates.args = args.trim();
@@ -1967,7 +2007,6 @@ function EditServerModal({
1967
2007
  Type: <span className="text-[#888]">{server.type}</span>
1968
2008
  {server.package && <> • Package: <span className="text-[#888] font-mono">{server.package}</span></>}
1969
2009
  {server.command && <> • Command: <span className="text-[#888] font-mono">{server.command}</span></>}
1970
- {isRemote && server.url && <> • URL: <span className="text-[#888] font-mono text-xs">{server.url}</span></>}
1971
2010
  </div>
1972
2011
 
1973
2012
  {/* Name */}
@@ -2010,6 +2049,57 @@ function EditServerModal({
2010
2049
  </div>
2011
2050
  )}
2012
2051
 
2052
+ {/* Package (for pip type) */}
2053
+ {server.type === "pip" && (
2054
+ <div>
2055
+ <label className="block text-sm text-[#666] mb-1">pip Package</label>
2056
+ <input
2057
+ type="text"
2058
+ value={pkg}
2059
+ onChange={e => setPkg(e.target.value)}
2060
+ className="w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"
2061
+ />
2062
+ </div>
2063
+ )}
2064
+
2065
+ {/* URL & Credentials (for http type) */}
2066
+ {isRemote && (
2067
+ <>
2068
+ <div>
2069
+ <label className="block text-sm text-[#666] mb-1">Server URL</label>
2070
+ <input
2071
+ type="text"
2072
+ value={url}
2073
+ onChange={e => setUrl(e.target.value)}
2074
+ placeholder="https://example.com/mcp"
2075
+ className="w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"
2076
+ />
2077
+ </div>
2078
+ <div>
2079
+ <label className="block text-sm text-[#666] mb-1">Authentication (Basic Auth)</label>
2080
+ <div className="flex gap-2">
2081
+ <input
2082
+ type="text"
2083
+ value={username}
2084
+ onChange={e => setUsername(e.target.value)}
2085
+ placeholder="Username"
2086
+ className="flex-1 bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"
2087
+ />
2088
+ <input
2089
+ type="password"
2090
+ value={password}
2091
+ onChange={e => setPassword(e.target.value)}
2092
+ placeholder="Password / App Password"
2093
+ className="flex-1 bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 text-sm focus:outline-none focus:border-[#f97316]"
2094
+ />
2095
+ </div>
2096
+ <p className="text-xs text-[#555] mt-1">
2097
+ Leave empty if no authentication required
2098
+ </p>
2099
+ </div>
2100
+ </>
2101
+ )}
2102
+
2013
2103
  {/* Command & Args (for custom type) */}
2014
2104
  {server.type === "custom" && (
2015
2105
  <>