@agentuity/server 0.0.33 → 0.0.36
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/api/api.d.ts +53 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/api.js +178 -0
- package/dist/api/api.js.map +1 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +4 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/org/index.d.ts +2 -0
- package/dist/api/org/index.d.ts.map +1 -0
- package/dist/api/org/index.js +2 -0
- package/dist/api/org/index.js.map +1 -0
- package/dist/api/org/list.d.ts +21 -0
- package/dist/api/org/list.d.ts.map +1 -0
- package/dist/api/org/list.js +16 -0
- package/dist/api/org/list.js.map +1 -0
- package/dist/api/project/create.d.ts +28 -0
- package/dist/api/project/create.d.ts.map +1 -0
- package/dist/api/project/create.js +27 -0
- package/dist/api/project/create.js.map +1 -0
- package/dist/api/project/exists.d.ts +23 -0
- package/dist/api/project/exists.d.ts.map +1 -0
- package/dist/api/project/exists.js +61 -0
- package/dist/api/project/exists.js.map +1 -0
- package/dist/api/project/index.d.ts +3 -0
- package/dist/api/project/index.d.ts.map +1 -0
- package/dist/api/project/index.js +3 -0
- package/dist/api/project/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/src/api/api-example.md +155 -0
- package/src/api/api.ts +241 -0
- package/src/api/index.ts +3 -0
- package/src/api/org/index.ts +1 -0
- package/src/api/org/list.ts +28 -0
- package/src/api/project/create.ts +43 -0
- package/src/api/project/exists.ts +76 -0
- package/src/api/project/index.ts +2 -0
- package/src/config.ts +20 -0
- package/src/index.ts +14 -0
- package/src/server.ts +133 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client for Agentuity Platform
|
|
3
|
+
*
|
|
4
|
+
* Handles HTTP requests to the API with automatic error parsing and User-Agent headers.
|
|
5
|
+
*
|
|
6
|
+
* Error handling:
|
|
7
|
+
* - UPGRADE_REQUIRED (409): Throws UpgradeRequiredError
|
|
8
|
+
* - Other errors: Throws Error with API message or status text
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export interface APIErrorResponse {
|
|
12
|
+
success: boolean;
|
|
13
|
+
code?: string;
|
|
14
|
+
message: string;
|
|
15
|
+
details?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface APIClientConfig {
|
|
18
|
+
skipVersionCheck?: boolean;
|
|
19
|
+
userAgent?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class ValidationError extends Error {
|
|
22
|
+
issues: z.ZodIssue[];
|
|
23
|
+
constructor(message: string, issues: z.ZodIssue[]);
|
|
24
|
+
}
|
|
25
|
+
export declare class UpgradeRequiredError extends Error {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
export declare class APIError extends Error {
|
|
29
|
+
status: number;
|
|
30
|
+
code?: string | undefined;
|
|
31
|
+
constructor(message: string, status: number, code?: string | undefined);
|
|
32
|
+
}
|
|
33
|
+
export declare class APIClient {
|
|
34
|
+
private baseUrl;
|
|
35
|
+
private apiKey?;
|
|
36
|
+
private config?;
|
|
37
|
+
constructor(baseUrl: string, config?: APIClientConfig);
|
|
38
|
+
constructor(baseUrl: string, apiKey: string, config?: APIClientConfig);
|
|
39
|
+
request<TResponse, TBody = unknown>(method: string, endpoint: string, responseSchema: z.ZodType<TResponse>, body?: TBody, bodySchema?: z.ZodType<TBody>): Promise<TResponse>;
|
|
40
|
+
private makeRequest;
|
|
41
|
+
}
|
|
42
|
+
export declare function getAPIBaseURL(overrides?: {
|
|
43
|
+
api_url?: string;
|
|
44
|
+
}): string;
|
|
45
|
+
export declare function getAppBaseURL(overrides?: {
|
|
46
|
+
app_url?: string;
|
|
47
|
+
}): string;
|
|
48
|
+
export declare const APIResponseSchema: <T extends z.ZodType>(dataSchema: T) => z.ZodObject<{
|
|
49
|
+
success: z.ZodBoolean;
|
|
50
|
+
message: z.ZodOptional<z.ZodString>;
|
|
51
|
+
data: z.ZodOptional<T>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,eAAgB,SAAQ,KAAK;IAGjC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;gBAD3B,OAAO,EAAE,MAAM,EACR,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAK5B;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI3B;AAED,qBAAa,QAAS,SAAQ,KAAK;IAG1B,MAAM,EAAE,MAAM;IACd,IAAI,CAAC,EAAE,MAAM;gBAFpB,OAAO,EAAE,MAAM,EACR,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,YAAA;CAKrB;AAED,qBAAa,SAAS;IACrB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,CAAkB;gBAErB,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe;gBACzC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe;IAkB/D,OAAO,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,EACvC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpC,IAAI,CAAC,EAAE,KAAK,EACZ,UAAU,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAC3B,OAAO,CAAC,SAAS,CAAC;YAyCP,WAAW;CAsFzB;AAED,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAUtE;AAED,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAUtE;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,YAAY,CAAC;;;;iBAKjE,CAAC"}
|
package/dist/api/api.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Client for Agentuity Platform
|
|
3
|
+
*
|
|
4
|
+
* Handles HTTP requests to the API with automatic error parsing and User-Agent headers.
|
|
5
|
+
*
|
|
6
|
+
* Error handling:
|
|
7
|
+
* - UPGRADE_REQUIRED (409): Throws UpgradeRequiredError
|
|
8
|
+
* - Other errors: Throws Error with API message or status text
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
export class ValidationError extends Error {
|
|
12
|
+
issues;
|
|
13
|
+
constructor(message, issues) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.issues = issues;
|
|
16
|
+
this.name = 'ValidationError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class UpgradeRequiredError extends Error {
|
|
20
|
+
constructor(message) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = 'UpgradeRequiredError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export class APIError extends Error {
|
|
26
|
+
status;
|
|
27
|
+
code;
|
|
28
|
+
constructor(message, status, code) {
|
|
29
|
+
super(message);
|
|
30
|
+
this.status = status;
|
|
31
|
+
this.code = code;
|
|
32
|
+
this.name = 'APIError';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class APIClient {
|
|
36
|
+
baseUrl;
|
|
37
|
+
apiKey;
|
|
38
|
+
config;
|
|
39
|
+
constructor(baseUrl, apiKeyOrConfig, config) {
|
|
40
|
+
this.baseUrl = baseUrl;
|
|
41
|
+
// Detect if second parameter is apiKey (string) or config (object)
|
|
42
|
+
if (typeof apiKeyOrConfig === 'string') {
|
|
43
|
+
this.apiKey = apiKeyOrConfig;
|
|
44
|
+
this.config = config;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.apiKey = undefined;
|
|
48
|
+
this.config = apiKeyOrConfig;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async request(method, endpoint, responseSchema, body, bodySchema) {
|
|
52
|
+
// Validate request body if schema provided
|
|
53
|
+
if (body !== undefined && bodySchema) {
|
|
54
|
+
const validationResult = bodySchema.safeParse(body);
|
|
55
|
+
if (!validationResult.success) {
|
|
56
|
+
throw new ValidationError('Request body validation failed', validationResult.error.issues);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const response = await this.makeRequest(method, endpoint, body);
|
|
60
|
+
// Handle empty responses (204 or zero-length body)
|
|
61
|
+
let data;
|
|
62
|
+
if (response.status === 204 || response.headers.get('content-length') === '0') {
|
|
63
|
+
data = null;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const text = await response.text();
|
|
67
|
+
if (text === '') {
|
|
68
|
+
data = null;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const contentType = response.headers.get('content-type');
|
|
72
|
+
if (contentType && contentType.includes('application/json')) {
|
|
73
|
+
data = JSON.parse(text);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
data = text;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Validate response
|
|
81
|
+
const validationResult = responseSchema.safeParse(data);
|
|
82
|
+
if (!validationResult.success) {
|
|
83
|
+
throw new ValidationError('Response validation failed', validationResult.error.issues);
|
|
84
|
+
}
|
|
85
|
+
return validationResult.data;
|
|
86
|
+
}
|
|
87
|
+
async makeRequest(method, endpoint, body) {
|
|
88
|
+
const url = `${this.baseUrl}${endpoint}`;
|
|
89
|
+
const headers = {
|
|
90
|
+
'Content-Type': 'application/json',
|
|
91
|
+
};
|
|
92
|
+
if (this.config?.userAgent) {
|
|
93
|
+
headers['User-Agent'] = this.config.userAgent;
|
|
94
|
+
}
|
|
95
|
+
if (this.apiKey) {
|
|
96
|
+
headers['Authorization'] = `Bearer ${this.apiKey}`;
|
|
97
|
+
}
|
|
98
|
+
const response = await fetch(url, {
|
|
99
|
+
method,
|
|
100
|
+
headers,
|
|
101
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
102
|
+
});
|
|
103
|
+
if (!response.ok) {
|
|
104
|
+
const responseBody = await response.text();
|
|
105
|
+
// Try to parse error response
|
|
106
|
+
let errorData = null;
|
|
107
|
+
try {
|
|
108
|
+
errorData = JSON.parse(responseBody);
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
// Not JSON, ignore
|
|
112
|
+
}
|
|
113
|
+
if (process.env.DEBUG) {
|
|
114
|
+
// Sanitize headers to avoid leaking API keys
|
|
115
|
+
const sanitizedHeaders = { ...headers };
|
|
116
|
+
for (const key in sanitizedHeaders) {
|
|
117
|
+
if (key.toLowerCase() === 'authorization') {
|
|
118
|
+
sanitizedHeaders[key] = 'REDACTED';
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
console.error('API Error Details:');
|
|
122
|
+
console.error(' URL:', url);
|
|
123
|
+
console.error(' Method:', method);
|
|
124
|
+
console.error(' Status:', response.status, response.statusText);
|
|
125
|
+
console.error(' Headers:', JSON.stringify(sanitizedHeaders, null, 2));
|
|
126
|
+
console.error(' Response:', responseBody);
|
|
127
|
+
}
|
|
128
|
+
// Check for UPGRADE_REQUIRED error
|
|
129
|
+
if (errorData?.code === 'UPGRADE_REQUIRED') {
|
|
130
|
+
// Skip version check if configured
|
|
131
|
+
if (this.config?.skipVersionCheck) {
|
|
132
|
+
if (process.env.DEBUG) {
|
|
133
|
+
console.error('[DEBUG] Skipping version check (configured to skip)');
|
|
134
|
+
}
|
|
135
|
+
// Request is still rejected, but throw UpgradeRequiredError so callers
|
|
136
|
+
// can detect it and handle UI behavior (e.g., suppress banner) based on skip flag
|
|
137
|
+
throw new UpgradeRequiredError(errorData.message ||
|
|
138
|
+
'Version check skipped, but request failed. Try upgrading the client.');
|
|
139
|
+
}
|
|
140
|
+
throw new UpgradeRequiredError(errorData.message || 'Please upgrade to the latest version');
|
|
141
|
+
}
|
|
142
|
+
// Throw with message from API if available
|
|
143
|
+
if (errorData?.message) {
|
|
144
|
+
throw new APIError(errorData.message, response.status, errorData.code);
|
|
145
|
+
}
|
|
146
|
+
throw new APIError(`API error: ${response.status} ${response.statusText}`, response.status);
|
|
147
|
+
}
|
|
148
|
+
// Successful response; handle empty bodies (e.g., 204 No Content)
|
|
149
|
+
if (response.status === 204 || response.headers.get('content-length') === '0') {
|
|
150
|
+
return new Response(null, { status: 204 });
|
|
151
|
+
}
|
|
152
|
+
return response;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
export function getAPIBaseURL(overrides) {
|
|
156
|
+
if (process.env.AGENTUITY_API_URL) {
|
|
157
|
+
return process.env.AGENTUITY_API_URL;
|
|
158
|
+
}
|
|
159
|
+
if (overrides?.api_url) {
|
|
160
|
+
return overrides.api_url;
|
|
161
|
+
}
|
|
162
|
+
return 'https://api.agentuity.com';
|
|
163
|
+
}
|
|
164
|
+
export function getAppBaseURL(overrides) {
|
|
165
|
+
if (process.env.AGENTUITY_APP_URL) {
|
|
166
|
+
return process.env.AGENTUITY_APP_URL;
|
|
167
|
+
}
|
|
168
|
+
if (overrides?.app_url) {
|
|
169
|
+
return overrides.app_url;
|
|
170
|
+
}
|
|
171
|
+
return 'https://app.agentuity.com';
|
|
172
|
+
}
|
|
173
|
+
export const APIResponseSchema = (dataSchema) => z.object({
|
|
174
|
+
success: z.boolean(),
|
|
175
|
+
message: z.string().optional().describe('the error message if success=false'),
|
|
176
|
+
data: dataSchema.optional(),
|
|
177
|
+
});
|
|
178
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAGjC;IAFR,YACC,OAAe,EACR,MAAoB;QAE3B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,WAAM,GAAN,MAAM,CAAc;QAG3B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC/B,CAAC;CACD;AAED,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACpC,CAAC;CACD;AAED,MAAM,OAAO,QAAS,SAAQ,KAAK;IAG1B;IACA;IAHR,YACC,OAAe,EACR,MAAc,EACd,IAAa;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAS;QAGpB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACxB,CAAC;CACD;AAED,MAAM,OAAO,SAAS;IACb,OAAO,CAAS;IAChB,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C1B,CAAC;IAED,OAAO,2BAA2B,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,SAAgC;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACnC,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACtC,CAAC;IAED,IAAI,SAAS,EAAE,OAAO,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC,OAAO,CAAC;IAC1B,CAAC;IAED,OAAO,2BAA2B,CAAC;AACpC,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAsB,UAAa,EAAE,EAAE,CACvE,CAAC,CAAC,MAAM,CAAC;IACR,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAC7E,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/org/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/org/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIClient } from '../api';
|
|
3
|
+
declare const ListOrganizationsResponseSchema: z.ZodObject<{
|
|
4
|
+
success: z.ZodBoolean;
|
|
5
|
+
message: z.ZodOptional<z.ZodString>;
|
|
6
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ListOrganizationsResponse = z.infer<typeof ListOrganizationsResponseSchema>;
|
|
12
|
+
export type OrganizationList = NonNullable<ListOrganizationsResponse['data']>;
|
|
13
|
+
/**
|
|
14
|
+
* List all organizations
|
|
15
|
+
*
|
|
16
|
+
* @param client
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
export declare function listOrganizations(client: APIClient): Promise<ListOrganizationsResponse>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/api/org/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAqB,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEtD,QAAA,MAAM,+BAA+B;;;;;;;iBAOpC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9E;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAM7F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from '../api';
|
|
3
|
+
const ListOrganizationsResponseSchema = APIResponseSchema(z.array(z.object({
|
|
4
|
+
id: z.string().describe('the unique id for the organization'),
|
|
5
|
+
name: z.string().describe('the name of the organization'),
|
|
6
|
+
})));
|
|
7
|
+
/**
|
|
8
|
+
* List all organizations
|
|
9
|
+
*
|
|
10
|
+
* @param client
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export async function listOrganizations(client) {
|
|
14
|
+
return client.request('GET', '/cli/organization', ListOrganizationsResponseSchema);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/api/org/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAa,MAAM,QAAQ,CAAC;AAEtD,MAAM,+BAA+B,GAAG,iBAAiB,CACxD,CAAC,CAAC,KAAK,CACN,CAAC,CAAC,MAAM,CAAC;IACR,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CACzD,CAAC,CACF,CACD,CAAC;AAKF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAiB;IACxD,OAAO,MAAM,CAAC,OAAO,CACpB,KAAK,EACL,mBAAmB,EACnB,+BAA+B,CAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIClient } from '../api';
|
|
3
|
+
declare const CreateProjectRequestSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
organization_id: z.ZodString;
|
|
6
|
+
provider: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare const CreateProjectResponseSchema: z.ZodObject<{
|
|
9
|
+
success: z.ZodBoolean;
|
|
10
|
+
message: z.ZodOptional<z.ZodString>;
|
|
11
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
api_key: z.ZodString;
|
|
14
|
+
projectKey: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type CreateProjectRequest = z.infer<typeof CreateProjectRequestSchema>;
|
|
18
|
+
export type CreateProjectResponse = z.infer<typeof CreateProjectResponseSchema>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a new Project
|
|
21
|
+
*
|
|
22
|
+
* @param client
|
|
23
|
+
* @param body
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function createProject(client: APIClient, body: CreateProjectRequest): Promise<Omit<CreateProjectResponse, 'projectKey'>>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/api/project/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,QAAQ,CAAC;AAEtD,QAAA,MAAM,0BAA0B;;;;iBAQ9B,CAAC;AAEH,QAAA,MAAM,2BAA2B;;;;;;;;iBAMhC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,oBAAoB,GACxB,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC,CAQpD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from '../api';
|
|
3
|
+
const CreateProjectRequestSchema = z.object({
|
|
4
|
+
name: z.string().max(255).min(1).describe('the name of the new project'),
|
|
5
|
+
organization_id: z
|
|
6
|
+
.string()
|
|
7
|
+
.max(255)
|
|
8
|
+
.min(1)
|
|
9
|
+
.describe('the organization id to create the project in'),
|
|
10
|
+
provider: z.string().max(255).min(1),
|
|
11
|
+
});
|
|
12
|
+
const CreateProjectResponseSchema = APIResponseSchema(z.object({
|
|
13
|
+
id: z.string().describe('the unique id for the project'),
|
|
14
|
+
api_key: z.string().describe('the SDK api key for the project'),
|
|
15
|
+
projectKey: z.string().describe('the Project api key for the project'),
|
|
16
|
+
}));
|
|
17
|
+
/**
|
|
18
|
+
* Create a new Project
|
|
19
|
+
*
|
|
20
|
+
* @param client
|
|
21
|
+
* @param body
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export async function createProject(client, body) {
|
|
25
|
+
return client.request('POST', '/cli/project', CreateProjectResponseSchema, body, CreateProjectRequestSchema);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/api/project/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAa,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAEtD,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACxE,eAAe,EAAE,CAAC;SAChB,MAAM,EAAE;SACR,GAAG,CAAC,GAAG,CAAC;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,8CAA8C,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,2BAA2B,GAAG,iBAAiB,CACpD,CAAC,CAAC,MAAM,CAAC;IACR,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC/D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;CACtE,CAAC,CACF,CAAC;AAKF;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAClC,MAAiB,EACjB,IAA0B;IAE1B,OAAO,MAAM,CAAC,OAAO,CACpB,MAAM,EACN,cAAc,EACd,2BAA2B,EAC3B,IAAI,EACJ,0BAA0B,CAC1B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIClient } from '../api';
|
|
3
|
+
declare const _ProjectExistsRequestSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
organization_id: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
declare const ProjectExistsResponseSchema: z.ZodObject<{
|
|
8
|
+
success: z.ZodBoolean;
|
|
9
|
+
message: z.ZodOptional<z.ZodString>;
|
|
10
|
+
data: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type ProjectExistsRequest = z.infer<typeof _ProjectExistsRequestSchema>;
|
|
13
|
+
export type ProjectExistsResponse = z.infer<typeof ProjectExistsResponseSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new Project
|
|
16
|
+
*
|
|
17
|
+
* @param client
|
|
18
|
+
* @param body
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function projectExists(client: APIClient, body: ProjectExistsRequest): Promise<boolean>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=exists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../src/api/project/exists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAA+B,MAAM,QAAQ,CAAC;AAqBhE,QAAA,MAAM,2BAA2B;;;iBAO/B,CAAC;AAEH,QAAA,MAAM,2BAA2B;;;;iBAAiC,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,oBAAoB,GACxB,OAAO,CAAC,OAAO,CAAC,CA6BlB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from '../api';
|
|
3
|
+
// func ProjectWithNameExists(ctx context.Context, logger logger.Logger, baseUrl string, token string, orgId string, name string) (bool, error) {
|
|
4
|
+
// client := util.NewAPIClient(ctx, logger, baseUrl, token)
|
|
5
|
+
// var resp Response[bool]
|
|
6
|
+
// if err := client.Do("GET", fmt.Sprintf("/cli/project/exists/%s?orgId=%s", url.PathEscape(name), url.PathEscape(orgId)), nil, &resp); err != nil {
|
|
7
|
+
// var apiErr *util.APIError
|
|
8
|
+
// if errors.As(err, &apiErr) {
|
|
9
|
+
// if apiErr.Status == http.StatusConflict {
|
|
10
|
+
// return true, nil
|
|
11
|
+
// }
|
|
12
|
+
// if apiErr.Status == http.StatusUnprocessableEntity {
|
|
13
|
+
// return false, apiErr
|
|
14
|
+
// }
|
|
15
|
+
// }
|
|
16
|
+
// return false, fmt.Errorf("error validating project name: %w", err)
|
|
17
|
+
// }
|
|
18
|
+
// return resp.Data, nil
|
|
19
|
+
// }
|
|
20
|
+
const _ProjectExistsRequestSchema = z.object({
|
|
21
|
+
name: z.string().max(255).min(1).describe('the name of the new project'),
|
|
22
|
+
organization_id: z
|
|
23
|
+
.string()
|
|
24
|
+
.max(255)
|
|
25
|
+
.min(1)
|
|
26
|
+
.describe('the organization id to create the project in'),
|
|
27
|
+
});
|
|
28
|
+
const ProjectExistsResponseSchema = APIResponseSchema(z.boolean());
|
|
29
|
+
/**
|
|
30
|
+
* Create a new Project
|
|
31
|
+
*
|
|
32
|
+
* @param client
|
|
33
|
+
* @param body
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
export async function projectExists(client, body) {
|
|
37
|
+
const qs = new URLSearchParams();
|
|
38
|
+
qs.set('orgId', body.organization_id);
|
|
39
|
+
try {
|
|
40
|
+
const resp = await client.request('GET', `/cli/project/exists/${encodeURIComponent(body.name)}?${qs.toString()}`, ProjectExistsResponseSchema);
|
|
41
|
+
if (resp.data) {
|
|
42
|
+
return resp.data;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
catch (ex) {
|
|
47
|
+
const _ex = ex;
|
|
48
|
+
if (_ex.name === 'APIError') {
|
|
49
|
+
const apiError = _ex;
|
|
50
|
+
switch (apiError.status) {
|
|
51
|
+
case 409:
|
|
52
|
+
return true;
|
|
53
|
+
case 422:
|
|
54
|
+
return false;
|
|
55
|
+
default:
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
throw ex;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL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E,EAAE,EACvE,2BAA2B,CAC3B,CAAC;QAEF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,IAAI,CAAC;QAClB,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,EAAW,CAAC;QACxB,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,GAAe,CAAC;YACjC,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACzB,KAAK,GAAG;oBACP,OAAO,IAAI,CAAC;gBACb,KAAK,GAAG;oBACP,OAAO,KAAK,CAAC;gBACd,QAAQ;YACT,CAAC;QACF,CAAC;QACD,MAAM,EAAE,CAAC;IACV,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/project/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/project/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './config';
|
|
2
2
|
export * from './server';
|
|
3
|
+
export * from './api';
|
|
4
|
+
export { z } from 'zod';
|
|
3
5
|
export type { FetchAdapter, FetchRequest, FetchResponse, FetchSuccessResponse, FetchErrorResponse, Body, ServiceException, } from '@agentuity/core';
|
|
4
6
|
export { buildUrl, toServiceException, toPayload, fromResponse } from '@agentuity/core';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"AGENTS.md",
|
|
9
9
|
"README.md",
|
|
10
|
+
"src",
|
|
10
11
|
"dist"
|
|
11
12
|
],
|
|
12
13
|
"exports": {
|
|
@@ -22,7 +23,8 @@
|
|
|
22
23
|
"prepublishOnly": "bun run clean && bun run build"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@agentuity/core": "0.0.
|
|
26
|
+
"@agentuity/core": "0.0.35",
|
|
27
|
+
"zod": "^4.1.12"
|
|
26
28
|
},
|
|
27
29
|
"devDependencies": {
|
|
28
30
|
"@types/node": "^22.0.0",
|