sailfork 0.2.0 → 0.3.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/AGENTS.md +3 -0
- package/LICENSE +17 -15
- package/dist/index.cjs +58 -1
- package/dist/index.js +58 -1
- package/dist/tools.cjs +245 -0
- package/dist/tools.js +245 -0
- package/dist/types/core/version.d.ts +1 -1
- package/dist/types/generated/api.d.ts +24 -0
- package/dist/types/generated/index.d.ts +1 -1
- package/dist/types/generated/ops.d.ts +39 -0
- package/dist/types/generated/types.d.ts +90 -0
- package/dist/types-cjs/core/version.d.ts +1 -1
- package/dist/types-cjs/generated/api.d.ts +24 -0
- package/dist/types-cjs/generated/index.d.ts +1 -1
- package/dist/types-cjs/generated/ops.d.ts +39 -0
- package/dist/types-cjs/generated/types.d.ts +90 -0
- package/llms.txt +3 -0
- package/package.json +2 -2
|
@@ -38,6 +38,10 @@ export type ApiError = {
|
|
|
38
38
|
export type Artifacts = {
|
|
39
39
|
artifacts: RunArtifact[];
|
|
40
40
|
};
|
|
41
|
+
/** How a person answers an [`IssueAsk`]: `single` (one option), `multi` (any number of options) or `text` (free text). */
|
|
42
|
+
export type AskKind = 'single' | 'multi' | 'text';
|
|
43
|
+
/** An option as an asker writes it: its label alone, or the label with a description. */
|
|
44
|
+
export type AskOptionInput = string | IssueAskOption;
|
|
41
45
|
/** A pull request's auto-merge: `GET`, `PUT` and `DELETE pulls/{n}/auto-merge`. */
|
|
42
46
|
export type AutoMerge = {
|
|
43
47
|
/** Who turned it on; the merge is made as them. */
|
|
@@ -914,6 +918,36 @@ export type Issue = {
|
|
|
914
918
|
/** Last write of any kind. */
|
|
915
919
|
updatedAt: string;
|
|
916
920
|
};
|
|
921
|
+
/** A question for a person, answered in place. */
|
|
922
|
+
export type IssueAsk = {
|
|
923
|
+
agent?: string | null;
|
|
924
|
+
/** `None` until someone answers. */
|
|
925
|
+
answer?: IssueAskAnswer | null;
|
|
926
|
+
at: string;
|
|
927
|
+
by: string;
|
|
928
|
+
/** Pass it to `issue answer` and `issue unask`. */
|
|
929
|
+
id: string;
|
|
930
|
+
kind: AskKind;
|
|
931
|
+
options?: IssueAskOption[];
|
|
932
|
+
/** A `single` or `multi` question that also takes free text beside its options. */
|
|
933
|
+
other?: boolean;
|
|
934
|
+
/** The label of the option the asker suggests. */
|
|
935
|
+
recommended?: string | null;
|
|
936
|
+
text: string;
|
|
937
|
+
};
|
|
938
|
+
export type IssueAskAnswer = {
|
|
939
|
+
agent?: string | null;
|
|
940
|
+
at: string;
|
|
941
|
+
by: string;
|
|
942
|
+
/** The labels of the options picked. */
|
|
943
|
+
choices?: string[];
|
|
944
|
+
/** The free text: the whole answer to a `text` question, or what an `other` answer adds. */
|
|
945
|
+
text?: string;
|
|
946
|
+
};
|
|
947
|
+
export type IssueAskOption = {
|
|
948
|
+
description?: string | null;
|
|
949
|
+
label: string;
|
|
950
|
+
};
|
|
917
951
|
export type IssueComment = {
|
|
918
952
|
agent: boolean;
|
|
919
953
|
at: string;
|
|
@@ -935,6 +969,8 @@ export type IssueComment = {
|
|
|
935
969
|
/** Where the work stands, for whoever picks the issue up next. */
|
|
936
970
|
export type IssueContext = {
|
|
937
971
|
agent?: string | null;
|
|
972
|
+
/** Questions with a kind and options, answered in place; an unanswered one makes the issue read as needing input. */
|
|
973
|
+
asks?: IssueAsk[];
|
|
938
974
|
at: string;
|
|
939
975
|
branch?: string | null;
|
|
940
976
|
/** The account that last wrote it. */
|
|
@@ -2958,6 +2994,46 @@ export type InboxReadInput = {
|
|
|
2958
2994
|
tab?: string | null;
|
|
2959
2995
|
};
|
|
2960
2996
|
export type InboxReadOutput = null;
|
|
2997
|
+
/**
|
|
2998
|
+
* Answer a question on an issue, replacing an earlier answer: `choices` are option labels (one for `single`, any for `multi`), `text` the free-text answer of a `text` question or an `other` answer. You need write access or the issue's lease.
|
|
2999
|
+
*/
|
|
3000
|
+
export type IssuesAnswerInput = {
|
|
3001
|
+
/** The labels of the options picked. */
|
|
3002
|
+
choices?: string[];
|
|
3003
|
+
/** The question's id, from the issue's context. */
|
|
3004
|
+
id: string;
|
|
3005
|
+
/** Issue number. */
|
|
3006
|
+
number: number;
|
|
3007
|
+
/** The repository's owner: a user or an org handle. */
|
|
3008
|
+
owner: string;
|
|
3009
|
+
/** The repository's name. */
|
|
3010
|
+
repo: string;
|
|
3011
|
+
/** The answer in your own words. */
|
|
3012
|
+
text?: string;
|
|
3013
|
+
};
|
|
3014
|
+
export type IssuesAnswerOutput = Issue;
|
|
3015
|
+
/**
|
|
3016
|
+
* Ask a person a question on an issue and read the answer back later from the issue's context (`asks`). `single` takes one of 2 to 10 options, `multi` any number of them, `text` free text; `other` lets a choice question also take free text. The issue reads as needing input, and its assignee is told, until it is answered. You need the issue's lease or write access.
|
|
3017
|
+
*/
|
|
3018
|
+
export type IssuesAskInput = {
|
|
3019
|
+
/** `single` (pick one option), `multi` (pick any) or `text` (free text). */
|
|
3020
|
+
kind: AskKind;
|
|
3021
|
+
/** Issue number. */
|
|
3022
|
+
number: number;
|
|
3023
|
+
/** The choices of a `single` or `multi` question, 2 to 10, each a label or `{label, description}`; none for `text`. */
|
|
3024
|
+
options?: AskOptionInput[];
|
|
3025
|
+
/** true lets a `single` or `multi` question also take an answer in the person's own words. */
|
|
3026
|
+
other?: boolean;
|
|
3027
|
+
/** The repository's owner: a user or an org handle. */
|
|
3028
|
+
owner: string;
|
|
3029
|
+
/** The label of the option you suggest. */
|
|
3030
|
+
recommended?: string | null;
|
|
3031
|
+
/** The repository's name. */
|
|
3032
|
+
repo: string;
|
|
3033
|
+
/** The whole question, in Markdown, with what the person needs to answer it (up to 2000 characters). */
|
|
3034
|
+
text: string;
|
|
3035
|
+
};
|
|
3036
|
+
export type IssuesAskOutput = Issue;
|
|
2961
3037
|
/**
|
|
2962
3038
|
* Delegate an issue to yourself or your agent for a lease, or renew the lease. The issue returns to ready if the lease lapses.
|
|
2963
3039
|
*/
|
|
@@ -3320,6 +3396,20 @@ export type IssuesSubscribeInput = {
|
|
|
3320
3396
|
subscribed: boolean;
|
|
3321
3397
|
};
|
|
3322
3398
|
export type IssuesSubscribeOutput = Issue;
|
|
3399
|
+
/**
|
|
3400
|
+
* Take a question back from an issue, answered or not, once its answer is used or it no longer matters. You need the issue's lease or write access.
|
|
3401
|
+
*/
|
|
3402
|
+
export type IssuesUnaskInput = {
|
|
3403
|
+
/** The question's id, from the issue's context. */
|
|
3404
|
+
id: string;
|
|
3405
|
+
/** Issue number. */
|
|
3406
|
+
number: number;
|
|
3407
|
+
/** The repository's owner: a user or an org handle. */
|
|
3408
|
+
owner: string;
|
|
3409
|
+
/** The repository's name. */
|
|
3410
|
+
repo: string;
|
|
3411
|
+
};
|
|
3412
|
+
export type IssuesUnaskOutput = Issue;
|
|
3323
3413
|
/**
|
|
3324
3414
|
* Take your reaction back from an issue.
|
|
3325
3415
|
*/
|
package/llms.txt
CHANGED
|
@@ -91,6 +91,8 @@
|
|
|
91
91
|
|
|
92
92
|
## issues
|
|
93
93
|
|
|
94
|
+
- `sf.issues.answer(input)`: Answer a question on an issue, replacing an earlier answer: `choices` are option labels (one for `single`, any for `multi`), `text` the free-text answer of a `text` question or an `other` answer. You need write access or the issue's lease.
|
|
95
|
+
- `sf.issues.ask(input)`: Ask a person a question on an issue and read the answer back later from the issue's context (`asks`). `single` takes one of 2 to 10 options, `multi` any number of them, `text` free text; `other` lets a choice question also take free text. The issue reads as needing input, and its assignee is told, until it is answered. You need the issue's lease or write access.
|
|
94
96
|
- `sf.issues.claim(input)`: Delegate an issue to yourself or your agent for a lease, or renew the lease. The issue returns to ready if the lease lapses.
|
|
95
97
|
- `sf.issues.close(input)`: Close an issue with a reason, after posting an optional comment. Without a `reason` it is `done`, or `duplicate` when `duplicateOf` names the issue it repeats.
|
|
96
98
|
- `sf.issues.comment(input)`: Comment on an issue, or post a progress update as whoever holds its lease.
|
|
@@ -111,6 +113,7 @@
|
|
|
111
113
|
- `sf.issues.similar(input)`: Check for issues the title reads like, open ones closest first, to look through before filing a duplicate.
|
|
112
114
|
- `sf.issues.start(input)`: Claim an issue and open a caisson on its branch, or return the live caisson already working on it. Safe to repeat.
|
|
113
115
|
- `sf.issues.subscribe(input)`: Follow an issue to be notified of its activity, or stop following it. Needs only read access.
|
|
116
|
+
- `sf.issues.unask(input)`: Take a question back from an issue, answered or not, once its answer is used or it no longer matters. You need the issue's lease or write access.
|
|
114
117
|
- `sf.issues.unreact(input)`: Take your reaction back from an issue.
|
|
115
118
|
- `sf.issues.update(input)`: Change any field of an issue. A field left out stays; `null` clears the ones that can be cleared. An issue's author may change its words and whether it is open without write access.
|
|
116
119
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sailfork",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The Sailfork SDK for TypeScript: issues, pull requests, caissons and CI for agents.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"main": "./dist/index.cjs",
|