@yagni-app/code-staging 1.2.14-staging.2481.1 → 1.2.14-staging.2492.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.
@@ -82,11 +82,14 @@ export const SECRET_PATTERNS = [
82
82
  // anywhere a name starts, with `=` or, as a header dump or a JSON body
83
83
  // writes them, `:` (`X-Amz-Signature: …`, `"client_secret":"…"`). Never a
84
84
  // path's last part (`src/auth/token:12:5`) nor a stack frame's bare `line:col`
85
- // (`at async token:12:5`). Prose after the name (`token: expired.`) is
86
- // redacted all the same, failing closed; a value never ends in the
87
- // sentence's `.`, `,`, `;`, `:`, `!`, `?` or `)`, which stays.
85
+ // (`at async token:12:5`): the `line:col` is skipped only when a real frame
86
+ // shape follows it — a `)`, a line end or nothing (YAG-1417) — so a value
87
+ // that merely starts like one (`token: 12:5 x`) is redacted. Prose after
88
+ // the name (`token: expired.`) is redacted all the same, failing closed; a
89
+ // value never ends in the sentence's `.`, `,`, `;`, `:`, `!`, `?` or `)`,
90
+ // which stays.
88
91
  [
89
- /(?<![A-Za-z0-9_.\-/\\])((?:[A-Za-z0-9]+[_.-])*(?:token|secret|signature|password|passwd|credential|credentials)["']?\s*[:=]\s*["']?)(?!\d+:\d+(?![^\s)]))[^&#\s"'<>]*[^&#\s"'<>.,;:!?)]/gi,
92
+ /(?<![A-Za-z0-9_.\-/\\])((?:[A-Za-z0-9]+[_.-])*(?:token|secret|signature|password|passwd|credential|credentials)["']?\s*[:=]\s*["']?)(?!\d+:\d+(?![^)\r\n]))[^&#\s"'<>]*[^&#\s"'<>.,;:!?)]/gi,
90
93
  "$1[REDACTED]",
91
94
  ],
92
95
  // The short whole names (`sig`, `code`, `key`, `auth`) only behind a URL's
@@ -99,10 +102,11 @@ export const SECRET_PATTERNS = [
99
102
  ],
100
103
  // key = "value" / key: value for secret-named keys, the key quoted as JSON
101
104
  // quotes it too (`"password":"…"`, YAG-1324). As the parameter rule above:
102
- // never a path's last part nor a frame's bare `line:col` (not `12:34:56`), and an unquoted value
103
- // leaves the sentence's closing punctuation.
105
+ // never a path's last part nor a frame's bare `line:col` (not `12:34:56`;
106
+ // the `line:col` is skipped only before a `)`, a line end or nothing,
107
+ // YAG-1417), and an unquoted value leaves the sentence's closing punctuation.
104
108
  [
105
- /(?<![/\\])\b([A-Za-z0-9_]*(?:secret|password|passwd|api[_-]?key|token|private[_-]?key|access[_-]?key)[A-Za-z0-9_]*)\b(["']?\s*[:=]\s*)("[^"]+"|'[^']+'|`[^`]+`|(?!\d+:\d+(?![^\s)]))[^\s"']*[^\s"'.,;:!?)])/gi,
109
+ /(?<![/\\])\b([A-Za-z0-9_]*(?:secret|password|passwd|api[_-]?key|token|private[_-]?key|access[_-]?key)[A-Za-z0-9_]*)\b(["']?\s*[:=]\s*)("[^"]+"|'[^']+'|`[^`]+`|(?!\d+:\d+(?![^)\r\n]))[^\s"']*[^\s"'.,;:!?)])/gi,
106
110
  "$1$2[REDACTED]",
107
111
  ],
108
112
  // Long base64-ish blobs (likely keys/JWTs)
@@ -113,7 +113,8 @@ export declare function commitTitle(ticket: string, ticketBrief?: string): strin
113
113
  * The title a run with a plan and no ticket title commits under (the cloud
114
114
  * session reads its ticket from a file): the line under the plan's Goal or
115
115
  * Summary heading, else its first line of prose. Undefined when the plan has
116
- * neither.
116
+ * neither. `>`-quoted lines (the host's "A person approved…" note) are never
117
+ * prose: the title starts at the plan's own text, not the note above it.
117
118
  */
118
119
  export declare function planTitle(planText: string | undefined): string | undefined;
119
120
  /**
@@ -102,11 +102,14 @@ function fromGoal(planText) {
102
102
  * The title a run with a plan and no ticket title commits under (the cloud
103
103
  * session reads its ticket from a file): the line under the plan's Goal or
104
104
  * Summary heading, else its first line of prose. Undefined when the plan has
105
- * neither.
105
+ * neither. `>`-quoted lines (the host's "A person approved…" note) are never
106
+ * prose: the title starts at the plan's own text, not the note above it.
106
107
  */
107
108
  export function planTitle(planText) {
108
109
  const lines = (planText ?? "").split("\n").map((line) => line.trim());
109
- const prose = (from) => lines.slice(from).find((line) => line && !line.startsWith("#") && !line.startsWith("```"));
110
+ const prose = (from) => lines
111
+ .slice(from)
112
+ .find((line) => line && !line.startsWith("#") && !line.startsWith("```") && !line.startsWith(">"));
110
113
  const goal = lines.findIndex((line) => GOAL_HEADING.test(line));
111
114
  const line = (goal >= 0 ? prose(goal + 1) : undefined) ?? prose(0);
112
115
  const title = line
@@ -154,6 +157,9 @@ export function commitSubject(type, scope, title) {
154
157
  */
155
158
  export function summarizePlan(planText, ticket) {
156
159
  const flat = fromGoal(planText ?? "")
160
+ // The host's >-quoted note ("A person approved…") is never the plan: drop
161
+ // it before flattening, so it never becomes a sentence of the summary.
162
+ .replace(/^[ \t]*>.*$/gm, "")
157
163
  .replace(/^#+\s*/gm, "")
158
164
  .replace(/^\s*(?:[-*+]|\d+[.)])\s+/gm, "")
159
165
  .replace(/`{1,3}/g, "")
@@ -31,11 +31,14 @@ const PATTERNS = [
31
31
  // anywhere a name starts, with `=` or, as a header dump or a JSON body
32
32
  // writes them, `:` (`X-Amz-Signature: …`, `"client_secret":"…"`). Never a
33
33
  // path's last part (`src/auth/token:12:5`) nor a stack frame's bare `line:col`
34
- // (`at async token:12:5`). Prose after the name (`token: expired.`) is
35
- // redacted all the same, failing closed; a value never ends in the
36
- // sentence's `.`, `,`, `;`, `:`, `!`, `?` or `)`, which stays.
34
+ // (`at async token:12:5`): the `line:col` is skipped only when a real frame
35
+ // shape follows it — a `)`, a line end or nothing (YAG-1417) — so a value
36
+ // that merely starts like one (`token: 12:5 x`) is redacted. Prose after
37
+ // the name (`token: expired.`) is redacted all the same, failing closed; a
38
+ // value never ends in the sentence's `.`, `,`, `;`, `:`, `!`, `?` or `)`,
39
+ // which stays.
37
40
  [
38
- /(?<![A-Za-z0-9_.\-/\\])((?:[A-Za-z0-9]+[_.-])*(?:token|secret|signature|password|passwd|credential|credentials)["']?\s*[:=]\s*["']?)(?!\d+:\d+(?![^\s)]))[^&#\s"'<>]*[^&#\s"'<>.,;:!?)]/gi,
41
+ /(?<![A-Za-z0-9_.\-/\\])((?:[A-Za-z0-9]+[_.-])*(?:token|secret|signature|password|passwd|credential|credentials)["']?\s*[:=]\s*["']?)(?!\d+:\d+(?![^)\r\n]))[^&#\s"'<>]*[^&#\s"'<>.,;:!?)]/gi,
39
42
  "$1[REDACTED]",
40
43
  ],
41
44
  // The short whole names (`sig`, `code`, `key`, `auth`) only behind a URL's
@@ -48,10 +51,11 @@ const PATTERNS = [
48
51
  ],
49
52
  // key = "value" / key: value for secret-named keys, the key quoted as JSON
50
53
  // quotes it too (`"password":"…"`, YAG-1324). As the parameter rule above:
51
- // never a path's last part nor a frame's bare `line:col` (not `12:34:56`), and an unquoted value
52
- // leaves the sentence's closing punctuation.
54
+ // never a path's last part nor a frame's bare `line:col` (not `12:34:56`;
55
+ // the `line:col` is skipped only before a `)`, a line end or nothing,
56
+ // YAG-1417), and an unquoted value leaves the sentence's closing punctuation.
53
57
  [
54
- /(?<![/\\])\b([A-Za-z0-9_]*(?:secret|password|passwd|api[_-]?key|token|private[_-]?key|access[_-]?key)[A-Za-z0-9_]*)\b(["']?\s*[:=]\s*)("[^"]+"|'[^']+'|`[^`]+`|(?!\d+:\d+(?![^\s)]))[^\s"']*[^\s"'.,;:!?)])/gi,
58
+ /(?<![/\\])\b([A-Za-z0-9_]*(?:secret|password|passwd|api[_-]?key|token|private[_-]?key|access[_-]?key)[A-Za-z0-9_]*)\b(["']?\s*[:=]\s*)("[^"]+"|'[^']+'|`[^`]+`|(?!\d+:\d+(?![^)\r\n]))[^\s"']*[^\s"'.,;:!?)])/gi,
55
59
  "$1$2[REDACTED]",
56
60
  ],
57
61
  // Long base64-ish blobs (likely keys/JWTs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.2.14-staging.2481.1",
3
+ "version": "1.2.14-staging.2492.1",
4
4
  "description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
@@ -58,5 +58,5 @@
58
58
  "turndown": "^7.2.4",
59
59
  "typebox": "^1.3.15"
60
60
  },
61
- "yagniSourceSha": "16158fec6803b7dae644373f3cb4612a11417569"
61
+ "yagniSourceSha": "68fff2c78ba4f23d49be214576f1a711d3927734"
62
62
  }