superagent-skill 0.4.2 → 0.5.1
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 +35 -7
- package/SKILL.md +15 -5
- package/lib/cli.mjs +632 -126
- package/lib/index.mjs +1 -1
- package/lib/{settings-Dud0f9wo.mjs → settings-BwRUbWkx.mjs} +38 -0
- package/package.json +1 -1
- package/prompts/delivery.md +2 -2
- package/prompts/pr-review.md +3 -3
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as followupOwners, B as ticketOutcome, C as reasonText, D as key, E as ticketStage, F as reached, I as readUntil, L as runningAssignment, M as latestAssignment, N as latestReport, O as USER_ERRORS, P as liveTicket, R as settled, S as REASONS, T as canRetry, V as waitsForPerson, _ as AdmissionDirectionSchema, a as readSettings, b as directionAllowed, c as AGENT_NAMES, d as REPORT_FILE, f as readReport, g as readState, h as FileRepositories, i as parseYaml, j as isoTime, k as UserError, l as installed, n as SettingsSchema, o as stringifyYaml, p as reportInstructions, r as defaultSettings, s as writeSettings, t as SETTINGS_FILE, u as runnerFor, v as RuleAssessmentSchema, w as said, x as Engine, y as RuleMatchSchema, z as threadKey } from "./settings-
|
|
1
|
+
import { A as followupOwners, B as ticketOutcome, C as reasonText, D as key, E as ticketStage, F as reached, I as readUntil, L as runningAssignment, M as latestAssignment, N as latestReport, O as USER_ERRORS, P as liveTicket, R as settled, S as REASONS, T as canRetry, V as waitsForPerson, _ as AdmissionDirectionSchema, a as readSettings, b as directionAllowed, c as AGENT_NAMES, d as REPORT_FILE, f as readReport, g as readState, h as FileRepositories, i as parseYaml, j as isoTime, k as UserError, l as installed, n as SettingsSchema, o as stringifyYaml, p as reportInstructions, r as defaultSettings, s as writeSettings, t as SETTINGS_FILE, u as runnerFor, v as RuleAssessmentSchema, w as said, x as Engine, y as RuleMatchSchema, z as threadKey } from "./settings-BwRUbWkx.mjs";
|
|
2
2
|
// src/core/memory.ts
|
|
3
3
|
/** In-memory repository implementation for testing and ephemeral engine instances. */
|
|
4
4
|
const clone = (value) => structuredClone(value);
|
|
@@ -2623,6 +2623,23 @@ const PrReviewSchema = z.object({
|
|
|
2623
2623
|
/** Whether community PRs (from authors not explicitly in allowed list) may be reviewed. */
|
|
2624
2624
|
allowCommunityPrs: z.boolean().default(true)
|
|
2625
2625
|
});
|
|
2626
|
+
/** Merge request review on GitLab: the same work as `PrReviewSchema`, with GitLab's squash-instead-of-method. */
|
|
2627
|
+
const MrReviewSchema = z.object({
|
|
2628
|
+
/** Whether autonomous merge request review is enabled. */
|
|
2629
|
+
enabled: z.boolean().default(true),
|
|
2630
|
+
/** When true, actively polls open merge requests in the project. */
|
|
2631
|
+
pollOpenMrs: z.boolean().default(true),
|
|
2632
|
+
/** Commands to run locally inside the worktree to verify the merge request, e.g. ["npm test"]. */
|
|
2633
|
+
verifyCommands: z.array(z.string()).default([]),
|
|
2634
|
+
/** Timeout in seconds for each verify command. Default 300s. */
|
|
2635
|
+
verifyTimeoutSeconds: z.number().int().min(10).max(3600).default(300),
|
|
2636
|
+
/** Whether to merge the merge request if verification and review both pass. */
|
|
2637
|
+
autoMerge: z.boolean().default(false),
|
|
2638
|
+
/** Whether the merge squashes the commits. GitLab applies its project setting when this is false. */
|
|
2639
|
+
squash: z.boolean().default(true),
|
|
2640
|
+
/** Whether merge requests from authors not explicitly in the allowed list may be reviewed. */
|
|
2641
|
+
allowCommunityMrs: z.boolean().default(true)
|
|
2642
|
+
});
|
|
2626
2643
|
const SettingsSchema = z.object({
|
|
2627
2644
|
/** Where tickets, triggers and logs live, as an absolute path. */
|
|
2628
2645
|
stateDir: z.string().min(1),
|
|
@@ -2666,6 +2683,21 @@ const SettingsSchema = z.object({
|
|
|
2666
2683
|
/** Twitter handles that may trigger tickets; empty accepts any user matching the query. */
|
|
2667
2684
|
allowed: z.array(z.string()).default([])
|
|
2668
2685
|
}).optional(),
|
|
2686
|
+
gitlab: z.object({
|
|
2687
|
+
enabled: z.boolean().default(true),
|
|
2688
|
+
/** The instance to talk to: `gitlab.com`, or the host of a self-managed GitLab, optionally with a port. */
|
|
2689
|
+
host: z.string().regex(/^[A-Za-z0-9.-]+(?::\d+)?$/, "expected a host such as gitlab.com or git.example.com:8443").default("gitlab.com"),
|
|
2690
|
+
/** The project to work on, as `group/project`; subgroups are part of the path. */
|
|
2691
|
+
project: z.string().regex(/^[\w.-]+(?:\/[\w.-]+)+$/, "expected group/project"),
|
|
2692
|
+
/** The CLI that acts as the agent's account, such as `glab-agent`. */
|
|
2693
|
+
cli: z.string().default("glab"),
|
|
2694
|
+
/** How often to poll to-do items, in seconds. */
|
|
2695
|
+
pollSeconds: z.number().int().min(15).max(3600).default(60),
|
|
2696
|
+
/** GitLab usernames that may ask for work. Empty accepts nobody. */
|
|
2697
|
+
allowed: z.array(z.string()).default([]),
|
|
2698
|
+
/** Merge request review, checkout, and verification settings. */
|
|
2699
|
+
mrReview: MrReviewSchema.optional()
|
|
2700
|
+
}).optional(),
|
|
2669
2701
|
executor: ExecutorSchema.optional().transform((value) => ExecutorSchema.parse(value ?? {})),
|
|
2670
2702
|
policy: PolicySchema.optional().transform((value) => PolicySchema.parse(value ?? {})),
|
|
2671
2703
|
/** Who assesses a candidate and with what: the `claude` CLI, or a runner named here. */
|
|
@@ -2689,6 +2721,12 @@ const SettingsSchema = z.object({
|
|
|
2689
2721
|
timers: TimersSchema.optional().transform((value) => TimersSchema.parse(value ?? {})),
|
|
2690
2722
|
/** Pull-based active watchers for external sources without webhooks. */
|
|
2691
2723
|
watchers: z.array(WatcherSchema).default([])
|
|
2724
|
+
}).strict().superRefine((settings, context) => {
|
|
2725
|
+
if (settings.github?.enabled && settings.gitlab?.enabled) context.addIssue({
|
|
2726
|
+
code: "custom",
|
|
2727
|
+
path: ["gitlab"],
|
|
2728
|
+
message: "one installation serves one forge: set `github.enabled` or `gitlab.enabled` to false"
|
|
2729
|
+
});
|
|
2692
2730
|
});
|
|
2693
2731
|
/** The default an installation starts from, for `superagent init`. */
|
|
2694
2732
|
function defaultSettings(cwd, home) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superagent-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A headless, file-backed agent that turns requests from GitHub issues, Feishu chats, or Twitter mentions into tickets and runs each ticket on a configurable coding agent: Claude Code, Codex or opencode.",
|
|
6
6
|
"bin": {
|
package/prompts/delivery.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Describe the change in the pull request
|
|
1
|
+
Describe the change in the request you opened — a pull request or a merge request — with the checks you ran and any limitation a reviewer should know.
|
|
2
2
|
|
|
3
|
-
If a person's branch or
|
|
3
|
+
If a person's branch or request already contains this change, close yours with one sentence naming theirs.
|
|
4
4
|
Do not close it for work that is only related.
|
package/prompts/pr-review.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Review the
|
|
2
|
-
Presume community
|
|
1
|
+
Review the request carefully before approving or merging.
|
|
2
|
+
Presume community requests may be authored by unassisted coding agents without human testing.
|
|
3
3
|
Verify that all unit tests, linters, and builds have succeeded locally in the checked-out worktree.
|
|
4
4
|
Never merge code that breaks existing tests, introduces security flaws, or degrades maintainability.
|
|
5
|
-
If changes are needed, provide constructive, line-specific feedback or close unfixable/spam
|
|
5
|
+
If changes are needed, provide constructive, line-specific feedback or close unfixable/spam requests.
|