@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.
@@ -1,4 +1,4 @@
1
- import { A as s, V as m, f as o, i as e, p as f, a as t, r as i } from "../binary-DSACXL6n.js";
1
+ import { A as s, V as m, f as o, i as e, p as f, a as t, r as i } from "../binary-DZahYwrf.js";
2
2
  export {
3
3
  s as AST_GREP_BINARY,
4
4
  m as VALE_BINARY,
@@ -56,8 +56,14 @@ export declare const TOPICS: readonly ["create-sg-rule", "create-vale-rule", "cr
56
56
  * the boundary from the client's side, `detect` documents a CLI subprocess a
57
57
  * Worker cannot spawn, `create-legacy-rule` targets a local toolchain, and
58
58
  * `rule-meta` describes a local sidecar file the CLI never writes.
59
+ * - `feedback` and `feedback-invite` belong to the survey the CLI appends to
60
+ * a served recipe. The invite is a fragment the `agent` command renders
61
+ * header-less and attaches after a recipe's last section; it lives here as
62
+ * a recipe so Vale and the cross-reference tests cover its prose, and it is
63
+ * servable by name only as a side effect of that. Neither has a reader
64
+ * outside the CLI that sends the response.
59
65
  */
60
- export declare const INTERNAL_TOPICS: readonly ["auth", "check", "ci", "create-legacy-rule", "create-remote-rule", "delete-rule", "detect", "improve-rule", "info", "init", "onboard", "rule", "rule-meta", "update", "verify-rule"];
66
+ export declare const INTERNAL_TOPICS: readonly ["auth", "check", "ci", "create-legacy-rule", "create-remote-rule", "delete-rule", "detect", "feedback", "feedback-invite", "improve-rule", "info", "init", "onboard", "rule", "rule-meta", "update", "verify-rule"];
61
67
  /** A topic name the package exports. Unknown names fail to type-check. */
62
68
  export type PromptTopic = (typeof TOPICS)[number];
63
69
  /** Options accepted by every prompt render function. */
@@ -64,6 +64,20 @@ export interface RecipeOptions {
64
64
  * @default true
65
65
  */
66
66
  header?: boolean;
67
+ /**
68
+ * Add the fetch-time directive as the header block's second line: the
69
+ * text was resolved by the CLI when it was fetched, the next task fetches
70
+ * it again, and a session that saw an install or upgrade holds a stale
71
+ * skill until it reloads. The `agent` command asks for it, because what it
72
+ * serves IS a fetch. The prompts export does not, because a consumer
73
+ * embedding a recipe in its own prompt has no CLI to re-run, and the
74
+ * statement would be false there.
75
+ *
76
+ * Lives in the header block so `header: false` drops it with the version.
77
+ *
78
+ * @default false
79
+ */
80
+ directive?: boolean;
67
81
  }
68
82
  export declare function buildVariables(content: string, topic: string, options?: RecipeOptions): Record<string, string>;
69
83
  /** A recipe's text plus the sprintf variables its template contains. */
@@ -71,6 +85,12 @@ export interface RecipeText {
71
85
  text: string;
72
86
  variables: string[];
73
87
  }
88
+ /**
89
+ * The fetch-time directive, identical for every topic except the invocation.
90
+ * Rendered from the same resolution `%(TASKLESS_CLI)s` uses, so the command
91
+ * an agent is told to re-run is the one that served it.
92
+ */
93
+ export declare function fetchTimeDirective(invocation: string): string;
74
94
  /**
75
95
  * Look up an agent recipe topic from the embedded recipe map and return the rendered
76
96
  * text. Anonymous variants are preferred when `anonymous` is set and a
package/dist/prompts.js CHANGED
@@ -1,5 +1,5 @@
1
- import { g as n, a as i, b as u } from "./recipes-w68swLg4.js";
2
- const o = [
1
+ import { g as n, a as i, b as a } from "./recipes-tkku5bYo.js";
2
+ const u = [
3
3
  "create-sg-rule",
4
4
  "create-vale-rule",
5
5
  "create-runtime-rule",
@@ -12,6 +12,8 @@ const o = [
12
12
  "create-remote-rule",
13
13
  "delete-rule",
14
14
  "detect",
15
+ "feedback",
16
+ "feedback-invite",
15
17
  "improve-rule",
16
18
  "info",
17
19
  "init",
@@ -21,14 +23,14 @@ const o = [
21
23
  "update",
22
24
  "verify-rule"
23
25
  ];
24
- function a(e, r) {
26
+ function c(e, r) {
25
27
  return t(n(e, r), e);
26
28
  }
27
- function l(e, r) {
29
+ function d(e, r) {
28
30
  return t(i(e, r), e);
29
31
  }
30
- function d(e, r) {
31
- return t(u(e, r), e);
32
+ function l(e, r) {
33
+ return t(a(e, r), e);
32
34
  }
33
35
  function t(e, r) {
34
36
  if (e === void 0)
@@ -37,17 +39,17 @@ function t(e, r) {
37
39
  );
38
40
  return e;
39
41
  }
40
- const g = Object.fromEntries(
41
- o.map((e) => [
42
+ const f = Object.fromEntries(
43
+ u.map((e) => [
42
44
  e,
43
- (r) => a(e, r)
45
+ (r) => c(e, r)
44
46
  ])
45
47
  );
46
48
  export {
47
49
  s as INTERNAL_TOPICS,
48
- g as PROMPTS,
49
- o as TOPICS,
50
- l as getInstructions,
51
- a as getPrompt,
52
- d as getRawInstructions
50
+ f as PROMPTS,
51
+ u as TOPICS,
52
+ d as getInstructions,
53
+ c as getPrompt,
54
+ l as getRawInstructions
53
55
  };