agent-enderun 0.5.8 → 0.5.9

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.
Files changed (53) hide show
  1. package/.enderun/PROJECT_MEMORY.md +10 -130
  2. package/.enderun/agents/analyst.md +11 -5
  3. package/.enderun/agents/backend.md +46 -39
  4. package/.enderun/agents/explorer.md +14 -2
  5. package/.enderun/agents/frontend.md +41 -7
  6. package/.enderun/agents/git.md +1 -1
  7. package/.enderun/agents/manager.md +1 -1
  8. package/.enderun/agents/mobile.md +1 -1
  9. package/.enderun/agents/native.md +1 -1
  10. package/.enderun/blueprints/backend/errors/domain-error.ts +84 -0
  11. package/.enderun/blueprints/backend/middleware/error-handler.ts +24 -0
  12. package/.enderun/blueprints/frontend/ui/Button.tsx +60 -0
  13. package/.enderun/blueprints/frontend/ui/Input.tsx +43 -0
  14. package/.enderun/logs/manager.json +1 -18
  15. package/ENDERUN.md +24 -1
  16. package/README.md +7 -2
  17. package/bin/update-contract.js +3 -0
  18. package/package.json +2 -2
  19. package/packages/framework-mcp/dist/tools/contract.js +12 -6
  20. package/packages/framework-mcp/dist/tools/framework.js +2 -1
  21. package/packages/framework-mcp/dist/tools/knowledge.js +1 -1
  22. package/packages/framework-mcp/dist/utils.js +1 -1
  23. package/packages/framework-mcp/package.json +4 -1
  24. package/packages/framework-mcp/src/tools/contract.ts +18 -5
  25. package/packages/framework-mcp/src/tools/framework.ts +3 -2
  26. package/packages/framework-mcp/src/tools/knowledge.ts +6 -6
  27. package/packages/framework-mcp/src/utils.ts +1 -1
  28. package/packages/shared-types/dist/api.d.ts +18 -0
  29. package/packages/shared-types/dist/api.js +2 -0
  30. package/packages/shared-types/dist/api.js.map +1 -0
  31. package/packages/shared-types/dist/brands.d.ts +13 -0
  32. package/packages/shared-types/dist/brands.js +2 -0
  33. package/packages/shared-types/dist/brands.js.map +1 -0
  34. package/packages/shared-types/dist/constants.d.ts +27 -0
  35. package/packages/shared-types/dist/constants.js +22 -0
  36. package/packages/shared-types/dist/constants.js.map +1 -0
  37. package/packages/shared-types/dist/index.d.ts +7 -88
  38. package/packages/shared-types/dist/index.js +7 -3
  39. package/packages/shared-types/dist/index.js.map +1 -1
  40. package/packages/shared-types/dist/logs.d.ts +15 -0
  41. package/packages/shared-types/dist/logs.js +2 -0
  42. package/packages/shared-types/dist/logs.js.map +1 -0
  43. package/packages/shared-types/dist/models.d.ts +60 -0
  44. package/packages/shared-types/dist/models.js +2 -0
  45. package/packages/shared-types/dist/models.js.map +1 -0
  46. package/packages/shared-types/package.json +4 -1
  47. package/packages/shared-types/src/api.ts +20 -0
  48. package/packages/shared-types/src/brands.ts +12 -0
  49. package/packages/shared-types/src/constants.ts +34 -0
  50. package/packages/shared-types/src/index.ts +7 -97
  51. package/packages/shared-types/src/logs.ts +16 -0
  52. package/packages/shared-types/src/models.ts +66 -0
  53. package/panda.config.ts +79 -5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-enderun/shared-types",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Shared TypeScript types for AI-Enderun Framework. Ensures Contract-First synchronization between agents.",
5
5
  "author": "Yusuf BEKAR",
6
6
  "license": "MIT",
@@ -22,6 +22,9 @@
22
22
  "dist",
23
23
  "README.md"
24
24
  ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
