@applica-software-guru/persona-sdk 0.1.100 → 0.1.102

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 (171) hide show
  1. package/.eslintrc.cjs +6 -5
  2. package/.nvmrc +1 -1
  3. package/.prettierignore +3 -5
  4. package/.prettierrc +3 -5
  5. package/README.md +360 -20
  6. package/bitbucket-pipelines.yml +6 -5
  7. package/dist/bundle.cjs.js +1 -27
  8. package/dist/bundle.cjs.js.map +1 -1
  9. package/dist/bundle.es.js +753 -5084
  10. package/dist/bundle.es.js.map +1 -1
  11. package/dist/index.d.ts +1504 -8
  12. package/package.json +9 -51
  13. package/src/agents/agents-api.ts +66 -0
  14. package/src/agents/types.ts +349 -0
  15. package/src/auth/api-key-auth.ts +13 -0
  16. package/src/auth/authentication-provider.ts +4 -0
  17. package/src/auth/bearer-token-auth.ts +13 -0
  18. package/src/auth/index.ts +3 -0
  19. package/src/billing/billing-client.ts +182 -0
  20. package/src/billing/types.ts +166 -0
  21. package/src/credentials/credentials-api.ts +40 -0
  22. package/src/credentials/types.ts +67 -0
  23. package/src/exceptions.ts +10 -0
  24. package/src/features/feature-templates-api.ts +43 -0
  25. package/src/features/features-api.ts +16 -0
  26. package/src/features/types.ts +25 -0
  27. package/src/http-api.ts +102 -0
  28. package/src/index.ts +181 -7
  29. package/src/knowledges/knowledge-base-documents-api.ts +39 -0
  30. package/src/knowledges/knowledge-bases-api.ts +48 -0
  31. package/src/knowledges/types.ts +70 -0
  32. package/src/known-models/known-models-api.ts +33 -0
  33. package/src/known-models/types.ts +7 -0
  34. package/src/missions/missions-api.ts +62 -0
  35. package/src/missions/types.ts +25 -0
  36. package/src/paginated.ts +6 -0
  37. package/src/persona-sdk.ts +104 -0
  38. package/src/projects/projects-api.ts +90 -0
  39. package/src/projects/types.ts +52 -0
  40. package/src/revisions/types.ts +9 -0
  41. package/src/service-prices/service-prices-api.ts +33 -0
  42. package/src/service-prices/types.ts +8 -0
  43. package/src/sessions/sessions-api.ts +90 -0
  44. package/src/sessions/types.ts +150 -0
  45. package/src/triggers/trigger-executions-api.ts +28 -0
  46. package/src/triggers/triggers-api.ts +38 -0
  47. package/src/triggers/types.ts +50 -0
  48. package/src/values/values-api.ts +84 -0
  49. package/src/workflows/human-tasks-api.ts +44 -0
  50. package/src/workflows/types.ts +173 -0
  51. package/src/workflows/workflow-executions-api.ts +94 -0
  52. package/src/workflows/workflows-api.ts +57 -0
  53. package/tsconfig.json +20 -28
  54. package/vite.config.ts +20 -67
  55. package/.github/copilot-instructions.md +0 -3
  56. package/CLAUDE.md +0 -3
  57. package/GEMINI.md +0 -3
  58. package/components.json +0 -24
  59. package/dist/bundle.iife.js +0 -28
  60. package/dist/bundle.iife.js.map +0 -1
  61. package/dist/bundle.umd.js +0 -28
  62. package/dist/bundle.umd.js.map +0 -1
  63. package/dist/index.d.ts.map +0 -1
  64. package/dist/logging.d.ts +0 -18
  65. package/dist/logging.d.ts.map +0 -1
  66. package/dist/messages.d.ts +0 -9
  67. package/dist/messages.d.ts.map +0 -1
  68. package/dist/projects.d.ts +0 -17
  69. package/dist/projects.d.ts.map +0 -1
  70. package/dist/protocol/base.d.ts +0 -25
  71. package/dist/protocol/base.d.ts.map +0 -1
  72. package/dist/protocol/index.d.ts +0 -6
  73. package/dist/protocol/index.d.ts.map +0 -1
  74. package/dist/protocol/rest.d.ts +0 -25
  75. package/dist/protocol/rest.d.ts.map +0 -1
  76. package/dist/protocol/transaction.d.ts +0 -56
  77. package/dist/protocol/transaction.d.ts.map +0 -1
  78. package/dist/protocol/webrtc.d.ts +0 -60
  79. package/dist/protocol/webrtc.d.ts.map +0 -1
  80. package/dist/protocol/websocket.d.ts +0 -22
  81. package/dist/protocol/websocket.d.ts.map +0 -1
  82. package/dist/runtime/context.d.ts +0 -34
  83. package/dist/runtime/context.d.ts.map +0 -1
  84. package/dist/runtime/file-attachment-adapter.d.ts +0 -15
  85. package/dist/runtime/file-attachment-adapter.d.ts.map +0 -1
  86. package/dist/runtime/handlers.d.ts +0 -21
  87. package/dist/runtime/handlers.d.ts.map +0 -1
  88. package/dist/runtime/listeners.d.ts +0 -6
  89. package/dist/runtime/listeners.d.ts.map +0 -1
  90. package/dist/runtime/protocols.d.ts +0 -17
  91. package/dist/runtime/protocols.d.ts.map +0 -1
  92. package/dist/runtime/threads.d.ts +0 -34
  93. package/dist/runtime/threads.d.ts.map +0 -1
  94. package/dist/runtime/utils.d.ts +0 -10
  95. package/dist/runtime/utils.d.ts.map +0 -1
  96. package/dist/runtime.d.ts +0 -6
  97. package/dist/runtime.d.ts.map +0 -1
  98. package/dist/storage/base.d.ts +0 -9
  99. package/dist/storage/base.d.ts.map +0 -1
  100. package/dist/storage/index.d.ts +0 -3
  101. package/dist/storage/index.d.ts.map +0 -1
  102. package/dist/storage/persona.d.ts +0 -29
  103. package/dist/storage/persona.d.ts.map +0 -1
  104. package/dist/tools.d.ts +0 -72
  105. package/dist/tools.d.ts.map +0 -1
  106. package/dist/types.d.ts +0 -237
  107. package/dist/types.d.ts.map +0 -1
  108. package/docs/README.md +0 -13
  109. package/docs/api-reference.md +0 -16
  110. package/docs/contributing.md +0 -21
  111. package/docs/customization.md +0 -74
  112. package/docs/features.md +0 -7
  113. package/docs/installation.md +0 -9
  114. package/docs/messages.md +0 -214
  115. package/docs/protocols.md +0 -39
  116. package/docs/transactions.md +0 -121
  117. package/docs/usage.md +0 -40
  118. package/jsconfig.node.json +0 -10
  119. package/playground/index.html +0 -14
  120. package/playground/src/app.tsx +0 -10
  121. package/playground/src/chat.tsx +0 -117
  122. package/playground/src/components/assistant-ui/assistant-modal.tsx +0 -57
  123. package/playground/src/components/assistant-ui/attachment.tsx +0 -197
  124. package/playground/src/components/assistant-ui/markdown-text.tsx +0 -228
  125. package/playground/src/components/assistant-ui/thread-list.tsx +0 -91
  126. package/playground/src/components/assistant-ui/thread.tsx +0 -302
  127. package/playground/src/components/assistant-ui/threadlist-sidebar.tsx +0 -59
  128. package/playground/src/components/assistant-ui/tool-fallback.tsx +0 -93
  129. package/playground/src/components/assistant-ui/tooltip-icon-button.tsx +0 -42
  130. package/playground/src/components/chat/logging.tsx +0 -53
  131. package/playground/src/components/ui/avatar.tsx +0 -51
  132. package/playground/src/components/ui/button.tsx +0 -60
  133. package/playground/src/components/ui/dialog.tsx +0 -141
  134. package/playground/src/components/ui/input.tsx +0 -21
  135. package/playground/src/components/ui/separator.tsx +0 -26
  136. package/playground/src/components/ui/sheet.tsx +0 -139
  137. package/playground/src/components/ui/sidebar.tsx +0 -619
  138. package/playground/src/components/ui/skeleton.tsx +0 -13
  139. package/playground/src/components/ui/tooltip.tsx +0 -59
  140. package/playground/src/hooks/theme.ts +0 -70
  141. package/playground/src/hooks/use-mobile.ts +0 -19
  142. package/playground/src/lib/utils.ts +0 -6
  143. package/playground/src/main.tsx +0 -10
  144. package/playground/src/styles.css +0 -120
  145. package/playground/src/tools.ts +0 -149
  146. package/playground/src/vite-env.d.ts +0 -1
  147. package/preview-build.sh +0 -23
  148. package/src/logging.ts +0 -34
  149. package/src/messages.ts +0 -202
  150. package/src/projects.ts +0 -57
  151. package/src/protocol/base.ts +0 -73
  152. package/src/protocol/index.ts +0 -5
  153. package/src/protocol/rest.ts +0 -107
  154. package/src/protocol/transaction.ts +0 -182
  155. package/src/protocol/webrtc.ts +0 -379
  156. package/src/protocol/websocket.ts +0 -111
  157. package/src/runtime/context.ts +0 -88
  158. package/src/runtime/file-attachment-adapter.ts +0 -48
  159. package/src/runtime/handlers.ts +0 -322
  160. package/src/runtime/index.ts +0 -6
  161. package/src/runtime/listeners.ts +0 -79
  162. package/src/runtime/protocols.ts +0 -169
  163. package/src/runtime/threads.ts +0 -105
  164. package/src/runtime/utils.ts +0 -46
  165. package/src/runtime.tsx +0 -334
  166. package/src/storage/base.ts +0 -13
  167. package/src/storage/index.ts +0 -2
  168. package/src/storage/persona.ts +0 -138
  169. package/src/tools.ts +0 -211
  170. package/src/types.ts +0 -284
  171. package/tsconfig.node.json +0 -15
