@synergenius/flow-weaver-pack-weaver 0.9.199 → 0.9.201

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 (181) hide show
  1. package/dist/ai-chat-provider.js +5 -5
  2. package/dist/ai-chat-provider.js.map +1 -1
  3. package/dist/bot/acceptance-merge.d.ts +21 -0
  4. package/dist/bot/acceptance-merge.d.ts.map +1 -0
  5. package/dist/bot/acceptance-merge.js +46 -0
  6. package/dist/bot/acceptance-merge.js.map +1 -0
  7. package/dist/bot/ai-client.d.ts +14 -2
  8. package/dist/bot/ai-client.d.ts.map +1 -1
  9. package/dist/bot/ai-client.js +71 -24
  10. package/dist/bot/ai-client.js.map +1 -1
  11. package/dist/bot/assistant-tools.js +3 -3
  12. package/dist/bot/assistant-tools.js.map +1 -1
  13. package/dist/bot/audit-logger.d.ts.map +1 -1
  14. package/dist/bot/audit-logger.js +34 -14
  15. package/dist/bot/audit-logger.js.map +1 -1
  16. package/dist/bot/audit-trail.d.ts +67 -0
  17. package/dist/bot/audit-trail.d.ts.map +1 -0
  18. package/dist/bot/audit-trail.js +153 -0
  19. package/dist/bot/audit-trail.js.map +1 -0
  20. package/dist/bot/behavior-defaults.d.ts +1 -1
  21. package/dist/bot/behavior-defaults.d.ts.map +1 -1
  22. package/dist/bot/behavior-defaults.js +7 -3
  23. package/dist/bot/behavior-defaults.js.map +1 -1
  24. package/dist/bot/capability-registry.d.ts +9 -0
  25. package/dist/bot/capability-registry.d.ts.map +1 -1
  26. package/dist/bot/capability-registry.js +81 -27
  27. package/dist/bot/capability-registry.js.map +1 -1
  28. package/dist/bot/capability-types.d.ts +10 -0
  29. package/dist/bot/capability-types.d.ts.map +1 -1
  30. package/dist/bot/cli-provider.d.ts.map +1 -1
  31. package/dist/bot/cli-provider.js +8 -7
  32. package/dist/bot/cli-provider.js.map +1 -1
  33. package/dist/bot/preflight.d.ts +48 -0
  34. package/dist/bot/preflight.d.ts.map +1 -0
  35. package/dist/bot/preflight.js +247 -0
  36. package/dist/bot/preflight.js.map +1 -0
  37. package/dist/bot/provider-shim.d.ts +74 -0
  38. package/dist/bot/provider-shim.d.ts.map +1 -0
  39. package/dist/bot/provider-shim.js +176 -0
  40. package/dist/bot/provider-shim.js.map +1 -0
  41. package/dist/bot/runner.d.ts +2 -0
  42. package/dist/bot/runner.d.ts.map +1 -1
  43. package/dist/bot/runner.js +60 -17
  44. package/dist/bot/runner.js.map +1 -1
  45. package/dist/bot/step-executor.d.ts.map +1 -1
  46. package/dist/bot/step-executor.js +72 -115
  47. package/dist/bot/step-executor.js.map +1 -1
  48. package/dist/bot/swarm-controller.d.ts +2 -0
  49. package/dist/bot/swarm-controller.d.ts.map +1 -1
  50. package/dist/bot/swarm-controller.js +92 -20
  51. package/dist/bot/swarm-controller.js.map +1 -1
  52. package/dist/bot/task-create-handler.d.ts +37 -0
  53. package/dist/bot/task-create-handler.d.ts.map +1 -0
  54. package/dist/bot/task-create-handler.js +124 -0
  55. package/dist/bot/task-create-handler.js.map +1 -0
  56. package/dist/bot/task-store.d.ts +1 -0
  57. package/dist/bot/task-store.d.ts.map +1 -1
  58. package/dist/bot/task-store.js +67 -0
  59. package/dist/bot/task-store.js.map +1 -1
  60. package/dist/bot/types.d.ts +1 -1
  61. package/dist/bot/types.d.ts.map +1 -1
  62. package/dist/bot/weaver-tools.d.ts.map +1 -1
  63. package/dist/bot/weaver-tools.js +7 -39
  64. package/dist/bot/weaver-tools.js.map +1 -1
  65. package/dist/node-types/agent-execute.d.ts +25 -8
  66. package/dist/node-types/agent-execute.d.ts.map +1 -1
  67. package/dist/node-types/agent-execute.js +89 -23
  68. package/dist/node-types/agent-execute.js.map +1 -1
  69. package/dist/node-types/bot-report.d.ts.map +1 -1
  70. package/dist/node-types/bot-report.js +24 -3
  71. package/dist/node-types/bot-report.js.map +1 -1
  72. package/dist/node-types/plan-task.d.ts +8 -17
  73. package/dist/node-types/plan-task.d.ts.map +1 -1
  74. package/dist/node-types/plan-task.js +217 -256
  75. package/dist/node-types/plan-task.js.map +1 -1
  76. package/dist/node-types/review-result.js +8 -6
  77. package/dist/node-types/review-result.js.map +1 -1
  78. package/dist/palindrome.d.ts +9 -0
  79. package/dist/palindrome.d.ts.map +1 -0
  80. package/dist/palindrome.js +14 -0
  81. package/dist/palindrome.js.map +1 -0
  82. package/dist/ui/approval-card.js +91 -82
  83. package/dist/ui/bot-activity.js +73 -56
  84. package/dist/ui/bot-config.js +48 -31
  85. package/dist/ui/bot-dashboard.js +52 -36
  86. package/dist/ui/bot-panel.js +230 -228
  87. package/dist/ui/bot-slot-card.js +100 -90
  88. package/dist/ui/bot-status.js +37 -15
  89. package/dist/ui/budget-bar.js +57 -31
  90. package/dist/ui/capability-editor.js +447 -378
  91. package/dist/ui/chat-task-result.js +78 -71
  92. package/dist/ui/decision-log.js +68 -81
  93. package/dist/ui/genesis-block.js +86 -95
  94. package/dist/ui/instance-stream-view.js +722 -0
  95. package/dist/ui/profile-card.js +96 -221
  96. package/dist/ui/profile-editor.js +532 -575
  97. package/dist/ui/settings-section.js +41 -45
  98. package/dist/ui/swarm-controls.js +212 -135
  99. package/dist/ui/swarm-dashboard.js +3992 -2715
  100. package/dist/ui/task-detail-view.js +415 -521
  101. package/dist/ui/task-editor.js +339 -390
  102. package/dist/ui/task-pool-list.js +60 -55
  103. package/dist/workflows/src/palindrome.d.ts +11 -0
  104. package/dist/workflows/src/palindrome.d.ts.map +1 -0
  105. package/dist/workflows/src/palindrome.js +16 -0
  106. package/dist/workflows/src/palindrome.js.map +1 -0
  107. package/dist/workflows/tests/palindrome.test.d.ts +2 -0
  108. package/dist/workflows/tests/palindrome.test.d.ts.map +1 -0
  109. package/dist/workflows/tests/palindrome.test.js +41 -0
  110. package/dist/workflows/tests/palindrome.test.js.map +1 -0
  111. package/dist/workflows/weaver-bot-batch.js +1 -1
  112. package/dist/workflows/weaver-bot-batch.js.map +1 -1
  113. package/dist/workflows/weaver-bot.js +1 -1
  114. package/dist/workflows/weaver-bot.js.map +1 -1
  115. package/flowweaver.manifest.json +1 -1
  116. package/package.json +8 -2
  117. package/src/ai-chat-provider.ts +5 -5
  118. package/src/bot/acceptance-merge.ts +62 -0
  119. package/src/bot/ai-client.ts +77 -21
  120. package/src/bot/assistant-tools.ts +3 -3
  121. package/src/bot/audit-logger.ts +42 -14
  122. package/src/bot/audit-trail.ts +211 -0
  123. package/src/bot/behavior-defaults.ts +7 -2
  124. package/src/bot/capability-registry.ts +84 -28
  125. package/src/bot/capability-types.ts +11 -0
  126. package/src/bot/cli-provider.ts +8 -7
  127. package/src/bot/preflight.ts +285 -0
  128. package/src/bot/provider-shim.ts +218 -0
  129. package/src/bot/runner.ts +68 -20
  130. package/src/bot/step-executor.ts +69 -127
  131. package/src/bot/swarm-controller.ts +94 -20
  132. package/src/bot/task-create-handler.ts +164 -0
  133. package/src/bot/task-store.ts +83 -0
  134. package/src/bot/types.ts +4 -1
  135. package/src/bot/weaver-tools.ts +7 -45
  136. package/src/node-types/agent-execute.ts +102 -16
  137. package/src/node-types/bot-report.ts +24 -3
  138. package/src/node-types/plan-task.ts +238 -280
  139. package/src/node-types/review-result.ts +8 -6
  140. package/src/palindrome.ts +14 -0
  141. package/src/ui/approval-card.tsx +78 -62
  142. package/src/ui/bot-activity.tsx +12 -10
  143. package/src/ui/bot-config.tsx +12 -10
  144. package/src/ui/bot-dashboard.tsx +13 -11
  145. package/src/ui/bot-panel.tsx +189 -171
  146. package/src/ui/bot-slot-card.tsx +125 -70
  147. package/src/ui/bot-status.tsx +4 -4
  148. package/src/ui/budget-bar.tsx +86 -25
  149. package/src/ui/capability-editor.tsx +392 -257
  150. package/src/ui/chat-task-result.tsx +81 -78
  151. package/src/ui/decision-log.tsx +76 -73
  152. package/src/ui/genesis-block.tsx +91 -61
  153. package/src/ui/instance-stream-view.tsx +861 -0
  154. package/src/ui/profile-card.tsx +195 -168
  155. package/src/ui/profile-editor.tsx +453 -370
  156. package/src/ui/settings-section.tsx +46 -39
  157. package/src/ui/swarm-controls.tsx +252 -123
  158. package/src/ui/swarm-dashboard.tsx +999 -466
  159. package/src/ui/task-detail-view.tsx +485 -428
  160. package/src/ui/task-editor.tsx +329 -271
  161. package/src/ui/task-pool-list.tsx +68 -62
  162. package/src/workflows/src/palindrome.ts +16 -0
  163. package/src/workflows/tests/palindrome.test.ts +49 -0
  164. package/src/workflows/weaver-bot-batch.ts +1 -1
  165. package/src/workflows/weaver-bot.ts +1 -1
  166. package/dist/ui/bot-constants.d.ts +0 -14
  167. package/dist/ui/bot-constants.d.ts.map +0 -1
  168. package/dist/ui/bot-constants.js +0 -189
  169. package/dist/ui/bot-constants.js.map +0 -1
  170. package/dist/ui/steer-api.d.ts +0 -7
  171. package/dist/ui/steer-api.d.ts.map +0 -1
  172. package/dist/ui/steer-api.js +0 -11
  173. package/dist/ui/steer-api.js.map +0 -1
  174. package/dist/ui/trace-to-timeline.d.ts +0 -91
  175. package/dist/ui/trace-to-timeline.d.ts.map +0 -1
  176. package/dist/ui/trace-to-timeline.js +0 -116
  177. package/dist/ui/trace-to-timeline.js.map +0 -1
  178. package/dist/ui/use-stream-timeline.d.ts +0 -50
  179. package/dist/ui/use-stream-timeline.d.ts.map +0 -1
  180. package/dist/ui/use-stream-timeline.js +0 -245
  181. package/dist/ui/use-stream-timeline.js.map +0 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Checks if a string is a palindrome.
