zigrix 0.1.0-alpha.8 → 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 (86) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +159 -120
  3. package/dist/agents/registry.js +19 -2
  4. package/dist/agents/roles.d.ts +10 -0
  5. package/dist/agents/roles.js +83 -0
  6. package/dist/config/defaults.d.ts +88 -6
  7. package/dist/config/defaults.js +82 -50
  8. package/dist/config/load.d.ts +5 -3
  9. package/dist/config/load.js +69 -30
  10. package/dist/config/schema.d.ts +46 -4
  11. package/dist/config/schema.js +49 -3
  12. package/dist/configure.d.ts +2 -0
  13. package/dist/configure.js +37 -14
  14. package/dist/dashboard/.next/BUILD_ID +1 -1
  15. package/dist/dashboard/.next/app-build-manifest.json +13 -13
  16. package/dist/dashboard/.next/app-path-routes-manifest.json +3 -3
  17. package/dist/dashboard/.next/build-manifest.json +2 -2
  18. package/dist/dashboard/.next/prerender-manifest.json +6 -6
  19. package/dist/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/dist/dashboard/.next/server/app/_not-found.html +1 -1
  21. package/dist/dashboard/.next/server/app/_not-found.rsc +1 -1
  22. package/dist/dashboard/.next/server/app/api/auth/login/route.js +1 -1
  23. package/dist/dashboard/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  24. package/dist/dashboard/.next/server/app/api/auth/logout/route.js +1 -1
  25. package/dist/dashboard/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  26. package/dist/dashboard/.next/server/app/api/auth/session/route.js +1 -1
  27. package/dist/dashboard/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
  28. package/dist/dashboard/.next/server/app/api/auth/setup/route.js +1 -1
  29. package/dist/dashboard/.next/server/app/api/auth/setup/route_client-reference-manifest.js +1 -1
  30. package/dist/dashboard/.next/server/app/api/overview/route_client-reference-manifest.js +1 -1
  31. package/dist/dashboard/.next/server/app/api/stream/route_client-reference-manifest.js +1 -1
  32. package/dist/dashboard/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  33. package/dist/dashboard/.next/server/app/api/tasks/[taskId]/conversation/route_client-reference-manifest.js +1 -1
  34. package/dist/dashboard/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  35. package/dist/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
  36. package/dist/dashboard/.next/server/app/login.html +1 -1
  37. package/dist/dashboard/.next/server/app/login.rsc +1 -1
  38. package/dist/dashboard/.next/server/app/page.js +2 -2
  39. package/dist/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/dist/dashboard/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  41. package/dist/dashboard/.next/server/app/setup.html +1 -1
  42. package/dist/dashboard/.next/server/app/setup.rsc +1 -1
  43. package/dist/dashboard/.next/server/app-paths-manifest.json +3 -3
  44. package/dist/dashboard/.next/server/chunks/972.js +1 -1
  45. package/dist/dashboard/.next/server/functions-config-manifest.json +3 -3
  46. package/dist/dashboard/.next/server/middleware.js +1 -1
  47. package/dist/dashboard/.next/server/pages/404.html +1 -1
  48. package/dist/dashboard/.next/server/pages/500.html +1 -1
  49. package/dist/dashboard/.next/static/chunks/app/page-0314989c31e18b4b.js +1 -0
  50. package/dist/dashboard/.next/static/css/{94d75aff24d0c077.css → c3a7306cb2ba3f6c.css} +1 -1
  51. package/dist/dashboard.js +47 -0
  52. package/dist/doctor.js +28 -5
  53. package/dist/index.js +175 -171
  54. package/dist/onboard.d.ts +76 -2
  55. package/dist/onboard.js +529 -25
  56. package/dist/orchestration/dispatch.d.ts +3 -1
  57. package/dist/orchestration/dispatch.js +173 -45
  58. package/dist/orchestration/evidence.js +31 -4
  59. package/dist/orchestration/finalize.d.ts +1 -0
  60. package/dist/orchestration/finalize.js +5 -3
  61. package/dist/orchestration/report.js +9 -1
  62. package/dist/orchestration/worker.d.ts +1 -1
  63. package/dist/orchestration/worker.js +58 -8
  64. package/dist/rules/templates.js +3 -6
  65. package/dist/state/tasks.d.ts +12 -0
  66. package/dist/state/tasks.js +7 -0
  67. package/package.json +23 -2
  68. package/rules/defaults/README.md +9 -9
  69. package/rules/defaults/{back-zig.md → backend-agent.md} +4 -4
  70. package/rules/defaults/{front-zig.md → frontend-agent.md} +4 -4
  71. package/rules/defaults/orchestrator-agent.md +261 -0
  72. package/rules/defaults/{qa-zig.md → qa-agent.md} +11 -11
  73. package/rules/defaults/{sec-zig.md → security-agent.md} +4 -4
  74. package/rules/defaults/{sys-zig.md → system-agent.md} +8 -9
  75. package/rules/defaults/worker-common.md +25 -19
  76. package/skills/zigrix-doctor/SKILL.md +4 -2
  77. package/skills/zigrix-evidence/SKILL.md +7 -3
  78. package/skills/zigrix-main-agent-guide/SKILL.md +128 -0
  79. package/skills/zigrix-shared/SKILL.md +27 -3
  80. package/skills/zigrix-task-create/SKILL.md +8 -2
  81. package/skills/zigrix-task-status/SKILL.md +5 -2
  82. package/skills/zigrix-worker/SKILL.md +12 -4
  83. package/dist/dashboard/.next/static/chunks/app/page-25f54e54e74fb3af.js +0 -1
  84. package/rules/defaults/pro-zig.md +0 -238
  85. /package/dist/dashboard/.next/static/{2a4glWei05xr4Jg0Ly6cp → PT4hYxzrqxj-Zq4ZjtKNg}/_buildManifest.js +0 -0
  86. /package/dist/dashboard/.next/static/{2a4glWei05xr4Jg0Ly6cp → PT4hYxzrqxj-Zq4ZjtKNg}/_ssgManifest.js +0 -0