@@ -0,0 +1,173 @@
1
+ export type NodeType =
2
+ | 'start'
3
+ | 'action'
4
+ | 'condition'
5
+ | 'loop'
6
+ | 'tool'
7
+ | 'agent'
8
+ | 'set_var'
9
+ | 'output'
10
+ | 'workflow'
11
+ | 'resource'
12
+ | 'script';
13
+
14
+ export type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'file' | 'list';
15
+
16
+ export type VariableDirection = 'in' | 'out';
17
+
18
+ export type ExecutionStatus = 'running' | 'completed' | 'failed' | 'cancelled';
19
+
20
+ export interface Position {
21
+ x?: number;
22
+ y?: number;
23
+ }
24
+
25
+ export interface Handle {
26
+ name?: string;
27
+ description?: string;
28
+ type?: string;
29
+ }
30
+
31
+ export interface WorkflowVariable {
32
+ name?: string;
33
+ description?: string;
34
+ type?: VariableType;
35
+ direction?: VariableDirection;
36
+ defaultValue?: unknown;
37
+ }
38
+
39
+ export interface WorkflowTrigger {
40
+ type?: string;
41
+ }
42
+
43
+ export interface Node {
44
+ id?: string;
45
+ type?: NodeType;
46
+ name?: string;
47
+ description?: string;
48
+ position?: Position;
49
+ allowDynamicInputVariables?: boolean;
50
+ allowDynamicOutputVariables?: boolean;
51
+ allowDynamicHandles?: boolean;
52
+ staticVariables?: WorkflowVariable[];
53
+ variables?: WorkflowVariable[];
54
+ values?: Record<string, unknown>;
55
+ staticHandles?: Handle[];
56
+ handles?: Handle[];
57
+ }
58
+
59
+ export interface StartNode extends Node {
60
+ trigger?: WorkflowTrigger;
61
+ }
62
+
63
+ export interface Connection {
64
+ id?: string;
65
+ sourceId?: string;
66
+ targetId?: string;
67
+ sourceHandle?: string;
68
+ targetHandle?: string;
69
+ }
70
+
71
+ export interface Step {
72
+ id?: string;
73
+ nodeId?: string;
74
+ status?: string;
75
+ startedAt?: string;
76
+ endedAt?: string;
77
+ result?: Record<string, unknown>;
78
+ error?: string;
79
+ output?: Record<string, unknown>;
80
+ }
81
+
82
+ export interface RunResult {
83
+ source?: Node;
84
+ success?: boolean;
85
+ message?: string;
86
+ nextNodes?: string[];
87
+ }
88
+
89
+ export interface NodeExecutionResult {
90
+ nextNodes?: Node[];
91
+ output?: Record<string, unknown>;
92
+ }
93
+
94
+ export interface Execution {
95
+ id?: string;
96
+ workflowId?: string;
97
+ status?: string;
98
+ userId?: string;
99
+ steps?: Step[];
100
+ startedAt?: string;
101
+ endedAt?: string;
102
+ output?: Record<string, unknown>;
103
+ error?: string;
104
+ }
105
+
106
+ export interface WorkflowResult {
107
+ workflowId?: string;
108
+ steps?: RunResult[];
109
+ }
110
+
111
+ export interface AgentValue {
112
+ agentId?: string;
113
+ initialContext?: Record<string, unknown>;
114
+ }
115
+
116
+ export interface ContentItemFile {
117
+ content?: string;
118
+ contentType?: string;
119
+ }
120
+
121
+ export interface Ref {
122
+ nodeId?: string;
123
+ variableName?: string;
124
+ }
125
+
126
+ export interface ContentItem {
127
+ text?: string | Ref;
128
+ file?: ContentItemFile | Ref;
129
+ }
130
+
131
+ export interface ContentValue {
132
+ content?: ContentItem[];
133
+ }
134
+
135
+ export interface ExecuteRequest {
136
+ userId?: string;
137
+ initialData?: Record<string, unknown>;
138
+ callbackUrl?: string;
139
+ eventsHook?: string;
140
+ }
141
+
142
+ export interface HumanTask {
143
+ id: string;
144
+ projectId?: string;
145
+ workflowId?: string;
146
+ workflowName?: string;
147
+ executionId?: string;
148
+ nodeId?: string;
149
+ stepId?: string;
150
+ origin?: 'node' | 'agent_escalation';
151
+ question?: string;
152
+ payload?: Record<string, unknown>;
153
+ assignee?: string;
154
+ role?: string;
155
+ status: string;
156
+ response?: unknown;
157
+ respondedBy?: string;
158
+ respondedAt?: string;
159
+ createdAt?: string;
160
+ timeoutAt?: string;
161
+ sessionCode?: string;
162
+ }
163
+
164
+ export interface Workflow {
165
+ id?: string;
166
+ projectId?: string;
167
+ name?: string;
168
+ description?: string;
169
+ rootNode?: StartNode;
170
+ nodes?: Node[];
171
+ connections?: Connection[];
172
+ features?: import('../agents/types').Feature[];
173
+ }
@@ -0,0 +1,94 @@
1
+ import { HttpApi } from '../http-api';
2
+ import { Paginated } from '../paginated';
3
+ import { AuthenticationProvider } from '../auth/authentication-provider';
4
+ import { Execution, ExecuteRequest } from './types';
5
+
6
+ export class WorkflowExecutionsApi extends HttpApi {
7
+ constructor(baseUrl: string, auth: string | AuthenticationProvider) {
8
+ super(baseUrl, auth);
9
+ }
10
+
11
+ async list(workflowId: string, page?: number, size?: number): Promise<Paginated<Execution>> {
12
+ const { page: p, size: s } = this.normalizePageParams(page, size);
13
+ const params: Record<string, unknown> = { page: p, size: s };
14
+ return this.httpGet<Paginated<Execution>>('/workflows/' + workflowId + '/executions', params);
15
+ }
16
+
17
+ async get(workflowId: string, executionId: string): Promise<Execution> {
18
+ return this.httpGet<Execution>('/workflows/' + workflowId + '/executions/' + executionId);
19
+ }
20
+
21
+ async run(workflowId: string, request: ExecuteRequest): Promise<Execution> {
22
+ return this.httpPost<Execution>('/workflows/' + workflowId + '/executions', request);
23
+ }
24
+
25
+ async queue(workflowId: string, request: ExecuteRequest): Promise<Execution> {
26
+ return this.httpPost<Execution>('/workflows/' + workflowId + '/executions/queue', request);
27
+ }
28
+
29
+ /** Runs across all workflows in the project (filter by status/workflow/date). */
30
+ async listRuns(filters: {
31
+ status?: string;
32
+ workflowId?: string;
33
+ dateFrom?: string;
34
+ dateTo?: string;
35
+ page?: number;
36
+ size?: number;
37
+ } = {}): Promise<Paginated<Execution>> {
38
+ const { page, size } = this.normalizePageParams(filters.page, filters.size);
39
+ const params: Record<string, unknown> = { page, size };
40
+ if (filters.status) params.status = filters.status;
41
+ if (filters.workflowId) params.workflowId = filters.workflowId;
42
+ if (filters.dateFrom) params.dateFrom = filters.dateFrom;
43
+ if (filters.dateTo) params.dateTo = filters.dateTo;
44
+ return this.httpGet<Paginated<Execution>>('/executions', params);
45
+ }
46
+
47
+ /** Request cancellation of a running/waiting execution (cascades to sub-workflows). */
48
+ async cancel(workflowId: string, executionId: string): Promise<Execution> {
49
+ return this.httpPost<Execution>(
50
+ '/workflows/' + workflowId + '/executions/' + executionId + '/cancel',
51
+ {},
52
+ );
53
+ }
54
+
55
+ /** Re-run an execution from a given node. mode: 'reuse_outputs' | 'fresh'. */
56
+ async rerun(
57
+ workflowId: string,
58
+ executionId: string,
59
+ fromNodeId: string,
60
+ mode: 'reuse_outputs' | 'fresh' = 'reuse_outputs',
61
+ ): Promise<Execution> {
62
+ return this.httpPost<Execution>(
63
+ '/workflows/' + workflowId + '/executions/' + executionId + '/rerun',
64
+ { fromNodeId, mode },
65
+ );
66
+ }
67
+
68
+ /** Execute a single node in isolation with the given inputs (debugging). */
69
+ async dryRunNode(
70
+ workflowId: string,
71
+ nodeId: string,
72
+ inputs: Record<string, unknown> = {},
73
+ ): Promise<Record<string, unknown>> {
74
+ return this.httpPost<Record<string, unknown>>(
75
+ '/workflows/' + workflowId + '/nodes/' + nodeId + '/dry-run',
76
+ { inputs },
77
+ );
78
+ }
79
+
80
+ /** Normalized action trace of an agent step (reasoning, tool calls, messages). */
81
+ async stepTrace(
82
+ workflowId: string,
83
+ executionId: string,
84
+ stepId: string,
85
+ page?: number,
86
+ size?: number,
87
+ ): Promise<Record<string, unknown>> {
88
+ const { page: p, size: s } = this.normalizePageParams(page, size ?? 200);
89
+ return this.httpGet<Record<string, unknown>>(
90
+ '/workflows/' + workflowId + '/executions/' + executionId + '/steps/' + stepId + '/trace',
91
+ { page: p, size: s },
92
+ );
93
+ }
94
+ }
@@ -0,0 +1,57 @@
1
+ import { HttpApi } from '../http-api';
2
+ import { Paginated } from '../paginated';
3
+ import { AuthenticationProvider } from '../auth/authentication-provider';
4
+ import { Revision } from '../revisions/types';
5
+ import { Workflow } from './types';
6
+ import { WorkflowExecutionsApi } from './workflow-executions-api';
7
+ import { HumanTasksApi } from './human-tasks-api';
8
+
9
+ export class WorkflowsApi extends HttpApi {
10
+ constructor(baseUrl: string, auth: string | AuthenticationProvider) {
11
+ super(baseUrl, auth);
12
+ }
13
+
14
+ async list(keyword?: string | null, page?: number, size?: number, extraParams?: Record<string, string>): Promise<Paginated<Workflow>> {
15
+ const { page: p, size: s } = this.normalizePageParams(page, size);
16
+ const params: Record<string, unknown> = { page: p, size: s, ...extraParams };
17
+ if (keyword) params.keyword = keyword;
18
+ return this.httpGet<Paginated<Workflow>>('/workflows', params);
19
+ }
20
+
21
+ async create(workflow: Workflow): Promise<Workflow> {
22
+ return this.httpPost<Workflow>('/workflows', workflow);
23
+ }
24
+
25
+ async update(workflowId: string, workflow: Workflow): Promise<Workflow> {
26
+ workflow.id = workflowId;
27
+ return this.httpPut<Workflow>('/workflows/' + workflowId, workflow);
28
+ }
29
+
30
+ async remove(workflowId: string): Promise<void> {
31
+ await this.httpDelete('/workflows/' + workflowId);
32
+ }
33
+
34
+ async get(workflowId: string): Promise<Workflow> {
35
+ return this.httpGet<Workflow>('/workflows/' + workflowId);
36
+ }
37
+
38
+ executions(): WorkflowExecutionsApi {
39
+ return new WorkflowExecutionsApi(this.getBaseUrl(), this.getAuthProvider());
40
+ }
41
+
42
+ humanTasks(): HumanTasksApi {
43
+ return new HumanTasksApi(this.getBaseUrl(), this.getAuthProvider());
44
+ }
45
+
46
+ async listRevisions(workflowId: string): Promise<Revision[]> {
47
+ return this.httpGet<Revision[]>('/workflows/' + workflowId + '/revisions');
48
+ }
49
+
50
+ async getRevision(workflowId: string, revisionId: string): Promise<Revision> {
51
+ return this.httpGet<Revision>('/workflows/' + workflowId + '/revisions/' + revisionId);
52
+ }
53
+
54
+ async rollback(workflowId: string, revisionId: string): Promise<Workflow> {
55
+ return this.httpPost<Workflow>('/workflows/' + workflowId + '/revisions/' + revisionId + '/rollback', {});
56
+ }
57
+ }
package/tsconfig.json CHANGED
@@ -1,36 +1,28 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "allowJs": true,
4
- "allowSyntheticDefaultImports": true,
5
- "baseUrl": ".",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "esModuleInterop": true,
9
- "forceConsistentCasingInFileNames": true,
3
+ "target": "ES2022",
4
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "skipLibCheck": true,
7
+ "moduleResolution": "bundler",
8
+ "allowImportingTsExtensions": true,
9
+ "resolveJsonModule": true,
10
10
  "isolatedModules": true,