3
+ * Case-insensitive, ignores non-alphanumeric characters.
4
+ *
5
+ * @param s - The input string to check
6
+ * @returns true if the string is a palindrome, false otherwise
7
+ */
8
+ export function isPalindrome(s: string): boolean {
9
+ // Convert to lowercase and keep only alphanumeric characters
10
+ const cleaned = s.toLowerCase().replace(/[^a-z0-9]/g, '');
11
+
12
+ // Check if the cleaned string is equal to its reverse
13
+ return cleaned === cleaned.split('').reverse().join('');
14
+ }
@@ -3,9 +3,8 @@
3
3
  * Rendered inside TaskBlock when phase is 'planning' and a plan is available.
4
4
  * Uses the workspace context's callTool for approval.
5
5
  */
6
- const React = require('react');
7
- const { useState, useCallback } = React;
8
- const {
6
+ import React, { useState, useCallback } from 'react';
7
+ import {
9
8
  CollapsibleBlock,
10
9
  Flex,
11
10
  Typography,
@@ -13,7 +12,7 @@ const {
13
12
  Chip,
14
13
  Button,
15
14
  toast,
16
- } = require('@fw/plugin-ui-kit');
15
+ } from '@fw/plugin-ui-kit';
17
16
 
18
17
  interface PlanStep {
19
18
  id: string;
@@ -51,66 +50,83 @@ function ApprovalCard({ plan, callTool, onDecision }: ApprovalCardProps) {
51
50
  );
52
51
 
53
52
  if (decided !== null) {
54
- return React.createElement(CollapsibleBlock, {
55
- status: decided ? 'completed' : 'error',
56
- label: React.createElement(Typography, {
57
- variant: 'caption-bold',
58
- color: decided ? 'color-status-positive' : 'color-status-negative',
59
- }, decided ? 'Plan Approved' : 'Plan Rejected'),
60
- expanded: false,
61
- canExpand: false,
62
- });
53
+ return (
54
+ <CollapsibleBlock
55
+ status={decided ? 'completed' : 'error'}
56
+ label={
57
+ <Typography
58
+ variant="caption-bold"
59
+ color={decided ? 'color-status-positive' : 'color-status-negative'}
60
+ >
61
+ {decided ? 'Plan Approved' : 'Plan Rejected'}
62
+ </Typography>
63
+ }
64
+ expanded={false}
65
+ canExpand={false}
66
+ />
67
+ );
63
68
  }
64
69
 
65
- return React.createElement(CollapsibleBlock, {
66
- status: 'pending',
67
- label: React.createElement(Flex, { variant: 'row-center-start-nowrap-8' },
68
- React.createElement(Badge, { variant: 'warning' }, 'Approval Needed'),
69
- React.createElement(Typography, { variant: 'caption-bold', color: 'color-text-high' },
70
- plan.summary || `${plan.steps.length} step plan`),
71
- ),
72
- expanded: true,
73
- canExpand: false,
74
- },
75
- React.createElement(Flex, {
76
- variant: 'column-start-start-nowrap-6',
77
- style: { padding: '10px 12px' },
78
- },
79
- ...plan.steps.map((step: PlanStep, i: number) =>
80
- React.createElement(Flex, {
81
- key: step.id || i,
82
- variant: 'row-center-start-nowrap-6',
83
- style: { fontSize: '11px' },
84
- },
85
- React.createElement(Chip, { label: step.operation, size: 'small', color: 'color-status-info' }),
86
- React.createElement(Typography, {
87
- variant: 'smallCaption-regular',
88
- color: 'color-text-medium',
89
- }, step.description),
90
- ),
91
- ),
92
- ),
93
- React.createElement(Flex, {
94
- variant: 'row-center-start-nowrap-8',
95
- style: { padding: '10px 12px', borderTop: '1px solid var(--color-border-default)' },
96
- },
97
- React.createElement(Button, {
98
- variant: 'fill',
99
- color: 'primary',
100
- size: 'xs',
101
- onClick: () => handleDecision(true),
102
- loading: deciding,
103
- disabled: deciding,
104
- }, 'Approve'),
105
- React.createElement(Button, {
106
- variant: 'outlined',
107
- color: 'danger',
108
- size: 'xs',
109
- onClick: () => handleDecision(false),
110
- loading: deciding,
111
- disabled: deciding,
112
- }, 'Reject'),
113
- ),
70
+ return (
71
+ <CollapsibleBlock
72
+ status="pending"
73
+ label={
74
+ <Flex variant="row-center-start-nowrap-8">
75
+ <Badge variant="warning">Approval Needed</Badge>
76
+ <Typography variant="caption-bold" color="color-text-high">
77
+ {plan.summary || `${plan.steps.length} step plan`}
78
+ </Typography>
79
+ </Flex>
80
+ }
81
+ expanded={true}
82
+ canExpand={false}
83
+ >
84
+ <Flex
85
+ variant="column-start-start-nowrap-6"
86
+ style={{ padding: '10px 12px' }}
87
+ >
88
+ {plan.steps.map((step: PlanStep, i: number) => (
89
+ <Flex
90
+ key={step.id || i}
91
+ variant="row-center-start-nowrap-6"
92
+ style={{ fontSize: '11px' }}
93
+ >
94
+ <Chip label={step.operation} size="small" color="color-status-info" />
95
+ <Typography
96
+ variant="smallCaption-regular"
97
+ color="color-text-medium"
98
+ >
99
+ {step.description}
100
+ </Typography>
101
+ </Flex>
102
+ ))}
103
+ </Flex>
104
+ <Flex
105
+ variant="row-center-start-nowrap-8"
106
+ style={{ padding: '10px 12px', borderTop: '1px solid var(--color-border-default)' }}
107
+ >
108
+ <Button
109
+ variant="fill"
110
+ color="primary"
111
+ size="xs"
112
+ onClick={() => handleDecision(true)}
113
+ loading={deciding}
114
+ disabled={deciding}
115
+ >
116
+ Approve
117
+ </Button>
118
+ <Button
119
+ variant="outlined"
120
+ color="danger"
121
+ size="xs"
122
+ onClick={() => handleDecision(false)}
123
+ loading={deciding}
124
+ disabled={deciding}
125
+ >
126
+ Reject
127
+ </Button>
128
+ </Flex>
129
+ </CollapsibleBlock>
114
130
  );
115
131
  }
116
132
 
@@ -3,15 +3,16 @@
3
3
  * Shows running bot, queued tasks, recent runs, and KPI bar.
4
4
  * Runs in the platform bot-panel sandbox.
5
5
  */
6
- const React = require('react');
7
- const { useState, useEffect, useCallback, useRef } = React;
8
- const { Typography } = require('@fw/plugin-ui-kit');
9
- const { Icon } = require('@fw/plugin-ui-kit');
10
- const { IconButton } = require('@fw/plugin-ui-kit');
11
- const { Badge } = require('@fw/plugin-ui-kit');
12
- const { ScrollArea } = require('@fw/plugin-ui-kit');
13
- const { LoadingSpinner } = require('@fw/plugin-ui-kit');
14
- const { styled } = require('@fw/plugin-theme');
6
+ import React, { useState, useEffect, useCallback, useRef } from 'react';
7
+ import {
8
+ Typography,
9
+ Icon,
10
+ IconButton,
11
+ Badge,
12
+ ScrollArea,
13
+ LoadingSpinner,
14
+ } from '@fw/plugin-ui-kit';
15
+ import { styled } from '@fw/plugin-theme';
15
16
 
16
17
  const REFRESH_INTERVAL = 30_000;
17
18
 
@@ -345,4 +346,5 @@ function BotActivity({ packName, botId }: { packName: string; botId: string }) {
345
346
  );
346
347
  }
347
348
 
348
- module.exports = BotActivity;
349
+ export { BotActivity };
350
+ export default BotActivity;
@@ -2,15 +2,16 @@
2
2
  * Weaver Bot Config Panel — shows active configuration (detected + configured).
3
3
  * Runs in the platform bot-panel sandbox.
4
4
  */
5
- const React = require('react');
6
- const { useState, useEffect, useCallback } = React;
7
- const { Typography } = require('@fw/plugin-ui-kit');
8
- const { CollapsibleSection } = require('@fw/plugin-ui-kit');
9
- const { LoadingSpinner } = require('@fw/plugin-ui-kit');
10
- const { Banner } = require('@fw/plugin-ui-kit');
11
- const { IconButton } = require('@fw/plugin-ui-kit');
12
- const { Badge } = require('@fw/plugin-ui-kit');
13
- const { styled } = require('@fw/plugin-theme');
5
+ import React, { useState, useEffect, useCallback } from 'react';
6
+ import {
7
+ Typography,
8
+ CollapsibleSection,
9
+ LoadingSpinner,
10
+ Banner,
11
+ IconButton,
12
+ Badge,
13
+ } from '@fw/plugin-ui-kit';
14
+ import { styled } from '@fw/plugin-theme';
14
15
 
15
16
  const BASE = '/api/pack-tool/@synergenius/flow-weaver-pack-weaver';
16
17
 
@@ -147,4 +148,5 @@ function BotConfig({ packName, botId }: { packName: string; botId: string }) {
147
148
  );
148
149
  }
