@inkeep/agents-manage-ui 0.1.2 → 0.1.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/.env.example +2 -2
- package/.turbo/turbo-build.log +30 -30
- package/.turbo/turbo-test.log +10 -43
- package/.turbo/turbo-typecheck.log +1 -1
- package/README.md +3 -3
- package/biome.json +3 -0
- package/package.json +8 -7
- package/src/app/api/signoz/conversations/[conversationId]/route.ts +56 -34
- package/src/components/artifact-components/form/artifact-component-form.tsx +16 -7
- package/src/components/data-components/form/data-component-form.tsx +16 -7
- package/src/components/graph/configuration/node-types.tsx +2 -4
- package/src/components/graph/graph.tsx +4 -26
- package/src/components/graph/nodes/agent-node.tsx +1 -1
- package/src/components/graph/nodes/external-agent-node.tsx +1 -1
- package/src/components/graph/playground/chat-widget.tsx +2 -2
- package/src/components/graph/playground/ikp-message.tsx +16 -16
- package/src/components/graph/playground/playground.tsx +5 -5
- package/src/components/graph/sidepane/metadata/metadata-editor.tsx +34 -17
- package/src/components/graph/sidepane/nodes/agent-node-editor.tsx +34 -19
- package/src/components/graph/sidepane/nodes/external-agent-node-editor.tsx +31 -11
- package/src/components/graph/sidepane/nodes/mcp-node-editor.tsx +4 -9
- package/src/components/graph/sidepane/nodes/model-section.tsx +1 -1
- package/src/components/graph/toolbar/toolbar.tsx +1 -1
- package/src/components/mcp-servers/form/active-tools-selector.tsx +4 -2
- package/src/components/projects/form/project-form.tsx +18 -9
- package/src/components/projects/form/project-models-section.tsx +51 -23
- package/src/components/projects/form/project-stopwhen-section.tsx +25 -11
- package/src/components/traces/ai-calls-breakdown.tsx +1 -1
- package/src/components/traces/charts/area-chart-card.tsx +2 -2
- package/src/components/traces/charts/area-chart.tsx +2 -2
- package/src/components/traces/charts/chart-card.tsx +4 -4
- package/src/components/traces/conversation-detail.tsx +10 -8
- package/src/components/traces/conversation-stats/conversation-list-item.tsx +48 -37
- package/src/components/traces/conversation-stats/conversation-stats-card.tsx +1 -1
- package/src/components/traces/filters/date-picker.tsx +6 -6
- package/src/components/traces/filters/filter-trigger.tsx +1 -1
- package/src/components/traces/filters/graph-filter.tsx +3 -3
- package/src/components/traces/timeline/activity-details-sidepane.tsx +1 -1
- package/src/components/traces/timeline/activity-timeline.tsx +1 -1
- package/src/components/traces/timeline/blocks.tsx +2 -2
- package/src/components/traces/timeline/render-panel-content.tsx +11 -11
- package/src/components/traces/timeline/timeline-item.tsx +36 -22
- package/src/components/traces/timeline/timeline-wrapper.tsx +11 -12
- package/src/components/traces/traces-overview.tsx +3 -3
- package/src/components/ui/alert.tsx +17 -23
- package/src/components/ui/calendar.tsx +3 -4
- package/src/components/ui/external-link.tsx +2 -2
- package/src/components/ui/inheritance-indicator.tsx +20 -17
- package/src/components/ui/resizable.tsx +13 -18
- package/src/constants/page-descriptions.tsx +2 -5
- package/src/constants/signoz.ts +15 -18
- package/src/features/graph/domain/__tests__/roundtrip.test.ts +5 -5
- package/src/features/graph/domain/serialize.ts +8 -9
- package/src/hooks/use-auto-prefill-id-zustand.ts +68 -0
- package/src/hooks/use-auto-prefill-id.ts +36 -0
- package/src/hooks/use-chat-activities-polling.ts +1 -1
- package/src/hooks/use-graph-errors.ts +2 -1
- package/src/hooks/use-project-data.ts +2 -2
- package/src/lib/actions/graph-full.ts +6 -2
- package/src/lib/actions/projects.ts +1 -1
- package/src/lib/api/api-config.ts +6 -6
- package/src/lib/api/api-keys.ts +4 -1
- package/src/lib/api/credentials.ts +1 -1
- package/src/lib/api/data-components.ts +1 -1
- package/src/lib/api/graph-full-client.ts +6 -3
- package/src/lib/api/projects.ts +1 -1
- package/src/lib/api/signoz-sql.ts +1 -1
- package/src/lib/index.ts +1 -1
- package/src/lib/logger.ts +1 -2
- package/src/lib/utils/generate-id.ts +14 -0
- package/tsconfig.json +2 -2
- package/eslint.config.mjs +0 -14
|
@@ -12,11 +12,15 @@ import {
|
|
|
12
12
|
ApiError,
|
|
13
13
|
createFullGraph as apiCreateFullGraph,
|
|
14
14
|
deleteFullGraph as apiDeleteFullGraph,
|
|
15
|
+
fetchGraphs as apiFetchGraphs,
|
|
15
16
|
getFullGraph as apiGetFullGraph,
|
|
16
17
|
updateFullGraph as apiUpdateFullGraph,
|
|
17
|
-
fetchGraphs as apiFetchGraphs,
|
|
18
18
|
} from '../api/graph-full-client';
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
type FullGraphDefinition,
|
|
21
|
+
FullGraphDefinitionSchema,
|
|
22
|
+
type Graph,
|
|
23
|
+
} from '../types/graph-full';
|
|
20
24
|
|
|
21
25
|
/**
|
|
22
26
|
* Result type for server actions - follows a consistent pattern
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
|
|
3
3
|
import { revalidatePath } from 'next/cache';
|
|
4
|
+
import type { ProjectFormData } from '@/components/projects/form/validation';
|
|
4
5
|
import {
|
|
5
6
|
createProject,
|
|
6
7
|
deleteProject,
|
|
@@ -11,7 +12,6 @@ import {
|
|
|
11
12
|
import { ApiError } from '../types/errors';
|
|
12
13
|
import type { Project } from '../types/project';
|
|
13
14
|
import type { ActionResult } from './types';
|
|
14
|
-
import type { ProjectFormData } from '@/components/projects/form/validation';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Fetch all projects
|
|
@@ -10,23 +10,23 @@ const DEFAULT_MANAGEMENT_API_BASE_URL = 'http://localhost:3002';
|
|
|
10
10
|
const DEFAULT_EXECUTION_API_BASE_URL = 'http://localhost:3003';
|
|
11
11
|
|
|
12
12
|
// Management API (CRUD operations, configuration)
|
|
13
|
-
if (!process.env.
|
|
13
|
+
if (!process.env.NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL) {
|
|
14
14
|
console.warn(
|
|
15
|
-
`
|
|
15
|
+
`NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: ${DEFAULT_MANAGEMENT_API_BASE_URL}`
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// Execution API (chat completions, agent execution)
|
|
20
|
-
if (!process.env.
|
|
20
|
+
if (!process.env.NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL) {
|
|
21
21
|
console.warn(
|
|
22
|
-
`
|
|
22
|
+
`NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: ${DEFAULT_EXECUTION_API_BASE_URL}`
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export const MANAGEMENT_API_BASE_URL =
|
|
27
|
-
process.env.
|
|
27
|
+
process.env.NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL || DEFAULT_MANAGEMENT_API_BASE_URL;
|
|
28
28
|
export const EXECUTION_API_BASE_URL =
|
|
29
|
-
process.env.
|
|
29
|
+
process.env.NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL || DEFAULT_EXECUTION_API_BASE_URL;
|
|
30
30
|
|
|
31
31
|
async function makeApiRequestInternal<T>(
|
|
32
32
|
baseUrl: string,
|
package/src/lib/api/api-keys.ts
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
'use server';
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type {
|
|
11
|
+
ApiKeyApiCreationResponse,
|
|
12
|
+
ApiKeyApiSelect,
|
|
13
|
+
} from '@inkeep/agents-core/client-exports';
|
|
11
14
|
import type { ListResponse, SingleResponse } from '../types/response';
|
|
12
15
|
import { makeManagementApiRequest } from './api-config';
|
|
13
16
|
import { validateProjectId, validateTenantId } from './resource-validation';
|
|
@@ -100,9 +100,12 @@ export async function deleteFullGraph(
|
|
|
100
100
|
validateTenantId(tenantId);
|
|
101
101
|
validateProjectId(projectId);
|
|
102
102
|
|
|
103
|
-
await makeManagementApiRequest(
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
await makeManagementApiRequest(
|
|
104
|
+
`tenants/${tenantId}/crud/projects/${projectId}/graph/${graphId}`,
|
|
105
|
+
{
|
|
106
|
+
method: 'DELETE',
|
|
107
|
+
}
|
|
108
|
+
);
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
// Export the error class for use in server actions
|
package/src/lib/api/projects.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
|
|
3
|
+
import type { ProjectFormData } from '@/components/projects/form/validation';
|
|
3
4
|
import type { Project } from '../types/project';
|
|
4
5
|
import type { ListResponse, SingleResponse } from '../types/response';
|
|
5
|
-
import type { ProjectFormData } from '@/components/projects/form/validation';
|
|
6
6
|
import { makeManagementApiRequest } from './api-config';
|
|
7
7
|
import { validateTenantId } from './resource-validation';
|
|
8
8
|
|
package/src/lib/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ export {
|
|
|
15
15
|
validateGraphData,
|
|
16
16
|
} from './actions/graph-full';
|
|
17
17
|
// API Configuration exports
|
|
18
|
-
export {
|
|
18
|
+
export { EXECUTION_API_BASE_URL, MANAGEMENT_API_BASE_URL } from './api/api-config';
|
|
19
19
|
// API Client exports (for advanced use cases)
|
|
20
20
|
export {
|
|
21
21
|
ApiError,
|
package/src/lib/logger.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
-
import {pino } from 'pino';
|
|
2
|
+
import { pino } from 'pino';
|
|
3
3
|
|
|
4
4
|
// Environment configuration for Next.js
|
|
5
5
|
const LOG_LEVEL = process.env.LOG_LEVEL || 'info';
|
|
@@ -40,6 +40,5 @@ export function withRequestContext<T>(reqId: string, fn: () => T): T {
|
|
|
40
40
|
return asyncLocalStorage.run(new Map([['requestId', reqId]]), fn);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
43
|
// Export the base logger for direct use if needed
|
|
45
44
|
export { logger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a unique ID from a name
|
|
3
|
+
* @param name - The name to generate an ID from
|
|
4
|
+
* @returns The generated ID
|
|
5
|
+
*/
|
|
6
|
+
export const generateId = (name: string) => {
|
|
7
|
+
return name
|
|
8
|
+
.toLowerCase()
|
|
9
|
+
.trim()
|
|
10
|
+
.replace(/\s+/g, '-') // Replace whitespace with dashes
|
|
11
|
+
.replace(/[^a-z0-9-]/g, '') // Remove non-alphanumeric characters except dashes
|
|
12
|
+
.replace(/-+/g, '-') // Replace multiple consecutive dashes with single dash
|
|
13
|
+
.replace(/^-|-$/g, ''); // Remove leading/trailing dashes
|
|
14
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "ES2017",
|
|
4
|
-
"lib": ["dom", "dom.iterable", "
|
|
4
|
+
"lib": ["dom", "dom.iterable", "ESNext"],
|
|
5
5
|
"allowJs": true,
|
|
6
6
|
"skipLibCheck": true,
|
|
7
7
|
"strict": true,
|
|
8
8
|
"noEmit": true,
|
|
9
9
|
"esModuleInterop": true,
|
|
10
|
-
"module": "
|
|
10
|
+
"module": "ESNext",
|
|
11
11
|
"moduleResolution": "bundler",
|
|
12
12
|
"resolveJsonModule": true,
|
|
13
13
|
"isolatedModules": true,
|
package/eslint.config.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { dirname } from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { FlatCompat } from '@eslint/eslintrc';
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = dirname(__filename);
|
|
7
|
-
|
|
8
|
-
const compat = new FlatCompat({
|
|
9
|
-
baseDirectory: __dirname,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const eslintConfig = [...compat.extends('next/core-web-vitals', 'next/typescript')];
|
|
13
|
-
|
|
14
|
-
export default eslintConfig;
|