@alan-ai-hq/agent-manager-darwin-arm64 0.1.186 → 0.1.187

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/alan-agent.cjs CHANGED
@@ -20730,6 +20730,12 @@ var init_files = __esm({
20730
20730
  root: machinePathSchema,
20731
20731
  /** Paths relative to `root`: tracked and untracked, never ignored. */
20732
20732
  files: external_exports.array(external_exports.string()),
20733
+ /**
20734
+ * Paths relative to `root` that Git ignores: files, and a folder Git ignores whole as one
20735
+ * `dir/` entry, so a cache directory costs a path rather than its thousands of files.
20736
+ * Older runtimes omit it.
20737
+ */
20738
+ ignored: external_exports.array(external_exports.string()).optional(),
20733
20739
  /** Not a Git checkout, or its listing hit the cap: `files` is what a bounded walk found. */
20734
20740
  source: external_exports.enum(["git", "walk"]),
20735
20741
  truncated: external_exports.boolean()
@@ -25624,7 +25630,7 @@ Before replying in the Alan chat, consider what the user is trying to do and whe
25624
25630
  ALAN_SUGGESTING_WORK_PROMPT = `## Suggesting Work
25625
25631
 
25626
25632
  When \`suggest_task\` is available, use it to put work in the session's side panel for the user to pick up; it creates nothing by itself.
25627
- - \`convert_session\`: suggest once when a chat that is not linked to a task has turned into multi-step delivery work (code changes, a PR, several turns). Give the title and description the task should have.
25633
+ - \`convert_session\`: Alan already suggests this automatically at turn end when a chat that is not linked to a task has turned into multi-step delivery work (code changes, a PR, several turns), so you rarely need to. If you do, give the title and description the task should have.
25628
25634
  - \`follow_up\`: suggest real, separate work you found and did not do, such as a bug, risky debt or a missing test. Never the next step of the current request or work you are about to do. Include \`handoffContext\` with what a fresh session needs: verified findings, files, decisions.
25629
25635
  - Prefer none. At most three in a turn, never a duplicate (check \`list_task_suggestions\`), and withdraw one that stops applying. Do not mention suggestions in your reply.`;
25630
25636
  ALAN_IDENTITY_PROMPT = `You are Alan, the software factory agent. Alan ships software end to end \u2014 plan, write, review, test, deploy.
@@ -31189,7 +31195,7 @@ var init_background_task = __esm({
31189
31195
 
31190
31196
  // ../shared/src/agent/acp/plan.ts
31191
31197
  function normalized2(entry2) {
31192
- return entry2.content.trim().toLowerCase();
31198
+ return typeof entry2.content === "string" ? entry2.content.trim().toLowerCase() : "";
31193
31199
  }
31194
31200
  function hash2(text5) {
31195
31201
  let value3 = 2166136261;
@@ -31250,9 +31256,39 @@ function mergePlanGenerations(merged, source, moveAnchor) {
31250
31256
  if (generations.length > 0) merged.earlierPlans = generations;
31251
31257
  else delete merged.earlierPlans;
31252
31258
  }
31259
+ function isPlanStatus(value3) {
31260
+ return typeof value3 === "string" && STATUSES2.has(value3);
31261
+ }
31262
+ function isPlanPriority(value3) {
31263
+ return typeof value3 === "string" && PRIORITIES.has(value3);
31264
+ }
31265
+ function readPlanEntries(value3) {
31266
+ if (!Array.isArray(value3)) return [];
31267
+ return value3.flatMap((raw) => {
31268
+ if (!isRecord2(raw) || typeof raw.content !== "string" || raw.content.trim() === "") return [];
31269
+ return [
31270
+ {
31271
+ ...typeof raw.id === "string" ? { id: raw.id } : {},
31272
+ content: raw.content,
31273
+ priority: isPlanPriority(raw.priority) ? raw.priority : "medium",
31274
+ status: isPlanStatus(raw.status) ? raw.status : "pending"
31275
+ }
31276
+ ];
31277
+ });
31278
+ }
31279
+ var STATUSES2, PRIORITIES;
31253
31280
  var init_plan = __esm({
31254
31281
  "../shared/src/agent/acp/plan.ts"() {
31255
31282
  "use strict";
31283
+ init_type_guards();
31284
+ STATUSES2 = /* @__PURE__ */ new Set([
31285
+ "pending",
31286
+ "in_progress",
31287
+ "completed",
31288
+ "failed",
31289
+ "cancelled"
31290
+ ]);
31291
+ PRIORITIES = /* @__PURE__ */ new Set(["high", "medium", "low"]);
31256
31292
  }
31257
31293
  });
31258
31294
 
@@ -32519,7 +32555,12 @@ function applyOne(state2, index, update) {
32519
32555
  }
32520
32556
  case "plan_update": {
32521
32557
  if (!isUpdate(update, "plan_update")) return;
32522
- const { plan: plan2, replaced } = advancePlan(state2.plan, update, state2.entries.length);
32558
+ const entries2 = readPlanEntries(update.entries);
32559
+ const { plan: plan2, replaced } = advancePlan(
32560
+ state2.plan,
32561
+ { planId: update.planId, entries: entries2 },
32562
+ state2.entries.length
32563
+ );
32523
32564
  if (replaced) state2.earlierPlans = [...state2.earlierPlans ?? [], replaced];
32524
32565
  state2.plan = plan2;
32525
32566
  return;
@@ -37096,8 +37137,8 @@ var init_background = __esm({
37096
37137
  });
37097
37138
 
37098
37139
  // ../agent-core/src/providers/acp/create-plan.ts
37099
- function isPlanStatus(value3) {
37100
- return STATUSES2.has(value3);
37140
+ function isPlanStatus2(value3) {
37141
+ return STATUSES3.has(value3);
37101
37142
  }
37102
37143
  function todoEntries(todos) {
37103
37144
  return asArray(todos).flatMap((raw) => {
@@ -37105,7 +37146,7 @@ function todoEntries(todos) {
37105
37146
  const content2 = asString(todo?.content);
37106
37147
  if (!content2) return [];
37107
37148
  const status = asString(todo?.status);
37108
- return [{ content: content2, priority: "medium", status: isPlanStatus(status) ? status : "pending" }];
37149
+ return [{ content: content2, priority: "medium", status: isPlanStatus2(status) ? status : "pending" }];
37109
37150
  });
37110
37151
  }
37111
37152
  function readCursorPlan(params, fallbackId) {
@@ -37140,7 +37181,7 @@ function cursorPlanAnswer(answer2) {
37140
37181
  const reason = isAskSkip(answer2) ? "The user rejected the plan" : `The user answered: ${text5}`;
37141
37182
  return { outcome: { outcome: "rejected", reason } };
37142
37183
  }
37143
- var CURSOR_CREATE_PLAN, STATUSES2;
37184
+ var CURSOR_CREATE_PLAN, STATUSES3;
37144
37185
  var init_create_plan = __esm({
37145
37186
  "../agent-core/src/providers/acp/create-plan.ts"() {
37146
37187
  "use strict";
@@ -37148,7 +37189,7 @@ var init_create_plan = __esm({
37148
37189
  init_kernel2();
37149
37190
  init_tool_call_id();
37150
37191
  CURSOR_CREATE_PLAN = "cursor/create_plan";
37151
- STATUSES2 = /* @__PURE__ */ new Set([
37192
+ STATUSES3 = /* @__PURE__ */ new Set([
37152
37193
  "pending",
37153
37194
  "in_progress",
37154
37195
  "completed",
@@ -37331,13 +37372,13 @@ function planEntriesOf(value3) {
37331
37372
  {
37332
37373
  ...id2 ? { id: id2 } : {},
37333
37374
  content: content2,
37334
- priority: isPlanPriority(priority) ? priority : "medium",
37375
+ priority: isPlanPriority2(priority) ? priority : "medium",
37335
37376
  status: planEntryStatus(entry2.status)
37336
37377
  }
37337
37378
  ];
37338
37379
  });
37339
37380
  }
37340
- function isPlanPriority(value3) {
37381
+ function isPlanPriority2(value3) {
37341
37382
  return PLAN_PRIORITIES.has(value3);
37342
37383
  }
37343
37384
  function toolPlan(update) {
@@ -74513,6 +74554,16 @@ async function gitListing(git, root, dirs, signal) {
74513
74554
  return null;
74514
74555
  }
74515
74556
  }
74557
+ async function gitIgnoredListing(git, root, signal) {
74558
+ try {
74559
+ const output2 = await git.run({ cwd: root, args: [...LS_IGNORED], readOnly: true }, signal);
74560
+ if (output2.exitCode !== 0) return null;
74561
+ return [...new Set(splitNul(output2.stdout))].sort().slice(0, MAX_IGNORED_ENTRIES);
74562
+ } catch (error62) {
74563
+ if (signal.aborted) throw error62;
74564
+ return null;
74565
+ }
74566
+ }
74516
74567
  async function entriesOf2(path22) {
74517
74568
  try {
74518
74569
  return await (0, import_promises73.readdir)(path22, { withFileTypes: true });
@@ -74539,13 +74590,15 @@ async function listTree(git, root, signal) {
74539
74590
  const listed = await gitListing(git, root, void 0, signal);
74540
74591
  if (listed !== null) {
74541
74592
  const truncated2 = listed.length > MAX_TREE_FILES;
74593
+ const ignored3 = await gitIgnoredListing(git, root, signal) ?? [];
74542
74594
  return {
74543
74595
  files: truncated2 ? listed.slice(0, MAX_TREE_FILES) : listed,
74596
+ ignored: ignored3,
74544
74597
  source: "git",
74545
74598
  truncated: truncated2
74546
74599
  };
74547
74600
  }
74548
- return { ...await walkFiles(root, signal), source: "walk" };
74601
+ return { ...await walkFiles(root, signal), ignored: [], source: "walk" };
74549
74602
  }
74550
74603
  async function walkRootFiles(root) {
74551
74604
  const entries2 = await entriesOf2(root);
@@ -74576,7 +74629,7 @@ function foldersOf(files) {
74576
74629
  }
74577
74630
  return [...folders].sort();
74578
74631
  }
74579
- var import_promises73, import_node_path86, MAX_TREE_FILES, IGNORED_FOLDER_NAMES, LS_FILES;
74632
+ var import_promises73, import_node_path86, MAX_TREE_FILES, IGNORED_FOLDER_NAMES, MAX_IGNORED_ENTRIES, LS_FILES, LS_IGNORED;
74580
74633
  var init_tree = __esm({
74581
74634
  "src/capabilities/workspace/files/tree.ts"() {
74582
74635
  "use strict";
@@ -74602,7 +74655,16 @@ var init_tree = __esm({
74602
74655
  "build",
74603
74656
  "coverage"
74604
74657
  ]);
74658
+ MAX_IGNORED_ENTRIES = 2e4;
74605
74659
  LS_FILES = ["ls-files", "-z", "--cached", "--others", "--exclude-standard"];
74660
+ LS_IGNORED = [
74661
+ "ls-files",
74662
+ "-z",
74663
+ "--others",
74664
+ "--ignored",
74665
+ "--exclude-standard",
74666
+ "--directory"
74667
+ ];
74606
74668
  }
74607
74669
  });
74608
74670
 
@@ -141785,13 +141847,13 @@ var init_skill = __esm({
141785
141847
 
141786
141848
  // ../alan-engine/src/tools/todo.ts
141787
141849
  function toTodo(input2) {
141788
- const status = STATUSES3.find((candidate2) => candidate2 === input2.status);
141850
+ const status = STATUSES4.find((candidate2) => candidate2 === input2.status);
141789
141851
  if (status === void 0) {
141790
141852
  throw new ToolFailure(
141791
- `Invalid todo status "${input2.status}". Use one of: ${STATUSES3.join(", ")}.`
141853
+ `Invalid todo status "${input2.status}". Use one of: ${STATUSES4.join(", ")}.`
141792
141854
  );
141793
141855
  }
141794
- const priority = PRIORITIES.find((candidate2) => candidate2 === input2.priority) ?? null;
141856
+ const priority = PRIORITIES2.find((candidate2) => candidate2 === input2.priority) ?? null;
141795
141857
  return { content: input2.content, status, priority };
141796
141858
  }
141797
141859
  function todoJson(todos) {
@@ -141832,7 +141894,7 @@ function createTodoReadTool() {
141832
141894
  )
141833
141895
  });
141834
141896
  }
141835
- var TodosDoc, WRITE_DESCRIPTION, READ_DESCRIPTION, todoSchema, writeParameters2, STATUSES3, PRIORITIES;
141897
+ var TodosDoc, WRITE_DESCRIPTION, READ_DESCRIPTION, todoSchema, writeParameters2, STATUSES4, PRIORITIES2;
141836
141898
  var init_todo = __esm({
141837
141899
  "../alan-engine/src/tools/todo.ts"() {
141838
141900
  "use strict";
@@ -141862,8 +141924,8 @@ var init_todo = __esm({
141862
141924
  writeParameters2 = typebox_exports.Object({
141863
141925
  todos: typebox_exports.Array(todoSchema, { description: "The updated todo list" })
141864
141926
  });
141865
- STATUSES3 = ["pending", "in_progress", "completed", "cancelled"];
141866
- PRIORITIES = ["high", "medium", "low"];
141927
+ STATUSES4 = ["pending", "in_progress", "completed", "cancelled"];
141928
+ PRIORITIES2 = ["high", "medium", "low"];
141867
141929
  }
141868
141930
  });
141869
141931
 
@@ -150837,7 +150899,7 @@ var import_node_worker_threads2 = require("node:worker_threads");
150837
150899
  // package.json
150838
150900
  var package_default = {
150839
150901
  name: "@alan-ai-hq/agent-manager",
150840
- version: "0.1.186",
150902
+ version: "0.1.187",
150841
150903
  private: true,
150842
150904
  type: "module",
150843
150905
  description: "Alan machine runtime (alan-agent): identity, link, reconciler, session holders, run log, uploader, local API",
package/alan-holder.cjs CHANGED
@@ -20727,6 +20727,12 @@ var init_files = __esm({
20727
20727
  root: machinePathSchema,
20728
20728
  /** Paths relative to `root`: tracked and untracked, never ignored. */
20729
20729
  files: external_exports.array(external_exports.string()),
20730
+ /**
20731
+ * Paths relative to `root` that Git ignores: files, and a folder Git ignores whole as one
20732
+ * `dir/` entry, so a cache directory costs a path rather than its thousands of files.
20733
+ * Older runtimes omit it.
20734
+ */
20735
+ ignored: external_exports.array(external_exports.string()).optional(),
20730
20736
  /** Not a Git checkout, or its listing hit the cap: `files` is what a bounded walk found. */
20731
20737
  source: external_exports.enum(["git", "walk"]),
20732
20738
  truncated: external_exports.boolean()
@@ -25275,7 +25281,7 @@ Before replying in the Alan chat, consider what the user is trying to do and whe
25275
25281
  ALAN_SUGGESTING_WORK_PROMPT = `## Suggesting Work
25276
25282
 
25277
25283
  When \`suggest_task\` is available, use it to put work in the session's side panel for the user to pick up; it creates nothing by itself.
25278
- - \`convert_session\`: suggest once when a chat that is not linked to a task has turned into multi-step delivery work (code changes, a PR, several turns). Give the title and description the task should have.
25284
+ - \`convert_session\`: Alan already suggests this automatically at turn end when a chat that is not linked to a task has turned into multi-step delivery work (code changes, a PR, several turns), so you rarely need to. If you do, give the title and description the task should have.
25279
25285
  - \`follow_up\`: suggest real, separate work you found and did not do, such as a bug, risky debt or a missing test. Never the next step of the current request or work you are about to do. Include \`handoffContext\` with what a fresh session needs: verified findings, files, decisions.
25280
25286
  - Prefer none. At most three in a turn, never a duplicate (check \`list_task_suggestions\`), and withdraw one that stops applying. Do not mention suggestions in your reply.`;
25281
25287
  ALAN_IDENTITY_PROMPT = `You are Alan, the software factory agent. Alan ships software end to end \u2014 plan, write, review, test, deploy.
package/alan-lease.cjs CHANGED
@@ -20698,6 +20698,12 @@ var init_files = __esm({
20698
20698
  root: machinePathSchema,
20699
20699
  /** Paths relative to `root`: tracked and untracked, never ignored. */
20700
20700
  files: external_exports.array(external_exports.string()),
20701
+ /**
20702
+ * Paths relative to `root` that Git ignores: files, and a folder Git ignores whole as one
20703
+ * `dir/` entry, so a cache directory costs a path rather than its thousands of files.
20704
+ * Older runtimes omit it.
20705
+ */
20706
+ ignored: external_exports.array(external_exports.string()).optional(),
20701
20707
  /** Not a Git checkout, or its listing hit the cap: `files` is what a bounded walk found. */
20702
20708
  source: external_exports.enum(["git", "walk"]),
20703
20709
  truncated: external_exports.boolean()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alan-ai-hq/agent-manager-darwin-arm64",
3
- "version": "0.1.186",
3
+ "version": "0.1.187",
4
4
  "description": "Alan machine runtime (alan-agent) for one platform: the official Node.js binary, the runtime bundle and its launcher. Installed by @alan-ai-hq/agent-manager.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://tryalan.ai",