jules-orchestrator-kit 0.28.1 → 0.28.2

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/bin/agentctl.mjs CHANGED
@@ -14,7 +14,7 @@ const command = args[0];
14
14
 
15
15
  function printHelp() {
16
16
  console.log(`
17
- šŸš€ agentctl v0.28.1 — Universal Agent Orchestrator & Safety Gatekeeper
17
+ šŸš€ agentctl v0.28.2 — Universal Agent Orchestrator & Safety Gatekeeper
18
18
 
19
19
  Usage: agentctl <command> [options]
20
20
 
@@ -53,7 +53,7 @@ async function main() {
53
53
  }
54
54
 
55
55
  if (command === "version" || command === "--version" || command === "-v") {
56
- console.log("agentctl v0.28.1");
56
+ console.log("agentctl v0.28.2");
57
57
  process.exit(0);
58
58
  }
59
59
 
@@ -264,7 +264,7 @@ async function main() {
264
264
  }
265
265
 
266
266
  case "doctor": {
267
- console.log(`\nšŸ” agentctl System Diagnostics (v0.28.1)`);
267
+ console.log(`\nšŸ” agentctl System Diagnostics (v0.28.2)`);
268
268
  console.log(`--------------------------------------------------`);
269
269
  console.log(` Project Root : ${root}`);
270
270
  console.log(` Config File : ${config._file || "None (Using defaults)"}`);
@@ -353,7 +353,7 @@ base_branch: main
353
353
  case "status": {
354
354
  const queueDir = getQueueDir(root);
355
355
  const files = existsSync(queueDir) ? readdirSync(queueDir).filter((f) => isTaskFile(f, queueDir)) : [];
356
- console.log(`\nšŸ“Š agentctl Status Summary (v0.28.1)`);
356
+ console.log(`\nšŸ“Š agentctl Status Summary (v0.28.2)`);
357
357
  console.log(`--------------------------------------------------`);
358
358
  console.log(` Project Root : ${root}`);
359
359
  console.log(` Pending Tasks : ${files.length}`);
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Google Jules Orchestrator Kit - Node.js SDK (v0.28.1)
2
+ * Google Jules Orchestrator Kit - Node.js SDK (v0.28.2)
3
3
  *
4
4
  * Exposes core orchestrator functions for programmatically driving agent tasks,
5
5
  * security auditing, repo gating, and state operations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jules-orchestrator-kit",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "description": "Orchestration kit for running Google Jules autonomous agents.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/dashboard.mjs CHANGED
@@ -32,7 +32,7 @@ export function getDashboardHtml(root = process.cwd()) {
32
32
  </style>
33
33
  </head>
34
34
  <body>
35
- <h1>šŸš€ jules-orchestrator-kit Dashboard (v0.28.1)</h1>
35
+ <h1>šŸš€ jules-orchestrator-kit Dashboard (v0.28.2)</h1>
36
36
  <div class="subtitle">Repository: <code>${root}</code></div>
37
37
 
38
38
  <div class="grid">
@@ -87,7 +87,7 @@ export function createDashboardServer({ root = process.cwd(), port: _port = 4100
87
87
 
88
88
  if (url.pathname === "/api/status") {
89
89
  res.writeHead(200, { "Content-Type": "application/json; charset=utf-8" });
90
- return res.end(JSON.stringify({ ok: true, version: "0.28.1", root, ts: new Date().toISOString() }));
90
+ return res.end(JSON.stringify({ ok: true, version: "0.28.2", root, ts: new Date().toISOString() }));
91
91
  }
92
92
 
93
93
  if (url.pathname === "/api/telemetry") {
package/src/engine.mjs CHANGED
@@ -101,20 +101,21 @@ export async function gate(opts = {}) {
101
101
  const root = opts.root || process.cwd();
102
102
  const config = opts.config || loadConfig(root);
103
103
  const base = opts.base || config.baseBranch || "main";
104
+ const mode = opts.mode || (opts.workingTree ? "working-tree" : (process.env.JULES_GATE_MODE || "working-tree"));
104
105
  const progressBus = opts.progressBus;
105
106
  const progressToken = opts.progressToken;
106
107
  const phases = [];
107
108
 
108
- appendTelemetry(root, "gate_started", { base });
109
+ appendTelemetry(root, "gate_started", { base, mode });
109
110
 
110
111
  let files = [];
111
112
  let bytes = 0;
112
113
  let diffStr = "";
113
114
 
114
115
  try {
115
- files = changedFiles(root, base);
116
- bytes = diffBytes(root, base);
117
- diffStr = diffText(root, base);
116
+ files = changedFiles(root, base, mode);
117
+ bytes = diffBytes(root, base, mode);
118
+ diffStr = diffText(root, base, mode);
118
119
  } catch (err) {
119
120
  phases.push({ phase: "git_resolution", ok: false, error: err.message });
120
121
  appendTelemetry(root, "gate_finished", { ok: false, code: 1, error: err.message });
package/src/mcp.mjs CHANGED
@@ -9,7 +9,7 @@ import { ProgressBus } from "./mcp-progress.mjs";
9
9
 
10
10
  export const MCP_SERVER_INFO = {
11
11
  name: "jules-orchestrator-kit",
12
- version: "0.28.1",
12
+ version: "0.28.2",
13
13
  };
14
14
 
15
15
  export const MAX_MCP_FRAME_SIZE = 4 * 1024 * 1024; // 4 MB memory safety ceiling
package/src/provider.mjs CHANGED
@@ -121,16 +121,23 @@ export function createProvider(spec = "jules", config = {}) {
121
121
  throw new MissingApiKeyError();
122
122
  }
123
123
 
124
+ const isRepoless = Boolean(task.repoless || ctx.repoless);
124
125
  const rawRepo = task.source || ctx.source || process.env.JULES_REPO || "";
126
+ if (!rawRepo && !ctx.dryRun && providerSpec.name === "jules" && !isRepoless) {
127
+ throw new Error("Missing connected Jules repository source. Set JULES_REPO or pass source/repoless option.");
128
+ }
129
+
125
130
  const sourceName = rawRepo
126
131
  ? (rawRepo.startsWith("sources/") ? rawRepo : `sources/github/${rawRepo}`)
127
- : "sources/github/default/repo";
132
+ : undefined;
133
+
134
+ const startingBranch = task.branch || ctx.branch || config.baseBranch || process.env.BASE_BRANCH || "main";
128
135
 
129
136
  const data = {
130
137
  prompt: task.prompt || "",
131
138
  title: task.title || "Agent Task",
132
- branch: task.branch || (config.branchPrefix ? config.branchPrefix + "task" : "agent/task"),
133
- source: sourceName,
139
+ branch: startingBranch,
140
+ source: sourceName || "",
134
141
  project: process.env.JULES_PROJECT_ID || "default",
135
142
  ...ctx,
136
143
  };
@@ -176,9 +183,15 @@ export function createProvider(spec = "jules", config = {}) {
176
183
  }
177
184
 
178
185
  if (bodyObj && typeof bodyObj === "object") {
179
- if (data.repoless || ctx.repoless || task.repoless) {
186
+ if (isRepoless || !sourceName) {
180
187
  delete bodyObj.sourceContext;
181
188
  }
189
+ if (task.autoPr || ctx.autoPr) {
190
+ bodyObj.automationMode = "AUTO_CREATE_PR";
191
+ }
192
+ if (task.requirePlanApproval || ctx.requirePlanApproval) {
193
+ bodyObj.requirePlanApproval = true;
194
+ }
182
195
  body = JSON.stringify(bodyObj);
183
196
  }
184
197