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.
@@ -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;
@@ -0,0 +1,3 @@
1
+ export function defineSite(config) {
2
+ return config;
3
+ }
@@ -0,0 +1,2 @@
1
+ export { defineSite, type AgentSiteConfig, type AgentSiteRoute } from './defineSite.js';
2
+ export { serveAgent } from './serveAgent.js';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { defineSite } from './defineSite.js';
2
+ export { serveAgent } from './serveAgent.js';
@@ -0,0 +1,4 @@
1
+ import { AgentSiteConfig } from './defineSite.js';
2
+ export declare function serveAgent(config: AgentSiteConfig): {
3
+ GET: () => Response;
4
+ };
@@ -0,0 +1,12 @@
1
+ export function serveAgent(config) {
2
+ return {
3
+ GET: () => {
4
+ return new Response(JSON.stringify(config, null, 2), {
5
+ headers: {
6
+ 'Content-Type': 'application/json',
7
+ 'Access-Control-Allow-Origin': '*',
8
+ },
9
+ });
10
+ },
11
+ };
12
+ }
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
@@ -0,0 +1,2 @@
1
+ export { defineSite, type AgentSiteConfig, type AgentSiteRoute } from './defineSite.js';
2
+ export { serveAgent } from './serveAgent.js';
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
+ }