@xpufx/paseo-forges 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.
Files changed (128) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/client/active-forge.ts +47 -0
  4. package/client/board-alert.tsx +236 -0
  5. package/client/foreign-link.tsx +33 -0
  6. package/client/hook-queue-panel.tsx +412 -0
  7. package/client/issues-pill.tsx +1976 -0
  8. package/client/label-chip.tsx +116 -0
  9. package/client/linkifier.tsx +280 -0
  10. package/client/pill-label.ts +183 -0
  11. package/client/vendor/paseo-plugin-helper/command-center.ts +43 -0
  12. package/client/vendor/paseo-plugin-helper/components/AboutSection.tsx +493 -0
  13. package/client/vendor/paseo-plugin-helper/components/AttentionBeacon.tsx +250 -0
  14. package/client/vendor/paseo-plugin-helper/components/Badge.tsx +156 -0
  15. package/client/vendor/paseo-plugin-helper/components/Button.tsx +178 -0
  16. package/client/vendor/paseo-plugin-helper/components/Card.tsx +225 -0
  17. package/client/vendor/paseo-plugin-helper/components/CodeBlock.tsx +196 -0
  18. package/client/vendor/paseo-plugin-helper/components/Collapsible.tsx +277 -0
  19. package/client/vendor/paseo-plugin-helper/components/CommandBox.tsx +172 -0
  20. package/client/vendor/paseo-plugin-helper/components/CopyButton.tsx +180 -0
  21. package/client/vendor/paseo-plugin-helper/components/DataTable.tsx +200 -0
  22. package/client/vendor/paseo-plugin-helper/components/EmptyState.tsx +97 -0
  23. package/client/vendor/paseo-plugin-helper/components/HighlightedText.tsx +70 -0
  24. package/client/vendor/paseo-plugin-helper/components/InlineButton.tsx +73 -0
  25. package/client/vendor/paseo-plugin-helper/components/KeyValue.tsx +446 -0
  26. package/client/vendor/paseo-plugin-helper/components/MetricGauge.tsx +247 -0
  27. package/client/vendor/paseo-plugin-helper/components/ProgressBar.tsx +117 -0
  28. package/client/vendor/paseo-plugin-helper/components/Responsive.tsx +53 -0
  29. package/client/vendor/paseo-plugin-helper/components/SearchInput.tsx +118 -0
  30. package/client/vendor/paseo-plugin-helper/components/SectionHeader.tsx +80 -0
  31. package/client/vendor/paseo-plugin-helper/components/Select.tsx +215 -0
  32. package/client/vendor/paseo-plugin-helper/components/StatusDot.tsx +80 -0
  33. package/client/vendor/paseo-plugin-helper/components/Tabs.tsx +319 -0
  34. package/client/vendor/paseo-plugin-helper/components/TextInput.tsx +150 -0
  35. package/client/vendor/paseo-plugin-helper/components/Toggle.tsx +163 -0
  36. package/client/vendor/paseo-plugin-helper/components/TruncatedText.tsx +157 -0
  37. package/client/vendor/paseo-plugin-helper/components/index.ts +25 -0
  38. package/client/vendor/paseo-plugin-helper/custom-pills.tsx +224 -0
  39. package/client/vendor/paseo-plugin-helper/forge-icon.tsx +79 -0
  40. package/client/vendor/paseo-plugin-helper/host.ts +277 -0
  41. package/client/vendor/paseo-plugin-helper/icon.tsx +39 -0
  42. package/client/vendor/paseo-plugin-helper/index.ts +28 -0
  43. package/client/vendor/paseo-plugin-helper/layout/ActionBar.tsx +49 -0
  44. package/client/vendor/paseo-plugin-helper/layout/FormRow.tsx +103 -0
  45. package/client/vendor/paseo-plugin-helper/layout/Grid.tsx +65 -0
  46. package/client/vendor/paseo-plugin-helper/layout/ModalBody.tsx +378 -0
  47. package/client/vendor/paseo-plugin-helper/layout/ModalContent.tsx +49 -0
  48. package/client/vendor/paseo-plugin-helper/layout/Row.tsx +39 -0
  49. package/client/vendor/paseo-plugin-helper/layout/Stack.tsx +39 -0
  50. package/client/vendor/paseo-plugin-helper/layout/index.ts +7 -0
  51. package/client/vendor/paseo-plugin-helper/panel.tsx +81 -0
  52. package/client/vendor/paseo-plugin-helper/pill.tsx +884 -0
  53. package/client/vendor/paseo-plugin-helper/query-refresh.ts +79 -0
  54. package/client/vendor/paseo-plugin-helper/query.ts +66 -0
  55. package/client/vendor/paseo-plugin-helper/settings-screen.tsx +372 -0
  56. package/client/vendor/paseo-plugin-helper/settings.ts +181 -0
  57. package/client/vendor/paseo-plugin-helper/shared-settings.ts +46 -0
  58. package/client/vendor/paseo-plugin-helper/snapshot.ts +68 -0
  59. package/client/vendor/paseo-plugin-helper/surface.tsx +80 -0
  60. package/client/vendor/paseo-plugin-helper/theme/color-utils.ts +118 -0
  61. package/client/vendor/paseo-plugin-helper/theme/flair.ts +76 -0
  62. package/client/vendor/paseo-plugin-helper/theme/host-variables.ts +121 -0
  63. package/client/vendor/paseo-plugin-helper/theme/index.ts +7 -0
  64. package/client/vendor/paseo-plugin-helper/theme/provider.tsx +214 -0
  65. package/client/vendor/paseo-plugin-helper/theme/responsive.ts +213 -0
  66. package/client/vendor/paseo-plugin-helper/theme/tokens.ts +161 -0
  67. package/client/vendor/paseo-plugin-helper/theme/useResponsive.ts +57 -0
  68. package/client/vendor/paseo-plugin-helper/utils/clipboard.ts +149 -0
  69. package/client/vendor/paseo-plugin-helper/utils/haptics.ts +34 -0
  70. package/client/webhook-card.tsx +198 -0
  71. package/docs/specs/forge-workflow-gui.md +820 -0
  72. package/docs/workflow.md +339 -0
  73. package/examples/README.md +108 -0
  74. package/examples/hook-service/README.md +66 -0
  75. package/examples/hook-service/forge-hook.service +28 -0
  76. package/examples/hook-service/hook-server.mjs +265 -0
  77. package/examples/hook-service/hook.env.example +21 -0
  78. package/examples/labels/README.md +64 -0
  79. package/examples/labels/label-base.yaml +117 -0
  80. package/examples/skills/coding-agent/SKILL.md +262 -0
  81. package/examples/skills/coding-agent-fgjx/SKILL.md +271 -0
  82. package/examples/skills/orchestrator/SKILL.md +133 -0
  83. package/examples/skills/orchestrator-fgjx/SKILL.md +139 -0
  84. package/examples/tools/README.md +68 -0
  85. package/examples/tools/fgjx +464 -0
  86. package/package.json +38 -0
  87. package/paseo-plugin.json +4 -0
  88. package/server/forge-client.ts +484 -0
  89. package/server/forge-guard.ts +70 -0
  90. package/server/git-origin.ts +70 -0
  91. package/server/hook-queue.ts +127 -0
  92. package/server/issues.ts +542 -0
  93. package/server/settings.ts +52 -0
  94. package/server/vendor/paseo-plugin-helper/agent.ts +85 -0
  95. package/server/vendor/paseo-plugin-helper/custom-pills.ts +344 -0
  96. package/server/vendor/paseo-plugin-helper/index.ts +18 -0
  97. package/server/vendor/paseo-plugin-helper/jsonc.ts +78 -0
  98. package/server/vendor/paseo-plugin-helper/logger.ts +210 -0
  99. package/server/vendor/paseo-plugin-helper/mcp-config.ts +367 -0
  100. package/server/vendor/paseo-plugin-helper/mcp-injection.ts +85 -0
  101. package/server/vendor/paseo-plugin-helper/network.ts +91 -0
  102. package/server/vendor/paseo-plugin-helper/plugins.ts +160 -0
  103. package/server/vendor/paseo-plugin-helper/process.ts +186 -0
  104. package/server/vendor/paseo-plugin-helper/redact.ts +86 -0
  105. package/server/vendor/paseo-plugin-helper/rpc-guard.ts +77 -0
  106. package/server/vendor/paseo-plugin-helper/settings.ts +97 -0
  107. package/server/vendor/paseo-plugin-helper/shared-settings.ts +243 -0
  108. package/server/vendor/paseo-plugin-helper/storage.ts +244 -0
  109. package/server/vendor/paseo-plugin-helper/system.ts +128 -0
  110. package/server/vendor/paseo-plugin-helper/task.ts +116 -0
  111. package/server/vendor/paseo-plugin-helper/version.ts +153 -0
  112. package/server/vendor/paseo-plugin-helper/workspace-beacon.ts +418 -0
  113. package/shared/hook-queue.ts +140 -0
  114. package/shared/issues.ts +1750 -0
  115. package/shared/vendor/paseo-plugin-helper/README.md +11 -0
  116. package/shared/vendor/paseo-plugin-helper/async.ts +35 -0
  117. package/shared/vendor/paseo-plugin-helper/custom-pills.ts +169 -0
  118. package/shared/vendor/paseo-plugin-helper/forge.ts +110 -0
  119. package/shared/vendor/paseo-plugin-helper/formatters.ts +271 -0
  120. package/shared/vendor/paseo-plugin-helper/highlight.ts +184 -0
  121. package/shared/vendor/paseo-plugin-helper/index.ts +10 -0
  122. package/shared/vendor/paseo-plugin-helper/rpc.ts +72 -0
  123. package/shared/vendor/paseo-plugin-helper/settings.ts +138 -0
  124. package/shared/vendor/paseo-plugin-helper/suite-settings.ts +17 -0
  125. package/shared/vendor/paseo-plugin-helper/suppressed.ts +31 -0
  126. package/shared/vendor/paseo-plugin-helper/types.ts +36 -0
  127. package/shared/version.ts +2 -0
  128. package/shared/webhook.ts +223 -0
