abelworkflow 0.9.2 → 1.0.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 (134) hide show
  1. package/README.md +54 -182
  2. package/bin/abelworkflow.mjs +5 -3
  3. package/extensions/pi-gpt-responses-compat/index.ts +1 -1
  4. package/lib/cli/args.mjs +76 -0
  5. package/lib/cli/main.mjs +385 -0
  6. package/lib/cli/prompts.mjs +106 -0
  7. package/lib/config/dotenv.mjs +102 -0
  8. package/lib/config/jsonc.mjs +80 -0
  9. package/lib/config/store.mjs +310 -0
  10. package/lib/config/toml.mjs +638 -0
  11. package/lib/installer/assets.mjs +324 -0
  12. package/lib/installer/install.mjs +153 -0
  13. package/lib/installer/links.mjs +427 -0
  14. package/lib/installer/state.mjs +163 -0
  15. package/lib/paths.mjs +99 -0
  16. package/lib/providers/claude.mjs +197 -0
  17. package/lib/providers/codex.mjs +433 -0
  18. package/lib/providers/pi.mjs +577 -0
  19. package/lib/providers/skills.mjs +105 -0
  20. package/lib/templates/codex/agents/default.toml +7 -0
  21. package/lib/templates/codex/agents/explorer.toml +7 -0
  22. package/lib/templates/codex/agents/planner.toml +7 -0
  23. package/lib/templates/codex/agents/reviewer.toml +7 -0
  24. package/lib/templates/codex/agents/worker.toml +7 -0
  25. package/lib/templates/codex/config-base.toml +11 -3
  26. package/lib/templates/workflow/AGENTS.md +50 -0
  27. package/lib/templates/workflow/commands/abel-design.md +175 -0
  28. package/{commands → lib/templates/workflow/commands}/abel-diagnose.md +5 -5
  29. package/lib/templates/workflow/commands/abel-implement.md +170 -0
  30. package/{commands → lib/templates/workflow/commands}/abel-init.md +3 -5
  31. package/{.gitignore → lib/templates/workflow/gitignore.template} +0 -2
  32. package/lib/tools/cli-installer.mjs +277 -0
  33. package/package.json +37 -10
  34. package/skills/context7-auto-research/SKILL.md +5 -5
  35. package/skills/context7-auto-research/{context7-api.js → context7-api.cjs} +5 -8
  36. package/skills/dev-browser/SKILL.md +53 -33
  37. package/skills/dev-browser/dist/scripts/start.d.ts +2 -0
  38. package/skills/dev-browser/dist/scripts/start.d.ts.map +1 -0
  39. package/skills/dev-browser/dist/scripts/start.js +118 -0
  40. package/skills/dev-browser/dist/scripts/start.js.map +1 -0
  41. package/skills/dev-browser/dist/src/client.d.ts +93 -0
  42. package/skills/dev-browser/dist/src/client.d.ts.map +1 -0
  43. package/skills/dev-browser/dist/src/client.js +310 -0
  44. package/skills/dev-browser/dist/src/client.js.map +1 -0
  45. package/skills/dev-browser/dist/src/entrypoint.d.ts +29 -0
  46. package/skills/dev-browser/dist/src/entrypoint.d.ts.map +1 -0
  47. package/skills/dev-browser/dist/src/entrypoint.js +106 -0
  48. package/skills/dev-browser/dist/src/entrypoint.js.map +1 -0
  49. package/skills/dev-browser/dist/src/index.d.ts +4 -0
  50. package/skills/dev-browser/dist/src/index.d.ts.map +1 -0
  51. package/skills/dev-browser/dist/src/index.js +2 -0
  52. package/skills/dev-browser/dist/src/index.js.map +1 -0
  53. package/skills/dev-browser/dist/src/page-api.d.ts +25 -0
  54. package/skills/dev-browser/dist/src/page-api.d.ts.map +1 -0
  55. package/skills/dev-browser/dist/src/page-api.js +104 -0
  56. package/skills/dev-browser/dist/src/page-api.js.map +1 -0
  57. package/skills/dev-browser/dist/src/relay.d.ts +27 -0
  58. package/skills/dev-browser/dist/src/relay.d.ts.map +1 -0
  59. package/skills/dev-browser/dist/src/relay.js +521 -0
  60. package/skills/dev-browser/dist/src/relay.js.map +1 -0
  61. package/skills/dev-browser/dist/src/runtime.d.ts +45 -0
  62. package/skills/dev-browser/dist/src/runtime.d.ts.map +1 -0
  63. package/skills/dev-browser/dist/src/runtime.js +54 -0
  64. package/skills/dev-browser/dist/src/runtime.js.map +1 -0
  65. package/skills/dev-browser/dist/src/snapshot/browser-script.d.ts +23 -0
  66. package/skills/dev-browser/dist/src/snapshot/browser-script.d.ts.map +1 -0
  67. package/skills/dev-browser/{src/snapshot/browser-script.ts → dist/src/snapshot/browser-script.js} +21 -30
  68. package/skills/dev-browser/dist/src/snapshot/browser-script.js.map +1 -0
  69. package/skills/dev-browser/dist/src/snapshot/index.d.ts +14 -0
  70. package/skills/dev-browser/dist/src/snapshot/index.d.ts.map +1 -0
  71. package/skills/dev-browser/{src/snapshot/index.ts → dist/src/snapshot/index.js} +2 -2
  72. package/skills/dev-browser/dist/src/snapshot/index.js.map +1 -0
  73. package/skills/dev-browser/dist/src/snapshot/inject.d.ts +13 -0
  74. package/skills/dev-browser/dist/src/snapshot/inject.d.ts.map +1 -0
  75. package/skills/dev-browser/{src/snapshot/inject.ts → dist/src/snapshot/inject.js} +2 -2
  76. package/skills/dev-browser/dist/src/snapshot/inject.js.map +1 -0
  77. package/skills/dev-browser/dist/src/standalone.d.ts +32 -0
  78. package/skills/dev-browser/dist/src/standalone.d.ts.map +1 -0
  79. package/skills/dev-browser/dist/src/standalone.js +174 -0
  80. package/skills/dev-browser/dist/src/standalone.js.map +1 -0
  81. package/skills/dev-browser/dist/src/startup.d.ts +55 -0
  82. package/skills/dev-browser/dist/src/startup.d.ts.map +1 -0
  83. package/skills/dev-browser/dist/src/startup.js +81 -0
  84. package/skills/dev-browser/dist/src/startup.js.map +1 -0
  85. package/skills/dev-browser/dist/src/target-registry.d.ts +29 -0
  86. package/skills/dev-browser/dist/src/target-registry.d.ts.map +1 -0
  87. package/skills/dev-browser/dist/src/target-registry.js +135 -0
  88. package/skills/dev-browser/dist/src/target-registry.js.map +1 -0
  89. package/skills/dev-browser/dist/src/types.d.ts +27 -0
  90. package/skills/dev-browser/dist/src/types.d.ts.map +1 -0
  91. package/skills/dev-browser/dist/src/types.js +2 -0
  92. package/skills/dev-browser/dist/src/types.js.map +1 -0
  93. package/skills/dev-browser/package-lock.json +67 -1510
  94. package/skills/dev-browser/package.json +18 -14
  95. package/skills/dev-browser/references/scraping.md +94 -105
  96. package/skills/grok-search/.env.example +3 -3
  97. package/skills/grok-search/SKILL.md +1 -1
  98. package/skills/grok-search/defaults.json +3 -0
  99. package/skills/grok-search/gitignore.template +4 -0
  100. package/skills/grok-search/scripts/_dotenv.py +5 -1
  101. package/skills/grok-search/scripts/groksearch_cli.py +15 -33
  102. package/skills/prompt-enhancer/SKILL.md +2 -27
  103. package/skills/prompt-enhancer/TEMPLATE.md +0 -4
  104. package/.skill-lock.json +0 -29
  105. package/AGENTS.md +0 -45
  106. package/commands/abel-implement.md +0 -157
  107. package/commands/abel-plan.md +0 -88
  108. package/commands/abel-research.md +0 -126
  109. package/lib/cli/logic.mjs +0 -213
  110. package/lib/cli.mjs +0 -3016
  111. package/skills/confidence-check/SKILL.md +0 -34
  112. package/skills/confidence-check/confidence.ts +0 -276
  113. package/skills/dev-browser/bun.lock +0 -460
  114. package/skills/dev-browser/scripts/start.ts +0 -280
  115. package/skills/dev-browser/src/client.ts +0 -474
  116. package/skills/dev-browser/src/entrypoint.ts +0 -157
  117. package/skills/dev-browser/src/index.ts +0 -289
  118. package/skills/dev-browser/src/relay.ts +0 -731
  119. package/skills/dev-browser/src/runtime.test.ts +0 -60
  120. package/skills/dev-browser/src/runtime.ts +0 -171
  121. package/skills/dev-browser/src/startup.test.ts +0 -95
  122. package/skills/dev-browser/src/startup.ts +0 -153
  123. package/skills/dev-browser/src/types.ts +0 -35
  124. package/skills/dev-browser/tsconfig.json +0 -36
  125. package/skills/dev-browser/vitest.config.ts +0 -12
  126. package/skills/prompt-enhancer/.env.example +0 -12
  127. package/skills/prompt-enhancer/ADVANCED.md +0 -103
  128. package/skills/prompt-enhancer/requirements.txt +0 -2
  129. package/skills/prompt-enhancer/scripts/_dotenv.py +0 -28
  130. package/skills/prompt-enhancer/scripts/enhance.py +0 -191
  131. package/skills/prompt-enhancer/scripts/prompt_enhancer_entry.py +0 -253
  132. package/skills/sequential-think/SKILL.md +0 -198
  133. package/skills/sequential-think/scripts/.env.example +0 -5
  134. package/skills/sequential-think/scripts/sequential_think_cli.py +0 -253
