@workermill/agent 0.1.0 → 0.1.1

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/dist/poller.js CHANGED
@@ -149,8 +149,10 @@ async function handleQueuedTask(task, config) {
149
149
  executionPlanV2: task.executionPlanV2,
150
150
  jiraFields: task.jiraFields || {},
151
151
  };
152
+ // Pass org credentials from the claim response to the container
153
+ const credentials = claimData.credentials;
152
154
  // Spawn asynchronously (don't block the poll loop)
153
- spawnWorker(spawnableTask, config, oc).catch((err) => console.error(`${ts()} ${chalk.red("✗")} Spawn failed for ${taskLabel}:`, err.message || err));
155
+ spawnWorker(spawnableTask, config, oc, credentials).catch((err) => console.error(`${ts()} ${chalk.red("✗")} Spawn failed for ${taskLabel}:`, err.message || err));
154
156
  }
155
157
  /**
156
158
  * Start the poll loop.
package/dist/spawner.d.ts CHANGED
@@ -19,11 +19,26 @@ export interface SpawnableTask {
19
19
  skipManagerReview?: boolean;
20
20
  executionPlanV2: unknown;
21
21
  jiraFields: Record<string, unknown>;
22
+ taskNotes?: string;
23
+ }
24
+ /** Org credentials returned by /api/agent/claim */
25
+ export interface ClaimCredentials {
26
+ jiraBaseUrl?: string;
27
+ jiraEmail?: string;
28
+ jiraApiToken?: string;
29
+ linearApiKey?: string;
30
+ managerProvider?: string;
31
+ managerModelId?: string;
32
+ customerAwsAccessKeyId?: string;
33
+ customerAwsSecretAccessKey?: string;
34
+ customerAwsRegion?: string;
35
+ issueTrackerProvider?: string;
36
+ bitbucketEmail?: string;
22
37
  }
23
38
  /**
24
39
  * Spawn a Docker worker container for a task.
25
40
  */
26
- export declare function spawnWorker(task: SpawnableTask, config: AgentConfig, orgConfig: Record<string, unknown>): Promise<void>;
41
+ export declare function spawnWorker(task: SpawnableTask, config: AgentConfig, orgConfig: Record<string, unknown>, credentials?: ClaimCredentials): Promise<void>;
27
42
  /**
28
43
  * Get count of actively running containers.
29
44
  */
package/dist/spawner.js CHANGED
@@ -104,7 +104,7 @@ function hasSelfReviewLabel(task) {
104
104
  /**
105
105
  * Spawn a Docker worker container for a task.
106
106
  */
107
- export async function spawnWorker(task, config, orgConfig) {
107
+ export async function spawnWorker(task, config, orgConfig, credentials) {
108
108
  const taskLabel = chalk.cyan(task.id.slice(0, 8));
109
109
  if (activeContainers.has(task.id)) {
110
110
  console.log(`${ts()} ${taskLabel} ${chalk.dim("Already running, skipping")}`);
@@ -174,6 +174,25 @@ export async function spawnWorker(task, config, orgConfig) {
174
174
  GITHUB_REPO: task.githubRepo || "",
175
175
  // Worker model
176
176
  WORKER_MODEL: task.workerModel || String(orgConfig.defaultWorkerModel || "sonnet"),
177
+ // Jira credentials (from org Secrets Manager via /api/agent/claim)
178
+ JIRA_BASE_URL: credentials?.jiraBaseUrl || "",
179
+ JIRA_EMAIL: credentials?.jiraEmail || "",
180
+ JIRA_API_TOKEN: credentials?.jiraApiToken || "",
181
+ // Issue tracker system (jira, linear, github-issues)
182
+ TICKET_SYSTEM: credentials?.issueTrackerProvider || "jira",
183
+ LINEAR_API_KEY: credentials?.linearApiKey || "",
184
+ // AWS credentials (from org Secrets Manager for workers that deploy infrastructure)
185
+ AWS_ACCESS_KEY_ID: credentials?.customerAwsAccessKeyId || "",
186
+ AWS_SECRET_ACCESS_KEY: credentials?.customerAwsSecretAccessKey || "",
187
+ AWS_DEFAULT_REGION: credentials?.customerAwsRegion || "",
188
+ AWS_REGION: credentials?.customerAwsRegion || "",
189
+ // Manager provider and model for tech lead review
190
+ MANAGER_PROVIDER: credentials?.managerProvider || "anthropic",
191
+ MANAGER_MODEL: credentials?.managerModelId || "",
192
+ // Bitbucket email (needed for API calls with API tokens)
193
+ BITBUCKET_EMAIL: credentials?.bitbucketEmail || "",
194
+ // Task notes from dashboard
195
+ TASK_NOTES: task.taskNotes || "",
177
196
  // Anthropic API key (if available)
178
197
  ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY || "",
179
198
  // Resilience settings from org config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workermill/agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "WorkerMill Remote Agent - Run AI workers locally with your Claude Max subscription",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",