@tarcisiopgs/lisa 1.24.0 → 1.26.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/README.md CHANGED
@@ -91,7 +91,7 @@ source: linear
91
91
  workflow: worktree # "worktree" (isolated) or "branch" (in-place)
92
92
 
93
93
  source_config:
94
- team: Engineering
94
+ scope: Engineering
95
95
  project: Web App
96
96
  label: ready
97
97
  pick_from: Backlog
@@ -129,7 +129,7 @@ JIRA_BASE_URL="" && JIRA_EMAIL="" && JIRA_API_TOKEN=""
129
129
 
130
130
  | Field | Linear | Trello | Plane | Shortcut | GitLab Issues | GitHub Issues | Jira |
131
131
  |-------|--------|--------|-------|----------|---------------|---------------|------|
132
- | `team` | Team name | Board name | Workspace slug | Group name | Project path | `owner/repo` | Project key |
132
+ | `scope` | Team name | Board name | Workspace slug | | Project path | `owner/repo` | Project key |
133
133
  | `project` | Project name | — | Project ID | — | — | — | — |
134
134
  | `pick_from` | Status name | List name | State name | Workflow state | — | — | Status name |
135
135
  | `label` | Label | Label | Label | Label | Label | Label | Label |
@@ -213,7 +213,7 @@ function makeIssueId(owner, repo, number) {
213
213
  var GitHubIssuesSource = class {
214
214
  name = "github-issues";
215
215
  async fetchNextIssue(config) {
216
- const { owner, repo } = parseOwnerRepo(config.team);
216
+ const { owner, repo } = parseOwnerRepo(config.scope);
217
217
  const validStates = ["open", "closed", "all"];
218
218
  const isOrphanDetection = !!config.pick_from && !validStates.includes(config.pick_from);
219
219
  const filterLabels = isOrphanDetection ? [config.pick_from] : Array.isArray(config.label) ? config.label : [config.label];
@@ -355,7 +355,7 @@ var GitHubIssuesSource = class {
355
355
  }
356
356
  }
357
357
  async listIssues(config) {
358
- const { owner, repo } = parseOwnerRepo(config.team);
358
+ const { owner, repo } = parseOwnerRepo(config.scope);
359
359
  const labels = Array.isArray(config.label) ? config.label : [config.label];
360
360
  const label = labels.map((l) => encodeURIComponent(l)).join(",");
361
361
  const path = `/repos/${owner}/${repo}/issues?labels=${label}&state=open&sort=created&direction=asc&per_page=100`;
@@ -367,6 +367,25 @@ var GitHubIssuesSource = class {
367
367
  url: issue.html_url
368
368
  }));
369
369
  }
