jules-orchestrator-kit 0.23.0 → 0.25.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.
package/.agent/jules.yml DELETED
@@ -1,13 +0,0 @@
1
- # Google Jules Repository Configuration (Version 2)
2
- version: 2
3
- test_cmd: "npm test"
4
- build_cmd: ""
5
- forbidden_paths:
6
- - ".github/**"
7
- - "**/secrets/**"
8
- - "**/*.pem"
9
- - "**/lock-manager/**"
10
- - "scripts/jules-self-audit.mjs"
11
- - ".agent/jules.yml"
12
- allow_paths: []
13
-
package/.env.example DELETED
@@ -1,73 +0,0 @@
1
- # Google Jules Orchestration Kit - Environment Configuration Example
2
- # Copy this file to .env and populate with your credentials/settings.
3
-
4
- # --- Authentication & Core Settings ---
5
- # Google Jules API Key (Required for direct REST API dispatches)
6
- JULES_API_KEY=your_google_jules_api_key_here
7
-
8
- # Alias for API key (fallback if JULES_API_KEY is not set)
9
- # GEMINI_API_KEY=your_gemini_api_key_here
10
-
11
- # Override the Jules REST API URL
12
- # JULES_API_URL=https://jules.googleapis.com/v1alpha/sessions
13
-
14
- # Target GitHub Repository (Format: owner/repo)
15
- JULES_REPO=owner/repo
16
-
17
- # Set to "true" or "1" to run in repoless/serverless mode
18
- # JULES_REPOLESS=false
19
-
20
- # Enable Dry-Run mode to simulate payload dispatch without making API calls
21
- # JULES_DRY_RUN=false
22
-
23
- # --- Budget & Security Gatekeeper ---
24
- # Daily max session limit for autonomous dispatches (Default: 300)
25
- # JULES_DAILY_BUDGET=300
26
-
27
- # Allow modifications to command-defining files (package.json, Cargo.toml, etc.) in PRs (Default: false)
28
- # JULES_ALLOW_COMMAND_FILE_CHANGES=false
29
-
30
- # Allow modifications to agent rule files (AGENTS.md, JULES_RULES_TEMPLATE.md, .agent/rules/**) in PRs (Default: false)
31
- # JULES_ALLOW_AGENT_RULE_CHANGES=false
32
-
33
- # --- Execution Scope & Git ---
34
- # Base Branch for PR Audits & Merge-Base Calculations (Default: main)
35
- BASE_BRANCH=main
36
-
37
- # PR Head Branch (Used by CI to dynamically target branches during OODA repair)
38
- # GITHUB_HEAD_REF=my-feature-branch
39
-
40
- # Root directory of the project (Auto-assigned during swarm executions)
41
- # JULES_PROJECT_ROOT=/path/to/project
42
-
43
- # --- Swarm & Concurrency ---
44
- # Maximum parallel dispatches for swarm runs (Default: 3)
45
- JULES_SWARM_CONCURRENCY=3
46
-
47
- # Dispatch Stagger Interval in Milliseconds (Default: 1500)
48
- JULES_SWARM_STAGGER_MS=1500
49
-
50
- # Rate-limit for the jules:queue command (Default: 500)
51
- # JULES_PACE_MS=500
52
-
53
- # Use Git Worktrees instead of cloning for swarm isolation
54
- # JULES_USE_WORKTREES=false
55
-
56
- # Current slot index for partitioning tasks (Swarm mode)
57
- # JULES_SLOT_INDEX=1
58
-
59
- # Total number of slots for partitioning tasks (Swarm mode)
60
- # JULES_SLOT_TOTAL=3
61
-
62
- # --- CI & Output ---
63
- # Is this running in a CI environment? (Changes log output and fail-fast behaviors)
64
- # CI=true
65
-
66
- # Allow OODA Auto-Repair even in CI environments
67
- # ALLOW_AUTO_REPAIR=true
68
-
69
- # GitHub Actions Step Summary File Path
70
- # GITHUB_STEP_SUMMARY=/path/to/step_summary.md
71
-
72
- # Disable color in terminal output
73
- # NO_COLOR=true
@@ -1,49 +0,0 @@
1
- name: Jules PR Audit & Test Gatekeeper
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- branches: [ main ]
8
-
9
- jobs:
10
- audit-and-test:
11
- runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- node-version: ['20.x', '22.x', '24.x']
15
- steps:
16
- - name: Checkout repository
17
- uses: actions/checkout@v4
18
- with:
19
- fetch-depth: 0
20
-
21
- - name: Setup Node.js
22
- uses: actions/setup-node@v4
23
- with:
24
- node-version: ${{ matrix.node-version }}
25
-
26
- - name: Cache OODA state & ledgers
27
- uses: actions/cache@v4
28
- with:
29
- path: .agent/state/
30
- key: ooda-state-${{ runner.os }}-${{ github.run_id }}
31
- restore-keys: |
32
- ooda-state-${{ runner.os }}-
33
-
34
- - name: Install dependencies
35
- run: npm install
36
-
37
- - name: Run Linter
38
- run: npm run lint --if-present
39
-
40
- - name: Run Unit Tests
41
- run: npm test --if-present
42
-
43
- - name: Run Jules PR Self-Audit Gatekeeper
44
- if: matrix.node-version == '22.x' && github.event_name == 'pull_request'
45
- run: node scripts/jules-self-audit.mjs
46
- env:
47
- CI: "true"
48
- BASE_BRANCH: "main"
49
-
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Backward compatibility shim for jules-cleanup.mjs in v0.9.0.
5
- */
6
-
7
- export function extractPrUrls(outputs = []) {
8
- const prs = [];
9
- const regex = /https:\/\/github\.com\/[^\s/]+\/[^\s/]+\/pull\/\d+/g;
10
- for (const item of outputs) {
11
- const text = typeof item === "string" ? item : item?.link || JSON.stringify(item);
12
- const matches = text.match(regex);
13
- if (matches) {
14
- for (const m of matches) {
15
- if (!prs.includes(m)) prs.push(m);
16
- }
17
- }
18
- }
19
- return prs;
20
- }
21
-
22
- export function auditSessions(sessions = [], opts = {}) {
23
- const staleHoursThreshold = opts.staleHoursThreshold || 24;
24
- const now = Date.now();
25
- const merged = [];
26
- const active = [];
27
- const stale = [];
28
-
29
- for (const s of sessions) {
30
- if (s.state === "MERGED") {
31
- merged.push(s);
32
- } else {
33
- const updatedMs = s.updateTime ? new Date(s.updateTime).getTime() : now;
34
- const ageHours = (now - updatedMs) / (1000 * 60 * 60);
35
- if (ageHours > staleHoursThreshold) {
36
- stale.push(s);
37
- } else {
38
- active.push(s);
39
- }
40
- }
41
- }
42
-
43
- return { merged, active, stale };
44
- }
45
-
46
- if (process.argv[1] && process.argv[1].endsWith("jules-cleanup.mjs")) {
47
- console.log("[Shim] Cleanup audit completed.");
48
- process.exit(0);
49
- }
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Backward compatibility shim for jules-swarm.mjs in v0.9.0.
5
- */
6
-
7
- import { existsSync, mkdirSync, writeFileSync } from "node:fs";
8
- import { join } from "node:path";
9
-
10
- export function buildSyncManifest(tasks = []) {
11
- const reservations = tasks.map((t) => ({ id: t.id, title: t.title, scope: t.scope }));
12
- return {
13
- version: 1,
14
- totalTasks: tasks.length,
15
- reservations,
16
- };
17
- }
18
-
19
- export async function pushReservationManifest(manifest, projectRoot = process.cwd()) {
20
- const isDry = process.env.JULES_DRY_RUN === "true" || process.env.JULES_DRY_RUN === "1";
21
- const isRemote = process.env.JULES_SWARM_REMOTE_PUSH === "true";
22
-
23
- const agentDir = join(projectRoot, ".agent");
24
- if (!existsSync(agentDir)) {
25
- try { mkdirSync(agentDir, { recursive: true }); } catch (_) {}
26
- }
27
- const manifestPath = join(agentDir, "sync-manifest.json");
28
- try { writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), "utf-8"); } catch (_) {}
29
-
30
- if (isDry) return { status: "DRY_RUN", path: manifestPath };
31
- if (isRemote) return { status: "PUSHED", path: manifestPath };
32
- return { status: "SAVED_LOCAL", path: manifestPath };
33
- }
34
-
35
- if (process.argv[1] && process.argv[1].endsWith("jules-swarm.mjs")) {
36
- console.log("[Shim] Running swarm via engine.run()...");
37
- process.exit(0);
38
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * Backward compatibility shim for lock-manager.mjs in v0.9.0.
3
- * Delegates to src/state.mjs.
4
- */
5
-
6
- import { acquireLock, releaseLock, lockStatus } from "../src/state.mjs";
7
-
8
- export function acquire(agent, taskId, filePaths = [], opts = {}) {
9
- return acquireLock(agent, taskId, filePaths, opts);
10
- }
11
-
12
- export function release(agent, taskId, opts = {}) {
13
- return releaseLock(agent, taskId, opts);
14
- }
15
-
16
- export function status(opts = {}) {
17
- return lockStatus(opts);
18
- }
19
-
20
- export function cleanup() {
21
- return { removed: 0 };
22
- }