@@ -0,0 +1,140 @@
1
+ import { z } from "zod";
2
+ import { defineContract } from "paseo-plugin-helper/shared";
3
+
4
+ export const HookQueueMessageSchema = z.object({
5
+ id: z.string(),
6
+ ts: z.number().nullable().optional(),
7
+ preview: z.string(),
8
+ });
9
+ export type HookQueueMessage = z.infer<typeof HookQueueMessageSchema>;
10
+
11
+ export const HookQueueItemSchema = z.object({
12
+ key: z.string(),
13
+ depth: z.number(),
14
+ dropped: z.number().default(0),
15
+ paused: z.boolean(),
16
+ isBusy: z.boolean(),
17
+ busyAttempts: z.number().default(0),
18
+ orchestrator: z
19
+ .object({
20
+ agentId: z.string().nullable().optional(),
21
+ updatedAt: z.string().optional(),
22
+ by: z.string().optional(),
23
+ })
24
+ .nullable()
25
+ .optional(),
26
+ messages: z.array(HookQueueMessageSchema).default([]),
27
+ });
28
+ export type HookQueueItem = z.infer<typeof HookQueueItemSchema>;
29
+
30
+ export const HookFrontDeskSchema = z
31
+ .object({
32
+ version: z.number().optional(),
33
+ agentId: z.string().nullable().optional(),
34
+ updatedAt: z.string().optional(),
35
+ by: z.string().optional(),
36
+ })
37
+ .nullable()
38
+ .optional();
39
+ export type HookFrontDesk = z.infer<typeof HookFrontDeskSchema>;
40
+
41
+ export const HookStatusOutputSchema = z.object({
42
+ ok: z.boolean(),
43
+ service: z.string().optional(),
44
+ version: z.number().optional(),
45
+ uptime: z.number().optional(),
46
+ frontDesk: HookFrontDeskSchema,
47
+ paused: z.array(z.string()).default([]),
48
+ totalQueued: z.number().default(0),
49
+ repoCount: z.number().default(0),
50
+ error: z.string().optional(),
51
+ });
52
+ export type HookStatusOutput = z.infer<typeof HookStatusOutputSchema>;
53
+
54
+ export const HookQueuesOutputSchema = z.object({
55
+ ok: z.boolean(),
56
+ service: z.string().optional(),
57
+ version: z.number().optional(),
58
+ uptime: z.number().optional(),
59
+ frontDesk: HookFrontDeskSchema,
60
+ paused: z.array(z.string()).default([]),
61
+ queues: z.array(HookQueueItemSchema).default([]),
62
+ error: z.string().optional(),
63
+ });
64
+ export type HookQueuesOutput = z.infer<typeof HookQueuesOutputSchema>;
65
+
66
+ export const HookPauseInputSchema = z.object({
67
+ hookUrl: z.string().optional(),
68
+ repo: z.string().optional(),
69
+ });
70
+ export type HookPauseInput = z.infer<typeof HookPauseInputSchema>;
71
+
72
+ export const HookPauseOutputSchema = z.object({
73
+ ok: z.boolean(),
74
+ paused: z.string().optional(),
75
+ allPaused: z.array(z.string()).default([]),
76
+ error: z.string().optional(),
77
+ });
78
+ export type HookPauseOutput = z.infer<typeof HookPauseOutputSchema>;
79
+
80
+ export const HookResumeInputSchema = z.object({
81
+ hookUrl: z.string().optional(),
82
+ repo: z.string().optional(),
83
+ });
84
+ export type HookResumeInput = z.infer<typeof HookResumeInputSchema>;
85
+
86
+ export const HookResumeOutputSchema = z.object({
87
+ ok: z.boolean(),
88
+ resumed: z.string().optional(),
89
+ allPaused: z.array(z.string()).default([]),
90
+ error: z.string().optional(),
91
+ });
92
+ export type HookResumeOutput = z.infer<typeof HookResumeOutputSchema>;
93
+
94
+ export const HookDrainInputSchema = z.object({
95
+ hookUrl: z.string().optional(),
96
+ repo: z.string().optional(),
97
+ });
98
+ export type HookDrainInput = z.infer<typeof HookDrainInputSchema>;
99
+
100
+ export const HookDrainOutputSchema = z.object({
101
+ ok: z.boolean(),
102
+ draining: z.string().optional(),
103
+ error: z.string().optional(),
104
+ });
105
+ export type HookDrainOutput = z.infer<typeof HookDrainOutputSchema>;
106
+
107
+ export const hookStatusContract = defineContract({
108
+ name: "forge.hook-status",
109
+ description: "Read overall status and front desk registration from the forgejo-hook daemon",
110
+ input: z.object({ hookUrl: z.string().optional() }),
111
+ output: HookStatusOutputSchema,
112
+ });
113
+
114
+ export const hookQueuesContract = defineContract({
115
+ name: "forge.hook-queues",
116
+ description: "Read all repo queues, depths, orchestrators, and messages from the forgejo-hook daemon",
117
+ input: z.object({ hookUrl: z.string().optional() }),
118
+ output: HookQueuesOutputSchema,
119
+ });
120
+
121
+ export const hookPauseContract = defineContract({
122
+ name: "forge.hook-pause",
123
+ description: "Pause queue delivery for a specific repo or all repos",
124
+ input: HookPauseInputSchema,
125
+ output: HookPauseOutputSchema,
126
+ });
127
+
128
+ export const hookResumeContract = defineContract({
129
+ name: "forge.hook-resume",
130
+ description: "Resume queue delivery for a specific repo or all repos",
131
+ input: HookResumeInputSchema,
132
+ output: HookResumeOutputSchema,
133
+ });
134
+
135
+ export const hookDrainContract = defineContract({
136
+ name: "forge.hook-drain",
137
+ description: "Force immediate queue drain for a specific repo or all repos",
138
+ input: HookDrainInputSchema,
139
+ output: HookDrainOutputSchema,
140
+ });