@moxxy/agent-cli 0.0.2 → 0.0.4

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,6 @@
1
+ import {
2
+ createProgram
3
+ } from "./chunk-HMEDKSSW.mjs";
4
+ export {
5
+ createProgram
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ createProgram
3
+ } from "./chunk-ZTFAXFQJ.mjs";
4
+ export {
5
+ createProgram
6
+ };
package/dist/index.js CHANGED
@@ -1650,6 +1650,538 @@ 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, githubIssuePayloadSchema, ISSUE_TYPES, ISSUE_PRIORITIES, ISSUE_COMPLEXITIES, issueClassificationSchema, PIPELINE_STAGES, PIPELINE_STATUSES, pipelineStageResultSchema, pipelineRunSchema, gatewayConfigSchema, githubAuthConfigSchema, webhookServerConfigSchema, watchedRepoSchema, agentRunConfigSchema, sdkProviderSchema, claudeConfigSchema, pipelineConfigSchema, moxxyConfigSchema, agentCommandResultSchema, argDefSchema, optionDefSchema, agentCLICommandDefSchema, workflowStepSchema, workflowSchema, workflowStepResultSchema, workflowResultSchema;
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
+ githubIssuePayloadSchema = import_zod10.z.object({
2011
+ action: import_zod10.z.string(),
2012
+ issueNumber: import_zod10.z.number().int().positive(),
2013
+ title: import_zod10.z.string(),
2014
+ body: import_zod10.z.string().nullable(),
2015
+ labels: import_zod10.z.array(import_zod10.z.string()),
2016
+ author: import_zod10.z.string(),
2017
+ repo: import_zod10.z.object({
2018
+ owner: import_zod10.z.string(),
2019
+ name: import_zod10.z.string(),
2020
+ fullName: import_zod10.z.string(),
2021
+ defaultBranch: import_zod10.z.string(),
2022
+ cloneUrl: import_zod10.z.string()
2023
+ }),
2024
+ url: import_zod10.z.string().url(),
2025
+ createdAt: import_zod10.z.string()
2026
+ });
2027
+ ISSUE_TYPES = ["feature", "bug", "refactor", "docs", "test", "chore"];
2028
+ ISSUE_PRIORITIES = ["low", "medium", "high", "urgent"];
2029
+ ISSUE_COMPLEXITIES = ["trivial", "small", "medium", "large", "epic"];
2030
+ issueClassificationSchema = import_zod10.z.object({
2031
+ type: import_zod10.z.enum(ISSUE_TYPES),
2032
+ priority: import_zod10.z.enum(ISSUE_PRIORITIES),
2033
+ complexity: import_zod10.z.enum(ISSUE_COMPLEXITIES),
2034
+ confidence: import_zod10.z.number().min(0).max(1),
2035
+ reasoning: import_zod10.z.string()
2036
+ });
2037
+ PIPELINE_STAGES = [
2038
+ "triage",
2039
+ "research",
2040
+ "inspect",
2041
+ "plan",
2042
+ "implement"
2043
+ ];
2044
+ PIPELINE_STATUSES = [
2045
+ "pending",
2046
+ "running",
2047
+ "completed",
2048
+ "failed",
2049
+ "cancelled"
2050
+ ];
2051
+ pipelineStageResultSchema = import_zod10.z.object({
2052
+ stage: import_zod10.z.enum(PIPELINE_STAGES),
2053
+ status: import_zod10.z.enum(PIPELINE_STATUSES),
2054
+ output: import_zod10.z.unknown().optional(),
2055
+ error: import_zod10.z.string().optional(),
2056
+ duration_ms: import_zod10.z.number().optional()
2057
+ });
2058
+ pipelineRunSchema = import_zod10.z.object({
2059
+ id: import_zod10.z.string(),
2060
+ issueNumber: import_zod10.z.number().int().positive(),
2061
+ repo: import_zod10.z.object({
2062
+ owner: import_zod10.z.string(),
2063
+ name: import_zod10.z.string()
2064
+ }),
2065
+ stages: import_zod10.z.array(pipelineStageResultSchema),
2066
+ status: import_zod10.z.enum(PIPELINE_STATUSES),
2067
+ branchName: import_zod10.z.string().optional(),
2068
+ prNumber: import_zod10.z.number().int().positive().optional(),
2069
+ classification: issueClassificationSchema.optional(),
2070
+ createdAt: import_zod10.z.number(),
2071
+ updatedAt: import_zod10.z.number()
2072
+ });
2073
+ gatewayConfigSchema = import_zod9.z.object({
2074
+ url: import_zod9.z.string().url(),
2075
+ authToken: import_zod9.z.string().optional(),
2076
+ deviceId: import_zod9.z.string().optional(),
2077
+ devicePrivateKey: import_zod9.z.string().optional()
2078
+ });
2079
+ githubAuthConfigSchema = import_zod9.z.object({
2080
+ token: import_zod9.z.string(),
2081
+ webhookSecret: import_zod9.z.string().optional(),
2082
+ appId: import_zod9.z.string().optional(),
2083
+ privateKey: import_zod9.z.string().optional()
2084
+ });
2085
+ webhookServerConfigSchema = import_zod9.z.object({
2086
+ port: import_zod9.z.number().int().positive().default(3456),
2087
+ host: import_zod9.z.string().default("0.0.0.0"),
2088
+ path: import_zod9.z.string().default("/webhook/github")
2089
+ });
2090
+ watchedRepoSchema = import_zod9.z.object({
2091
+ owner: import_zod9.z.string(),
2092
+ repo: import_zod9.z.string(),
2093
+ defaultBranch: import_zod9.z.string().default("main"),
2094
+ enabledEvents: import_zod9.z.array(import_zod9.z.string()).default(["issues.opened", "issues.labeled"]),
2095
+ labels: import_zod9.z.array(import_zod9.z.string()).optional()
2096
+ });
2097
+ agentRunConfigSchema = import_zod9.z.object({
2098
+ moltAgentId: import_zod9.z.string().optional(),
2099
+ maxConcurrentTasks: import_zod9.z.number().int().positive().default(1)
2100
+ });
2101
+ sdkProviderSchema = import_zod9.z.enum(["molt", "claude"]).default("molt");
2102
+ claudeConfigSchema = import_zod9.z.object({
2103
+ apiKey: import_zod9.z.string().optional(),
2104
+ cliPath: import_zod9.z.string().default("claude"),
2105
+ model: import_zod9.z.string().default("claude-sonnet-4-5"),
2106
+ timeout: import_zod9.z.number().int().positive().default(3e5),
2107
+ permissionMode: import_zod9.z.string().default("default")
2108
+ });
2109
+ pipelineConfigSchema = import_zod9.z.object({
2110
+ enabledStages: import_zod9.z.array(import_zod9.z.enum(PIPELINE_STAGES)).default(["triage", "research", "inspect", "plan", "implement"])
2111
+ });
2112
+ moxxyConfigSchema = import_zod9.z.object({
2113
+ version: import_zod9.z.number().int().positive().default(1),
2114
+ sdk: sdkProviderSchema,
2115
+ gateway: gatewayConfigSchema.optional(),
2116
+ github: githubAuthConfigSchema,
2117
+ webhook: webhookServerConfigSchema.optional(),
2118
+ repos: import_zod9.z.array(watchedRepoSchema).default([]),
2119
+ agent: agentRunConfigSchema.optional(),
2120
+ pipeline: pipelineConfigSchema.optional(),
2121
+ claude: claudeConfigSchema.optional()
2122
+ });
2123
+ agentCommandResultSchema = import_zod11.z.object({
2124
+ success: import_zod11.z.boolean(),
2125
+ command: import_zod11.z.string(),
2126
+ data: import_zod11.z.unknown().optional(),
2127
+ error: import_zod11.z.object({
2128
+ code: import_zod11.z.string(),
2129
+ message: import_zod11.z.string(),
2130
+ details: import_zod11.z.string().optional()
2131
+ }).optional(),
2132
+ duration_ms: import_zod11.z.number()
2133
+ });
2134
+ argDefSchema = import_zod11.z.object({
2135
+ name: import_zod11.z.string(),
2136
+ description: import_zod11.z.string(),
2137
+ required: import_zod11.z.boolean().default(false),
2138
+ type: import_zod11.z.enum(["string", "number", "boolean"]).default("string")
2139
+ });
2140
+ optionDefSchema = import_zod11.z.object({
2141
+ name: import_zod11.z.string(),
2142
+ short: import_zod11.z.string().optional(),
2143
+ description: import_zod11.z.string(),
2144
+ required: import_zod11.z.boolean().default(false),
2145
+ type: import_zod11.z.enum(["string", "number", "boolean"]).default("string"),
2146
+ defaultValue: import_zod11.z.unknown().optional()
2147
+ });
2148
+ agentCLICommandDefSchema = import_zod11.z.object({
2149
+ name: import_zod11.z.string(),
2150
+ description: import_zod11.z.string(),
2151
+ args: import_zod11.z.array(argDefSchema),
2152
+ options: import_zod11.z.array(optionDefSchema),
2153
+ examples: import_zod11.z.array(import_zod11.z.string())
2154
+ });
2155
+ workflowStepSchema = import_zod11.z.object({
2156
+ id: import_zod11.z.string(),
2157
+ plugin: import_zod11.z.string(),
2158
+ command: import_zod11.z.string(),
2159
+ args: import_zod11.z.record(import_zod11.z.unknown()),
2160
+ description: import_zod11.z.string(),
2161
+ dependsOn: import_zod11.z.array(import_zod11.z.string()).optional(),
2162
+ optional: import_zod11.z.boolean().optional()
2163
+ });
2164
+ workflowSchema = import_zod11.z.object({
2165
+ id: import_zod11.z.string(),
2166
+ name: import_zod11.z.string(),
2167
+ description: import_zod11.z.string(),
2168
+ steps: import_zod11.z.array(workflowStepSchema),
2169
+ context: import_zod11.z.record(import_zod11.z.unknown())
2170
+ });
2171
+ workflowStepResultSchema = import_zod11.z.object({
2172
+ stepId: import_zod11.z.string(),
2173
+ result: agentCommandResultSchema,
2174
+ skipped: import_zod11.z.boolean().default(false)
2175
+ });
2176
+ workflowResultSchema = import_zod11.z.object({
2177
+ workflowId: import_zod11.z.string(),
2178
+ success: import_zod11.z.boolean(),
2179
+ stepResults: import_zod11.z.array(workflowStepResultSchema),
2180
+ duration_ms: import_zod11.z.number()
2181
+ });
2182
+ }
2183
+ });
2184
+
1653
2185
  // src/plugins/workflow/run.ts
