@taskless/cli 0.11.1 → 0.11.2
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 +3 -2
- package/dist/binary-DZahYwrf.js +108 -0
- package/dist/index.js +12899 -12280
- package/dist/node/runtimes.js +1 -1
- package/dist/prompts/index.d.ts +7 -1
- package/dist/prompts/recipes.d.ts +20 -0
- package/dist/prompts.js +16 -14
- package/dist/{recipes-w68swLg4.js → recipes-tkku5bYo.js} +627 -295
- package/dist/rules/capabilities.d.ts +19 -2
- package/dist/schemas/feedback.d.ts +19 -0
- package/dist/schemas/index.d.ts +14 -1
- package/dist/survey/constants.d.ts +50 -0
- package/dist/util/invocation.d.ts +18 -0
- package/package.json +15 -15
- package/dist/binary-DSACXL6n.js +0 -107
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* Pinned against the binary by `test/ast-grep-vendor-contract.test.ts`
|
|
39
39
|
* ("engine capabilities" → "reports the pinned version").
|
|
40
40
|
*/
|
|
41
|
-
export declare const AST_GREP_VERSION = "0.45.
|
|
41
|
+
export declare const AST_GREP_VERSION = "0.45.3";
|
|
42
42
|
/**
|
|
43
43
|
* Every language ast-grep can parse, verbatim from
|
|
44
44
|
* `sg run -h` → `Supported languages are: [...]` at
|
|
@@ -137,7 +137,7 @@ export declare const AST_GREP_TSX_SPLIT: Readonly<Partial<Record<AstGrepLanguage
|
|
|
137
137
|
* Pinned against the binary by `test/vale-vendor-contract.test.ts`
|
|
138
138
|
* ("engine capabilities" → "reports the pinned version").
|
|
139
139
|
*/
|
|
140
|
-
export declare const VALE_VERSION = "3.
|
|
140
|
+
export declare const VALE_VERSION = "3.21.0";
|
|
141
141
|
/**
|
|
142
142
|
* Which tier Vale routes an extension to.
|
|
143
143
|
*
|
|
@@ -194,6 +194,23 @@ export type ValeFormatTier =
|
|
|
194
194
|
* plain text today, but the moment Vale routes it to a converter the same
|
|
195
195
|
* omission is a crash that takes down every Vale rule in the run.
|
|
196
196
|
*
|
|
197
|
+
* 3.20.0 → 3.21.0 LEARNED ONE FORMAT, AND THE SOURCE CHECK IS WHAT FOUND IT.
|
|
198
|
+
* Every existing row was re-probed against the 3.21.0 binary and none moved.
|
|
199
|
+
* The v3.20.0...v3.21.0 tree adds `internal/lint/notebook.go` and routes
|
|
200
|
+
* `.ipynb` to it from `lintFile`'s markup switch, so Jupyter notebooks left
|
|
201
|
+
* the unnamed plaintext fallback for `markup` and are a new row below. The
|
|
202
|
+
* benign direction again, and a narrowing: on 3.20.0 a notebook was linted as
|
|
203
|
+
* the JSON it is, so a rule matching `[*.ipynb]` fired on cell source, on
|
|
204
|
+
* outputs, and on metadata alike. On 3.21.0 a Markdown cell is read as
|
|
205
|
+
* Markdown and a code cell as its kernel's language (comments only); raw
|
|
206
|
+
* cells and outputs are not read at all, and `Line`/`Span` point into the
|
|
207
|
+
* notebook file. Findings drop, nothing warns. Measured on the pinned binary,
|
|
208
|
+
* and pinned in `test/vale-vendor-contract.test.ts`.
|
|
209
|
+
*
|
|
210
|
+
* Also in that tree, and not a tier change: `internal/lint/selection.go` (the
|
|
211
|
+
* `doc(...)` scope, see `src/schemas/vale-rule.ts`), and `html.go` now applies
|
|
212
|
+
* `BlockIgnores`/`TokenIgnores` to `.html`, where 3.20.0 ignored both keys.
|
|
213
|
+
*
|
|
197
214
|
* NOTHING MOVED ACROSS 3.19.0 → 3.20.0, AND THE SECOND HALF OF THAT CLAIM IS
|
|
198
215
|
* THE ONE THAT COST SOMETHING. Every row below was re-probed against the
|
|
199
216
|
* 3.20.0 binary and none of them moved, which this table can report. It cannot
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Input schema for `taskless feedback send --from` JSON file.
|
|
4
|
+
*
|
|
5
|
+
* Human keys only. The map to the survey's question identifiers lives in
|
|
6
|
+
* `src/survey/constants.ts`, and a payload never carries a `$survey_*` key.
|
|
7
|
+
*/
|
|
8
|
+
export declare const inputSchema: z.ZodObject<{
|
|
9
|
+
verbatim: z.ZodString;
|
|
10
|
+
goal: z.ZodString;
|
|
11
|
+
completed: z.ZodEnum<{
|
|
12
|
+
Yes: "Yes";
|
|
13
|
+
No: "No";
|
|
14
|
+
Unknown: "Unknown";
|
|
15
|
+
}>;
|
|
16
|
+
workedWell: z.ZodOptional<z.ZodString>;
|
|
17
|
+
needsImprovement: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type FeedbackInput = z.infer<typeof inputSchema>;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -69,7 +69,20 @@ export {
|
|
|
69
69
|
*/
|
|
70
70
|
outputSchema as verifyTestOutputSchema, } from "./verify-test.js";
|
|
71
71
|
export {
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* The layered detail behind one ast-grep rule's verification — schema
|
|
74
|
+
* validation, Taskless requirement checks, and `sg test`, kept separate
|
|
75
|
+
* rather than flattened into `verifyTestOutputSchema`'s single envelope.
|
|
76
|
+
*
|
|
77
|
+
* Not what `taskless verify --json` or `taskless test --json` print. Both
|
|
78
|
+
* commands compute this internally via `verifyRule()` and then flatten it
|
|
79
|
+
* before printing anything, so there is no current CLI invocation that
|
|
80
|
+
* emits this shape verbatim. A command that did — `taskless rule verify
|
|
81
|
+
* <id> --json` — existed once and was removed when rule addressing moved
|
|
82
|
+
* from id to path, because an id can name a rule under two engines and a
|
|
83
|
+
* path cannot (see `resolve-path.ts`). This schema describes the pre-
|
|
84
|
+
* flattening detail that command used to print, unchanged since.
|
|
85
|
+
*/
|
|
73
86
|
verifyOutputSchema,
|
|
74
87
|
/** The same, for a Vale rule — a different shape, discriminated on `engine`. */
|
|
75
88
|
valeVerifyOutputSchema, } from "./rules-verify.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The PostHog survey the CLI answers on the user's behalf, and the map from
|
|
3
|
+
* the payload's human keys to its question identifiers.
|
|
4
|
+
*
|
|
5
|
+
* This is the ONLY place the survey's identifiers live. The agent never sees a
|
|
6
|
+
* question UUID: it writes `verbatim`, `goal`, and so on, and `feedback send`
|
|
7
|
+
* translates. A mangled UUID would be a silently missing answer; a mangled
|
|
8
|
+
* human key is a validation error with a message.
|
|
9
|
+
*
|
|
10
|
+
* The identifiers are PostHog's. `survey shown`, `survey dismissed`, and
|
|
11
|
+
* `survey sent` are its event literals for a custom survey, `$survey_id` and
|
|
12
|
+
* `$survey_response_<question id>` are its property contract, and the CLI
|
|
13
|
+
* adds no survey-specific property of its own. Everything else on the event
|
|
14
|
+
* is the standard set the telemetry client stamps on every capture.
|
|
15
|
+
*
|
|
16
|
+
* `survey shown` means SERVED. The CLI knows it appended the invite to a
|
|
17
|
+
* recipe; it cannot know the agent put the question to a person. The funnel
|
|
18
|
+
* reads shown ≫ sent by design, and nothing here pretends otherwise.
|
|
19
|
+
*
|
|
20
|
+
* A question's id changes when its type changes in PostHog. Q3 became single
|
|
21
|
+
* choice on 2026-09-17 and took a new id; the one below is current.
|
|
22
|
+
*/
|
|
23
|
+
export declare const SURVEY_ID = "01a0b1a0-80fb-0000-5dc1-baa4ec44e619";
|
|
24
|
+
/** The payload keys, in question order. */
|
|
25
|
+
export type FeedbackKey = "verbatim" | "goal" | "completed" | "workedWell" | "needsImprovement";
|
|
26
|
+
export interface SurveyQuestion {
|
|
27
|
+
key: FeedbackKey;
|
|
28
|
+
id: string;
|
|
29
|
+
question: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const SURVEY_QUESTIONS: readonly SurveyQuestion[];
|
|
32
|
+
/** The choices PostHog holds for `completed`, in its own casing. */
|
|
33
|
+
export declare const COMPLETED_CHOICES: readonly ["Yes", "No", "Unknown"];
|
|
34
|
+
/**
|
|
35
|
+
* The recipes that carry the invite. Used by the gate alone; the events do not
|
|
36
|
+
* name the recipe, because the survey contract has no slot for it.
|
|
37
|
+
*/
|
|
38
|
+
export declare const SURVEYED_TOPICS: ReadonlySet<string>;
|
|
39
|
+
/**
|
|
40
|
+
* How long serving an invite holds the next one off. Ten days, because the
|
|
41
|
+
* surveyed recipes are rule generation, which is the touchiest part of the
|
|
42
|
+
* agent experience, and a long quiet gap is a gap in feedback.
|
|
43
|
+
*/
|
|
44
|
+
export declare const SHOWN_INTERVAL_MS: number;
|
|
45
|
+
/**
|
|
46
|
+
* How long an explicit answer holds the next invite off. Twenty days for both
|
|
47
|
+
* a dismissal and a sent response: either is a terminal action the user took,
|
|
48
|
+
* and only silence earns the shorter gap.
|
|
49
|
+
*/
|
|
50
|
+
export declare const ANSWERED_INTERVAL_MS: number;
|
|
@@ -21,6 +21,24 @@ export declare const PROD_INVOCATION = "npx @taskless/cli";
|
|
|
21
21
|
export declare function isProductionInvocation(): boolean;
|
|
22
22
|
/** This build's invocation, whatever the target. */
|
|
23
23
|
export declare function buildInvocation(): string;
|
|
24
|
+
/** The token skill and command sources spell the CLI invocation with. */
|
|
25
|
+
export declare const INVOCATION_PLACEHOLDER = "%(TASKLESS_CLI)s";
|
|
26
|
+
/**
|
|
27
|
+
* Render {@link INVOCATION_PLACEHOLDER} in an installed skill or command body
|
|
28
|
+
* to this build's invocation.
|
|
29
|
+
*
|
|
30
|
+
* The same token the recipes use, so a reader of either source sees one
|
|
31
|
+
* spelling. It is substituted as an exact token rather than rendered through
|
|
32
|
+
* sprintf: the sources are prose with no other placeholders, and sprintf
|
|
33
|
+
* would make a literal `%` in a markdown body a render error.
|
|
34
|
+
*
|
|
35
|
+
* This replaces searching the prose for the literal `npx @taskless/cli`
|
|
36
|
+
* ({@link applyCliInvocation}), which is whitespace-sensitive: a wrapped line
|
|
37
|
+
* or a doubled space left the literal in place, and a nightly install then
|
|
38
|
+
* carried a skill telling its agent to run the release package. A token
|
|
39
|
+
* either matches exactly or a test on the source notices it is missing.
|
|
40
|
+
*/
|
|
41
|
+
export declare function renderInvocationPlaceholder(content: string): string;
|
|
24
42
|
/**
|
|
25
43
|
* Rewrite the canonical `npx @taskless/cli` invocation to the build-target
|
|
26
44
|
* invocation (`__TASKLESS_CLI__`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taskless/cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"zod": "^4.3.6"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@ast-grep/cli": "0.45.
|
|
72
|
+
"@ast-grep/cli": "0.45.3",
|
|
73
73
|
"@types/sprintf-js": "^1.1.4",
|
|
74
74
|
"openapi-typescript": "^7.13.0",
|
|
75
75
|
"prettier": "^3.8.1",
|
|
@@ -82,18 +82,18 @@
|
|
|
82
82
|
"taskless": "./dist/index.js"
|
|
83
83
|
},
|
|
84
84
|
"optionalDependencies": {
|
|
85
|
-
"@ast-grep/cli-darwin-arm64": "0.45.
|
|
86
|
-
"@ast-grep/cli-darwin-x64": "0.45.
|
|
87
|
-
"@ast-grep/cli-linux-arm64-gnu": "0.45.
|
|
88
|
-
"@ast-grep/cli-linux-x64-gnu": "0.45.
|
|
89
|
-
"@ast-grep/cli-win32-arm64-msvc": "0.45.
|
|
90
|
-
"@ast-grep/cli-win32-ia32-msvc": "0.45.
|
|
91
|
-
"@ast-grep/cli-win32-x64-msvc": "0.45.
|
|
92
|
-
"@taskless/vale-darwin-arm64": "3.
|
|
93
|
-
"@taskless/vale-darwin-x64": "3.
|
|
94
|
-
"@taskless/vale-linux-arm64": "3.
|
|
95
|
-
"@taskless/vale-linux-x64": "3.
|
|
96
|
-
"@taskless/vale-win32-arm64": "3.
|
|
97
|
-
"@taskless/vale-win32-x64": "3.
|
|
85
|
+
"@ast-grep/cli-darwin-arm64": "0.45.3",
|
|
86
|
+
"@ast-grep/cli-darwin-x64": "0.45.3",
|
|
87
|
+
"@ast-grep/cli-linux-arm64-gnu": "0.45.3",
|
|
88
|
+
"@ast-grep/cli-linux-x64-gnu": "0.45.3",
|
|
89
|
+
"@ast-grep/cli-win32-arm64-msvc": "0.45.3",
|
|
90
|
+
"@ast-grep/cli-win32-ia32-msvc": "0.45.3",
|
|
91
|
+
"@ast-grep/cli-win32-x64-msvc": "0.45.3",
|
|
92
|
+
"@taskless/vale-darwin-arm64": "3.21.0-20260915061224",
|
|
93
|
+
"@taskless/vale-darwin-x64": "3.21.0-20260915061224",
|
|
94
|
+
"@taskless/vale-linux-arm64": "3.21.0-20260915061224",
|
|
95
|
+
"@taskless/vale-linux-x64": "3.21.0-20260915061224",
|
|
96
|
+
"@taskless/vale-win32-arm64": "3.21.0-20260915061224",
|
|
97
|
+
"@taskless/vale-win32-x64": "3.21.0-20260915061224"
|
|
98
98
|
}
|
|
99
99
|
}
|
package/dist/binary-DSACXL6n.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { spawnSync as v } from "node:child_process";
|
|
2
|
-
import { existsSync as u } from "node:fs";
|
|
3
|
-
import { createRequire as g } from "node:module";
|
|
4
|
-
import { resolve as i, dirname as c } from "node:path";
|
|
5
|
-
import { fileURLToPath as y } from "node:url";
|
|
6
|
-
const R = {
|
|
7
|
-
label: "ast-grep",
|
|
8
|
-
packagePrefix: "@ast-grep/cli",
|
|
9
|
-
toolchainSuffix: !0,
|
|
10
|
-
binaryNames: ["ast-grep", "sg"],
|
|
11
|
-
identity: /ast-grep/i
|
|
12
|
-
};
|
|
13
|
-
function m(e) {
|
|
14
|
-
const r = [process.platform, process.arch];
|
|
15
|
-
return e.toolchainSuffix && (process.platform === "linux" ? r.push("gnu") : process.platform === "win32" && r.push("msvc")), `${e.packagePrefix}-${r.join("-")}`;
|
|
16
|
-
}
|
|
17
|
-
function o(e) {
|
|
18
|
-
return process.platform === "win32" ? `${e}.exe` : e;
|
|
19
|
-
}
|
|
20
|
-
function p(e) {
|
|
21
|
-
return e.binaryNames.toReversed();
|
|
22
|
-
}
|
|
23
|
-
function b(e) {
|
|
24
|
-
return o(p(e)[0] ?? e.label);
|
|
25
|
-
}
|
|
26
|
-
function P(e, r) {
|
|
27
|
-
try {
|
|
28
|
-
const a = g(import.meta.url).resolve(
|
|
29
|
-
`${m(e)}/package.json`
|
|
30
|
-
);
|
|
31
|
-
return i(c(a), r);
|
|
32
|
-
} catch {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function h(e) {
|
|
37
|
-
const r = process.platform === "win32" ? ";" : ":";
|
|
38
|
-
for (const t of (process.env.PATH ?? "").split(r)) {
|
|
39
|
-
if (t === "") continue;
|
|
40
|
-
const a = i(t, e);
|
|
41
|
-
if (u(a)) return a;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function k(e, r) {
|
|
45
|
-
if (!u(r)) return !1;
|
|
46
|
-
const t = v(r, ["--version"], {
|
|
47
|
-
encoding: "utf8",
|
|
48
|
-
timeout: 5e3
|
|
49
|
-
});
|
|
50
|
-
return t.error !== void 0 || t.status !== 0 ? !1 : e.identity.test(`${t.stdout ?? ""}${t.stderr ?? ""}`);
|
|
51
|
-
}
|
|
52
|
-
function x(e) {
|
|
53
|
-
const r = i(
|
|
54
|
-
c(y(import.meta.url)),
|
|
55
|
-
"..",
|
|
56
|
-
"node_modules",
|
|
57
|
-
".bin"
|
|
58
|
-
), t = p(e), a = [
|
|
59
|
-
[
|
|
60
|
-
"platform-package",
|
|
61
|
-
m(e),
|
|
62
|
-
P(
|
|
63
|
-
e,
|
|
64
|
-
o(e.binaryNames[0] ?? e.label)
|
|
65
|
-
)
|
|
66
|
-
],
|
|
67
|
-
...t.map(
|
|
68
|
-
(n) => [
|
|
69
|
-
"node_modules/.bin",
|
|
70
|
-
"node_modules/.bin",
|
|
71
|
-
i(r, o(n))
|
|
72
|
-
]
|
|
73
|
-
),
|
|
74
|
-
...t.map(
|
|
75
|
-
(n) => ["PATH", "PATH", h(o(n))]
|
|
76
|
-
)
|
|
77
|
-
], l = [...new Set(a.map(([, n]) => n))];
|
|
78
|
-
for (const [n, , s] of a)
|
|
79
|
-
if (s !== void 0 && k(e, s))
|
|
80
|
-
return { path: s, source: n, tried: l };
|
|
81
|
-
return { path: void 0, source: void 0, tried: l };
|
|
82
|
-
}
|
|
83
|
-
const d = {
|
|
84
|
-
label: "vale",
|
|
85
|
-
packagePrefix: "@taskless/vale",
|
|
86
|
-
toolchainSuffix: !1,
|
|
87
|
-
binaryNames: ["vale"],
|
|
88
|
-
identity: /vale/i
|
|
89
|
-
};
|
|
90
|
-
let f;
|
|
91
|
-
function T() {
|
|
92
|
-
return f ??= x(d), f;
|
|
93
|
-
}
|
|
94
|
-
function _(e) {
|
|
95
|
-
return `Vale binary not found. Looked in: ${e.join(", ")}. Install a supported platform build, or put \`${b(d)}\` on your PATH. Other engines still ran.`;
|
|
96
|
-
}
|
|
97
|
-
export {
|
|
98
|
-
R as A,
|
|
99
|
-
d as V,
|
|
100
|
-
m as a,
|
|
101
|
-
T as b,
|
|
102
|
-
h as f,
|
|
103
|
-
k as i,
|
|
104
|
-
b as p,
|
|
105
|
-
x as r,
|
|
106
|
-
_ as v
|
|
107
|
-
};
|