agentkit-web 0.1.0
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/defineSite.d.ts +13 -0
- package/dist/defineSite.js +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/serveAgent.d.ts +4 -0
- package/dist/serveAgent.js +12 -0
- package/package.json +16 -0
- package/src/defineSite.js +0 -0
- package/src/defineSite.ts +17 -0
- package/src/index.js +0 -0
- package/src/index.ts +2 -0
- package/src/serveAgent.js +0 -0
- package/src/serveAgent.ts +14 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface AgentSiteRoute {
|
|
2
|
+
path: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
params?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface AgentSiteConfig {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
routes: AgentSiteRoute[];
|
|
11
|
+
capabilities?: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare function defineSite(config: AgentSiteConfig): AgentSiteConfig;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentkit-web",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"typescript": "^5.9.3"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AgentSiteRoute {
|
|
2
|
+
path: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
params?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AgentSiteConfig {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
routes: AgentSiteRoute[];
|
|
12
|
+
capabilities?: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function defineSite(config: AgentSiteConfig): AgentSiteConfig {
|
|
16
|
+
return config;
|
|
17
|
+
}
|
package/src/index.js
ADDED
|
File without changes
|
package/src/index.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AgentSiteConfig } from './defineSite.js';
|
|
2
|
+
|
|
3
|
+
export function serveAgent(config: AgentSiteConfig) {
|
|
4
|
+
return {
|
|
5
|
+
GET: () => {
|
|
6
|
+
return new Response(JSON.stringify(config, null, 2), {
|
|
7
|
+
headers: {
|
|
8
|
+
'Content-Type': 'application/json',
|
|
9
|
+
'Access-Control-Allow-Origin': '*',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "NodeNext",
|
|
6
|
+
"lib": [
|
|
7
|
+
"ES2020",
|
|
8
|
+
"DOM",
|
|
9
|
+
"DOM.Iterable"
|
|
10
|
+
],
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
/* Bundler mode */
|
|
13
|
+
"moduleResolution": "NodeNext",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"isolatedModules": true,
|
|
16
|
+
"outDir": "dist",
|
|
17
|
+
"declaration": true,
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true
|
|
23
|
+
},
|
|
24
|
+
"include": [
|
|
25
|
+
"src"
|
|
26
|
+
]
|
|
27
|
+
}
|