@cirtium/acent-connect 1.2.5 → 1.3.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acent",
3
- "version": "1.2.5",
3
+ "version": "1.3.0",
4
4
  "description": "Recall past work, trace code changes, revisit decisions, and resume tasks with Acent.",
5
5
  "mcpServers": "./mcp-claude.json",
6
6
  "hooks": "./hooks/claude.json"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acent",
3
- "version": "1.2.5",
3
+ "version": "1.3.0",
4
4
  "description": "Recall past work, trace code changes, revisit decisions, and resume tasks with Acent.",
5
5
  "skills": "./skills/",
6
6
  "mcpServers": "./mcp-codex.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acent",
3
- "version": "1.2.5",
3
+ "version": "1.3.0",
4
4
  "description": "Recall past work, trace code changes, revisit decisions, and resume tasks with Acent.",
5
5
  "author": {
6
6
  "name": "Cirtium"
@@ -389,7 +389,49 @@ async function codexInfo(run, cwd, includeQuota = false) {
389
389
  : { models, accountKey, windows }
390
390
  }
391
391
 
392
+ function antigravityQuota(report, now) {
393
+ const command = report?.command
394
+ if (report?.status !== "SUCCESS" || command?.name !== "usage" ||
395
+ !Array.isArray(command.data?.groups))
396
+ return []
397
+ return command.data.groups.flatMap((group) => {
398
+ const name = typeof group?.name === "string" ? group.name.trim().toLowerCase() : ""
399
+ const familyGroup = name === "gemini models" ? "gemini"
400
+ : name === "claude and gpt models" ? "claude_gpt" : undefined
401
+ if (!familyGroup || !Array.isArray(group.buckets)) return []
402
+ return group.buckets.flatMap((bucket) => {
403
+ const remaining = bucket?.remaining_fraction
404
+ const reset = typeof bucket?.reset_time === "string" ? Date.parse(bucket.reset_time) : NaN
405
+ if (bucket?.disabled || !Number.isFinite(remaining) || remaining < 0 || remaining > 1 ||
406
+ !/^[a-z0-9_-]{1,80}$/i.test(bucket?.id ?? "") ||
407
+ !["5h", "weekly"].includes(bucket.window) ||
408
+ (remaining === 0 && !(reset > now)) ||
409
+ (Number.isFinite(reset) && reset <= now && remaining < 1))
410
+ return []
411
+ return [{
412
+ bucket: bucket.id,
413
+ group: familyGroup,
414
+ window: bucket.window,
415
+ remainingPercent: remaining * 100,
416
+ ...(reset > now ? { resetsAt: reset } : {}),
417
+ }]
418
+ })
419
+ })
420
+ }
421
+
392
422
  export async function readBridgeQuota(tool, cwd, run = runProcess) {
423
+ if (tool === "Antigravity") {
424
+ const result = await runHost(tool, ["usage", "--json"], { cwd, timeout: 8000 }, run)
425
+ if (result.code !== 0 || result.failure) return
426
+ const checkedAt = Date.now()
427
+ try {
428
+ const windows = antigravityQuota(JSON.parse(result.stdout), checkedAt)
429
+ if (windows.length) return { checkedAt, windows }
430
+ } catch {
431
+ // Older versions and failed discovery leave the quota unknown.
432
+ }
433
+ return
434
+ }
393
435
  if (tool !== "Codex") return
394
436
  const { accountKey, windows } = await codexInfo(run, cwd, true)
395
437
  if (!accountKey || !windows?.length) return
@@ -489,6 +531,7 @@ export async function discoverBridgeTarget(
489
531
  modelCatalog: ids.length ? "available" : "unverified",
490
532
  ...(modelCatalogFailure ? { modelCatalogFailure } : {}),
491
533
  accountKey: codex?.accountKey,
534
+ ...(tool === "Antigravity" && ids.length ? { quotaReporting: "live" } : {}),
492
535
  }
493
536
  }
494
537
 
@@ -130,7 +130,7 @@ export const bridgeTools = [
130
130
  ),
131
131
  toolSchema(
132
132
  "acent_bridge_candidates",
133
- "List locally available tool and model combinations for a new Bridge task. Review and diagnosis use the current model by default, or a verified model from the earlier work when supplied. Omit a tool to consider all enabled tools.",
133
+ "List available tool and model combinations for a new Bridge task. For similarly suitable candidates, prefer Grok in Cursor and Gemini in Antigravity, marked preferredForTool. Review and diagnosis exclude the current model family or the family verified for earlier work. Omit a tool to consider all enabled tools.",
134
134
  {
135
135
  kind,
136
136
  ...reviewModelInputs,
@@ -151,7 +151,7 @@ export const bridgeTools = [
151
151
  ...reviewModelInputs,
152
152
  tool: target,
153
153
  model: text(
154
- "Model ID from the candidates list. Omit for the tool default."
154
+ "Use a concrete model ID from the candidates list. If omitted, Cursor prefers eligible Grok and Antigravity prefers eligible Gemini. If Gemini included quota is exhausted, Antigravity can select an eligible external model with confirmed included quota. Other tools use their eligible default."
155
155
  ),
156
156
  task: text(
157
157
  "Concrete task, relevant files, constraints, and what has already been tried."
@@ -302,7 +302,7 @@ export const bridgeInstructions = [
302
302
  "Handle straightforward copy or styling edits and dependent steps directly. Start additional automatic tasks only when each has a distinct, useful result. Keep one writer responsible for each shared contract, state machine, or business rule, even if the files are disjoint. Resolve shared design decisions before starting parallel implementation. If one task needs an earlier result, pass dependsOn or finish the prerequisite first. Use read-only review or diagnosis for independent work when writes need one owner.",
303
303
  "Keep authorized production actions such as deploys, database migrations, and live payments or refunds with the coordinating agent. Use Bridge for independent review of the plan and verification of the result.",
304
304
  "If automatic delegation is disabled, continue the task directly. If automatic delegation is enabled but no suitable candidate is available, continue work you can verify and state the specific reason the independent work did not run. Report only the reviews and checks that actually completed.",
305
- "Get candidates for each new task and choose a tool and model that fit the work and the user's preference. Favor lower-usage options for routine work when verified quota is low and the user has not pinned a model. Start tasks with concrete acceptance criteria.",
305
+ "Get candidates for each task. Honor the user's selected model. For automatic selection, choose a model that fits the work and preserves review independence. Check any reported quota and avoid candidates with exhausted included quota for automatic selection, unless the user has approved that usage. Among similarly suitable candidates, prefer Grok in Cursor and Gemini in Antigravity. An external model such as Claude in Cursor may be selected when it better fits the task or when the preferred family is unavailable, within the user's usage and spending settings. Unknown quota does not indicate availability or exhaustion. Pass the selected model ID explicitly and start with concrete acceptance criteria.",
306
306
  "For review, diagnosis, or refinement, use the host-reported current turn model as currentModel. Supply originModel only when the user is revisiting earlier work and its model is known. If earlier model metadata is missing, proceed with currentModel. In Codex, the Bridge tool hook can report the current model after a call. If Bridge returns origin_model_unverified and the hook reports a model, retry with that currentModel. Pass the same model inputs when starting the selected review. Never guess a model ID.",
307
307
  "Before starting a task or refinement, gather the decisions, constraints, and evidence that affect the delegated work. Reuse current evidence and use Acent Decisions or Recall first if missing project history could change the work. Pass the relevant facts and any unresolved constraints in context on the initial request. For self-contained work, include the current facts the delegate needs.",
308
308
  "In the final answer after using Bridge, name any enabled or explicitly requested tools that could not participate because CLI authentication was required, even if other tools completed the work. Use loginRequiredTools from candidate selection and login_required from task or refinement status as evidence. If the tool later succeeds in the same request, report its final outcome instead. Do not infer sign-out from missing models or an unavailable tool. Point users to Set up in Acent Bridge when they need to sign in.",
@@ -315,6 +315,38 @@ export const bridgeInstructions = [
315
315
  "Put application status, pending checks, and blockers in the table or the evidence above the conclusion. End the entire final answer, after the table and any evidence, with exactly one standalone sentence summarizing the overall outcome and the delegate's most useful observed contribution. If delegation could not run, state the blocker in that sentence. Place nothing after it.",
316
316
  ].join(" ")
317
317
 
318
+ const preferredModelFamilies = new Map([
319
+ ["Cursor", "grok"],
320
+ ["Antigravity", "gemini"],
321
+ ])
322
+
323
+ function selectBridgeModel(candidates, tool, requested) {
324
+ const available = candidates.filter((candidate) => candidate.tool === tool)
325
+ if (requested !== undefined)
326
+ return available.find((candidate) => candidate.model === requested)
327
+ if (!preferredModelFamilies.has(tool))
328
+ return available.find((candidate) => candidate.model === null)
329
+ const preferred = available.find((candidate) =>
330
+ candidate.preferredForTool && candidate.includedQuota !== "exhausted"
331
+ )
332
+ if (preferred) return preferred
333
+ if (tool === "Antigravity" && available.some((candidate) =>
334
+ candidate.preferredForTool && candidate.includedQuota === "exhausted"
335
+ ))
336
+ return available.find((candidate) =>
337
+ !candidate.preferredForTool && candidate.includedQuota === "available"
338
+ )
339
+ }
340
+
341
+ function antigravityModelQuota(family, quota) {
342
+ const group = family === "gemini" ? "gemini"
343
+ : family === "claude" || family === "gpt" ? "claude_gpt" : undefined
344
+ if (!group || quota.status !== "reported") return "unknown"
345
+ const windows = quota.windows.filter((window) => window.group === group)
346
+ if (windows.some((window) => window.remainingPercent === 0)) return "exhausted"
347
+ return windows.length ? "available" : "unknown"
348
+ }
349
+
318
350
  const cacheDuration = 120_000
319
351
  const failedDiscoveryCacheDuration = 5_000
320
352
  const leaseMaxAge = 20 * 60_000
@@ -588,7 +620,7 @@ export function createBridge({
588
620
  return result
589
621
  }
590
622
 
591
- async function candidates(args, folder, settings) {
623
+ async function candidates(args, folder, settings, { keepToolDefault = false, liveQuota = true } = {}) {
592
624
  if (args.automatic && !settings.automatic)
593
625
  return { status: "automatic_disabled", candidates: [] }
594
626
  const reference = reviewOnly(args.kind) ? reviewModelReference(args) : undefined
@@ -607,46 +639,52 @@ export function createBridge({
607
639
  (settings.targets.includes(tool) || args.tool === tool)
608
640
  )
609
641
  .map(({ tool }) => tool)
610
- const choices = targets.flatMap((item) =>
611
- item.status !== "ready"
612
- ? []
642
+ const quotas = await Promise.all(targets.map(async (item) => {
643
+ if (item.status !== "ready") return { status: "unknown" }
644
+ if (item.quotaReporting !== "live") return cachedQuota(item)
645
+ if (!liveQuota) return { status: "unknown" }
646
+ // The Antigravity command does not expose an account ID. Use a fresh snapshot
647
+ // for this selection and avoid sharing quota across signed-in accounts.
648
+ const sample = await readQuota(item.tool, folder).catch(() => undefined)
649
+ return sample?.windows?.length
650
+ ? { status: "reported", checkedAt: sample.checkedAt, windows: sample.windows }
651
+ : { status: "unknown" }
652
+ }))
653
+ const choices = targets.flatMap((item, index) => {
654
+ if (item.status !== "ready") return []
655
+ const preferredFamily = preferredModelFamilies.get(item.tool)
656
+ const models = preferredFamily && !keepToolDefault
657
+ ? item.models
613
658
  : [{ id: null, family: item.defaultFamily ?? null }, ...item.models]
614
- .filter(
615
- (model) =>
616
- !reference ||
617
- (model.family && model.family !== reference.family)
618
- )
619
- .filter(
620
- (model) =>
621
- (unavailable.get(
622
- modelKey(folder, item.tool, model.id, item.accountKey)
623
- ) ?? 0) <= Date.now()
624
- )
625
- .map((model) => ({
626
- tool: item.tool,
627
- model: model.id,
628
- family: model.family,
629
- }))
630
- )
659
+ return models
660
+ .filter((model) => !reference || (model.family && model.family !== reference.family))
661
+ .filter((model) =>
662
+ (unavailable.get(modelKey(folder, item.tool, model.id, item.accountKey)) ?? 0) <= Date.now()
663
+ )
664
+ .map((model) => ({
665
+ tool: item.tool,
666
+ model: model.id,
667
+ family: model.family,
668
+ ...(preferredFamily && model.family === preferredFamily ? { preferredForTool: true } : {}),
669
+ ...(item.tool === "Antigravity" ? { includedQuota: antigravityModelQuota(model.family, quotas[index]) } : {}),
670
+ }))
671
+ .sort((a, b) =>
672
+ Number(a.includedQuota === "exhausted") - Number(b.includedQuota === "exhausted") ||
673
+ Number(b.preferredForTool ?? false) - Number(a.preferredForTool ?? false)
674
+ )
675
+ })
631
676
  return {
632
677
  status: choices.length ? "ready" : "no_candidate",
633
678
  candidates: choices,
634
679
  ...(reference ? { referenceModel: reference.model, referenceModelSource: reference.source } : {}),
635
680
  ...(loginRequiredTools.length ? { loginRequiredTools } : {}),
636
- tools: await Promise.all(
637
- targets.map(async (item) => ({
638
- tool: item.tool,
639
- status: item.status,
640
- modelCatalog: item.modelCatalog,
641
- ...(item.modelCatalogFailure
642
- ? { modelCatalogFailure: item.modelCatalogFailure }
643
- : {}),
644
- remainingQuota:
645
- item.status === "ready"
646
- ? await cachedQuota(item)
647
- : { status: "unknown" },
648
- }))
649
- ),
681
+ tools: targets.map((item, index) => ({
682
+ tool: item.tool,
683
+ status: item.status,
684
+ modelCatalog: item.modelCatalog,
685
+ ...(item.modelCatalogFailure ? { modelCatalogFailure: item.modelCatalogFailure } : {}),
686
+ remainingQuota: quotas[index],
687
+ })),
650
688
  }
651
689
  }
652
690
 
@@ -741,9 +779,13 @@ export function createBridge({
741
779
  if (settings?.projectKey !== projectKey) return false
742
780
  let pending = false
743
781
  for (const job of queued) {
744
- const available = await candidates({ ...job, tool: job.tool }, folder, settings)
745
- if (!available.candidates.some(({ tool, model }) =>
746
- tool === job.tool && model === job.model
782
+ const available = await candidates({ ...job, tool: job.tool }, folder, settings, {
783
+ keepToolDefault: job.model === null,
784
+ liveQuota: job.modelSelectedAutomatically === true,
785
+ })
786
+ if (!available.candidates.some(({ tool, model, includedQuota }) =>
787
+ tool === job.tool && model === job.model &&
788
+ !(job.modelSelectedAutomatically && includedQuota === "exhausted")
747
789
  )) {
748
790
  const status = available.loginRequiredTools?.includes(job.tool)
749
791
  ? "login_required"
@@ -1387,7 +1429,7 @@ export function createBridge({
1387
1429
  removeStage: (stageDir) =>
1388
1430
  rm(stageDir, { recursive: true, force: true }),
1389
1431
  launch: async (task, currentSettings, snapshot) => {
1390
- const available = await candidates(task, folder, currentSettings)
1432
+ const available = await candidates(task, folder, currentSettings, { liveQuota: false })
1391
1433
  if (available.loginRequiredTools?.includes(task.tool))
1392
1434
  return { status: "login_required" }
1393
1435
  if (
@@ -1553,17 +1595,15 @@ export function createBridge({
1553
1595
  }
1554
1596
  : { id, status: "request_conflict" }
1555
1597
  }
1556
- const available = await candidates(args, folder, settings)
1557
- if (
1558
- !available.candidates.some(
1559
- (candidate) =>
1560
- candidate.tool === args.tool &&
1561
- candidate.model === (args.model ?? null)
1562
- )
1563
- )
1598
+ const available = await candidates(args, folder, settings, { liveQuota: args.model == null })
1599
+ const selection = selectBridgeModel(available.candidates, args.tool, args.model ?? undefined)
1600
+ if (!selection)
1564
1601
  return available.status === "ready"
1565
1602
  ? { ...available, status: "selection_unavailable" }
1566
1603
  : available
1604
+ job.model = selection.model
1605
+ if (args.model == null && preferredModelFamilies.has(args.tool))
1606
+ job.modelSelectedAutomatically = true
1567
1607
  if (!reviewOnly(job.kind) && !paths.length)
1568
1608
  return { status: "write_scope_required" }
1569
1609
  const result = await start(
@@ -1656,13 +1696,13 @@ export function createBridge({
1656
1696
  )
1657
1697
  throw new Error("Keep the context answer under 12,000 characters.")
1658
1698
  const tool = args.tool ?? job.tool
1659
- const model = args.tool || args.model ? (args.model ?? null) : job.model
1660
- const available = await candidates({ ...job, tool }, folder, settings)
1661
- if (
1662
- !available.candidates.some(
1663
- (candidate) => candidate.tool === tool && candidate.model === model
1664
- )
1665
- )
1699
+ const requested = args.model ?? (args.tool ? undefined : job.model)
1700
+ const available = await candidates({ ...job, tool }, folder, settings, {
1701
+ keepToolDefault: requested === null,
1702
+ liveQuota: requested === undefined || (!args.tool && !args.model && job.modelSelectedAutomatically === true),
1703
+ })
1704
+ const selection = selectBridgeModel(available.candidates, tool, requested)
1705
+ if (!selection || (!args.tool && !args.model && job.modelSelectedAutomatically && selection.includedQuota === "exhausted"))
1666
1706
  return { ...available, status: "selection_unavailable" }
1667
1707
  const baseline = await readJson(join(jobDir, "baseline.json"), null)
1668
1708
  if (!baseline)
@@ -1676,7 +1716,15 @@ export function createBridge({
1676
1716
  )
1677
1717
  if (args.answer) job.history.push({ answer: args.answer })
1678
1718
  return start(
1679
- { ...job, tool, model, question: undefined },
1719
+ {
1720
+ ...job,
1721
+ tool,
1722
+ model: selection.model,
1723
+ modelSelectedAutomatically: args.tool || args.model
1724
+ ? requested === undefined && preferredModelFamilies.has(tool)
1725
+ : job.modelSelectedAutomatically,
1726
+ question: undefined,
1727
+ },
1680
1728
  folder,
1681
1729
  projectDir,
1682
1730
  coordination,
@@ -0,0 +1,81 @@
1
+ import { supportsForm } from "./clarification.mjs"
2
+
3
+ export const decisionConflictInstructions =
4
+ "Before the first code write in a connected project, check existing evidence for decisions relevant to the requested behavior. If needed, use one focused get_decision_context lookup for that project. Reuse the result during the task and check again only if the intended behavior materially changes. Only consider explicit user decisions that still apply. If the request can be fulfilled within the decision, proceed within it. If a proposed edit clearly conflicts and proceeding requires a choice, call acent_resolve_decision_conflict before writing the edit or dependent work. Explain the decision, its source and reason, and the specific planned change in the user's language. Honor the selected result. If native input is unavailable, present the same options in chat once and wait for an explicit reply. On interruption, keep the conflicting change paused until the user returns and chooses. A one-time exception covers only that planned change. Ambiguous or unverified conflicts can be surfaced as notes. Current explicit user instructions remain authoritative."
5
+
6
+ const outcomes = ["keep_decision", "proceed_once", "cancel"]
7
+ const fields = {
8
+ decision: { type: "string", maxLength: 600 },
9
+ reason: { type: "string", maxLength: 600 },
10
+ source: { type: "string", maxLength: 400 },
11
+ proposedChange: { type: "string", maxLength: 600 },
12
+ }
13
+
14
+ export const decisionConflictTool = {
15
+ name: "acent_resolve_decision_conflict",
16
+ title: "Resolve an Acent decision conflict",
17
+ description: "Pause before a proposed code change that clearly conflicts with a verified, still-current user decision. Show the decision, reason, source and intended change, then wait for the user's choice. This tool returns a choice to the agent.",
18
+ inputSchema: {
19
+ type: "object",
20
+ properties: {
21
+ ...fields,
22
+ labels: {
23
+ type: "object",
24
+ properties: Object.fromEntries(outcomes.map(outcome => [outcome, { type: "string", maxLength: 80 }])),
25
+ required: outcomes,
26
+ additionalProperties: false,
27
+ description: "Translate Keep existing decision, Proceed with this change only, and Cancel to the user's language.",
28
+ },
29
+ },
30
+ required: [...Object.keys(fields), "labels"],
31
+ additionalProperties: false,
32
+ },
33
+ annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
34
+ }
35
+
36
+ function validText(value, maxLength) {
37
+ return typeof value === "string" && Boolean(value.trim()) && value.length <= maxLength
38
+ }
39
+
40
+ export async function resolveDecisionConflict(input, capabilities, protocol, request) {
41
+ const { decision, reason, source, proposedChange, labels } = input ?? {}
42
+ if (
43
+ Object.entries(fields).some(([key, field]) => !validText(input?.[key], field.maxLength)) ||
44
+ !outcomes.every(key => validText(labels?.[key], 80) && !/[\r\n]/u.test(labels[key])) ||
45
+ new Set(outcomes.map(key => labels[key])).size !== outcomes.length
46
+ ) throw new Error("Provide a verified decision, its reason and source, the proposed change, and three distinct choice labels.")
47
+
48
+ const message = [proposedChange, decision, reason, source].join("\n\n")
49
+ const choices = outcomes.map(outcome => labels[outcome])
50
+ const fallback = {
51
+ status: "needs_user_input",
52
+ question: message,
53
+ choices,
54
+ nextAction: "Show the decision conflict and options in the current chat and ask once whether to proceed. Wait for the user before the conflicting write or dependent work.",
55
+ }
56
+ if (!supportsForm(capabilities, protocol)) return fallback
57
+
58
+ let result
59
+ try {
60
+ result = await request({
61
+ ...(protocol === "2025-06-18" ? {} : { mode: "form" }),
62
+ message,
63
+ requestedSchema: {
64
+ type: "object",
65
+ properties: { choice: { type: "string", enum: choices } },
66
+ required: ["choice"],
67
+ },
68
+ })
69
+ } catch {
70
+ return fallback
71
+ }
72
+ if (result?.action === "cancel" || result?.action === "decline") {
73
+ return { status: "cancel" }
74
+ }
75
+ if (result?.action === "interrupted") return { status: "interrupted" }
76
+ if (result?.action === "accept") {
77
+ const outcome = outcomes.find(key => labels[key] === result.content?.choice)
78
+ if (outcome) return { status: outcome }
79
+ }
80
+ return fallback
81
+ }
@@ -6,6 +6,7 @@ import { connectionGuidance } from "./host-guidance.mjs"
6
6
  import { clarificationInstructions, clarificationTool, clarify, createQuestionChannel } from "./clarification.mjs"
7
7
  import { connectionContext, createRootsChannel, projectFolder } from "./connection-context.mjs"
8
8
  import { memoryInstructions } from "./memory-instructions.mjs"
9
+ import { decisionConflictInstructions, decisionConflictTool, resolveDecisionConflict } from "./decision-conflict.mjs"
9
10
  import { attachmentTool, saveAttachments } from "./capture-attachments.mjs"
10
11
  import { bridgeInstructions, bridgeTools, createBridge } from "./bridge.mjs"
11
12
  import { bridgeApprovalTool, requestBridgeApproval } from "./bridge-approval.mjs"
@@ -225,6 +226,7 @@ async function handleLine(line) {
225
226
  serverInfo: { name: "acent", version: installation?.version ?? "0.2.0" },
226
227
  instructions:
227
228
  "Use acent_connect to connect Acent when setup is needed; its default scope is auto. If it returns needs_user_input, ask its question once in the user’s language and wait for their answer. Show its authorization link to the user. After approval, refresh tools/list and continue the original request. Never approve on the user's behalf. " + memoryInstructions + "\n\n" + clarificationInstructions +
229
+ "\n\n" + decisionConflictInstructions +
228
230
  (localBridgeTools.length ? "\n\n" + bridgeInstructions : "") +
229
231
  (pluginUpdates ? "\n\n" + pluginUpdateInstructions : ""),
230
232
  })
@@ -400,6 +402,16 @@ async function handleLine(line) {
400
402
  }
401
403
  throw error
402
404
  }
405
+ if (message.method === "tools/call" && message.params?.name === decisionConflictTool.name) {
406
+ try {
407
+ const value = await resolveDecisionConflict(message.params.arguments, clientCapabilities, protocol,
408
+ (params) => questions.request(params, message.id, { waitForUser: true }))
409
+ reply({ ...content(JSON.stringify(value)), structuredContent: value })
410
+ } catch (error) {
411
+ reply(content(error.message, true))
412
+ }
413
+ return
414
+ }
403
415
  if (message.method === "tools/call" && message.params?.name === clarificationTool.name) {
404
416
  try {
405
417
  const value = await clarify(message.params.arguments, clientCapabilities, protocol,
@@ -439,7 +451,7 @@ async function handleLine(line) {
439
451
  const localTools = privateGrant(grant.client_id)
440
452
  ? (grant.captureKey && grant.scope?.split(" ").includes("original:read") ? [encryptedReadTool] : [])
441
453
  : grant.scope?.split(" ").includes("conversation:write") ? [attachmentTool] : []
442
- result.result.tools = [...result.result.tools.filter((tool) => tool.name !== clarificationTool.name), setupTool, clarificationTool, ...localTools, ...localBridgeTools, ...workspaceTools]
454
+ result.result.tools = [...result.result.tools.filter((tool) => tool.name !== clarificationTool.name), setupTool, clarificationTool, decisionConflictTool, ...localTools, ...localBridgeTools, ...workspaceTools]
443
455
  }
444
456
  if (message.method === "tools/call" && result.result)
445
457
  result.result = await withPluginUpdate(result.result)
@@ -1,6 +1,7 @@
1
1
  // Shared by the HTTP server and the packaged stdio proxy. The proxy handles
2
2
  // initialize locally, so upstream server instructions do not reach its host.
3
3
  export const memoryInstructions = [
4
+ "When get_recent_work, get_handoff or search_evidence returns attachments, match them to the relevant conversation by sourceId even if the user did not mention files. When reporting past work, include relevant filenames and their returned download links. When continuing work, read attachments that the prior request or decision relied on, using readWith when provided. Download links may require the user's Acent web session. For a relevant source in attachmentSourcesUnavailable, try search_attachments if the file matters. Describe file contents only after a successful read or inspection.",
4
5
  "Acent has five named skills: Acent Recall finds past context; Acent Trace explains saved code edits; Acent Decisions retrieves choices and reasons; Acent Resume continues saved work; Acent Connect manages connection setup. Recognize these names in user requests and use the relevant exposed tools. These are workflows within the Acent plugin, not separate connections. Automatic capture remains controlled by saving consent.",
5
6
  "Use connected Acent as the first source for missing project history when it could change the answer or next action, including within the same conversation or after context compaction. Search before asking the user to restate that history, even without an explicit mention of Acent. For example, if the user says 'do it like last time' or '저번처럼 해줘' and the earlier approach is unclear, search using the task, feature, or error they mention. Also retrieve for resumed work, unexplained past decisions or constraints, conflicting records, and recurring failures where earlier attempts could affect the next step. Skip retrieval when the current context and files already answer the question. Reuse evidence already read and search again when the task changes, a reference is stale, or later corrections may matter.",
6
7
  "When looking for conversations saved by this plugin connection, use read_saved_sessions when available. For an earlier device-encrypted connection use read_encrypted_sessions when available. Follow the returned pagination to continue a search.",
@@ -16,7 +16,7 @@ Use the Acent Bridge MCP tools in a session with one local project folder open.
16
16
  - Keep authorized production actions with the coordinating agent, including deployments, database migrations, and live payments or refunds. Bridge can review the plan or verify the outcome independently.
17
17
  - If automatic delegation is disabled, continue directly. If it is enabled and no suitable candidate is available, continue the work you can verify and report why independent work did not run.
18
18
  - Classify the work as `implement`, `review`, or `diagnose`. Call `acent_bridge_candidates` and select a returned tool and model that fit the task and the user's preference. For review, diagnosis, and refinement, pass the host-reported model for this turn as `currentModel`. Supply `originModel` when reviewing earlier work whose originating model is known. Bridge uses the earlier model when supplied and recognized, otherwise it checks independence against the current model. In Codex, if candidate selection returns `origin_model_unverified` and the Bridge hook reports the current model, retry with that ID. Pass the same model inputs to start the selected work. Report when no eligible candidate is available.
19
- - Use a reported quota snapshot as a tiebreaker among suitable candidates. When a quota is low, favor a lower-usage option if it still fits the task and the user has not pinned a model. Quota windows are provider-specific, and tokens from the last run cannot establish remaining quota.
19
+ - Honor a user-specified model. For automatic selection, choose for task fit and review independence first and check any reported quota. Among similarly suitable candidates, prefer Grok in Cursor and Gemini in Antigravity, marked `preferredForTool`. Use another eligible model such as Claude in Cursor when it fits the task better or when the preferred family is unavailable, within the user's usage and spending settings. Pass the selected model ID explicitly. Treat missing or expired quota data as unknown. In Antigravity, skip candidates marked `includedQuota: exhausted` for automatic selection unless the user has authorized overage use.
20
20
  - Before starting any task or refinement, gather the active decisions, constraints, and prior findings that affect the delegated scope. Use evidence already available. If missing project history could change the work, use [Acent Decisions](../acent-decisions/SKILL.md) for prior choices or [Acent Recall](../acent-recall/SKILL.md) for earlier requirements and attempts. Put the relevant facts, decision rationale where it affects the task, and unresolved points in `context` on the first call. For self-contained work, pass the current facts the delegate needs.
21
21
  - Start with `acent_bridge_start`. Use `paths` for the files to review or the files an implementation may edit. Use `readPaths` for additional context the delegate may read. Specify how to verify completion in `acceptance`. The folder shares four baseline slots across implementation, review, and diagnosis and expands up to eight as needed. Ready tasks submitted after all eight slots fill are queued and start as slots open. Track their existing IDs. Pass `dependsOn` when a task needs the result of earlier work. Review and diagnosis run in read-only mode.
22
22
  - Check multiple jobs together with `acent_bridge_activity`, or use `acent_bridge_status` for a patch or a full answer. While jobs run, continue independent work and avoid tight polling. If a delegate requests context, answer with the relevant evidence using `acent_bridge_continue`. Ask the user if their judgment is needed. Resume interrupted work from its existing copy or use `acent_bridge_cancel` to stop work that is no longer needed.
@@ -18,6 +18,8 @@ Read relevant returned references to recover the last user request, completed or
18
18
 
19
19
  When a past command, test, build, or migration result matters, check the returned `activities` for the selected conversation and relevant turn. Use `read_activity` with its `source_id` as `sourceId` and its `id`. Read only the sections you need, such as `output` to verify the result. If you need more records, use `search_activities` with the selected `sourceId`. An unknown status or missing output leaves the outcome unconfirmed.
20
20
 
21
+ Check returned `attachments` for the selected `sourceId`. When reporting past work, include relevant file names and download links. When resuming, read files the original task relied on, using the attachment's `readWith` reference for extracted text when available. If that source appears in `attachmentSourcesUnavailable`, retry with `search_attachments` when the file matters. Report what was actually accessible.
22
+
21
23
  Conversation candidates are not verified task lists. Distinguish message time, collection time and archive storage time. Do not assume the newest conversation is unfinished, or that a reported successful change still exists. Compare the selected evidence with current files and repository state before proceeding.
22
24
 
23
25
  If several tasks fit or the next step is materially ambiguous after a focused search, ask one question with evidence-based choices in the current chat. Use `request_clarification` when available, otherwise the host's question mechanism. Wait for the answer before dependent work; never answer on the user's behalf or retry a cancelled question.
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://antigravity.google/schemas/v1/plugin.json",
3
3
  "name": "acent",
4
4
  "displayName": "Acent",
5
- "version": "1.2.5",
5
+ "version": "1.3.0",
6
6
  "description": "Recall past work, trace code changes, revisit decisions, and resume tasks with Acent.",
7
7
  "author": {
8
8
  "name": "Cirtium"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirtium/acent-connect",
3
- "version": "1.2.5",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "Install and connect the shared Acent coding-tool plugin",
6
6
  "repository": {