11
+ "noEmit": true,
11
12
  "jsx": "react-jsx",
12
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
13
- "module": "ESNext",
14
- "moduleResolution": "Node",
15
- "noEmit": false,
16
- "noUnusedLocals": true,
17
- "noUnusedParameters": true,
18
- "outDir": "dist",
13
+ "strict": true,
14
+ "noUnusedLocals": false,
15
+ "noUnusedParameters": false,
16
+ "noFallthroughCasesInSwitch": true,
17
+ "declaration": true,
18
+ "declarationMap": true,
19
+ "sourceMap": true,
20
+ "outDir": "./dist",
21
+ "baseUrl": ".",
19
22
  "paths": {
20
- "@/*": ["playground/src/*"],
21
23
  "@applica-software-guru/persona-sdk": ["src/index.ts"]
22
- },
23
- "resolveJsonModule": true,
24
- "skipLibCheck": true,
25
- "strict": true,
26
- "target": "ESNext",
27
- "typeRoots": ["node_modules/@types", "src/assets.d.ts", "src/index.d.ts", "src/types.d.ts"],
28
- "useDefineForClassFields": true
29
- },
30
- "include": ["src", "playground/src"],
31
- "references": [
32
- {
33
- "path": "./jsconfig.node.json"
34
24
  }
35
- ]
25
+ },
26
+ "include": ["src"],
27
+ "exclude": ["node_modules", "dist"]
36
28
  }