@@ -1,253 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Sequential Think CLI - Standalone iterative thinking engine for complex problem-solving."""
3
-
4
- import argparse
5
- import json
6
- import sys
7
- from dataclasses import dataclass, field, asdict
8
- from datetime import datetime
9
- from pathlib import Path
10
- from typing import List, Optional, Dict
11
-
12
-
13
- # ============================================================================
14
- # Data Models
15
- # ============================================================================
16
-
17
- @dataclass
18
- class ThoughtData:
19
- thought: str
20
- thought_number: int
21
- total_thoughts: int
22
- next_thought_needed: bool = True
23
- is_revision: bool = False
24
- revises_thought: Optional[int] = None
25
- branch_from_thought: Optional[int] = None
26
- branch_id: Optional[str] = None
27
- needs_more_thoughts: bool = False
28
- timestamp: str = field(default_factory=lambda: datetime.now().isoformat())
29
-
30
-
31
- # ============================================================================
32
- # Thought History Manager
33
- # ============================================================================
34
-
35
- class ThoughtHistoryManager:
36
- _instance = None
37
-
38
- def __new__(cls):
39
- if cls._instance is None:
40
- cls._instance = super().__new__(cls)
41
- cls._instance._history: List[ThoughtData] = []
42
- cls._instance._branches: Dict[str, List[ThoughtData]] = {}
43
- cls._instance._history_file: Optional[Path] = None
44
- return cls._instance
45
-
46
- @property
47
- def history_file(self) -> Path:
48
- if self._history_file is None:
49
- config_dir = Path.home() / ".config" / "sequential-think"
50
- config_dir.mkdir(parents=True, exist_ok=True)
51
- self._history_file = config_dir / "thought_history.json"
52
- return self._history_file
53
-
54
- def _load_history(self) -> None:
55
- if self.history_file.exists():
56
- try:
57
- with open(self.history_file, 'r', encoding='utf-8') as f:
58
- data = json.load(f)
59
- self._history = [ThoughtData(**t) for t in data.get("history", [])]
60
- self._branches = {
61
- k: [ThoughtData(**t) for t in v]
62
- for k, v in data.get("branches", {}).items()
63
- }
64
- except (json.JSONDecodeError, IOError, TypeError):
65
- self._history = []
66
- self._branches = {}
67
-
68
- def _save_history(self) -> None:
69
- data = {
70
- "history": [asdict(t) for t in self._history],
71
- "branches": {k: [asdict(t) for t in v] for k, v in self._branches.items()}
72
- }
73
- with open(self.history_file, 'w', encoding='utf-8') as f:
74
- json.dump(data, f, ensure_ascii=False, indent=2)
75
-
76
- def add_thought(self, thought: ThoughtData) -> Dict:
77
- self._load_history()
78
-
79
- # Auto-adjust total if thought_number exceeds it
80
- if thought.thought_number > thought.total_thoughts:
81
- thought.total_thoughts = thought.thought_number
82
-
83
- self._history.append(thought)
84
-
85
- # Track branches
86
- if thought.branch_from_thought and thought.branch_id:
87
- if thought.branch_id not in self._branches:
88
- self._branches[thought.branch_id] = []
89
- self._branches[thought.branch_id].append(thought)
90
-
91
- self._save_history()
92
-
93
- return {
94
- "thoughtNumber": thought.thought_number,
95
- "totalThoughts": thought.total_thoughts,
96
- "nextThoughtNeeded": thought.next_thought_needed,
97
- "branches": list(self._branches.keys()),
98
- "thoughtHistoryLength": len(self._history)
99
- }
100
-
101
- def get_history(self) -> Dict:
102
- self._load_history()
103
- return {
104
- "history": [asdict(t) for t in self._history],
105
- "branches": {k: [asdict(t) for t in v] for k, v in self._branches.items()},
106
- "totalThoughts": len(self._history)
107
- }
108
-
109
- def clear_history(self) -> Dict:
110
- self._history = []
111
- self._branches = {}
112
- if self.history_file.exists():
113
- self.history_file.unlink()
114
- return {"status": "cleared", "message": "Thought history cleared"}
115
-
116
-
117
- manager = ThoughtHistoryManager()
118
-
119
-
120
- # ============================================================================
121
- # Formatters
122
- # ============================================================================
123
-
124
- def format_thought_text(thought: ThoughtData) -> str:
125
- prefix = ""
126
- context = ""
127
-
128
- if thought.is_revision:
129
- prefix = "🔄 Revision"
130
- context = f" (revising thought {thought.revises_thought})"
131
- elif thought.branch_from_thought:
132
- prefix = "🌿 Branch"
133
- context = f" (from thought {thought.branch_from_thought}, ID: {thought.branch_id})"
134
- else:
135
- prefix = "💭 Thought"
136
-
137
- header = f"{prefix} {thought.thought_number}/{thought.total_thoughts}{context}"
138
- border = "─" * max(len(header), min(len(thought.thought), 60)) + "────"
139
-
140
- return f"""
141
- ┌{border}┐
142
- │ {header.ljust(len(border) - 2)} │
143
- ├{border}┤
144
- │ {thought.thought[:len(border) - 2].ljust(len(border) - 2)} │
145
- └{border}┘"""
146
-
147
-
148
- def format_history_text(history: Dict) -> str:
149
- if not history["history"]:
150
- return "No thoughts recorded yet."
151
-
152
- lines = ["=" * 60, "THOUGHT HISTORY", "=" * 60, ""]
153
-
154
- for t in history["history"]:
155
- thought = ThoughtData(**t)
156
- lines.append(format_thought_text(thought))
157
-
158
- if history["branches"]:
159
- lines.extend(["", "-" * 60, "BRANCHES:", "-" * 60])
160
- for branch_id, thoughts in history["branches"].items():
161
- lines.append(f"\n[{branch_id}]")
162
- for t in thoughts:
163
- lines.append(f" Thought {t['thought_number']}: {t['thought'][:50]}...")
164
-
165
- return "\n".join(lines)
166
-
167
-
168
- # ============================================================================
169
- # Commands
170
- # ============================================================================
171
-
172
- def cmd_think(args) -> None:
173
- thought = ThoughtData(
174
- thought=args.thought,
175
- thought_number=args.thought_number,
176
- total_thoughts=args.total_thoughts,
177
- next_thought_needed=not args.no_next,
178
- is_revision=args.is_revision,
179
- revises_thought=args.revises_thought,
180
- branch_from_thought=args.branch_from,
181
- branch_id=args.branch_id,
182
- needs_more_thoughts=args.needs_more
183
- )
184
-
185
- result = manager.add_thought(thought)
186
-
187
- # Print formatted thought to stderr for visibility
188
- if not args.quiet:
189
- print(format_thought_text(thought), file=sys.stderr)
190
-
191
- # Output JSON result
192
- print(json.dumps(result, ensure_ascii=False, indent=2))
193
-
194
-
195
- def cmd_history(args) -> None:
196
- history = manager.get_history()
197
-
198
- if args.format == "json":
199
- print(json.dumps(history, ensure_ascii=False, indent=2))
200
- else:
201
- print(format_history_text(history))
202
-
203
-
204
- def cmd_clear(args) -> None:
205
- result = manager.clear_history()
206
- print(json.dumps(result, ensure_ascii=False, indent=2))
207
-
208
-
209
- # ============================================================================
210
- # Main
211
- # ============================================================================
212
-
213
- def main():
214
- parser = argparse.ArgumentParser(
215
- prog="sequential_think_cli",
216
- description="Sequential Think CLI - Iterative thinking engine for complex problem-solving"
217
- )
218
-
219
- subparsers = parser.add_subparsers(dest="command", required=True)
220
-
221
- # think command
222
- p_think = subparsers.add_parser("think", help="Process a thought in the chain")
223
- p_think.add_argument("--thought", "-t", required=True, help="Current thinking step content")
224
- p_think.add_argument("--thought-number", "-n", type=int, required=True, help="Current position (1-based)")
225
- p_think.add_argument("--total-thoughts", "-T", type=int, required=True, help="Estimated total thoughts")
226
- p_think.add_argument("--no-next", action="store_true", help="Mark as final thought (no more needed)")
227
- p_think.add_argument("--is-revision", action="store_true", help="This thought revises previous thinking")
228
- p_think.add_argument("--revises-thought", type=int, help="Which thought number is being reconsidered")
229
- p_think.add_argument("--branch-from", type=int, help="Branching point thought number")
230
- p_think.add_argument("--branch-id", help="Identifier for current branch")
231
- p_think.add_argument("--needs-more", action="store_true", help="Signal more thoughts needed beyond estimate")
232
- p_think.add_argument("--quiet", "-q", action="store_true", help="Suppress formatted output to stderr")
233
-
234
- # history command
235
- p_history = subparsers.add_parser("history", help="View thought history")
236
- p_history.add_argument("--format", "-f", choices=["json", "text"], default="text", help="Output format")
237
-
238
- # clear command
239
- subparsers.add_parser("clear", help="Clear thought history")
240
-
241
- args = parser.parse_args()
242
-
243
- commands = {
244
- "think": cmd_think,
245
- "history": cmd_history,
246
- "clear": cmd_clear,
247
- }
248
-
249
- commands[args.command](args)
250
-
251
-
252
- if __name__ == "__main__":
253
- main()