@industry-theme/agent-driven-ui-panels 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,234 @@
1
+ /**
2
+ * Agent Configuration Types
3
+ *
4
+ * A hybrid schema combining conventions from multiple AI agent standards:
5
+ *
6
+ * ## References
7
+ *
8
+ * ### A2A Protocol - Agent Card (Google + 50 companies)
9
+ * - Spec: https://a2a-protocol.org/latest/specification/
10
+ * - Location: /.well-known/agent.json
11
+ * - Provides: id, name, description, version, skills, capabilities
12
+ * - Survey: https://arxiv.org/html/2508.03095v1
13
+ *
14
+ * ### Microsoft Declarative Agent Manifest v1.5
15
+ * - Spec: https://learn.microsoft.com/en-us/microsoft-365-copilot/extensibility/declarative-agent-manifest-1.5
16
+ * - JSON Schema: https://aka.ms/json-schemas/copilot/declarative-agent/v1.5/schema.json
17
+ * - Provides: instructions (system prompt), capabilities, actions
18
+ *
19
+ * ### Model Context Protocol (MCP)
20
+ * - Spec: https://modelcontextprotocol.io/specification/2025-06-18
21
+ * - TypeScript Schema: https://github.com/modelcontextprotocol/specification/blob/main/schema/schema.ts
22
+ * - Provides: tools with name, description, inputSchema, outputSchema
23
+ *
24
+ * ### OpenAI Function Calling / Structured Outputs
25
+ * - Docs: https://platform.openai.com/docs/guides/function-calling
26
+ * - Cookbook: https://cookbook.openai.com/examples/function_calling_with_an_openapi_spec
27
+ * - Provides: JSON Schema for tool inputs/outputs, strict mode
28
+ *
29
+ * ### Agents.md Standard (2025)
30
+ * - Info: https://www.remio.ai/post/what-is-agents-md-a-complete-guide-to-the-new-ai-coding-agent-standard-in-2025
31
+ * - Provides: Agent manifest with identity, behavioral rules, capability interfaces
32
+ *
33
+ * ### Agent Communication Protocol (ACP)
34
+ * - Spec: https://agentcommunicationprotocol.dev/core-concepts/agent-manifest
35
+ * - Provides: Agent manifest with identity, capabilities, metadata, runtime status
36
+ *
37
+ * @version 0.1.0
38
+ * @lastUpdated 2024-12-01
39
+ */
40
+ import type { PanelTool } from '@principal-ade/panel-framework-core';
41
+ import type { ReactNode } from 'react';
42
+ /**
43
+ * Skill definition following A2A Protocol Agent Card specification.
44
+ *
45
+ * @see https://a2a-protocol.org/latest/specification/
46
+ *
47
+ * Skills represent discrete capabilities an agent can perform.
48
+ * They are similar to MCP tools but with A2A-specific metadata.
49
+ */
50
+ export interface AgentSkill {
51
+ /** Unique identifier for the skill */
52
+ id: string;
53
+ /** Human-readable name */
54
+ name: string;
55
+ /** Description of what the skill does */
56
+ description: string;
57
+ /**
58
+ * JSON Schema defining expected input parameters.
59
+ * @see https://json-schema.org/
60
+ */
61
+ inputSchema?: Record<string, unknown>;
62
+ /**
63
+ * JSON Schema defining the output format.
64
+ * @see https://json-schema.org/
65
+ */
66
+ outputSchema?: Record<string, unknown>;
67
+ /** Tags for categorization and discovery */
68
+ tags?: string[];
69
+ }
70
+ /**
71
+ * Agent capabilities following A2A Protocol conventions.
72
+ *
73
+ * @see https://a2a-protocol.org/latest/specification/
74
+ *
75
+ * Capabilities declare support for optional protocol features.
76
+ * Extend this interface for domain-specific capabilities.
77
+ */
78
+ export interface AgentCapabilities {
79
+ /** Whether the agent supports streaming responses */
80
+ streaming?: boolean;
81
+ /** Whether the agent supports push notifications */
82
+ pushNotifications?: boolean;
83
+ /** Whether the agent can execute code */
84
+ codeExecution?: boolean;
85
+ /** Whether the agent can generate images */
86
+ imageGeneration?: boolean;
87
+ /** Whether the agent can browse the web */
88
+ webBrowsing?: boolean;
89
+ /** Whether the agent can access files */
90
+ fileAccess?: boolean;
91
+ /** Additional custom capabilities */
92
+ [key: string]: boolean | undefined;
93
+ }
94
+ /**
95
+ * Provider/vendor information following A2A Protocol.
96
+ *
97
+ * @see https://a2a-protocol.org/latest/specification/
98
+ */
99
+ export interface AgentProvider {
100
+ /** Provider/organization name */
101
+ name: string;
102
+ /** Provider website URL */
103
+ url?: string;
104
+ /** URL to provider logo */
105
+ logo?: string;
106
+ }
107
+ /**
108
+ * Reference to an external resource (system prompt, documentation, etc.)
109
+ *
110
+ * Supports multiple URI schemes for flexibility:
111
+ * - `file://` or relative path: Local file
112
+ * - `http://` or `https://`: Remote URL
113
+ * - `panel://`: Panel framework resource
114
+ * - `mcp://`: MCP resource URI
115
+ */
116
+ export interface ResourceRef {
117
+ /** URI or path to the resource */
118
+ uri: string;
119
+ /** MIME type of the resource (e.g., "text/markdown", "text/plain") */
120
+ mimeType?: string;
121
+ /** Human-readable label */
122
+ label?: string;
123
+ }
124
+ /**
125
+ * Agent Configuration - Hybrid schema combining multiple standards.
126
+ *
127
+ * This interface combines the best practices from:
128
+ * - A2A Protocol Agent Card (identity, skills, capabilities)
129
+ * - Microsoft Declarative Agent Manifest (instructions/system prompt)
130
+ * - MCP Tool Manifest (tools with JSON schemas)
131
+ *
132
+ * ## Usage
133
+ *
134
+ * ```typescript
135
+ * const agentConfig: AgentConfig = {
136
+ * id: 'my-org.coding-assistant',
137
+ * name: 'Coding Assistant',
138
+ * description: 'An AI assistant for software development tasks',
139
+ * version: '1.0.0',
140
+ * instructions: 'You are a helpful coding assistant...',
141
+ * systemPromptRef: { uri: './prompts/system.md', mimeType: 'text/markdown' },
142
+ * tools: [...],
143
+ * capabilities: { streaming: true, codeExecution: true },
144
+ * };
145
+ * ```
146
+ */
147
+ export interface AgentConfig {
148
+ /**
149
+ * Unique identifier for the agent.
150
+ * Recommended format: "{namespace}.{agent-name}" (e.g., "my-org.assistant")
151
+ */
152
+ id: string;
153
+ /**
154
+ * Human-readable name of the agent.
155
+ * @maxLength 100 (Microsoft recommendation)
156
+ */
157
+ name: string;
158
+ /**
159
+ * Description of what the agent does.
160
+ * @maxLength 1000 (Microsoft recommendation)
161
+ */
162
+ description: string;
163
+ /**
164
+ * Semantic version of the agent configuration.
165
+ * @see https://semver.org/
166
+ */
167
+ version?: string;
168
+ /**
169
+ * Provider/vendor information.
170
+ * @see https://a2a-protocol.org/latest/specification/
171
+ */
172
+ provider?: AgentProvider;
173
+ /**
174
+ * Short instructions or guidelines on how the agent should behave.
175
+ * This is typically a summary; use systemPromptRef for the full prompt.
176
+ * @maxLength 8000 (Microsoft recommendation)
177
+ */
178
+ instructions?: string;
179
+ /**
180
+ * Reference to the full system prompt resource.
181
+ * The actual prompt content is stored externally and loaded on demand.
182
+ */
183
+ systemPromptRef?: ResourceRef;
184
+ /**
185
+ * Example conversation starters to help users understand agent capabilities.
186
+ * @maxLength 12 items (Microsoft recommendation)
187
+ */
188
+ conversationStarters?: string[];
189
+ /**
190
+ * Tools available to the agent.
191
+ * Uses the PanelTool type from panel-framework-core which is UTCP-compatible.
192
+ * @see https://modelcontextprotocol.io/specification/2025-06-18
193
+ */
194
+ tools?: PanelTool[];
195
+ /**
196
+ * Skills following A2A Protocol convention.
197
+ * Skills are similar to tools but with A2A-specific metadata.
198
+ * Use this if integrating with A2A-compatible systems.
199
+ * @see https://a2a-protocol.org/latest/specification/
200
+ */
201
+ skills?: AgentSkill[];
202
+ /**
203
+ * Capabilities supported by this agent.
204
+ * Declares optional features the agent can perform.
205
+ */
206
+ capabilities?: AgentCapabilities;
207
+ /**
208
+ * Icon for the agent.
209
+ * Can be a ReactNode (e.g., Lucide icon), URL string, or emoji string.
210
+ */
211
+ icon?: ReactNode;
212
+ /**
213
+ * Tags for categorization and discovery.
214
+ */
215
+ tags?: string[];
216
+ /**
217
+ * Additional metadata for extensibility.
218
+ */
219
+ metadata?: Record<string, unknown>;
220
+ }
221
+ /**
222
+ * Minimal agent info for display in lists/cards.
223
+ * Subset of AgentConfig for lightweight views.
224
+ */
225
+ export interface AgentInfo {
226
+ id: string;
227
+ name: string;
228
+ description: string;
229
+ version?: string;
230
+ icon?: ReactNode;
231
+ toolCount?: number;
232
+ capabilities?: AgentCapabilities;
233
+ }
234
+ //# sourceMappingURL=agent-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-config.d.ts","sourceRoot":"","sources":["../../src/types/agent-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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,CAAC;CAClC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Panel Extension Type Definitions
3
+ *
4
+ * Re-exports core types from @principal-ade/panel-framework-core
5
+ */
6
+ export type { DataSlice, WorkspaceMetadata, RepositoryMetadata, FileTreeSource, ActiveFileSlice, PanelEventType, PanelEvent, PanelActions, PanelContextValue, PanelComponentProps, PanelMetadata, PanelLifecycleHooks, PanelDefinition, PanelModule, PanelRegistryEntry, PanelLoader, PanelRegistryConfig, PanelTool, PanelToolsMetadata, JsonSchema, PanelEventCallTemplate, } from '@principal-ade/panel-framework-core';
7
+ import type { PanelEvent, PanelEventEmitter as BasePanelEventEmitter } from '@principal-ade/panel-framework-core';
8
+ /**
9
+ * Extended PanelEventEmitter with wildcard subscription support.
10
+ * The core PanelEventBus class implements these methods, but the
11
+ * base interface doesn't include them yet.
12
+ */
13
+ export interface PanelEventEmitter extends BasePanelEventEmitter {
14
+ /** Subscribe to all events (wildcard) */
15
+ onAll?<T>(handler: (event: PanelEvent<T>) => void): () => void;
16
+ /** Unsubscribe from wildcard handler */
17
+ offAll?<T>(handler: (event: PanelEvent<T>) => void): void;
18
+ }
19
+ export type { AgentConfig, AgentInfo, AgentSkill, AgentCapabilities, AgentProvider, ResourceRef, } from './agent-config';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,UAAU,EAGV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EAGnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EAGnB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,sBAAsB,GACvB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,IAAI,qBAAqB,EAC3C,MAAM,qCAAqC,CAAC;AAE7C;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,yCAAyC;IACzC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC/D,wCAAwC;IACxC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC;CAC3D;AAGD,YAAY,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "@industry-theme/agent-driven-ui-panels",
3
+ "version": "0.1.0",
4
+ "description": "Agent-driven UI panels for displaying system prompts, event bus activity, and other agent internals",
5
+ "type": "module",
6
+ "main": "dist/panels.bundle.js",
7
+ "module": "dist/panels.bundle.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/panels.bundle.js",
13
+ "require": "./dist/panels.bundle.js",
14
+ "default": "./dist/panels.bundle.js"
15
+ },
16
+ "./tools": {
17
+ "types": "./dist/tools/index.d.ts",
18
+ "import": "./dist/tools.bundle.js",
19
+ "require": "./dist/tools.bundle.js",
20
+ "default": "./dist/tools.bundle.js"
21
+ }
22
+ },
23
+ "keywords": [
24
+ "panel-extension"
25
+ ],
26
+ "author": "Your Name",
27
+ "license": "MIT",
28
+ "scripts": {
29
+ "build": "bun run clean && bun run build:panel && bun run build:tools && bun run build:types",
30
+ "build:panel": "vite build",
31
+ "build:tools": "bun build ./src/tools/index.ts --outfile ./dist/tools.bundle.js --format esm --target browser",
32
+ "build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
33
+ "dev": "vite build --watch",
34
+ "clean": "rm -rf dist",
35
+ "typecheck": "tsc --noEmit",
36
+ "lint": "eslint . --ext .ts,.tsx",
37
+ "lint:fix": "eslint . --ext .ts,.tsx --fix",
38
+ "format": "prettier --write .",
39
+ "format:check": "prettier --check .",
40
+ "test": "bun test",
41
+ "test:watch": "bun test --watch",
42
+ "storybook": "storybook dev -p 6006",
43
+ "build-storybook": "storybook build"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">=19.0.0",
47
+ "react-dom": ">=19.0.0"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "@principal-ade/panel-framework-core": {
51
+ "optional": true
52
+ }
53
+ },
54
+ "dependencies": {
55
+ "@principal-ade/industry-theme": "^0.1.2",
56
+ "@principal-ade/panel-framework-core": "^0.1.5",
57
+ "@principal-ade/utcp-panel-event": "^0.1.0",
58
+ "clsx": "^2.1.1",
59
+ "lucide-react": "^0.552.0"
60
+ },
61
+ "devDependencies": {
62
+ "@chromatic-com/storybook": "^4.1.3",
63
+ "@eslint/js": "^9.32.0",
64
+ "@storybook/addon-docs": "10.1.2",
65
+ "@storybook/addon-links": "10.1.2",
66
+ "@storybook/addon-onboarding": "10.1.2",
67
+ "@storybook/react-vite": "10.1.2",
68
+ "@types/bun": "latest",
69
+ "@types/node": "^22.15.26",
70
+ "@types/react": "^19.0.0",
71
+ "@types/react-dom": "^19.0.0",
72
+ "@typescript-eslint/eslint-plugin": "^8.38.0",
73
+ "@typescript-eslint/parser": "^8.38.0",
74
+ "@vitejs/plugin-react": "^4.3.4",
75
+ "esbuild": "^0.25.8",
76
+ "eslint": "^9.32.0",
77
+ "eslint-config-prettier": "^10.1.8",
78
+ "eslint-plugin-react": "^7.37.2",
79
+ "eslint-plugin-react-hooks": "^5.0.0",
80
+ "eslint-plugin-storybook": "10.1.2",
81
+ "prettier": "^3.6.2",
82
+ "react": "^19.0.0",
83
+ "react-dom": "^19.0.0",
84
+ "storybook": "10.1.2",
85
+ "typescript": "^5.0.4",
86
+ "typescript-eslint": "^8.38.0",
87
+ "vite": "^6.0.7"
88
+ },
89
+ "files": [
90
+ "dist",
91
+ "README.md",
92
+ "LICENSE"
93
+ ],
94
+ "repository": {
95
+ "type": "git",
96
+ "url": "git+https://github.com/industry-theme/agent-driven-ui-panels.git"
97
+ }
98
+ }