@moxxy/agent-cli 0.0.2 → 0.0.3
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.
- package/dist/chunk-HMEDKSSW.mjs +2104 -0
- package/dist/cli-7CFDLTKN.mjs +6 -0
- package/dist/index.js +531 -3
- package/dist/index.mjs +2 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1650,6 +1650,534 @@ var init_pr = __esm({
|
|
|
1650
1650
|
}
|
|
1651
1651
|
});
|
|
1652
1652
|
|
|
1653
|
+
// ../types/dist/index.mjs
|
|
1654
|
+
var import_zod, import_zod2, import_zod3, import_zod4, import_zod5, import_zod6, import_zod7, import_zod8, import_zod9, import_zod10, import_zod11, uuidSchema, timestampSchema, paginationSchema, activityTypeSchema, taskActivitySchema, createActivitySchema, agentStatusSchema, agentTypeSchema, agentCapabilitySchema, agentIdentitySchema, agentModelConfigSchema, agentSchema, createAgentSchema, updateAgentSchema, taskFiltersSchema, INTEGRATION_TYPES, NOTIFICATION_EVENTS, createIntegrationSchema, updateIntegrationSchema, projectStatusSchema, workflowModeSchema, validationSettingsSchema, workflowSettingsSchema, prdStatusSchema, prdTemplateSchema, prdTaskSchema, projectSchema, generatePRDInputSchema, importPRDTasksInputSchema, updatePRDInputSchema, createProjectSchema, updateProjectSchema, taskStatusSchema, taskTypeSchema, taskPrioritySchema, agentNoteTypeSchema, agentNoteSchema, taskSchema, createTaskSchema, updateTaskSchema, clientEventTypeSchema, serverEventTypeSchema, gatewayConfigSchema, githubAuthConfigSchema, webhookServerConfigSchema, watchedRepoSchema, agentRunConfigSchema, sdkProviderSchema, claudeConfigSchema, moxxyConfigSchema, agentCommandResultSchema, argDefSchema, optionDefSchema, agentCLICommandDefSchema, workflowStepSchema, workflowSchema, workflowStepResultSchema, workflowResultSchema, githubIssuePayloadSchema, ISSUE_TYPES, ISSUE_PRIORITIES, ISSUE_COMPLEXITIES, issueClassificationSchema, PIPELINE_STAGES, PIPELINE_STATUSES, pipelineStageResultSchema, pipelineRunSchema;
|
|
1655
|
+
var init_dist = __esm({
|
|
1656
|
+
"../types/dist/index.mjs"() {
|
|
1657
|
+
"use strict";
|
|
1658
|
+
import_zod = require("zod");
|
|
1659
|
+
import_zod2 = require("zod");
|
|
1660
|
+
import_zod3 = require("zod");
|
|
1661
|
+
import_zod4 = require("zod");
|
|
1662
|
+
import_zod5 = require("zod");
|
|
1663
|
+
import_zod6 = require("zod");
|
|
1664
|
+
import_zod7 = require("zod");
|
|
1665
|
+
import_zod8 = require("zod");
|
|
1666
|
+
import_zod9 = require("zod");
|
|
1667
|
+
import_zod10 = require("zod");
|
|
1668
|
+
import_zod11 = require("zod");
|
|
1669
|
+
uuidSchema = import_zod2.z.string().uuid();
|
|
1670
|
+
timestampSchema = import_zod2.z.number().int().positive();
|
|
1671
|
+
paginationSchema = import_zod2.z.object({
|
|
1672
|
+
page: import_zod2.z.number().int().positive().optional().default(1),
|
|
1673
|
+
limit: import_zod2.z.number().int().positive().max(100).optional().default(20),
|
|
1674
|
+
orderBy: import_zod2.z.string().optional(),
|
|
1675
|
+
order: import_zod2.z.enum(["asc", "desc"]).optional().default("desc")
|
|
1676
|
+
});
|
|
1677
|
+
activityTypeSchema = import_zod.z.enum([
|
|
1678
|
+
"created",
|
|
1679
|
+
"assigned",
|
|
1680
|
+
"status_change",
|
|
1681
|
+
"comment",
|
|
1682
|
+
"commit",
|
|
1683
|
+
"pr_created",
|
|
1684
|
+
"pr_merged",
|
|
1685
|
+
"pr_closed"
|
|
1686
|
+
]);
|
|
1687
|
+
taskActivitySchema = import_zod.z.object({
|
|
1688
|
+
id: uuidSchema,
|
|
1689
|
+
taskId: uuidSchema,
|
|
1690
|
+
agentId: uuidSchema.nullable(),
|
|
1691
|
+
activityType: activityTypeSchema,
|
|
1692
|
+
description: import_zod.z.string().max(500),
|
|
1693
|
+
metadata: import_zod.z.record(import_zod.z.any()),
|
|
1694
|
+
createdAt: timestampSchema
|
|
1695
|
+
});
|
|
1696
|
+
createActivitySchema = import_zod.z.object({
|
|
1697
|
+
taskId: uuidSchema,
|
|
1698
|
+
agentId: uuidSchema.nullable().optional(),
|
|
1699
|
+
activityType: activityTypeSchema,
|
|
1700
|
+
description: import_zod.z.string().max(500),
|
|
1701
|
+
metadata: import_zod.z.record(import_zod.z.any()).optional().default({})
|
|
1702
|
+
});
|
|
1703
|
+
agentStatusSchema = import_zod3.z.enum(["available", "busy", "offline"]);
|
|
1704
|
+
agentTypeSchema = import_zod3.z.enum([
|
|
1705
|
+
"developer",
|
|
1706
|
+
"prd",
|
|
1707
|
+
"code-review",
|
|
1708
|
+
"orchestrator",
|
|
1709
|
+
"custom"
|
|
1710
|
+
]);
|
|
1711
|
+
agentCapabilitySchema = import_zod3.z.enum([
|
|
1712
|
+
"frontend",
|
|
1713
|
+
"backend",
|
|
1714
|
+
"fullstack",
|
|
1715
|
+
"devops",
|
|
1716
|
+
"testing",
|
|
1717
|
+
"documentation"
|
|
1718
|
+
]);
|
|
1719
|
+
agentIdentitySchema = import_zod3.z.object({
|
|
1720
|
+
/** Display name for the agent (persona name) */
|
|
1721
|
+
displayName: import_zod3.z.string().max(100).optional(),
|
|
1722
|
+
/** Theme/persona description */
|
|
1723
|
+
theme: import_zod3.z.string().max(500).optional(),
|
|
1724
|
+
/** Emoji representation */
|
|
1725
|
+
emoji: import_zod3.z.string().max(10).optional(),
|
|
1726
|
+
/** Avatar path or URL */
|
|
1727
|
+
avatar: import_zod3.z.string().url().optional().or(import_zod3.z.string().max(0)),
|
|
1728
|
+
/** Custom system prompt */
|
|
1729
|
+
systemPrompt: import_zod3.z.string().max(1e4).optional()
|
|
1730
|
+
});
|
|
1731
|
+
agentModelConfigSchema = import_zod3.z.object({
|
|
1732
|
+
/** Primary model (provider/model format) */
|
|
1733
|
+
primary: import_zod3.z.string().optional(),
|
|
1734
|
+
/** Fallback models in order of preference */
|
|
1735
|
+
fallbacks: import_zod3.z.array(import_zod3.z.string()).optional()
|
|
1736
|
+
});
|
|
1737
|
+
agentSchema = import_zod3.z.object({
|
|
1738
|
+
id: uuidSchema,
|
|
1739
|
+
name: import_zod3.z.string().min(1).max(100),
|
|
1740
|
+
moltAgentId: import_zod3.z.string().min(1),
|
|
1741
|
+
githubToken: import_zod3.z.string().min(1),
|
|
1742
|
+
githubUsername: import_zod3.z.string().min(1),
|
|
1743
|
+
workspace: import_zod3.z.string().min(1),
|
|
1744
|
+
capabilities: import_zod3.z.array(agentCapabilitySchema),
|
|
1745
|
+
status: agentStatusSchema,
|
|
1746
|
+
currentTaskId: uuidSchema.nullable(),
|
|
1747
|
+
agentType: agentTypeSchema.optional(),
|
|
1748
|
+
identity: agentIdentitySchema.optional(),
|
|
1749
|
+
modelConfig: agentModelConfigSchema.optional(),
|
|
1750
|
+
projectId: uuidSchema.optional(),
|
|
1751
|
+
lastSyncAt: timestampSchema,
|
|
1752
|
+
createdAt: timestampSchema,
|
|
1753
|
+
updatedAt: timestampSchema
|
|
1754
|
+
});
|
|
1755
|
+
createAgentSchema = import_zod3.z.object({
|
|
1756
|
+
name: import_zod3.z.string().min(1).max(100),
|
|
1757
|
+
githubToken: import_zod3.z.string().min(1),
|
|
1758
|
+
githubUsername: import_zod3.z.string().min(1),
|
|
1759
|
+
capabilities: import_zod3.z.array(agentCapabilitySchema).min(1),
|
|
1760
|
+
workspace: import_zod3.z.string().min(1),
|
|
1761
|
+
/** Agent type for specialized behaviors */
|
|
1762
|
+
agentType: agentTypeSchema.optional(),
|
|
1763
|
+
/** Agent identity/persona configuration */
|
|
1764
|
+
identity: agentIdentitySchema.optional()
|
|
1765
|
+
});
|
|
1766
|
+
updateAgentSchema = import_zod3.z.object({
|
|
1767
|
+
name: import_zod3.z.string().min(1).max(100).optional(),
|
|
1768
|
+
status: agentStatusSchema.optional(),
|
|
1769
|
+
workspace: import_zod3.z.string().min(1).optional(),
|
|
1770
|
+
capabilities: import_zod3.z.array(agentCapabilitySchema).optional(),
|
|
1771
|
+
/** Agent type for specialized behaviors */
|
|
1772
|
+
agentType: agentTypeSchema.optional(),
|
|
1773
|
+
/** Agent identity/persona configuration */
|
|
1774
|
+
identity: agentIdentitySchema.optional(),
|
|
1775
|
+
/** Model configuration update */
|
|
1776
|
+
modelConfig: agentModelConfigSchema.optional(),
|
|
1777
|
+
/** Update GitHub PAT token */
|
|
1778
|
+
githubToken: import_zod3.z.string().min(1).optional(),
|
|
1779
|
+
/** Update GitHub username */
|
|
1780
|
+
githubUsername: import_zod3.z.string().min(1).optional()
|
|
1781
|
+
});
|
|
1782
|
+
taskFiltersSchema = import_zod4.z.object({
|
|
1783
|
+
projectId: import_zod4.z.string().uuid().optional(),
|
|
1784
|
+
status: import_zod4.z.string().optional(),
|
|
1785
|
+
type: import_zod4.z.string().optional(),
|
|
1786
|
+
priority: import_zod4.z.string().optional(),
|
|
1787
|
+
assignedAgentId: import_zod4.z.string().uuid().optional()
|
|
1788
|
+
});
|
|
1789
|
+
INTEGRATION_TYPES = ["slack", "discord", "email", "github"];
|
|
1790
|
+
NOTIFICATION_EVENTS = [
|
|
1791
|
+
"task:created",
|
|
1792
|
+
"task:completed",
|
|
1793
|
+
"task:failed",
|
|
1794
|
+
"task:assigned",
|
|
1795
|
+
"task:status_changed",
|
|
1796
|
+
"agent:status_changed",
|
|
1797
|
+
"pr:created",
|
|
1798
|
+
"pr:merged"
|
|
1799
|
+
];
|
|
1800
|
+
createIntegrationSchema = import_zod5.z.object({
|
|
1801
|
+
type: import_zod5.z.enum(INTEGRATION_TYPES),
|
|
1802
|
+
name: import_zod5.z.string().min(1).max(100),
|
|
1803
|
+
enabled: import_zod5.z.boolean().optional().default(false),
|
|
1804
|
+
config: import_zod5.z.record(import_zod5.z.unknown()),
|
|
1805
|
+
enabledEvents: import_zod5.z.array(import_zod5.z.enum(NOTIFICATION_EVENTS)).optional().default([])
|
|
1806
|
+
});
|
|
1807
|
+
updateIntegrationSchema = import_zod5.z.object({
|
|
1808
|
+
name: import_zod5.z.string().min(1).max(100).optional(),
|
|
1809
|
+
enabled: import_zod5.z.boolean().optional(),
|
|
1810
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).optional(),
|
|
1811
|
+
enabledEvents: import_zod5.z.array(import_zod5.z.enum(NOTIFICATION_EVENTS)).optional()
|
|
1812
|
+
});
|
|
1813
|
+
projectStatusSchema = import_zod6.z.enum(["active", "archived", "paused"]);
|
|
1814
|
+
workflowModeSchema = import_zod6.z.enum(["manual", "automatic"]);
|
|
1815
|
+
validationSettingsSchema = import_zod6.z.object({
|
|
1816
|
+
runInstall: import_zod6.z.boolean().optional(),
|
|
1817
|
+
runTests: import_zod6.z.boolean().optional(),
|
|
1818
|
+
runBuild: import_zod6.z.boolean().optional(),
|
|
1819
|
+
runLint: import_zod6.z.boolean().optional(),
|
|
1820
|
+
blockOnFailure: import_zod6.z.boolean().optional(),
|
|
1821
|
+
installCommand: import_zod6.z.string().max(500).optional(),
|
|
1822
|
+
testCommand: import_zod6.z.string().max(500).optional(),
|
|
1823
|
+
buildCommand: import_zod6.z.string().max(500).optional(),
|
|
1824
|
+
lintCommand: import_zod6.z.string().max(500).optional(),
|
|
1825
|
+
maxRetries: import_zod6.z.number().int().min(0).max(100).optional(),
|
|
1826
|
+
preferSameAgent: import_zod6.z.boolean().optional(),
|
|
1827
|
+
timeout: import_zod6.z.number().int().min(1e3).max(36e5).optional()
|
|
1828
|
+
// 1s to 1h
|
|
1829
|
+
});
|
|
1830
|
+
workflowSettingsSchema = import_zod6.z.object({
|
|
1831
|
+
mode: workflowModeSchema,
|
|
1832
|
+
previewBranch: import_zod6.z.string().min(1).max(100),
|
|
1833
|
+
autoMerge: import_zod6.z.boolean().optional(),
|
|
1834
|
+
validation: validationSettingsSchema.optional()
|
|
1835
|
+
});
|
|
1836
|
+
prdStatusSchema = import_zod6.z.enum([
|
|
1837
|
+
"idle",
|
|
1838
|
+
"generating",
|
|
1839
|
+
"completed",
|
|
1840
|
+
"failed",
|
|
1841
|
+
"tasks_generating",
|
|
1842
|
+
"tasks_completed",
|
|
1843
|
+
"tasks_failed"
|
|
1844
|
+
]);
|
|
1845
|
+
prdTemplateSchema = import_zod6.z.enum(["mobile", "web", "api", "feature", "data-pipeline"]);
|
|
1846
|
+
prdTaskSchema = import_zod6.z.object({
|
|
1847
|
+
id: import_zod6.z.string(),
|
|
1848
|
+
prdId: import_zod6.z.string(),
|
|
1849
|
+
step: import_zod6.z.number(),
|
|
1850
|
+
title: import_zod6.z.string(),
|
|
1851
|
+
description: import_zod6.z.string(),
|
|
1852
|
+
status: import_zod6.z.enum(["todo", "in_progress", "done", "blocked"]),
|
|
1853
|
+
priority: import_zod6.z.enum(["P0", "P1", "P2"]),
|
|
1854
|
+
estimatedHours: import_zod6.z.number().optional(),
|
|
1855
|
+
phase: import_zod6.z.enum(["discovery", "design", "development", "testing", "deployment"]).optional(),
|
|
1856
|
+
createdAt: import_zod6.z.string(),
|
|
1857
|
+
updatedAt: import_zod6.z.string(),
|
|
1858
|
+
completedAt: import_zod6.z.string().optional()
|
|
1859
|
+
});
|
|
1860
|
+
projectSchema = import_zod6.z.object({
|
|
1861
|
+
id: uuidSchema,
|
|
1862
|
+
name: import_zod6.z.string().min(1).max(100),
|
|
1863
|
+
description: import_zod6.z.string().max(500),
|
|
1864
|
+
githubRepoUrl: import_zod6.z.string().url(),
|
|
1865
|
+
githubOwner: import_zod6.z.string().min(1),
|
|
1866
|
+
githubRepo: import_zod6.z.string().min(1),
|
|
1867
|
+
status: projectStatusSchema,
|
|
1868
|
+
defaultBranch: import_zod6.z.string().min(1).max(100).optional(),
|
|
1869
|
+
workflowSettings: workflowSettingsSchema.optional(),
|
|
1870
|
+
assignedAgentIds: import_zod6.z.array(uuidSchema).optional(),
|
|
1871
|
+
prd: import_zod6.z.string().optional(),
|
|
1872
|
+
prdGeneratedAt: timestampSchema.optional(),
|
|
1873
|
+
prdStatus: prdStatusSchema.optional(),
|
|
1874
|
+
prdError: import_zod6.z.string().optional(),
|
|
1875
|
+
prdTemplate: prdTemplateSchema.optional(),
|
|
1876
|
+
prdTasks: import_zod6.z.array(prdTaskSchema).optional(),
|
|
1877
|
+
createdAt: timestampSchema,
|
|
1878
|
+
updatedAt: timestampSchema
|
|
1879
|
+
});
|
|
1880
|
+
generatePRDInputSchema = import_zod6.z.object({
|
|
1881
|
+
template: prdTemplateSchema.optional().default("feature")
|
|
1882
|
+
});
|
|
1883
|
+
importPRDTasksInputSchema = import_zod6.z.object({
|
|
1884
|
+
tasks: import_zod6.z.array(
|
|
1885
|
+
import_zod6.z.object({
|
|
1886
|
+
title: import_zod6.z.string(),
|
|
1887
|
+
description: import_zod6.z.string(),
|
|
1888
|
+
priority: import_zod6.z.enum(["P0", "P1", "P2"]).optional(),
|
|
1889
|
+
estimatedHours: import_zod6.z.number().optional(),
|
|
1890
|
+
phase: import_zod6.z.string().optional()
|
|
1891
|
+
})
|
|
1892
|
+
),
|
|
1893
|
+
taskType: import_zod6.z.enum(["feature", "bug", "research", "refactor", "documentation"])
|
|
1894
|
+
});
|
|
1895
|
+
updatePRDInputSchema = import_zod6.z.object({
|
|
1896
|
+
prd: import_zod6.z.string()
|
|
1897
|
+
});
|
|
1898
|
+
createProjectSchema = import_zod6.z.object({
|
|
1899
|
+
name: import_zod6.z.string().min(1).max(100),
|
|
1900
|
+
description: import_zod6.z.string().max(500),
|
|
1901
|
+
githubRepoUrl: import_zod6.z.string().url()
|
|
1902
|
+
});
|
|
1903
|
+
updateProjectSchema = import_zod6.z.object({
|
|
1904
|
+
name: import_zod6.z.string().min(1).max(100).optional(),
|
|
1905
|
+
description: import_zod6.z.string().max(500).optional(),
|
|
1906
|
+
status: projectStatusSchema.optional(),
|
|
1907
|
+
defaultBranch: import_zod6.z.string().min(1).max(100).optional(),
|
|
1908
|
+
workflowSettings: workflowSettingsSchema.optional()
|
|
1909
|
+
});
|
|
1910
|
+
taskStatusSchema = import_zod7.z.enum(["todo", "in_progress", "review", "done", "blocked"]);
|
|
1911
|
+
taskTypeSchema = import_zod7.z.enum(["feature", "bug", "research", "refactor", "documentation"]);
|
|
1912
|
+
taskPrioritySchema = import_zod7.z.enum(["low", "medium", "high", "urgent"]);
|
|
1913
|
+
agentNoteTypeSchema = import_zod7.z.enum([
|
|
1914
|
+
"progress",
|
|
1915
|
+
"summary",
|
|
1916
|
+
"error",
|
|
1917
|
+
"completion",
|
|
1918
|
+
"feedback"
|
|
1919
|
+
]);
|
|
1920
|
+
agentNoteSchema = import_zod7.z.object({
|
|
1921
|
+
id: uuidSchema,
|
|
1922
|
+
agentId: uuidSchema,
|
|
1923
|
+
agentName: import_zod7.z.string(),
|
|
1924
|
+
content: import_zod7.z.string(),
|
|
1925
|
+
type: agentNoteTypeSchema,
|
|
1926
|
+
createdAt: timestampSchema,
|
|
1927
|
+
isUserFeedback: import_zod7.z.boolean().optional()
|
|
1928
|
+
});
|
|
1929
|
+
taskSchema = import_zod7.z.object({
|
|
1930
|
+
id: uuidSchema,
|
|
1931
|
+
projectId: uuidSchema,
|
|
1932
|
+
title: import_zod7.z.string().min(1).max(200),
|
|
1933
|
+
description: import_zod7.z.string().max(2e3),
|
|
1934
|
+
type: taskTypeSchema,
|
|
1935
|
+
status: taskStatusSchema,
|
|
1936
|
+
priority: taskPrioritySchema,
|
|
1937
|
+
position: import_zod7.z.number().int().default(0),
|
|
1938
|
+
// Manual ordering within status
|
|
1939
|
+
assignedAgentId: uuidSchema.nullable(),
|
|
1940
|
+
autoAssign: import_zod7.z.boolean().default(true),
|
|
1941
|
+
// Whether agents should auto-pick this task
|
|
1942
|
+
agentNotes: import_zod7.z.array(agentNoteSchema).default([]),
|
|
1943
|
+
githubIssueNumber: import_zod7.z.number().int().positive().nullable(),
|
|
1944
|
+
githubPrNumber: import_zod7.z.number().int().positive().nullable(),
|
|
1945
|
+
metadata: import_zod7.z.record(import_zod7.z.any()),
|
|
1946
|
+
blockedBy: import_zod7.z.array(uuidSchema).default([]),
|
|
1947
|
+
// Task IDs that must be completed before this task
|
|
1948
|
+
blocking: import_zod7.z.array(uuidSchema).default([]),
|
|
1949
|
+
// Task IDs that depend on this task
|
|
1950
|
+
createdAt: timestampSchema,
|
|
1951
|
+
updatedAt: timestampSchema,
|
|
1952
|
+
completedAt: timestampSchema.nullable()
|
|
1953
|
+
});
|
|
1954
|
+
createTaskSchema = import_zod7.z.object({
|
|
1955
|
+
projectId: uuidSchema,
|
|
1956
|
+
title: import_zod7.z.string().min(1).max(200),
|
|
1957
|
+
description: import_zod7.z.string().max(2e3),
|
|
1958
|
+
type: taskTypeSchema,
|
|
1959
|
+
priority: taskPrioritySchema.optional().default("medium"),
|
|
1960
|
+
assignedAgentId: uuidSchema.optional(),
|
|
1961
|
+
// Optional agent to assign on creation
|
|
1962
|
+
autoAssign: import_zod7.z.boolean().optional().default(true),
|
|
1963
|
+
// Auto-assign to agents (default: true)
|
|
1964
|
+
blockedBy: import_zod7.z.array(uuidSchema).optional()
|
|
1965
|
+
// Task IDs that must be completed before this task
|
|
1966
|
+
});
|
|
1967
|
+
updateTaskSchema = import_zod7.z.object({
|
|
1968
|
+
title: import_zod7.z.string().min(1).max(200).optional(),
|
|
1969
|
+
description: import_zod7.z.string().max(2e3).optional(),
|
|
1970
|
+
type: taskTypeSchema.optional(),
|
|
1971
|
+
status: taskStatusSchema.optional(),
|
|
1972
|
+
priority: taskPrioritySchema.optional(),
|
|
1973
|
+
position: import_zod7.z.number().int().optional(),
|
|
1974
|
+
// Manual ordering within status
|
|
1975
|
+
assignedAgentId: uuidSchema.nullable().optional(),
|
|
1976
|
+
autoAssign: import_zod7.z.boolean().optional(),
|
|
1977
|
+
// Whether agents should auto-pick this task
|
|
1978
|
+
githubIssueNumber: import_zod7.z.number().int().positive().nullable().optional(),
|
|
1979
|
+
githubPrNumber: import_zod7.z.number().int().positive().nullable().optional(),
|
|
1980
|
+
metadata: import_zod7.z.record(import_zod7.z.any()).optional(),
|
|
1981
|
+
blockedBy: import_zod7.z.array(uuidSchema).optional()
|
|
1982
|
+
// Task IDs that must be completed before this task
|
|
1983
|
+
});
|
|
1984
|
+
clientEventTypeSchema = import_zod8.z.enum([
|
|
1985
|
+
"subscribe:project",
|
|
1986
|
+
"unsubscribe:project",
|
|
1987
|
+
"subscribe:task",
|
|
1988
|
+
"unsubscribe:task"
|
|
1989
|
+
]);
|
|
1990
|
+
serverEventTypeSchema = import_zod8.z.enum([
|
|
1991
|
+
"task:created",
|
|
1992
|
+
"task:updated",
|
|
1993
|
+
"task:status_changed",
|
|
1994
|
+
"task:assigned",
|
|
1995
|
+
"task:progress",
|
|
1996
|
+
"task:stream",
|
|
1997
|
+
"task:note_added",
|
|
1998
|
+
"task:execution_cancelled",
|
|
1999
|
+
"task:dependencies_updated",
|
|
2000
|
+
"tasks:reordered",
|
|
2001
|
+
"agent:created",
|
|
2002
|
+
"agent:updated",
|
|
2003
|
+
"agent:status_changed",
|
|
2004
|
+
"agent:log",
|
|
2005
|
+
"activity:created",
|
|
2006
|
+
"project:updated",
|
|
2007
|
+
"project:prd_status_changed",
|
|
2008
|
+
"error"
|
|
2009
|
+
]);
|
|
2010
|
+
gatewayConfigSchema = import_zod9.z.object({
|
|
2011
|
+
url: import_zod9.z.string().url(),
|
|
2012
|
+
authToken: import_zod9.z.string().optional(),
|
|
2013
|
+
deviceId: import_zod9.z.string().optional(),
|
|
2014
|
+
devicePrivateKey: import_zod9.z.string().optional()
|
|
2015
|
+
});
|
|
2016
|
+
githubAuthConfigSchema = import_zod9.z.object({
|
|
2017
|
+
token: import_zod9.z.string(),
|
|
2018
|
+
webhookSecret: import_zod9.z.string().optional(),
|
|
2019
|
+
appId: import_zod9.z.string().optional(),
|
|
2020
|
+
privateKey: import_zod9.z.string().optional()
|
|
2021
|
+
});
|
|
2022
|
+
webhookServerConfigSchema = import_zod9.z.object({
|
|
2023
|
+
port: import_zod9.z.number().int().positive().default(3456),
|
|
2024
|
+
host: import_zod9.z.string().default("0.0.0.0"),
|
|
2025
|
+
path: import_zod9.z.string().default("/webhook/github")
|
|
2026
|
+
});
|
|
2027
|
+
watchedRepoSchema = import_zod9.z.object({
|
|
2028
|
+
owner: import_zod9.z.string(),
|
|
2029
|
+
repo: import_zod9.z.string(),
|
|
2030
|
+
defaultBranch: import_zod9.z.string().default("main"),
|
|
2031
|
+
enabledEvents: import_zod9.z.array(import_zod9.z.string()).default(["issues.opened", "issues.labeled"]),
|
|
2032
|
+
labels: import_zod9.z.array(import_zod9.z.string()).optional()
|
|
2033
|
+
});
|
|
2034
|
+
agentRunConfigSchema = import_zod9.z.object({
|
|
2035
|
+
moltAgentId: import_zod9.z.string().optional(),
|
|
2036
|
+
maxConcurrentTasks: import_zod9.z.number().int().positive().default(1)
|
|
2037
|
+
});
|
|
2038
|
+
sdkProviderSchema = import_zod9.z.enum(["molt", "claude"]).default("molt");
|
|
2039
|
+
claudeConfigSchema = import_zod9.z.object({
|
|
2040
|
+
apiKey: import_zod9.z.string().optional(),
|
|
2041
|
+
cliPath: import_zod9.z.string().default("claude"),
|
|
2042
|
+
model: import_zod9.z.string().default("claude-sonnet-4-5"),
|
|
2043
|
+
timeout: import_zod9.z.number().int().positive().default(3e5),
|
|
2044
|
+
permissionMode: import_zod9.z.string().default("default")
|
|
2045
|
+
});
|
|
2046
|
+
moxxyConfigSchema = import_zod9.z.object({
|
|
2047
|
+
version: import_zod9.z.number().int().positive().default(1),
|
|
2048
|
+
sdk: sdkProviderSchema,
|
|
2049
|
+
gateway: gatewayConfigSchema.optional(),
|
|
2050
|
+
github: githubAuthConfigSchema,
|
|
2051
|
+
webhook: webhookServerConfigSchema.optional(),
|
|
2052
|
+
repos: import_zod9.z.array(watchedRepoSchema).default([]),
|
|
2053
|
+
agent: agentRunConfigSchema.optional(),
|
|
2054
|
+
claude: claudeConfigSchema.optional()
|
|
2055
|
+
});
|
|
2056
|
+
agentCommandResultSchema = import_zod10.z.object({
|
|
2057
|
+
success: import_zod10.z.boolean(),
|
|
2058
|
+
command: import_zod10.z.string(),
|
|
2059
|
+
data: import_zod10.z.unknown().optional(),
|
|
2060
|
+
error: import_zod10.z.object({
|
|
2061
|
+
code: import_zod10.z.string(),
|
|
2062
|
+
message: import_zod10.z.string(),
|
|
2063
|
+
details: import_zod10.z.string().optional()
|
|
2064
|
+
}).optional(),
|
|
2065
|
+
duration_ms: import_zod10.z.number()
|
|
2066
|
+
});
|
|
2067
|
+
argDefSchema = import_zod10.z.object({
|
|
2068
|
+
name: import_zod10.z.string(),
|
|
2069
|
+
description: import_zod10.z.string(),
|
|
2070
|
+
required: import_zod10.z.boolean().default(false),
|
|
2071
|
+
type: import_zod10.z.enum(["string", "number", "boolean"]).default("string")
|
|
2072
|
+
});
|
|
2073
|
+
optionDefSchema = import_zod10.z.object({
|
|
2074
|
+
name: import_zod10.z.string(),
|
|
2075
|
+
short: import_zod10.z.string().optional(),
|
|
2076
|
+
description: import_zod10.z.string(),
|
|
2077
|
+
required: import_zod10.z.boolean().default(false),
|
|
2078
|
+
type: import_zod10.z.enum(["string", "number", "boolean"]).default("string"),
|
|
2079
|
+
defaultValue: import_zod10.z.unknown().optional()
|
|
2080
|
+
});
|
|
2081
|
+
agentCLICommandDefSchema = import_zod10.z.object({
|
|
2082
|
+
name: import_zod10.z.string(),
|
|
2083
|
+
description: import_zod10.z.string(),
|
|
2084
|
+
args: import_zod10.z.array(argDefSchema),
|
|
2085
|
+
options: import_zod10.z.array(optionDefSchema),
|
|
2086
|
+
examples: import_zod10.z.array(import_zod10.z.string())
|
|
2087
|
+
});
|
|
2088
|
+
workflowStepSchema = import_zod10.z.object({
|
|
2089
|
+
id: import_zod10.z.string(),
|
|
2090
|
+
plugin: import_zod10.z.string(),
|
|
2091
|
+
command: import_zod10.z.string(),
|
|
2092
|
+
args: import_zod10.z.record(import_zod10.z.unknown()),
|
|
2093
|
+
description: import_zod10.z.string(),
|
|
2094
|
+
dependsOn: import_zod10.z.array(import_zod10.z.string()).optional(),
|
|
2095
|
+
optional: import_zod10.z.boolean().optional()
|
|
2096
|
+
});
|
|
2097
|
+
workflowSchema = import_zod10.z.object({
|
|
2098
|
+
id: import_zod10.z.string(),
|
|
2099
|
+
name: import_zod10.z.string(),
|
|
2100
|
+
description: import_zod10.z.string(),
|
|
2101
|
+
steps: import_zod10.z.array(workflowStepSchema),
|
|
2102
|
+
context: import_zod10.z.record(import_zod10.z.unknown())
|
|
2103
|
+
});
|
|
2104
|
+
workflowStepResultSchema = import_zod10.z.object({
|
|
2105
|
+
stepId: import_zod10.z.string(),
|
|
2106
|
+
result: agentCommandResultSchema,
|
|
2107
|
+
skipped: import_zod10.z.boolean().default(false)
|
|
2108
|
+
});
|
|
2109
|
+
workflowResultSchema = import_zod10.z.object({
|
|
2110
|
+
workflowId: import_zod10.z.string(),
|
|
2111
|
+
success: import_zod10.z.boolean(),
|
|
2112
|
+
stepResults: import_zod10.z.array(workflowStepResultSchema),
|
|
2113
|
+
duration_ms: import_zod10.z.number()
|
|
2114
|
+
});
|
|
2115
|
+
githubIssuePayloadSchema = import_zod11.z.object({
|
|
2116
|
+
action: import_zod11.z.string(),
|
|
2117
|
+
issueNumber: import_zod11.z.number().int().positive(),
|
|
2118
|
+
title: import_zod11.z.string(),
|
|
2119
|
+
body: import_zod11.z.string().nullable(),
|
|
2120
|
+
labels: import_zod11.z.array(import_zod11.z.string()),
|
|
2121
|
+
author: import_zod11.z.string(),
|
|
2122
|
+
repo: import_zod11.z.object({
|
|
2123
|
+
owner: import_zod11.z.string(),
|
|
2124
|
+
name: import_zod11.z.string(),
|
|
2125
|
+
fullName: import_zod11.z.string(),
|
|
2126
|
+
defaultBranch: import_zod11.z.string(),
|
|
2127
|
+
cloneUrl: import_zod11.z.string()
|
|
2128
|
+
}),
|
|
2129
|
+
url: import_zod11.z.string().url(),
|
|
2130
|
+
createdAt: import_zod11.z.string()
|
|
2131
|
+
});
|
|
2132
|
+
ISSUE_TYPES = ["feature", "bug", "refactor", "docs", "test", "chore"];
|
|
2133
|
+
ISSUE_PRIORITIES = ["low", "medium", "high", "urgent"];
|
|
2134
|
+
ISSUE_COMPLEXITIES = ["trivial", "small", "medium", "large", "epic"];
|
|
2135
|
+
issueClassificationSchema = import_zod11.z.object({
|
|
2136
|
+
type: import_zod11.z.enum(ISSUE_TYPES),
|
|
2137
|
+
priority: import_zod11.z.enum(ISSUE_PRIORITIES),
|
|
2138
|
+
complexity: import_zod11.z.enum(ISSUE_COMPLEXITIES),
|
|
2139
|
+
confidence: import_zod11.z.number().min(0).max(1),
|
|
2140
|
+
reasoning: import_zod11.z.string()
|
|
2141
|
+
});
|
|
2142
|
+
PIPELINE_STAGES = [
|
|
2143
|
+
"triage",
|
|
2144
|
+
"research",
|
|
2145
|
+
"inspect",
|
|
2146
|
+
"plan",
|
|
2147
|
+
"implement"
|
|
2148
|
+
];
|
|
2149
|
+
PIPELINE_STATUSES = [
|
|
2150
|
+
"pending",
|
|
2151
|
+
"running",
|
|
2152
|
+
"completed",
|
|
2153
|
+
"failed",
|
|
2154
|
+
"cancelled"
|
|
2155
|
+
];
|
|
2156
|
+
pipelineStageResultSchema = import_zod11.z.object({
|
|
2157
|
+
stage: import_zod11.z.enum(PIPELINE_STAGES),
|
|
2158
|
+
status: import_zod11.z.enum(PIPELINE_STATUSES),
|
|
2159
|
+
output: import_zod11.z.unknown().optional(),
|
|
2160
|
+
error: import_zod11.z.string().optional(),
|
|
2161
|
+
duration_ms: import_zod11.z.number().optional()
|
|
2162
|
+
});
|
|
2163
|
+
pipelineRunSchema = import_zod11.z.object({
|
|
2164
|
+
id: import_zod11.z.string(),
|
|
2165
|
+
issueNumber: import_zod11.z.number().int().positive(),
|
|
2166
|
+
repo: import_zod11.z.object({
|
|
2167
|
+
owner: import_zod11.z.string(),
|
|
2168
|
+
name: import_zod11.z.string()
|
|
2169
|
+
}),
|
|
2170
|
+
stages: import_zod11.z.array(pipelineStageResultSchema),
|
|
2171
|
+
status: import_zod11.z.enum(PIPELINE_STATUSES),
|
|
2172
|
+
branchName: import_zod11.z.string().optional(),
|
|
2173
|
+
prNumber: import_zod11.z.number().int().positive().optional(),
|
|
2174
|
+
classification: issueClassificationSchema.optional(),
|
|
2175
|
+
createdAt: import_zod11.z.number(),
|
|
2176
|
+
updatedAt: import_zod11.z.number()
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
2179
|
+
});
|
|
2180
|
+
|
|
1653
2181
|
// src/plugins/workflow/run.ts
|
|
1654
2182
|
async function executeStep(step, cwd) {
|
|
1655
2183
|
const args = [step.plugin, step.command];
|
|
@@ -1708,7 +2236,7 @@ function registerRun(parent) {
|
|
|
1708
2236
|
return;
|
|
1709
2237
|
}
|
|
1710
2238
|
const raw = JSON.parse(fs14.readFileSync(filePath, "utf-8"));
|
|
1711
|
-
const workflow =
|
|
2239
|
+
const workflow = workflowSchema.parse(raw);
|
|
1712
2240
|
log(`Running workflow: ${workflow.name}`);
|
|
1713
2241
|
const sortedSteps = topologicalSort(workflow.steps);
|
|
1714
2242
|
const stepResults = [];
|
|
@@ -1794,13 +2322,13 @@ function registerRun(parent) {
|
|
|
1794
2322
|
}
|
|
1795
2323
|
});
|
|
1796
2324
|
}
|
|
1797
|
-
var fs14, path14
|
|
2325
|
+
var fs14, path14;
|
|
1798
2326
|
var init_run = __esm({
|
|
1799
2327
|
"src/plugins/workflow/run.ts"() {
|
|
1800
2328
|
"use strict";
|
|
1801
2329
|
fs14 = __toESM(require("fs"));
|
|
1802
2330
|
path14 = __toESM(require("path"));
|
|
1803
|
-
|
|
2331
|
+
init_dist();
|
|
1804
2332
|
init_exec();
|
|
1805
2333
|
init_result();
|
|
1806
2334
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
log,
|
|
8
8
|
output,
|
|
9
9
|
success
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HMEDKSSW.mjs";
|
|
11
11
|
|
|
12
12
|
// src/index.ts
|
|
13
13
|
async function run() {
|
|
14
|
-
const { createProgram: createProgram2 } = await import("./cli-
|
|
14
|
+
const { createProgram: createProgram2 } = await import("./cli-7CFDLTKN.mjs");
|
|
15
15
|
const program = createProgram2();
|
|
16
16
|
await program.parseAsync(process.argv);
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/agent-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Agent-facing CLI tool for structured operations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"commander": "^13.0.0",
|
|
42
42
|
"glob": "^11.0.0",
|
|
43
|
-
"zod": "^3.23.8"
|
|
44
|
-
"@moxxy/types": "1.0.0"
|
|
43
|
+
"zod": "^3.23.8"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@biomejs/biome": "^2.3.13",
|
|
48
47
|
"@types/node": "^22.0.0",
|
|
49
48
|
"tsup": "^8.0.1",
|
|
50
49
|
"typescript": "^5.7.0",
|
|
51
|
-
"vitest": "^2.1.0"
|
|
50
|
+
"vitest": "^2.1.0",
|
|
51
|
+
"@moxxy/types": "1.0.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
|
-
"build": "tsup
|
|
55
|
-
"dev": "tsup
|
|
54
|
+
"build": "tsup",
|
|
55
|
+
"dev": "tsup --watch",
|
|
56
56
|
"test": "vitest run",
|
|
57
57
|
"test:watch": "vitest",
|
|
58
58
|
"lint": "biome check .",
|