@xn-intenton-z2a/agentic-lib 7.1.40 → 7.1.41

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/README.md CHANGED
@@ -157,7 +157,6 @@ Configuration lives in `agentic-lib.toml` at your project root:
157
157
 
158
158
  ```toml
159
159
  [schedule]
160
- tier = "schedule-1" # schedule-1 through schedule-4
161
160
  supervisor = "daily" # off | weekly | daily | hourly | continuous
162
161
 
163
162
  [paths]
@@ -134,7 +134,7 @@ async function runTask(taskName) {
134
134
  const writablePaths = getWritablePathsFromConfig(config);
135
135
  const readOnlyPaths = getReadOnlyPathsFromConfig(config);
136
136
 
137
- console.log(`[config] schedule=${config.schedule}`);
137
+ console.log(`[config] supervisor=${config.supervisor || "daily"}`);
138
138
  console.log(`[config] writable=${writablePaths.join(", ")}`);
139
139
  console.log(`[config] test=${config.testScript}`);
140
140
  console.log("");
@@ -241,7 +241,6 @@ async function loadTaskConfig() {
241
241
  const { parse } = await import("smol-toml");
242
242
  const toml = parse(readFileSync(tomlPath, "utf8"));
243
243
  return {
244
- schedule: toml.schedule?.tier || "schedule-1",
245
244
  missionPath: toml.paths?.mission || "MISSION.md",
246
245
  sourcePath: toml.paths?.source || "src/lib/",
247
246
  testsPath: toml.paths?.tests || "tests/unit/",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.1.40",
3
+ "version": "7.1.41",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -119,7 +119,6 @@ export function loadConfig(configPath) {
119
119
  const bot = toml.bot || {};
120
120
 
121
121
  return {
122
- schedule: toml.schedule?.tier || "schedule-1",
123
122
  supervisor: toml.schedule?.supervisor || "daily",
124
123
  model: toml.schedule?.model || "gpt-5-mini",
125
124
  paths,
@@ -5,7 +5,7 @@
5
5
  // Appends structured entries to the intentïon.md activity log,
6
6
  // including commit URLs and safety-check outcomes.
7
7
 
8
- import { writeFileSync, appendFileSync, existsSync, mkdirSync } from "fs";
8
+ import { writeFileSync, readFileSync, appendFileSync, existsSync, mkdirSync } from "fs";
9
9
  import { dirname } from "path";
10
10
  import * as core from "@actions/core";
11
11
 
@@ -73,8 +73,20 @@ export function logActivity({
73
73
 
74
74
  const entry = parts.join("\n");
75
75
 
76
+ const MAX_ENTRIES = 30;
77
+
76
78
  if (existsSync(filepath)) {
77
- appendFileSync(filepath, entry);
79
+ // Rotate: keep only the header + last MAX_ENTRIES entries
80
+ const existing = readFileSync(filepath, "utf8");
81
+ const sections = existing.split("\n## ");
82
+ if (sections.length > MAX_ENTRIES + 1) {
83
+ // sections[0] is the header, sections[1..] are entries (prefixed with "## " after split)
84
+ const header = sections[0];
85
+ const kept = sections.slice(-(MAX_ENTRIES));
86
+ writeFileSync(filepath, header + "\n## " + kept.join("\n## ") + entry);
87
+ } else {
88
+ appendFileSync(filepath, entry);
89
+ }
78
90
  } else {
79
91
  writeFileSync(filepath, `# intentïon Activity Log\n${entry}`);
80
92
  }