package/vite.config.ts CHANGED
@@ -1,74 +1,27 @@
1
- import react from '@vitejs/plugin-react';
2
- import * as packageJson from './package.json';
1
+ import { defineConfig } from 'vite';
2
+ import dts from 'vite-plugin-dts';
3
3
  import { resolve } from 'path';
4
- import { ConfigEnv, defineConfig, UserConfig } from 'vite';
5
- import { default as dts } from 'vite-plugin-dts';
6
- import tailwindcss from '@tailwindcss/vite';
7
4
 
8
- export default defineConfig((configEnv: ConfigEnv) => {
9
- const { mode } = configEnv;
10
- const isDevelopment = mode === 'development';
11
- const config: UserConfig = {
12
- build: {
13
- sourcemap: true,
14
- lib: {
15
- entry: resolve('src', 'index.ts'),
16
- name: 'personaSDK',
17
- formats: ['es', 'umd', 'cjs', 'iife'],
18
- fileName: (format: string) => `bundle.${format}.js`,
19
- },
20
- rollupOptions: {
21
- external: [
22
- ...Object.keys(packageJson.peerDependencies),
23
- ...Object.keys(packageJson.dependencies || {}),
24
- /^react\//,
25
- /^react-dom\//,
26
- /^@radix-ui\//,
27
- ],
28
- input: resolve(__dirname, 'src', 'index.ts'),
29
- output: {
30
- globals: {
31
- 'react-dom': 'ReactDOM',
32
- react: 'React',
33
- 'react/jsx-runtime': 'React',
34
- 'react/jsx-dev-runtime': 'React',
35
- '@assistant-ui/react': 'AssistantUI',
36
- '@radix-ui/react-dialog': 'RadixDialog',
37
- '@radix-ui/react-slot': 'RadixSlot',
38
- 'rehype-raw': 'rehypeRaw',
39
- zustand: 'zustand',
40
- },
41
- },
42
- },
5
+ export default defineConfig({
6
+ plugins: [dts({ rollupTypes: true })],
7
+ build: {
8
+ lib: {
9
+ entry: resolve(__dirname, 'src/index.ts'),
10
+ name: 'PersonaSDK',
11
+ formats: ['es', 'cjs'],
12
+ fileName: (format) => `bundle.${format}.js`,
43
13
  },
44
- resolve: {
45
- dedupe: Object.keys(packageJson.peerDependencies || {}),
46
- alias: {
47
- '@applica-software-guru/persona-sdk': resolve(__dirname, 'src'),
48
- '@': resolve(__dirname, 'playground/src'),
49
- '@/*': resolve(__dirname, 'playground/src/*'),
50
- '*': resolve(__dirname, 'src/*'),
14
+ rollupOptions: {
15
+ external: [],
16
+ output: {
17
+ globals: {},
51
18
  },
52
19
  },
53
- plugins: [
54
- dts({
55
- include: ['./src/**/*.{js,jsx,ts,tsx}'],
56
- }),
57
- react(),
58
- ],
59
- define: {
60
- 'process.env': {
61
- NODE_ENV: 'production',
62
- },
20
+ sourcemap: true,
21
+ },
22
+ resolve: {
23
+ alias: {
24
+ '@applica-software-guru/persona-sdk': resolve(__dirname, 'src'),
63
25
  },
64
- optimizeDeps: {
65
- include: Object.keys(packageJson.peerDependencies || {}),
66
- },
67
- };
68
- if (isDevelopment) {
69
- config.plugins = [react(), tailwindcss()];
70
- config.root = resolve(__dirname, 'playground');
71
- }
72
-
73
- return config;
26
+ },
74
27
  });
@@ -1,3 +0,0 @@
1
- # Copilot Instructions
2
-
3
- Please refer to the [README.md](../README.md) for project documentation and guidelines.
package/CLAUDE.md DELETED
@@ -1,3 +0,0 @@
1
- # Claude Instructions
2
-
3
- Please refer to the [README.md](README.md) for project documentation and guidelines.
package/GEMINI.md DELETED
@@ -1,3 +0,0 @@
1
- # Gemini Instructions
2
-
3
- Please refer to the [README.md](README.md) for project documentation and guidelines.
package/components.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "playground/src/styles.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "iconLibrary": "lucide",
14
- "aliases": {
15
- "components": "@/components",
16
- "utils": "@/lib/utils",
17
- "ui": "@/components/ui",
18
- "lib": "@/lib",
19
- "hooks": "@/hooks"
20
- },
21
- "registries": {
22
- "@assistant-ui": "https://r.assistant-ui.com/{name}.json"
23
- }
24
- }