arkaos 2.66.0 → 2.68.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/VERSION +1 -1
- package/config/settings-template.json +3 -0
- package/core/cognition/scheduler/__pycache__/daemon.cpython-313.pyc +0 -0
- package/core/cognition/scheduler/daemon.py +36 -0
- package/core/runtime/__pycache__/llm_cost_telemetry.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/llm_cost_telemetry_cli.cpython-313.pyc +0 -0
- package/installer/index.js +15 -0
- package/installer/worktree-baseref.js +61 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.68.0
|
|
Binary file
|
|
@@ -161,6 +161,7 @@ class ArkaScheduler:
|
|
|
161
161
|
"""
|
|
162
162
|
if schedule.python_module:
|
|
163
163
|
return [sys.executable, "-m", schedule.python_module, *schedule.module_args]
|
|
164
|
+
self._warn_metered_billing_cutover(schedule)
|
|
164
165
|
claude_bin = self._resolve_claude_binary()
|
|
165
166
|
prompt_path = os.path.expanduser(schedule.prompt_file)
|
|
166
167
|
prompt_content = Path(prompt_path).read_text(encoding="utf-8")
|
|
@@ -171,6 +172,41 @@ class ArkaScheduler:
|
|
|
171
172
|
pass # fall back to raw template if profile unavailable
|
|
172
173
|
return [claude_bin, "-p", prompt_content, "--dangerously-skip-permissions"]
|
|
173
174
|
|
|
175
|
+
@staticmethod
|
|
176
|
+
def _warn_metered_billing_cutover(schedule: ScheduleConfig) -> None:
|
|
177
|
+
"""Emit a one-time warning for legacy `claude -p` schedules.
|
|
178
|
+
|
|
179
|
+
PR52 v2.68.0 — Anthropic's Agent SDK $200 credit policy takes
|
|
180
|
+
effect 2026-06-15: programmatic Claude usage (`claude -p`,
|
|
181
|
+
Agent SDK, GitHub Actions, third-party harnesses) is metered
|
|
182
|
+
separately from interactive use. Subscriptions previously
|
|
183
|
+
absorbed the burn; after the cutover they no longer do. Operator
|
|
184
|
+
action: migrate this schedule to `python_module` (Dreaming v2)
|
|
185
|
+
or to a direct-API-key invocation with explicit budget alarms.
|
|
186
|
+
"""
|
|
187
|
+
marker_dir = Path.home() / ".arkaos" / "telemetry"
|
|
188
|
+
marker = marker_dir / f"metered-billing-warned.{schedule.command}"
|
|
189
|
+
if marker.exists():
|
|
190
|
+
return
|
|
191
|
+
try:
|
|
192
|
+
marker_dir.mkdir(parents=True, exist_ok=True)
|
|
193
|
+
marker.write_text(datetime.now().isoformat(), encoding="utf-8")
|
|
194
|
+
except OSError:
|
|
195
|
+
pass # best-effort marker; warning still fires every time
|
|
196
|
+
msg = (
|
|
197
|
+
"[arkaos] schedule '" + schedule.command + "' uses the legacy "
|
|
198
|
+
"`claude -p` path. From 2026-06-15, programmatic Claude usage "
|
|
199
|
+
"is metered separately from interactive subscription credit "
|
|
200
|
+
"(Pro $20 / Max5x $100 / Max20x $200, no rollover). "
|
|
201
|
+
"Migrate to python_module or direct API key before then. "
|
|
202
|
+
"See: knowledge-anthropic-agent-sdk-credit-policy-2026-06-15"
|
|
203
|
+
)
|
|
204
|
+
try:
|
|
205
|
+
sys.stderr.write(msg + "\n")
|
|
206
|
+
sys.stderr.flush()
|
|
207
|
+
except Exception:
|
|
208
|
+
pass
|
|
209
|
+
|
|
174
210
|
# ------------------------------------------------------------------
|
|
175
211
|
# Execution
|
|
176
212
|
# ------------------------------------------------------------------
|
|
Binary file
|
|
Binary file
|
package/installer/index.js
CHANGED
|
@@ -330,6 +330,21 @@ export async function install({ runtime, path, force, skipSystem, withOllama })
|
|
|
330
330
|
console.log(` Warning: could not seed autoMode.hard_deny (${err.message})`);
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
+
// PR48 v2.67.0 — seed worktree.baseRef = "head" so new Claude Code
|
|
334
|
+
// worktrees branch from the current HEAD instead of the repo's main.
|
|
335
|
+
// Only sets when missing — operator overrides are preserved.
|
|
336
|
+
try {
|
|
337
|
+
const { seedWorktreeBaseRef } = await import("./worktree-baseref.js");
|
|
338
|
+
const wtResult = seedWorktreeBaseRef({ runtime });
|
|
339
|
+
if (!wtResult.skipped && wtResult.action === "created") {
|
|
340
|
+
console.log(` worktree.baseRef set to "${wtResult.value}".`);
|
|
341
|
+
} else if (!wtResult.skipped && wtResult.action === "merged") {
|
|
342
|
+
console.log(` worktree.baseRef merged ("${wtResult.value}").`);
|
|
343
|
+
}
|
|
344
|
+
} catch (err) {
|
|
345
|
+
console.log(` Warning: could not seed worktree.baseRef (${err.message})`);
|
|
346
|
+
}
|
|
347
|
+
|
|
333
348
|
// PR43 v2.62.0 — auto-install default Claude Code plugins. Only runs
|
|
334
349
|
// when runtime is Claude Code AND the `claude` CLI is available.
|
|
335
350
|
// Idempotent: skips plugins already in installed_plugins.json.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// worktree.baseRef default for Claude Code (PR48 v2.67.0).
|
|
2
|
+
//
|
|
3
|
+
// Claude Code v2.1.151+ added the `worktree.baseRef` setting which
|
|
4
|
+
// controls where new worktrees branch from. The default is the repo's
|
|
5
|
+
// main branch, but for ArkaOS's iterative feature-branch workflow we
|
|
6
|
+
// want worktrees to branch from the current HEAD instead — that way an
|
|
7
|
+
// agent working from a feature branch gets a worktree built on top of
|
|
8
|
+
// the in-progress branch, not master.
|
|
9
|
+
//
|
|
10
|
+
// Behaviour:
|
|
11
|
+
// - No-op when runtime is not Claude Code.
|
|
12
|
+
// - Only sets the value when it's missing. Operator-authored values
|
|
13
|
+
// are preserved (this is a default, not a contract).
|
|
14
|
+
// - Atomic write via .tmp + rename.
|
|
15
|
+
// - Never raises — failures are non-fatal.
|
|
16
|
+
|
|
17
|
+
import { existsSync, readFileSync, writeFileSync, renameSync } from "node:fs";
|
|
18
|
+
import { homedir } from "node:os";
|
|
19
|
+
import { join } from "node:path";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export const DEFAULT_WORKTREE_BASEREF = "head";
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export function seedWorktreeBaseRef({
|
|
26
|
+
runtime = "claude-code",
|
|
27
|
+
home = homedir(),
|
|
28
|
+
defaultValue = DEFAULT_WORKTREE_BASEREF,
|
|
29
|
+
} = {}) {
|
|
30
|
+
if (runtime !== "claude-code") {
|
|
31
|
+
return { skipped: "runtime-not-claude-code", action: null };
|
|
32
|
+
}
|
|
33
|
+
const settingsPath = join(home, ".claude", "settings.json");
|
|
34
|
+
if (!existsSync(settingsPath)) {
|
|
35
|
+
return { skipped: "claude-settings-not-found", action: null };
|
|
36
|
+
}
|
|
37
|
+
let settings;
|
|
38
|
+
try {
|
|
39
|
+
settings = JSON.parse(readFileSync(settingsPath, "utf-8"));
|
|
40
|
+
} catch {
|
|
41
|
+
return { skipped: "settings-not-parseable", action: null };
|
|
42
|
+
}
|
|
43
|
+
if (typeof settings !== "object" || settings === null) {
|
|
44
|
+
return { skipped: "settings-not-object", action: null };
|
|
45
|
+
}
|
|
46
|
+
const existing = settings.worktree && typeof settings.worktree === "object"
|
|
47
|
+
? settings.worktree
|
|
48
|
+
: null;
|
|
49
|
+
if (existing && typeof existing.baseRef === "string" && existing.baseRef) {
|
|
50
|
+
return { skipped: null, action: "noop", value: existing.baseRef };
|
|
51
|
+
}
|
|
52
|
+
settings.worktree = { ...(existing ?? {}), baseRef: defaultValue };
|
|
53
|
+
const tmp = `${settingsPath}.tmp-${process.pid}`;
|
|
54
|
+
writeFileSync(tmp, JSON.stringify(settings, null, 2) + "\n");
|
|
55
|
+
renameSync(tmp, settingsPath);
|
|
56
|
+
return {
|
|
57
|
+
skipped: null,
|
|
58
|
+
action: existing ? "merged" : "created",
|
|
59
|
+
value: defaultValue,
|
|
60
|
+
};
|
|
61
|
+
}
|
package/package.json
CHANGED