370
+ async listLabels(scope) {
371
+ const { owner, repo } = parseOwnerRepo(scope);
372
+ const results = [];
373
+ let page = 1;
374
+ while (true) {
375
+ const labels = await githubGet(
376
+ `/repos/${owner}/${repo}/labels?per_page=100&page=${page}`
377
+ );
378
+ for (const l of labels) {
379
+ results.push({
380
+ value: l.name,
381
+ label: l.description ? `${l.name} \u2014 ${l.description}` : l.name
382
+ });
383
+ }
384
+ if (labels.length < 100) break;
385
+ page++;
386
+ }
387
+ return results;
388
+ }
370
389
  async removeLabel(issueId, labelToRemove) {
371
390
  const ref = parseGitHubIssueNumber(issueId);
372
391
  try {
@@ -458,7 +477,7 @@ function splitIssueId(id) {
458
477
  var GitLabIssuesSource = class {
459
478
  name = "gitlab-issues";
460
479
  async fetchNextIssue(config) {
461
- const project = parseGitLabProject(config.team);
480
+ const project = parseGitLabProject(config.scope);
462
481
  const validStates = ["opened", "closed", "all"];
463
482
  const isOrphanDetection = !!config.pick_from && !validStates.includes(config.pick_from);
464
483
  const filterLabels = isOrphanDetection ? [config.pick_from] : Array.isArray(config.label) ? config.label : [config.label];
@@ -504,7 +523,7 @@ var GitLabIssuesSource = class {
504
523
  const issue = sorted[0];
505
524
  if (!issue) return null;
506
525
  return {
507
- id: makeIssueId2(config.team, issue.iid),
526
+ id: makeIssueId2(config.scope, issue.iid),
508
527
  title: issue.title,
509
528
  description: issue.description ?? "",
510
529
  url: issue.web_url
@@ -573,18 +592,37 @@ var GitLabIssuesSource = class {
573
592
  });
574
593
  }
575
594
  async listIssues(config) {
576
- const project = parseGitLabProject(config.team);
595
+ const project = parseGitLabProject(config.scope);
577
596
  const labelsArr = Array.isArray(config.label) ? config.label : [config.label];
578
597
  const label = labelsArr.map((l) => encodeURIComponent(l)).join(",");
579
598
  const path = `/projects/${project}/issues?labels=${label}&state=opened&per_page=100`;
580
599
  const issues = await gitlabGet(path);
581
600
  return issues.map((issue) => ({
582
- id: makeIssueId2(config.team, issue.iid),
601
+ id: makeIssueId2(config.scope, issue.iid),
583
602
  title: issue.title,
584
603
  description: issue.description ?? "",
585
604
  url: issue.web_url
586
605
  }));
587
606
  }
607
+ async listLabels(scope) {
608
+ const project = parseGitLabProject(scope);
609
+ const results = [];
610
+ let page = 1;
611
+ while (true) {
612
+ const labels = await gitlabGet(
613
+ `/projects/${project}/labels?per_page=100&page=${page}`
614
+ );
615
+ for (const l of labels) {
616
+ results.push({
617
+ value: l.name,
618
+ label: l.description ? `${l.name} \u2014 ${l.description}` : l.name
619
+ });
620
+ }
621
+ if (labels.length < 100) break;
622
+ page++;
623
+ }
624
+ return results;
625
+ }
588
626
  async removeLabel(issueId, labelToRemove) {
589
627
  const { project, iid } = splitIssueId(issueId);
590
628
  const encodedProject = parseGitLabProject(project);
@@ -11,7 +11,7 @@ import * as clack from "@clack/prompts";
11
11
  import { execa } from "execa";
12
12
 
13
13
  // src/git/pr-body.ts
14
- var PROVIDER_ATTRIBUTION_RE = /claude\.ai|claude\s+code|gemini\s+cli|openai\s+codex|\bgoose\b|\baider\b|github\s+copilot|cursor\s+agent|\bopencode\b/i;
14
+ var PROVIDER_ATTRIBUTION_RE = /claude\.ai|claude\s+code|\banthropic\b|gemini\s+cli|\bgoogle\s+gemini\b|openai\s+codex|\bopenai\b|\bgoose\b|\baider\b|github\s+copilot|cursor\s+agent|\bopencode\b|\blisa\b/i;
15
15
  var AI_COAUTHOR_RE = /co-authored-by:[^\n]*(anthropic|claude|gemini|openai|codex|goose|aider|copilot|cursor|google)/i;
16
16
  function stripProviderAttribution(body) {
17
17
  let result = body;
@@ -182,6 +182,10 @@ function fetchCursorModels() {
182
182
  return CURSOR_PREFERRED_MODELS;
183
183
  }
184
184
  }
185
+ var COPILOT_PREFERRED_MODELS = ["claude-haiku-4.5", "gpt-5-mini", "gpt-4.1"];
186
+ function fetchCopilotModels() {
187
+ return COPILOT_PREFERRED_MODELS;
188
+ }
185
189
  function fetchOpenCodeModels() {
186
190
  try {
187
191
  const raw = execSync("opencode models", { encoding: "utf-8", timeout: 1e4 });
@@ -345,6 +349,7 @@ export {
345
349
  getVersion,
346
350
  isCursorFreePlan,
347
351
  fetchCursorModels,
352
+ fetchCopilotModels,
348
353
  fetchOpenCodeModels,
349
354
  detectPlatformFromRemoteUrl,
350
355
  detectPlatform,
@@ -69,7 +69,7 @@ function appendEntrySync(dir, entry) {
69
69
  const newEntryText = formatEntry(entry);
70
70
  let content;
71
71
  if (!existing.trim()) {
72
- content = `# Guardrails \u2014 Li\xE7\xF5es aprendidas
72
+ content = `# Guardrails \u2014 Lessons learned
73
73
 
74
74
  ${newEntryText}`;
75
75
  } else {
@@ -96,7 +96,7 @@ function appendRawEntrySync(dir, entryText) {
96
96
  const existing = existsSync(path) ? readFileSync(path, "utf-8") : "";
97
97
  let content;
98
98
  if (!existing.trim()) {
99
- content = `# Guardrails \u2014 Li\xE7\xF5es aprendidas
99
+ content = `# Guardrails \u2014 Lessons learned
100
100
 
101
101
  ${entryText}`;
102
102
  } else {
@@ -114,8 +114,8 @@ function formatEntry(entry) {
114
114
  return [
115
115
  `## Issue ${entry.issueId} (${entry.date})`,
116
116
  `- Provider: ${entry.provider}`,
117
- `- Erro: ${entry.errorType}`,
118
- `- Contexto:`,
117
+ `- Error: ${entry.errorType}`,
118
+ `- Context:`,
119
119
  "```",
120
120
  entry.context,
121
121
  "```"
@@ -4,6 +4,7 @@ import {
4
4
  detectGitRepos,
5
5
  detectPlatform,
6
6
  detectPlatformFromRemoteUrl,
7
+ fetchCopilotModels,
7
8
  fetchCursorModels,
8
9
  fetchOpenCodeModels,
9
10
  getGitRepoName,
@@ -11,12 +12,13 @@ import {
11
12
  getVersion,
12
13
  isCursorFreePlan,
13
14
  verifyPlatformCredential
14
- } from "./chunk-LAJNLRXO.js";
15
+ } from "./chunk-AGYOJQBR.js";
15
16
  export {
16
17
  detectDefaultBranch,
17
18
  detectGitRepos,
18
19
  detectPlatform,
19
20
  detectPlatformFromRemoteUrl,
21
+ fetchCopilotModels,
20
22
  fetchCursorModels,
21
23
  fetchOpenCodeModels,
22
24
  getGitRepoName,
@@ -10,7 +10,7 @@ import {
10
10
  guardrailsPath,
11
11
  migrateGuardrails,
12
12
  readGuardrails
13
- } from "./chunk-ZAYL7SJN.js";
13
+ } from "./chunk-CDI22S63.js";
14
14
  import "./chunk-7OCDGYDM.js";
15
15
  export {
16
16
  appendEntry,