1654
2186
  async function executeStep(step, cwd) {
1655
2187
  const args = [step.plugin, step.command];
@@ -1708,7 +2240,7 @@ function registerRun(parent) {
1708
2240
  return;
1709
2241
  }
1710
2242
  const raw = JSON.parse(fs14.readFileSync(filePath, "utf-8"));
1711
- const workflow = import_types.workflowSchema.parse(raw);
2243
+ const workflow = workflowSchema.parse(raw);
1712
2244
  log(`Running workflow: ${workflow.name}`);
1713
2245
  const sortedSteps = topologicalSort(workflow.steps);
1714
2246
  const stepResults = [];
@@ -1794,13 +2326,13 @@ function registerRun(parent) {
1794
2326
  }
1795
2327
  });
1796
2328
  }
1797
- var fs14, path14, import_types;
2329
+ var fs14, path14;
1798
2330
  var init_run = __esm({
1799
2331
  "src/plugins/workflow/run.ts"() {
1800
2332
  "use strict";
1801
2333
  fs14 = __toESM(require("fs"));
1802
2334
  path14 = __toESM(require("path"));
1803
- import_types = require("@moxxy/types");
2335
+ init_dist();
1804
2336
  init_exec();
1805
2337
  init_result();
1806
2338
  }
package/dist/index.mjs CHANGED
@@ -7,11 +7,11 @@ import {
7
7
  log,
8
8
  output,
9
9
  success
10
- } from "./chunk-SEOH5HLK.mjs";
10
+ } from "./chunk-ZTFAXFQJ.mjs";
11
11
 
12
12
  // src/index.ts
13
13
  async function run() {
14
- const { createProgram: createProgram2 } = await import("./cli-XX4HNXSW.mjs");
14
+ const { createProgram: createProgram2 } = await import("./cli-T3ZFKHEG.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.2",
3
+ "version": "0.0.4",
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 src/index.ts --format cjs,esm --dts",
55
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
54
+ "build": "tsup",
55
+ "dev": "tsup --watch",
56
56
  "test": "vitest run",
57
57
  "test:watch": "vitest",
58
58
  "lint": "biome check .",