superagent-skill 0.2.0 → 0.4.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 +21 -2
- package/SKILL.md +47 -1
- package/lib/cli.mjs +1182 -38
- package/lib/index.mjs +1 -1
- package/lib/{settings-D0qG6Mo8.mjs → settings-D8KZBXO7.mjs} +81 -4
- package/package.json +4 -2
- package/prompts/pr-review.md +5 -0
package/lib/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ticketStage, B as readUntil, D as reasonText, E as REASONS, F as isoTime, G as waitsForPerson, H as settled, I as latestAssignment, L as latestReport, M as USER_ERRORS, N as UserError, O as said, P as followupOwners, R as liveTicket, T as Engine, U as threadKey, V as runningAssignment, W as ticketOutcome, _ 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 key, k as canRetry, 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, y as RuleMatchSchema, z as reached } from "./settings-
|
|
1
|
+
import { A as ticketStage, B as readUntil, D as reasonText, E as REASONS, F as isoTime, G as waitsForPerson, H as settled, I as latestAssignment, L as latestReport, M as USER_ERRORS, N as UserError, O as said, P as followupOwners, R as liveTicket, T as Engine, U as threadKey, V as runningAssignment, W as ticketOutcome, _ 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 key, k as canRetry, 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, y as RuleMatchSchema, z as reached } from "./settings-D8KZBXO7.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);
|
|
@@ -2542,7 +2542,7 @@ var ClaudeRunner = class {
|
|
|
2542
2542
|
"--output-format",
|
|
2543
2543
|
"stream-json",
|
|
2544
2544
|
"--verbose",
|
|
2545
|
-
"--dangerously-skip-permissions",
|
|
2545
|
+
...run.readOnly ? ["--tools", "Read,Grep,Glob"] : ["--dangerously-skip-permissions"],
|
|
2546
2546
|
...run.model ? ["--model", run.model] : []
|
|
2547
2547
|
];
|
|
2548
2548
|
const result = await runProcess(this.binary, argv, {
|
|
@@ -2599,7 +2599,7 @@ var CodexRunner = class {
|
|
|
2599
2599
|
const argv = [
|
|
2600
2600
|
"exec",
|
|
2601
2601
|
"--sandbox",
|
|
2602
|
-
"danger-full-access",
|
|
2602
|
+
run.readOnly ? "read-only" : "danger-full-access",
|
|
2603
2603
|
"--skip-git-repo-check",
|
|
2604
2604
|
"--json",
|
|
2605
2605
|
"-o",
|
|
@@ -2769,6 +2769,62 @@ const PolicySchema = z.object({
|
|
|
2769
2769
|
]).default("observe"),
|
|
2770
2770
|
rules: z.array(RuleSchema).default([])
|
|
2771
2771
|
});
|
|
2772
|
+
const AttentionSchema = z.object({
|
|
2773
|
+
idleSecondsThreshold: z.number().int().min(10).max(86400).default(300),
|
|
2774
|
+
quietHours: z.object({
|
|
2775
|
+
enabled: z.boolean().default(true),
|
|
2776
|
+
start: z.string().default("23:00"),
|
|
2777
|
+
end: z.string().default("08:00"),
|
|
2778
|
+
morningDigestAt: z.string().default("08:30")
|
|
2779
|
+
}).default({
|
|
2780
|
+
enabled: true,
|
|
2781
|
+
start: "23:00",
|
|
2782
|
+
end: "08:00",
|
|
2783
|
+
morningDigestAt: "08:30"
|
|
2784
|
+
}),
|
|
2785
|
+
minNotifyIntervalMinutes: z.number().int().min(1).max(1440).default(10),
|
|
2786
|
+
maxDailyNotifications: z.number().int().min(1).max(1e3).default(25)
|
|
2787
|
+
});
|
|
2788
|
+
const BudgetSchema = z.object({
|
|
2789
|
+
autonomousCooldownSeconds: z.number().int().min(0).max(86400).default(180),
|
|
2790
|
+
maxAutonomousWakesPerDay: z.number().int().min(1).max(1e3).default(48)
|
|
2791
|
+
});
|
|
2792
|
+
const TimerScheduleSchema = z.object({
|
|
2793
|
+
id: z.string().min(1),
|
|
2794
|
+
cron: z.string().optional(),
|
|
2795
|
+
intervalMinutes: z.number().int().min(1).optional(),
|
|
2796
|
+
prompt: z.string().min(1)
|
|
2797
|
+
});
|
|
2798
|
+
const TimersSchema = z.object({
|
|
2799
|
+
enabled: z.boolean().default(true),
|
|
2800
|
+
schedules: z.array(TimerScheduleSchema).default([])
|
|
2801
|
+
});
|
|
2802
|
+
const WatcherSchema = z.object({
|
|
2803
|
+
id: z.string().min(1),
|
|
2804
|
+
intervalMinutes: z.number().int().min(1).default(10),
|
|
2805
|
+
command: z.string().min(1),
|
|
2806
|
+
instruction: z.string().min(1)
|
|
2807
|
+
});
|
|
2808
|
+
const PrReviewSchema = z.object({
|
|
2809
|
+
/** Whether autonomous PR review is enabled. */
|
|
2810
|
+
enabled: z.boolean().default(true),
|
|
2811
|
+
/** When true, actively polls open PRs in the repository. */
|
|
2812
|
+
pollOpenPrs: z.boolean().default(true),
|
|
2813
|
+
/** Commands to run locally inside the worktree to verify the PR, e.g. ["npm test", "npm run build"]. */
|
|
2814
|
+
verifyCommands: z.array(z.string()).default([]),
|
|
2815
|
+
/** Timeout in seconds for each verify command. Default 300s. */
|
|
2816
|
+
verifyTimeoutSeconds: z.number().int().min(10).max(3600).default(300),
|
|
2817
|
+
/** Whether to automatically merge the PR if tests pass and review passes. */
|
|
2818
|
+
autoMerge: z.boolean().default(false),
|
|
2819
|
+
/** Method to use when auto-merging: "squash" | "merge" | "rebase". Default "squash". */
|
|
2820
|
+
mergeMethod: z.enum([
|
|
2821
|
+
"squash",
|
|
2822
|
+
"merge",
|
|
2823
|
+
"rebase"
|
|
2824
|
+
]).default("squash"),
|
|
2825
|
+
/** Whether community PRs (from authors not explicitly in allowed list) may be reviewed. */
|
|
2826
|
+
allowCommunityPrs: z.boolean().default(true)
|
|
2827
|
+
});
|
|
2772
2828
|
const SettingsSchema = z.object({
|
|
2773
2829
|
/** Where tickets, triggers and logs live, as an absolute path. */
|
|
2774
2830
|
stateDir: z.string().min(1),
|
|
@@ -2782,7 +2838,9 @@ const SettingsSchema = z.object({
|
|
|
2782
2838
|
/** How often to poll notifications, in seconds. */
|
|
2783
2839
|
pollSeconds: z.number().int().min(15).max(3600).default(60),
|
|
2784
2840
|
/** GitHub logins that may ask for work. Empty accepts nobody. */
|
|
2785
|
-
allowed: z.array(z.string()).default([])
|
|
2841
|
+
allowed: z.array(z.string()).default([]),
|
|
2842
|
+
/** Pull request review, checkout, and verification settings. */
|
|
2843
|
+
prReview: PrReviewSchema.optional()
|
|
2786
2844
|
}).optional(),
|
|
2787
2845
|
feishu: z.object({
|
|
2788
2846
|
enabled: z.boolean().default(true),
|
|
@@ -2799,6 +2857,17 @@ const SettingsSchema = z.object({
|
|
|
2799
2857
|
allowed: z.array(z.string()).default([]),
|
|
2800
2858
|
syncChat: z.string().optional()
|
|
2801
2859
|
}).optional(),
|
|
2860
|
+
twitter: z.object({
|
|
2861
|
+
enabled: z.boolean().default(true),
|
|
2862
|
+
/** The CLI that acts as Twitter client (opencli). */
|
|
2863
|
+
cli: z.string().default("opencli"),
|
|
2864
|
+
/** Search query or keywords to monitor (e.g. "superagent OR @smallnest"). */
|
|
2865
|
+
query: z.string().min(1),
|
|
2866
|
+
/** How often to poll Twitter search, in seconds. */
|
|
2867
|
+
pollSeconds: z.number().int().min(15).max(3600).default(300),
|
|
2868
|
+
/** Twitter handles that may trigger tickets; empty accepts any user matching the query. */
|
|
2869
|
+
allowed: z.array(z.string()).default([])
|
|
2870
|
+
}).optional(),
|
|
2802
2871
|
executor: ExecutorSchema.optional().transform((value) => ExecutorSchema.parse(value ?? {})),
|
|
2803
2872
|
policy: PolicySchema.optional().transform((value) => PolicySchema.parse(value ?? {})),
|
|
2804
2873
|
/** Who assesses a candidate and with what: the `claude` CLI, or a runner named here. */
|
|
@@ -2813,7 +2882,15 @@ const SettingsSchema = z.object({
|
|
|
2813
2882
|
/** Branch names the agent pushes, as a prefix followed by the ticket's short name. */
|
|
2814
2883
|
branchPrefix: z.string().default("agent/"),
|
|
2815
2884
|
/** The operator's own instructions, appended to every ticket's prompt in their words. */
|
|
2816
|
-
prompts: z.string().default("")
|
|
2885
|
+
prompts: z.string().default(""),
|
|
2886
|
+
/** Human presence and attention routing configuration. */
|
|
2887
|
+
attention: AttentionSchema.optional().transform((value) => AttentionSchema.parse(value ?? {})),
|
|
2888
|
+
/** Token and autonomous wakeup protection guard. */
|
|
2889
|
+
budget: BudgetSchema.optional().transform((value) => BudgetSchema.parse(value ?? {})),
|
|
2890
|
+
/** Autonomous timers and schedules. */
|
|
2891
|
+
timers: TimersSchema.optional().transform((value) => TimersSchema.parse(value ?? {})),
|
|
2892
|
+
/** Pull-based active watchers for external sources without webhooks. */
|
|
2893
|
+
watchers: z.array(WatcherSchema).default([])
|
|
2817
2894
|
});
|
|
2818
2895
|
/** The default an installation starts from, for `superagent init`. */
|
|
2819
2896
|
function defaultSettings(cwd, home) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superagent-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "A headless, file-backed agent that turns requests from GitHub issues
|
|
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": {
|
|
7
7
|
"superagent": "bin/superagent.js"
|
|
8
8
|
},
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"opencode",
|
|
34
34
|
"feishu",
|
|
35
35
|
"github",
|
|
36
|
+
"twitter",
|
|
37
|
+
"always-on",
|
|
36
38
|
"automation",
|
|
37
39
|
"tickets"
|
|
38
40
|
],
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Review the pull request carefully before approving or merging.
|
|
2
|
+
Presume community PRs may be authored by unassisted coding agents without human testing.
|
|
3
|
+
Verify that all unit tests, linters, and builds have succeeded locally in the checked-out worktree.
|
|
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 PRs.
|