@@ -17,21 +17,41 @@ import { runCopilotTask, scanDirectory } from "../copilot.js";
17
17
  export async function reviewIssue(context) {
18
18
  const { octokit, repo, config, issueNumber, instructions, model } = context;
19
19
 
20
- // If no specific issue, review the oldest open automated issue
20
+ // If no specific issue, review the oldest open automated issue that hasn't been recently reviewed
21
21
  let targetIssueNumber = issueNumber;
22
22
  if (!targetIssueNumber) {
23
23
  const { data: openIssues } = await octokit.rest.issues.listForRepo({
24
24
  ...repo,
25
25
  state: "open",
26
26
  labels: "automated",
27
- per_page: 1,
27
+ per_page: 5,
28
28
  sort: "created",
29
29
  direction: "asc",
30
30
  });
31
31
  if (openIssues.length === 0) {
32
32
  return { outcome: "nop", details: "No open automated issues to review" };
33
33
  }
34
- targetIssueNumber = openIssues[0].number;
34
+ // Try each issue, skipping ones that already have a recent automated review comment
35
+ for (const candidate of openIssues) {
36
+ const { data: comments } = await octokit.rest.issues.listComments({
37
+ ...repo,
38
+ issue_number: candidate.number,
39
+ per_page: 5,
40
+ sort: "created",
41
+ direction: "desc",
42
+ });
43
+ const hasRecentReview = comments.some(
44
+ (c) => c.body?.includes("**Automated Review Result:**") && Date.now() - new Date(c.created_at).getTime() < 86400000,
45
+ );
46
+ if (!hasRecentReview) {
47
+ targetIssueNumber = candidate.number;
48
+ break;
49
+ }
50
+ }
51
+ // Fall back to the oldest if all have been recently reviewed
52
+ if (!targetIssueNumber) {
53
+ targetIssueNumber = openIssues[0].number;
54
+ }
35
55
  }
36
56
 
37
57
  const { data: issue } = await octokit.rest.issues.get({
@@ -74,7 +74,6 @@ async function gatherContext(octokit, repo, config) {
74
74
  issuesSummary,
75
75
  prsSummary,
76
76
  workflowsSummary,
77
- schedule: config.schedule,
78
77
  supervisor: config.supervisor,
79
78
  featureIssuesWipLimit: config.featureDevelopmentIssuesWipLimit,
80
79
  maintenanceIssuesWipLimit: config.maintenanceIssuesWipLimit,
@@ -108,7 +107,7 @@ function buildPrompt(ctx, agentInstructions) {
108
107
  `### Recent Activity`,
109
108
  ctx.recentActivity || "none",
110
109
  "",
111
- `### Schedule: ${ctx.schedule}, Supervisor: ${ctx.supervisor}`,
110
+ `### Supervisor: ${ctx.supervisor}`,
112
111
  "",
113
112
  `### Issue Limits`,
114
113
  `Feature development WIP limit: ${ctx.featureIssuesWipLimit}`,
@@ -28,7 +28,15 @@ runs:
28
28
  git add -A
29
29
  if git diff --cached --quiet; then
30
30
  echo "No changes to commit"
31
+ elif git diff --cached --name-only | grep -qvE '(intentïon\.md|intention\.md)$'; then
32
+ # At least one non-log file changed — proceed with commit
33
+ true
31
34
  else
35
+ echo "Only log files changed — skipping commit"
36
+ git reset HEAD -- . > /dev/null 2>&1
37
+ exit 0
38
+ fi
39
+ if ! git diff --cached --quiet; then
32
40
  git commit -m "${{ inputs.commit-message }}"
33
41
  REF="${{ inputs.push-ref }}"
34
42
  MAX_RETRIES=3
@@ -29,7 +29,9 @@ You are the supervisor of an autonomous coding repository. Your job is to advanc
29
29
  - **set-schedule:\<frequency\>** — Change the supervisor schedule. Use `weekly` when mission is substantially achieved, `continuous` to ramp up for active development.
30
30
  - **nop** — When everything is running optimally: transform is active, issues are flowing, no failures.
31
31
 
32
- ## Guidelines
32
+ ## Stale Issue Detection
33
+
34
+ When open issues with the `automated` label lack the `ready` label and are more than 1 day old, and review has run without adding labels, use `github:label-issue` to add the `ready` label directly. Don't wait for review to fix itself — if issues are stuck without `ready` for more than a cycle, label them so transform can pick them up.
33
35
 
34
36
  ## Mission Lifecycle
35
37
 
@@ -1,6 +1,3 @@
1
- # Which agentic-lib workflow schedule should be used?
2
- schedule: schedule-1
3
-
4
1
  # Mapping for from symbolic keys to filepaths for access by agentic-lib workflows with limits and access permissions
5
2
  paths:
6
3
  # Filepaths for elaborator workflows
@@ -6,7 +6,6 @@
6
6
  # Place it at the root of your project.
7
7
 
8
8
  [schedule]
9
- tier = "schedule-1" # schedule-1 through schedule-4
10
9
  supervisor = "daily" # off | weekly | daily | hourly | continuous
11
10
  model = "gpt-5-mini" # gpt-5-mini | claude-sonnet-4 | gpt-4.1
12
11
 
@@ -14,7 +14,7 @@
14
14
  "author": "",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@xn-intenton-z2a/agentic-lib": "^7.1.40"
17
+ "@xn-intenton-z2a/agentic-lib": "^7.1.41"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@vitest/coverage-v8": "^4.0.0",
@@ -103,7 +103,7 @@ jobs:
103
103
  ...context.repo,
104
104
  state: 'open',
105
105
  labels: 'automated',
106
- per_page: 1,
106
+ per_page: 20,
107
107
  sort: 'created',
108
108
  direction: 'asc',
109
109
  });