149
150
 
150
- module.exports = BotConfig;
151
+ export { BotConfig };
152
+ export default BotConfig;
@@ -2,16 +2,17 @@
2
2
  * Weaver Bot Dashboard — persistent overview with health, trust, costs, insights, and run history.
3
3
  * Runs in the platform bot-panel sandbox. Refreshes every 30 seconds.
4
4
  */
5
- const React = require('react');
6
- const { useState, useEffect, useCallback, useRef } = React;
7
- const { Typography } = require('@fw/plugin-ui-kit');
8
- const { Icon } = require('@fw/plugin-ui-kit');
9
- const { Badge } = require('@fw/plugin-ui-kit');
10
- const { CollapsibleSection } = require('@fw/plugin-ui-kit');
11
- const { LoadingSpinner } = require('@fw/plugin-ui-kit');
12
- const { Banner } = require('@fw/plugin-ui-kit');
13
- const { IconButton } = require('@fw/plugin-ui-kit');
14
- const { styled } = require('@fw/plugin-theme');
5
+ import React, { useState, useEffect, useCallback, useRef } from 'react';
6
+ import {
7
+ Typography,
8
+ Icon,
9
+ Badge,
10
+ CollapsibleSection,
11
+ LoadingSpinner,
12
+ Banner,
13
+ IconButton,
14
+ } from '@fw/plugin-ui-kit';
15
+ import { styled } from '@fw/plugin-theme';
15
16
 
16
17
  const BASE = '/api/pack-tool/@synergenius/flow-weaver-pack-weaver';
17
18
 
@@ -254,4 +255,5 @@ function BotDashboard({ packName, botId }: { packName: string; botId: string })
254
255
  );
255
256
  }
256
257
 
257
- module.exports = BotDashboard;
258
+ export { BotDashboard };
259
+ export default BotDashboard;