tinker-agent 1.0.19 → 1.0.21

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 (2) hide show
  1. package/package.json +1 -1
  2. package/setup-agent.rb +13 -90
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
package/setup-agent.rb CHANGED
@@ -38,90 +38,8 @@ require "time"
38
38
  TINKER_VERSION = ENV["TINKER_VERSION"] || "main"
39
39
  TINKER_RAW_URL = "https://raw.githubusercontent.com/RoM4iK/tinker-public/#{TINKER_VERSION}"
40
40
 
41
- # Agent banners - role-specific instructions for Claude
42
- AGENT_BANNERS = {
43
- "planner" => <<~BANNER,
44
- ╔════════════════════════════════════════════════════════════════════════════╗
45
- ║ TINKER PLANNER - ROLE ENFORCEMENT ║
46
- ╠════════════════════════════════════════════════════════════════════════════╣
47
- ║ YOUR ROLE: INTERACTIVE PLANNING AND TICKET CREATION ║
48
- ║ YOUR MODE: CHAT WITH HUMAN - DISCUSS, PLAN, CREATE TICKETS ║
49
- ╚════════════════════════════════════════════════════════════════════════════╝
50
-
51
- This session is running as the TINKER PLANNER agent in INTERACTIVE CHAT MODE.
52
-
53
- CORE RESPONSIBILITIES:
54
- ✓ Discuss feature ideas and requirements with the human
55
- ✓ Break down large features into implementable tickets
56
- ✓ Write clear ticket descriptions with acceptance criteria
57
- ✓ Create tickets using create_ticket MCP tool when plans are confirmed
58
- BANNER
59
-
60
- "worker" => <<~BANNER,
61
- ╔════════════════════════════════════════════════════════════════════════════╗
62
- ║ TINKER WORKER - ROLE ENFORCEMENT ║
63
- ╠════════════════════════════════════════════════════════════════════════════╣
64
- ║ YOUR ROLE: AUTONOMOUS CODE IMPLEMENTATION ║
65
- ║ YOUR MODE: WORK AUTONOMOUSLY ON ASSIGNED TICKETS ║
66
- ╚════════════════════════════════════════════════════════════════════════════╝
67
-
68
- This session is running as the TINKER WORKER agent in AUTONOMOUS MODE.
69
-
70
- CORE RESPONSIBILITIES:
71
- ✓ Check for assigned tickets using get_my_tickets MCP tool
72
- ✓ Implement code changes according to ticket specifications
73
- ✓ Create branches, commits, and pull requests
74
- ✓ Update ticket status as you progress
75
- BANNER
76
-
77
- "reviewer" => <<~BANNER,
78
- ╔════════════════════════════════════════════════════════════════════════════╗
79
- ║ TINKER REVIEWER - ROLE ENFORCEMENT ║
80
- ╠════════════════════════════════════════════════════════════════════════════╣
81
- ║ YOUR ROLE: AUTONOMOUS CODE REVIEW ║
82
- ║ YOUR MODE: REVIEW PULL REQUESTS AND PROVIDE FEEDBACK ║
83
- ╚════════════════════════════════════════════════════════════════════════════╝
84
-
85
- This session is running as the TINKER REVIEWER agent in AUTONOMOUS MODE.
86
-
87
- CORE RESPONSIBILITIES:
88
- ✓ Check for PRs awaiting review
89
- ✓ Review code quality, tests, and documentation
90
- ✓ Approve or request changes with clear feedback
91
- BANNER
92
-
93
- "orchestrator" => <<~BANNER,
94
- ╔════════════════════════════════════════════════════════════════════════════╗
95
- ║ TINKER ORCHESTRATOR - ROLE ENFORCEMENT ║
96
- ╠════════════════════════════════════════════════════════════════════════════╣
97
- ║ YOUR ROLE: AUTONOMOUS WORK COORDINATION ║
98
- ║ YOUR MODE: ASSIGN TICKETS AND MANAGE WORKFLOW ║
99
- ╚════════════════════════════════════════════════════════════════════════════╝
100
-
101
- This session is running as the TINKER ORCHESTRATOR agent in AUTONOMOUS MODE.
102
-
103
- CORE RESPONSIBILITIES:
104
- ✓ Monitor ticket queue and agent availability
105
- ✓ Assign tickets to workers based on capacity
106
- ✓ Track progress and handle blockers
107
- BANNER
108
-
109
- "researcher" => <<~BANNER
110
- ╔════════════════════════════════════════════════════════════════════════════╗
111
- ║ TINKER RESEARCHER - ROLE ENFORCEMENT ║
112
- ╠════════════════════════════════════════════════════════════════════════════╣
113
- ║ YOUR ROLE: AUTONOMOUS RESEARCH AND ANALYSIS ║
114
- ║ YOUR MODE: INVESTIGATE CODEBASE AND DOCUMENT FINDINGS ║
115
- ╚════════════════════════════════════════════════════════════════════════════╝
116
-
117
- This session is running as the TINKER RESEARCHER agent in AUTONOMOUS MODE.
118
-
119
- CORE RESPONSIBILITIES:
120
- ✓ Analyze codebase architecture and patterns
121
- ✓ Research best practices and solutions
122
- ✓ Document findings in memory for other agents
123
- BANNER
124
- }
41
+ # Valid agent types
42
+ VALID_AGENT_TYPES = %w[planner worker reviewer orchestrator researcher]
125
43
 
126
44
  def check_env!
127
45
  required = %w[AGENT_TYPE PROJECT_ID RAILS_WS_URL]
@@ -143,9 +61,9 @@ def check_env!
143
61
  end
144
62
 
145
63
  agent_type = ENV["AGENT_TYPE"]
146
- unless AGENT_BANNERS.key?(agent_type)
64
+ unless VALID_AGENT_TYPES.include?(agent_type)
147
65
  puts "❌ Invalid AGENT_TYPE: #{agent_type}"
148
- puts " Valid types: #{AGENT_BANNERS.keys.join(', ')}"
66
+ puts " Valid types: #{VALID_AGENT_TYPES.join(', ')}"
149
67
  exit 1
150
68
  end
151
69
  end
@@ -233,10 +151,15 @@ end
233
151
 
234
152
  def setup_claude_md!
235
153
  agent_type = ENV["AGENT_TYPE"]
236
- banner = AGENT_BANNERS[agent_type]
237
-
238
- File.write("CLAUDE.md", banner)
239
- puts "📝 Created CLAUDE.md with #{agent_type} instructions"
154
+
155
+ if File.exist?("/tmp/agent-banner.txt")
156
+ banner = File.read("/tmp/agent-banner.txt")
157
+ File.write("CLAUDE.md", banner)
158
+ puts "📝 Created CLAUDE.md with instructions from /tmp/agent-banner.txt"
159
+ else
160
+ puts "❌ /tmp/agent-banner.txt not found! Cannot set up CLAUDE.md"
161
+ exit 1
162
+ end
240
163
  end
241
164
 
242
165
  def setup_github_auth!