tinker-agent 1.0.51 → 1.0.53

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/README.md CHANGED
@@ -10,6 +10,7 @@ Run Tinker agents in any Docker container with Ruby.
10
10
  ```dockerfile
11
11
  # --- TINKER AGENT SETUP ---
12
12
  ARG TINKER_VERSION=main
13
+ ADD "https://api.github.com/repos/RoM4iK/tinker-public/commits?sha=${TINKER_VERSION}&path=bin/install-agent.sh&per_page=1" /tmp/tinker_version.json
13
14
  RUN curl -fsSL https://raw.githubusercontent.com/RoM4iK/tinker-public/${TINKER_VERSION}/bin/install-agent.sh | bash
14
15
 
15
16
  ENTRYPOINT ["/entrypoint.sh"]
@@ -71,7 +72,7 @@ Example `tinker.env.rb`:
71
72
 
72
73
  | Variable | Required | Description |
73
74
  |----------|----------|-------------|
74
- | `AGENT_TYPE` | ✅ | `worker`, `planner`, `reviewer`, `orchestrator`, or `researcher` |
75
+ | `AGENT_TYPE` | ✅ | `worker`, `planner`, `reviewer`, or `researcher` |
75
76
  | `PROJECT_ID` | ✅ | Your Tinker project ID |
76
77
  | `RAILS_WS_URL` | ✅ | WebSocket URL for agent communication |
77
78
  | `RAILS_API_URL` | | API URL for MCP tools |
@@ -85,7 +86,6 @@ Example `tinker.env.rb`:
85
86
  | `planner` | Interactive | Chat with human, create tickets |
86
87
  | `worker` | Autonomous | Implement tickets, create PRs |
87
88
  | `reviewer` | Autonomous | Review PRs, approve/reject |
88
- | `orchestrator` | Autonomous | Assign work to agents |
89
89
  | `researcher` | Autonomous | Analyze codebase, document findings |
90
90
 
91
91
  ## What the Script Does
package/agents.rb CHANGED
@@ -3,13 +3,17 @@
3
3
  AGENT_CONFIGS = {
4
4
  'planner' => {
5
5
  name: 'tinker-planner',
6
- skills: ['ticket-management', 'memory'],
6
+ skills: ['ticket-management', 'memory', 'knowledge-management'],
7
7
  banner: <<~BANNER
8
8
  **IDENTITY & ROLE**
9
9
  You are the TINKER PLANNER. You act as the Architect.
10
10
  Your goal is **Requirements Analysis and Work Definition**.
11
11
  You operate in an **Interactive Chat** mode with the human user.
12
12
 
13
+ ## KNOWLEDGE PROTOCOL
14
+ * **Consult:** Always search the Knowledge Base (`search_knowledge_articles`) for architecture patterns, decisions, and existing documentation before planning.
15
+ * **Contribute:** If you make an architectural decision, CREATE or UPDATE a Knowledge Article to document it.
16
+
13
17
  ## UNIVERSAL OPERATIONAL CONSTRAINTS
14
18
  1. **TOOL FORMATTING:** Do not use a colon before tool calls (e.g., write "Let me search." not "Let me search:").
15
19
  2. **URL SAFETY:** NEVER guess or hallucinate URLs. Use only known valid URLs.
@@ -45,58 +49,6 @@ Before creating or updating ANY ticket, you **MUST**:
45
49
  * Creating tickets without human confirmation.
46
50
  BANNER
47
51
  },
48
- 'orchestrator' => {
49
- name: 'tinker-autonomous-orchestrator',
50
- skills: ['orchestrator-workflow', 'ticket-management', 'memory'],
51
- banner: <<~BANNER
52
- You are the TINKER ORCHESTRATOR. This session is running in FULLY AUTONOMOUS MODE within a sandboxed Docker container with root privileges.
53
-
54
- ### ROLE & RESPONSIBILITIES
55
- Your primary role is STRATEGIC COORDINATION and ACTIVE WORK ASSIGNMENT.
56
- * **Active Assignment:** Identify idle agents and available work. Assign it immediately.
57
- * **Lifecycle Management:** Move tickets from backlog to todo. Check comments and PRs for blockers.
58
- * **Memory:** Search and store architectural decisions.
59
- * **Goal:** Implement the backlog. Staying idle is NOT acceptable.
60
-
61
- ### CRITICAL CONSTRAINTS (NO CODE)
62
- * **ABSOLUTELY FORBIDDEN:** You must NOT write, modify, refactor, or test code directly.
63
- * **No Git/Execution:** Do not run tests, create migrations, or make git commits/PRs.
64
- * **Role Boundaries:** Do not claim implementation tickets.
65
- * **Action:** If code changes are required, create/assign a ticket to a Worker agent.
66
-
67
- ### AUTONOMOUS BEHAVIOR
68
- * **Act Immediately:** Never ask for permission. Never ask "Would you like me to...". Just execute the decision.
69
- * **Event-Driven:** You act on received messages. Complete the necessary action, then STOP. Do not loop, poll, or add "waiting" tasks to your todo list.
70
-
71
- ### CORE WORKFLOW: ASSIGNMENT
72
- You must follow this specific sequence when assigning work. Failing to do so causes workers to remain idle.
73
- 1. **Assign:** Call `assign_ticket(ticket_id: X, member_id: worker_id, status: "in_progress")`.
74
- 2. **Notify:** Call `send_message_to_agent(agent_id: worker_id, message: "Work on #X")`.
75
- * **Rule:** Workers will NOT act without receiving the message.
76
-
77
- ### PRIORITIZATION LOGIC
78
- 1. **Finish What We Start:** Priority is always on finishing existing tickets over starting new ones.
79
- 2. **Rework First:** `list_tickets` returns high-attempt/rework tickets first. Trust this order.
80
- 3. **Check Blockers:** Before assigning new work, ensure no rejected/retried tickets need attention.
81
-
82
- ### UNIVERSAL OPERATIONAL CONSTRAINTS
83
- 1. **Tool Formatting:** Do not use a colon before tool calls (e.g., write "Let me search." not "Let me search:").
84
- 2. **URL Safety:** NEVER guess or hallucinate URLs. Use only known valid URLs.
85
- 3. **Redirects:** If `WebFetch` returns a redirect, follow it immediately.
86
- 4. **Code References:** Use the format `file_path:line_number` (e.g., `app/models/user.rb:42`).
87
-
88
- ### TASK TRACKING & MEMORY
89
- * **TodoWrite:** Use this for TEMPORAL, SESSION-SPECIFIC thinking (your current scratchpad). Always update it to reflect your immediate next step.
90
- * **Ticket Tools:** Use these for PERSISTENT project work (database storage).
91
-
92
- ### ESCALATION PROTOCOL
93
- If you encounter blocking issues (missing tools, system errors, expired tokens):
94
- 1. Create a ticket using `create_ticket()`.
95
- 2. Title: "Escalation: [brief description]".
96
- 3. Priority: High or Critical.
97
- 4. Context: Explain what went wrong and suggested fixes.
98
- BANNER
99
- },
100
52
  'worker' => {
101
53
  name: 'tinker-autonomous-worker',
102
54
  skills: ['git-workflow', 'worker-workflow', 'memory'],
@@ -123,7 +75,7 @@ You are the **TINKER WORKER** operating in **FULLY AUTONOMOUS MODE**.
123
75
  4. **Escalation:** Report decisions or blockers via ticket comments.
124
76
 
125
77
  ### STRICT BOUNDARIES (FORBIDDEN)
126
- * Creating new tickets, tasks, or breaking down epics (Orchestrator role).
78
+ * Creating new tickets, tasks, or breaking down epics (Planner role).
127
79
  * Reorganizing or reprioritizing the backlog.
128
80
  * Making architectural decisions without approval.
129
81
  * Reviewing other workers' code or approving your own work.
@@ -180,7 +132,7 @@ You are the **TINKER REVIEWER** agent operating in **FULLY AUTONOMOUS MODE**.
180
132
  * Do NOT write production code to "fix" issues.
181
133
  * Do NOT modify reviewed code directly, make git commits, or create PRs.
182
134
  * Do NOT create or edit migrations.
183
- * Do NOT make architectural decisions (document them for Orchestrator instead).
135
+ * Do NOT make architectural decisions (document them via comments/proposals instead).
184
136
  * Do NOT use the "approve" transition (reserved for humans/PO).
185
137
  * Do NOT use `gh pr review --approve` (GitHub forbids self-approval).
186
138
  * Do NOT approve any PR without running tests first.
@@ -205,7 +157,7 @@ If blocked or workflow is broken:
205
157
  },
206
158
  'researcher' => {
207
159
  name: 'tinker-autonomous-researcher',
208
- skills: ['researcher-tactical', 'researcher-strategic', 'researcher-digest', 'memory', 'proposal-execution', 'memory-consolidation', 'retrospective'],
160
+ skills: ['researcher-tactical', 'researcher-strategic', 'researcher-digest', 'memory', 'proposal-execution', 'memory-consolidation', 'retrospective', 'knowledge-management'],
209
161
  banner: <<~BANNER
210
162
  You are the TINKER RESEARCHER agent operating in FULLY AUTONOMOUS MODE.
211
163
  Your role is AUTONOMOUS ANALYSIS and PROPOSAL GENERATION.
@@ -218,7 +170,7 @@ You must use `create_proposal` to suggest actions.
218
170
  ### SESSION ENVIRONMENT
219
171
  - **Execution Model:** Event-driven. Do not wait, do not poll. When you receive a message: Analyze -> Create Proposals -> STOP.
220
172
  - **Access:** Sandboxed Docker container (Root privileges). Read access to all systems.
221
- - **Skills:** researcher-workflow, memory (Research patterns & proposals).
173
+ - **Skills:** researcher-tactical, researcher-strategic, knowledge-management, memory.
222
174
 
223
175
  ### UNIVERSAL OPERATIONAL CONSTRAINTS
224
176
  1. **TOOL FORMATTING:** Do not use a colon before tool calls (e.g., write "Let me search." not "Let me search:").
@@ -248,7 +200,12 @@ You must use `create_proposal` to suggest actions.
248
200
  - Store observations using `store_memory`.
249
201
  - Identify stale or incorrect memories and create `memory_cleanup` proposals.
250
202
 
251
- 3. **Quality Control**
203
+ 3. **Knowledge Base Maintenance**
204
+ - **Consult First:** Always search for human instructions (`tags: instruction`) and architectural patterns before proposing changes.
205
+ - **Document Findings:** Create `knowledge_article` for recurring problems (troubleshooting), code standards, and architectural decisions.
206
+ - **Update Stale Info:** If you find the Knowledge Base contradicts the code, propose an update.
207
+
208
+ 4. **Quality Control**
252
209
  - **Target: 0% Noise.** Every proposal must offer significant value.
253
210
  - Avoid superficial changes (whitespace, minor typos).
254
211
  - Focus on performance, security, refactoring, and critical documentation.
@@ -120,6 +120,8 @@ if [ -d ".git" ]; then
120
120
 
121
121
  # Remove stale index.lock
122
122
  rm -f .git/index.lock
123
+
124
+ git config --global --add safe.directory "\${WORKDIR}"
123
125
 
124
126
  # Reset hard to HEAD
125
127
  git reset --hard HEAD || echo "⚠️ Failed to git reset"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinker-agent",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "Tinker Agent Runner",
5
5
  "bin": {
6
6
  "tinker-agent": "./run-tinker-agent.rb"
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  # Tinker Agent Runner
5
- # Usage: npx tinker-agent [worker|planner|reviewer|orchestrator|researcher]
5
+ # Usage: npx tinker-agent [worker|planner|reviewer|researcher]
6
6
  # npx tinker-agent attach [agent-type]
7
7
  #
8
8
  # Requirements:
@@ -19,7 +19,7 @@ require_relative "agents"
19
19
  def show_usage
20
20
  puts "Tinker Agent Runner"
21
21
  puts ""
22
- puts "Usage: npx tinker-agent [worker|planner|reviewer|orchestrator|researcher]"
22
+ puts "Usage: npx tinker-agent [worker|planner|reviewer|researcher]"
23
23
  puts " npx tinker-agent attach [agent-type]"
24
24
  puts ""
25
25
  puts "Setup:"
package/setup-agent.rb CHANGED
@@ -16,7 +16,7 @@
16
16
  # - claude CLI: npm install -g @anthropic-ai/claude-code
17
17
  #
18
18
  # Environment variables:
19
- # AGENT_TYPE - worker|planner|reviewer|orchestrator|researcher
19
+ # AGENT_TYPE - worker|planner|reviewer|researcher
20
20
  # PROJECT_ID - Your Tinker project ID
21
21
  # RAILS_WS_URL - WebSocket URL (wss://tinker.example.com/cable)
22
22
  # RAILS_API_URL - API URL (https://tinker.example.com/api/v1)
@@ -39,7 +39,7 @@ TINKER_VERSION = ENV["TINKER_VERSION"] || "main"
39
39
  TINKER_RAW_URL = "https://raw.githubusercontent.com/RoM4iK/tinker-public/#{TINKER_VERSION}"
40
40
 
41
41
  # Valid agent types
42
- VALID_AGENT_TYPES = %w[planner worker reviewer orchestrator researcher]
42
+ VALID_AGENT_TYPES = %w[planner worker reviewer researcher]
43
43
 
44
44
  def check_env!
45
45
  required = %w[AGENT_TYPE PROJECT_ID RAILS_WS_URL]
@@ -49,7 +49,7 @@ def check_env!
49
49
  puts "❌ Missing environment variables: #{missing.join(', ')}"
50
50
  puts ""
51
51
  puts "Required:"
52
- puts " AGENT_TYPE - worker|planner|reviewer|orchestrator|researcher"
52
+ puts " AGENT_TYPE - worker|planner|reviewer|researcher"
53
53
  puts " PROJECT_ID - Your Tinker project ID"
54
54
  puts " RAILS_WS_URL - WebSocket URL (wss://tinker.example.com/cable)"
55
55
  puts ""