package/dist/onboard.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type StandardAgentRole } from './agents/roles.js';
1
2
  import type { ZigrixConfig } from './config/schema.js';
2
3
  import { type ZigrixPaths } from './state/paths.js';
3
4
  export interface OpenClawAgent {
@@ -13,7 +14,25 @@ export interface OpenClawConfig {
13
14
  agents?: {
14
15
  list?: OpenClawAgent[];
15
16
  };
17
+ gateway?: {
18
+ port?: number | string;
19
+ bind?: string;
20
+ mode?: string;
21
+ auth?: {
22
+ token?: string;
23
+ };
24
+ };
25
+ plugins?: {
26
+ entries?: {
27
+ 'device-pair'?: {
28
+ config?: {
29
+ publicUrl?: string;
30
+ };
31
+ };
32
+ };
33
+ };
16
34
  }
35
+ export type AgentRoleAssignments = Record<string, StandardAgentRole>;
17
36
  export interface PathStabilizeResult {
18
37
  alreadyInPath: boolean;
19
38
  symlinkCreated: boolean;
@@ -29,10 +48,13 @@ export interface OnboardResult {
29
48
  ok: boolean;
30
49
  action: string;
31
50
  baseDir: string;
51
+ workspaceBaseDir: string;
32
52
  configPath: string;
33
53
  paths: ZigrixPaths;
34
54
  openclawDetected: boolean;
35
55
  openclawHome: string;
56
+ openclawBinPath: string | null;
57
+ openclawGatewayUrl: string | null;
36
58
  agentsRegistered: string[];
37
59
  agentsSkipped: string[];
38
60
  rulesCopied: string[];
@@ -41,21 +63,39 @@ export interface OnboardResult {
41
63
  skillsSkipped: string[];
42
64
  skillsFailed: string[];
43
65
  pathStabilized: PathStabilizeResult;
66
+ openclawPathStabilized: PathStabilizeResult;
44
67
  warnings: string[];
45
68
  checks: {
46
69
  zigrixInPath: boolean;
70
+ openclawInPath: boolean;
47
71
  openclawSkillsDir: boolean;
48
72
  };
49
73
  }
50
74
  export interface RunOnboardOptions {
51
75
  yes?: boolean;
52
76
  projectDir?: string;
77
+ projectsBaseDir?: string;
78
+ orchestratorId?: string;
79
+ gatewayUrl?: string;
53
80
  silent?: boolean;
54
81
  }
55
82
  export declare function detectOpenClawHome(): string;
56
83
  export declare function loadOpenClawConfig(openclawHome: string): OpenClawConfig | null;
84
+ export declare function resolveOpenClawGatewayUrl(openclawConfig: OpenClawConfig | null): string | null;
85
+ export declare function resolveOpenClawGatewayToken(openclawConfig: OpenClawConfig | null): string | null;
86
+ /**
87
+ * Discover the openclaw binary path.
88
+ * Strategy order:
89
+ * 1. `which openclaw` — available in current PATH
90
+ * 2. Common nvm/volta/fnm managed paths
91
+ * 3. Well-known locations: /usr/local/bin, ~/.local/bin
92
+ * 4. Walk node_modules/.bin from openclaw home
93
+ *
94
+ * Returns the resolved absolute path or null.
95
+ */
96
+ export declare function resolveOpenClawBin(openclawHome?: string): string | null;
57
97
  export declare function filterAgents(agents: OpenClawAgent[]): OpenClawAgent[];
58
- export declare function registerAgents(config: ZigrixConfig, agents: OpenClawAgent[]): {
98
+ export declare function registerAgents(config: ZigrixConfig, agents: OpenClawAgent[], roleAssignments?: AgentRoleAssignments): {
59
99
  config: ZigrixConfig;
60
100
  registered: string[];
61
101
  skipped: string[];
@@ -64,12 +104,20 @@ export declare function registerAgents(config: ZigrixConfig, agents: OpenClawAge
64
104
  * Find the bundled default rules directory shipped with the zigrix package.
65
105
  */
66
106
  export declare function resolveBundledRulesDir(): string | null;
107
+ export declare function resolveRuleSeedSource(projectDir?: string): {
108
+ sourceDir: string | null;
109
+ source: 'external' | 'bundled' | 'none';
110
+ searched: string[];
111
+ };
67
112
  export declare function seedRules(sourceDir: string, targetDir: string): {
68
113
  copied: string[];
69
114
  skipped: string[];
70
115
  source: string;
71
116
  };
72
- export declare function checkZigrixInPath(): boolean;
117
+ export declare const STABLE_SHELL_PATHS: string[];
118
+ export declare function checkZigrixInPath(opts?: {
119
+ _overrideStablePaths?: string[];
120
+ }): boolean;
73
121
  /**
74
122
  * Resolve the path to the zigrix CLI entry point (dist/index.js).
75
123
  * Works whether installed via npm link, npm install -g, or local checkout.
@@ -94,9 +142,27 @@ export declare function findUserBinDir(): string;
94
142
  * 2. ~/.local/bin — user-local fallback; may not be in PATH, shows warning if so
95
143
  *
96
144
  * @param opts._overrideSystemBinDir - Override system bin dir selection (for testing)
145
+ * @param opts._overrideStablePaths - Override stable paths list (for testing)
97
146
  */
98
147
  export declare function ensureZigrixInPath(opts?: {
99
148
  _overrideSystemBinDir?: string | null;
149
+ _overrideStablePaths?: string[];
150
+ }): PathStabilizeResult;
151
+ export declare function checkOpenClawInPath(opts?: {
152
+ _overrideStablePaths?: string[];
153
+ }): boolean;
154
+ /**
155
+ * Ensure openclaw is reachable from PATH.
156
+ * Same strategy as ensureZigrixInPath():
157
+ * 1. /usr/local/bin — stable path, accessible from non-login shells
158
+ * 2. ~/.local/bin — user-local fallback
159
+ *
160
+ * @param opts._overrideSystemBinDir - Override system bin dir selection (for testing)
161
+ * @param opts._overrideStablePaths - Override stable paths list (for testing)
162
+ */
163
+ export declare function ensureOpenClawInPath(opts?: {
164
+ _overrideSystemBinDir?: string | null;
165
+ _overrideStablePaths?: string[];
100
166
  }): PathStabilizeResult;
101
167
  /**
102
168
  * Find the skills/ directory bundled with this zigrix package.
@@ -113,4 +179,12 @@ export declare function registerSkills(openclawHome: string): SkillRegistrationR
113
179
  * Space to toggle, Enter to confirm. All agents pre-selected by default.
114
180
  */
115
181
  export declare function promptAgentSelection(agents: OpenClawAgent[]): Promise<OpenClawAgent[]>;
182
+ export declare function promptAgentRoleAssignments(agents: OpenClawAgent[]): Promise<AgentRoleAssignments>;
183
+ export declare function promptWorkspaceBaseDir(defaultPath: string): Promise<string>;
184
+ export declare function promptGatewayUrl(defaultValue: string): Promise<string>;
185
+ export declare function ensureOrchestratorId(config: ZigrixConfig, preferredId?: string): {
186
+ config: ZigrixConfig;
187
+ changed: boolean;
188
+ warning?: string;
189
+ };
116
190
  export declare function runOnboard(options: RunOnboardOptions): Promise<OnboardResult>;