25
28
  "scripts": {
26
29
  "build": "tsc -p tsconfig.json",
27
30
  "build:watch": "tsc -p tsconfig.json --watch",
@@ -0,0 +1,20 @@
1
+ import { TraceID } from "./brands.js";
2
+
3
+ /**
4
+ * API Response Wrappers
5
+ */
6
+ export interface ApiResponse<T> {
7
+ data: T;
8
+ meta?: {
9
+ requestId: TraceID;
10
+ timestamp: string;
11
+ };
12
+ }
13
+
14
+ export interface ApiError {
15
+ error: {
16
+ code: string;
17
+ message: string;
18
+ details?: unknown;
19
+ };
20
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Branded Type Utility
3
+ */
4
+ export type Brand<K, T> = K & { __brand: T };
5
+
6
+ /**
7
+ * Entity IDs (Branded)
8
+ */
9
+ export type TraceID = Brand<string, "TraceID">;
10
+ export type AgentID = Brand<string, "AgentID">;
11
+ export type ProjectID = Brand<string, "ProjectID">;
12
+ export type UserID = Brand<string, "UserID">;
@@ -0,0 +1,34 @@
1
+ import { TraceID } from "./brands.js";
2
+
3
+ /**
4
+ * Project Phases
5
+ */
6
+ export const PROJECT_PHASES = ["PHASE_0", "PHASE_1", "PHASE_2", "PHASE_3", "PHASE_4"] as const;
7
+ export type ProjectPhase = (typeof PROJECT_PHASES)[number];
8
+
9
+ /**
10
+ * Execution Profiles
11
+ */
12
+ export const EXECUTION_PROFILES = ["Lightweight", "Full"] as const;
13
+ export type ExecutionProfile = (typeof EXECUTION_PROFILES)[number];
14
+
15
+ /**
16
+ * Task Priorities
17
+ */
18
+ export const TASK_PRIORITIES = ["P0", "P1", "P2", "P3"] as const;
19
+ export type TaskPriority = (typeof TASK_PRIORITIES)[number];
20
+
21
+ /**
22
+ * Task Statuses
23
+ */
24
+ export const TASK_STATUSES = ["PENDING", "IN_PROGRESS", "BLOCKED", "COMPLETED", "FAILED"] as const;
25
+ export type TaskStatus = (typeof TASK_STATUSES)[number];
26
+
27
+ /**
28
+ * Action Types & Status
29
+ */
30
+ export const ACTION_TYPES = ["CREATE", "MODIFY", "DELETE", "RESEARCH", "ORCHESTRATE"] as const;
31
+ export type ActionType = (typeof ACTION_TYPES)[number];
32
+
33
+ export const ACTION_STATUSES = ["SUCCESS", "FAILURE", "WAITING"] as const;
34
+ export type ActionStatus = (typeof ACTION_STATUSES)[number];
@@ -1,102 +1,12 @@
1
1
  /**
2
- * Agent Enderun — Shared Types
2
+ * Agent Enderun — Shared Types (Modular)
3
3
  *
4
4
  * This file is the Single Source of Truth for all Backend and Frontend communication.
5
- * All IDs use the Branded Types pattern for type safety.
5
+ * All modules are exported from here for central access.
6
6
  */
7
7
 
8
- /**
9
- * Branded Type Utility
10
- */
11
- export type Brand<K, T> = K & { __brand: T };
12
-
13
- /**
14
- * Entity IDs (Branded)
15
- */
16
- export type TraceID = Brand<string, "TraceID">;
17
- export type AgentID = Brand<string, "AgentID">;
18
- export type ProjectID = Brand<string, "ProjectID">;
19
- export type UserID = Brand<string, "UserID">;
20
-
21
- /**
22
- * Domain Models
23
- */
24
- export interface User {
25
- id: UserID;
26
- email: string;
27
- fullName: string;
28
- role: "ADMIN" | "DEVELOPER" | "VIEWER";
29
- createdAt: string;
30
- }
31
-
32
- export interface UserProfile extends User {
33
- avatarUrl?: string;
34
- bio?: string;
35
- preferences: Record<string, unknown>;
36
- }
37
-
38
- /**
39
- * Project Status Types
40
- */
41
- export type ProjectPhase = "PHASE_0" | "PHASE_1" | "PHASE_2" | "PHASE_3" | "PHASE_4";
42
- export type ExecutionProfile = "Lightweight" | "Full";
43
-
44
- export interface ProjectStatus {
45
- phase: ProjectPhase;
46
- profile: ExecutionProfile;
47
- lastUpdate: string;
48
- activeTraceId: TraceID | null;
49
- blockers: string[];
50
- }
51
-
52
- /**
53
- * Task Management Types
54
- */
55
- export type TaskPriority = "P0" | "P1" | "P2" | "P3";
56
- export type TaskStatus = "PENDING" | "IN_PROGRESS" | "BLOCKED" | "COMPLETED" | "FAILED";
57
-
58
- export interface Task {
59
- id: TraceID;
60
- description: string;
61
- agent: AgentID;
62
- priority: TaskPriority;
63
- status: TaskStatus;
64
- createdAt: string;
65
- updatedAt: string;
66
- }
67
-
68
- /**
69
- * Audit & Agent Logging Types
70
- */
71
- export type ActionType = "CREATE" | "MODIFY" | "DELETE" | "RESEARCH" | "ORCHESTRATE";
72
- export type ActionStatus = "SUCCESS" | "FAILURE" | "WAITING";
73
-
74
- export interface AgentActionLog {
75
- timestamp: string;
76
- agent: AgentID;
77
- action: ActionType;
78
- requestId: TraceID | "—";
79
- status: ActionStatus;
80
- summary: string;
81
- files?: string[];
82
- details?: Record<string, unknown>;
83
- }
84
-
85
- /**
86
- * API Response Wrappers
87
- */
88
- export interface ApiResponse<T> {
89
- data: T;
90
- meta?: {
91
- requestId: TraceID;
92
- timestamp: string;
93
- };
94
- }
95
-
96
- export interface ApiError {
97
- error: {
98
- code: string;
99
- message: string;
100
- details?: unknown;
101
- };
102
- }
8
+ export * from "./brands.js";
9
+ export * from "./constants.js";
10
+ export * from "./models.js";
11
+ export * from "./api.js";
12
+ export * from "./logs.js";
@@ -0,0 +1,16 @@
1
+ import { TraceID, AgentID } from "./brands.js";
2
+ import { ActionType, ActionStatus } from "./constants.js";
3
+
4
+ /**
5
+ * Audit & Agent Logging Types
6
+ */
7
+ export interface AgentActionLog {
8
+ timestamp: string;
9
+ agent: AgentID;
10
+ action: ActionType;
11
+ requestId: TraceID | "—";
12
+ status: ActionStatus;
13
+ summary: string;
14
+ files?: string[];
15
+ details?: Record<string, unknown>;
16
+ }
@@ -0,0 +1,66 @@
1
+ import { UserID, TraceID, AgentID } from "./brands.js";
2
+ import { ProjectPhase, ExecutionProfile, TaskPriority, TaskStatus } from "./constants.js";
3
+
4
+ /**
5
+ * Base Entity Fields
6
+ * All domain entities should include these fields.
7
+ */
8
+ export interface BaseEntity {
9
+ id: string; // Usually ULID
10
+ createdAt: string;
11
+ updatedAt: string;
12
+ deletedAt?: string | null;
13
+ }
14
+
15
+ /**
16
+ * Audit Log Model
17
+ */
18
+ export interface AuditLog extends BaseEntity {
19
+ entityName: string;
20
+ entityId: string;
21
+ action: "CREATE" | "UPDATE" | "DELETE" | "RESTORE";
22
+ userId: UserID;
23
+ previousState?: Record<string, unknown> | null;
24
+ newState?: Record<string, unknown> | null;
25
+ traceId: TraceID;
26
+ }
27
+
28
+ /**
29
+ * User Model
30
+ */
31
+ export interface User extends BaseEntity {
32
+ id: UserID;
33
+ email: string;
34
+ fullName: string;
35
+ role: "ADMIN" | "DEVELOPER" | "VIEWER";
36
+ }
37
+
38
+ export interface UserProfile extends User {
39
+ avatarUrl?: string;
40
+ bio?: string;
41
+ preferences: Record<string, unknown>;
42
+ }
43
+
44
+ /**
45
+ * Project Status
46
+ */
47
+ export interface ProjectStatus {
48
+ phase: ProjectPhase;
49
+ profile: ExecutionProfile;
50
+ lastUpdate: string;
51
+ activeTraceId: TraceID | null;
52
+ blockers: string[];
53
+ }
54
+
55
+ /**
56
+ * Task Model
57
+ */
58
+ export interface Task {
59
+ id: TraceID;
60
+ description: string;
61
+ agent: AgentID;
62
+ priority: TaskPriority;
63
+ status: TaskStatus;
64
+ createdAt: string;
65
+ updatedAt: string;
66
+ }
package/panda.config.ts CHANGED
@@ -1,24 +1,98 @@
1
- import { defineConfig } from "@pandacss/dev"
1
+ import { defineConfig } from "@pandacss/dev";
2
2
 
3
3
  export default defineConfig({
4
4
  // Whether to use css reset
5
5
  preflight: true,
6
-
6
+
7
7
  // Where to look for your css declarations
8
8
  include: [
9
9
  "./src/**/*.{js,jsx,ts,tsx}",
10
10
  "./pages/**/*.{js,jsx,ts,tsx}",
11
11
  "./apps/**/*.{js,jsx,ts,tsx}",
12
+ "./packages/ui/src/**/*.{ts,tsx}",
12
13
  ],
13
14
 
14
15
  // Files to exclude
15
16
  exclude: [],
16
17
 
17
- // Useful for theme customization
18
+ // Conditions for Dark Mode and other states
19
+ conditions: {
20
+ extend: {
21
+ dark: ".dark &, [data-theme='dark'] &",
22
+ light: ".light &, [data-theme='light'] &",
23
+ },
24
+ },
25
+
26
+ // Theme Customization
18
27
  theme: {
19
- extend: {}
28
+ extend: {
29
+ // Base Tokens (Absolute Values)
30
+ tokens: {
31
+ colors: {
32
+ brand: {
33
+ 50: { value: "#eef2ff" },
34
+ 100: { value: "#e0e7ff" },
35
+ 200: { value: "#c7d2fe" },
36
+ 300: { value: "#a5b4fc" },
37
+ 400: { value: "#818cf8" },
38
+ 500: { value: "#6366f1" },
39
+ 600: { value: "#4f46e5" },
40
+ 700: { value: "#4338ca" },
41
+ 800: { value: "#3730a3" },
42
+ 900: { value: "#312e81" },
43
+ 950: { value: "#1e1b4b" },
44
+ },
45
+ },
46
+ spacing: {
47
+ container: { value: "1200px" },
48
+ },
49
+ },
50
+ // Semantic Tokens (Theme Aware)
51
+ semanticTokens: {
52
+ colors: {
53
+ bg: {
54
+ canvas: {
55
+ value: { base: "{colors.white}", _dark: "{colors.brand.950}" },
56
+ },
57
+ surface: {
58
+ value: { base: "{colors.gray.50}", _dark: "{colors.brand.900}" },
59
+ },
60
+ muted: {
61
+ value: { base: "{colors.gray.100}", _dark: "{colors.brand.800}" },
62
+ },
63
+ },
64
+ text: {
65
+ default: {
66
+ value: { base: "{colors.gray.900}", _dark: "{colors.white}" },
67
+ },
68
+ muted: {
69
+ value: { base: "{colors.gray.500}", _dark: "{colors.gray.400}" },
70
+ },
71
+ brand: {
72
+ value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
73
+ },
74
+ },
75
+ accent: {
76
+ default: {
77
+ value: { base: "{colors.brand.500}", _dark: "{colors.brand.500}" },
78
+ },
79
+ emphasis: {
80
+ value: { base: "{colors.brand.600}", _dark: "{colors.brand.400}" },
81
+ },
82
+ fg: {
83
+ value: { base: "{colors.white}", _dark: "{colors.white}" },
84
+ },
85
+ },
86
+ border: {
87
+ default: {
88
+ value: { base: "{colors.gray.200}", _dark: "{colors.brand.800}" },
89
+ },
90
+ },
91
+ },
92
+ },
93
+ },
20
94
  },
21
95
 
22
96
  // The output directory for your css system
23
97
  outdir: "styled-system",
24
- })
98
+ });