@staff0rd/assist 0.659.1 → 0.660.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/dist/commands/sessions/web/bundle.js +362 -362
- package/dist/index.js +63 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.660.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -562,6 +562,21 @@ function stripLegacyConfigKeys(config) {
|
|
|
562
562
|
import { z as z3 } from "zod";
|
|
563
563
|
|
|
564
564
|
// src/shared/adviceFragmentNames.ts
|
|
565
|
+
var adviceFragmentTitles = {
|
|
566
|
+
"assist-global": "Using assist",
|
|
567
|
+
"backlog-ids": "Backlog item IDs",
|
|
568
|
+
"backlog-prs": "Backlog items, PRs, and commits",
|
|
569
|
+
"code-comments": "Commenting code",
|
|
570
|
+
"drafting-messages": "Drafting messages to send on the user's behalf",
|
|
571
|
+
"editing-files": "Editing files",
|
|
572
|
+
"filename-convention": "Naming files after their export",
|
|
573
|
+
"jira-context": "Fetching Jira context",
|
|
574
|
+
"jira-smart-links": "Editing Jira issues with Smart Links",
|
|
575
|
+
markdown: "Writing markdown",
|
|
576
|
+
refactor: "Renaming and extracting TypeScript",
|
|
577
|
+
"settings-json": "Editing claude/settings.json",
|
|
578
|
+
verify: "Verifying a change"
|
|
579
|
+
};
|
|
565
580
|
var adviceFragmentNames = [
|
|
566
581
|
"assist-global",
|
|
567
582
|
"backlog-ids",
|
|
@@ -2101,10 +2116,10 @@ function reportVerifyProblems(problems, success) {
|
|
|
2101
2116
|
}
|
|
2102
2117
|
|
|
2103
2118
|
// src/commands/verify/adviceFragments.ts
|
|
2119
|
+
var titles = adviceFragmentTitles;
|
|
2104
2120
|
function adviceFragments() {
|
|
2105
|
-
const
|
|
2106
|
-
|
|
2107
|
-
);
|
|
2121
|
+
const fragments = loadAdviceFragments();
|
|
2122
|
+
const shipped = new Set(fragments.map((fragment) => fragment.name));
|
|
2108
2123
|
const declared = new Set(adviceFragmentNames);
|
|
2109
2124
|
reportVerifyProblems(
|
|
2110
2125
|
[
|
|
@@ -2115,9 +2130,15 @@ function adviceFragments() {
|
|
|
2115
2130
|
verifySection(
|
|
2116
2131
|
"Listed in adviceFragmentNames but no longer shipped in claude/advice (remove them)",
|
|
2117
2132
|
[...declared].filter((name) => !shipped.has(name))
|
|
2133
|
+
),
|
|
2134
|
+
verifySection(
|
|
2135
|
+
"adviceFragmentTitles disagrees with the fragment's own title (the config picker shows these, so they must match)",
|
|
2136
|
+
fragments.filter((fragment) => titles[fragment.name] !== fragment.title).map(
|
|
2137
|
+
(fragment) => `${fragment.name}: "${titles[fragment.name] ?? ""}" should be "${fragment.title}"`
|
|
2138
|
+
)
|
|
2118
2139
|
)
|
|
2119
2140
|
],
|
|
2120
|
-
`All ${shipped.size} advice fragments are named in adviceFragmentNames.`
|
|
2141
|
+
`All ${shipped.size} advice fragments are named and titled in adviceFragmentNames.`
|
|
2121
2142
|
);
|
|
2122
2143
|
}
|
|
2123
2144
|
|
|
@@ -2842,6 +2863,33 @@ function configHelp(command, entries, preamble) {
|
|
|
2842
2863
|
);
|
|
2843
2864
|
}
|
|
2844
2865
|
|
|
2866
|
+
// src/shared/configEnumDescriptions.ts
|
|
2867
|
+
var byKey = {
|
|
2868
|
+
"advice.include": adviceFragmentTitles,
|
|
2869
|
+
"advice.exclude": adviceFragmentTitles
|
|
2870
|
+
};
|
|
2871
|
+
function configEnumDescriptions(key) {
|
|
2872
|
+
return byKey[key];
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
// src/shared/formatConfigPath.ts
|
|
2876
|
+
var RECORD_ENTRY_TOKEN = "*";
|
|
2877
|
+
function segmentText(segment) {
|
|
2878
|
+
if (segment.kind === "key") return segment.name;
|
|
2879
|
+
if (segment.kind === "entry") return RECORD_ENTRY_TOKEN;
|
|
2880
|
+
if (segment.kind === "index") return `[${segment.index}]`;
|
|
2881
|
+
return "[]";
|
|
2882
|
+
}
|
|
2883
|
+
function formatConfigPath(path91) {
|
|
2884
|
+
let text18 = "";
|
|
2885
|
+
for (const segment of path91) {
|
|
2886
|
+
const dotted = segment.kind === "key" || segment.kind === "entry";
|
|
2887
|
+
const rendered = segmentText(segment);
|
|
2888
|
+
text18 += dotted && text18 ? `.${rendered}` : rendered;
|
|
2889
|
+
}
|
|
2890
|
+
return text18;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2845
2893
|
// src/shared/unwrapSchemaNode.ts
|
|
2846
2894
|
var WRAPPER_TYPES = /* @__PURE__ */ new Set([
|
|
2847
2895
|
"optional",
|
|
@@ -2911,7 +2959,9 @@ function scalarArrayItemType(node) {
|
|
|
2911
2959
|
function scalarListNode(inner, base, item) {
|
|
2912
2960
|
const itemType = scalarArrayItemType(inner);
|
|
2913
2961
|
if (!itemType || item.kind !== "scalar") return void 0;
|
|
2914
|
-
|
|
2962
|
+
const descriptions = configEnumDescriptions(formatConfigPath(base.path));
|
|
2963
|
+
const described = descriptions && item.enumValues ? { ...item, enumDescriptions: descriptions } : item;
|
|
2964
|
+
return { ...base, kind: "scalarList", itemType, item: described };
|
|
2915
2965
|
}
|
|
2916
2966
|
function objectListNode(base, item) {
|
|
2917
2967
|
if (item.kind !== "object" && item.kind !== "unionOfObjects")
|
|
@@ -2995,24 +3045,6 @@ function describeConfigNode(schema2) {
|
|
|
2995
3045
|
return build(schema2, []);
|
|
2996
3046
|
}
|
|
2997
3047
|
|
|
2998
|
-
// src/shared/formatConfigPath.ts
|
|
2999
|
-
var RECORD_ENTRY_TOKEN = "*";
|
|
3000
|
-
function segmentText(segment) {
|
|
3001
|
-
if (segment.kind === "key") return segment.name;
|
|
3002
|
-
if (segment.kind === "entry") return RECORD_ENTRY_TOKEN;
|
|
3003
|
-
if (segment.kind === "index") return `[${segment.index}]`;
|
|
3004
|
-
return "[]";
|
|
3005
|
-
}
|
|
3006
|
-
function formatConfigPath(path91) {
|
|
3007
|
-
let text18 = "";
|
|
3008
|
-
for (const segment of path91) {
|
|
3009
|
-
const dotted = segment.kind === "key" || segment.kind === "entry";
|
|
3010
|
-
const rendered = segmentText(segment);
|
|
3011
|
-
text18 += dotted && text18 ? `.${rendered}` : rendered;
|
|
3012
|
-
}
|
|
3013
|
-
return text18;
|
|
3014
|
-
}
|
|
3015
|
-
|
|
3016
3048
|
// src/shared/describeConfigLeaves.ts
|
|
3017
3049
|
function leafType(node) {
|
|
3018
3050
|
switch (node.kind) {
|
|
@@ -5377,8 +5409,11 @@ function explainAdvice(context, fragments = loadAdviceFragments()) {
|
|
|
5377
5409
|
const width = Math.max(
|
|
5378
5410
|
...decisions.map((decision) => decision.fragment.name.length)
|
|
5379
5411
|
);
|
|
5412
|
+
const titleWidth = Math.max(
|
|
5413
|
+
...decisions.map((decision) => decision.fragment.title.length)
|
|
5414
|
+
);
|
|
5380
5415
|
return decisions.map(
|
|
5381
|
-
({ fragment, included, reason: reason4 }) => `${included ? chalk28.green("\u2713") : chalk28.dim("\u2717")} ${fragment.name.padEnd(width)} ${reason4}`
|
|
5416
|
+
({ fragment, included, reason: reason4 }) => `${included ? chalk28.green("\u2713") : chalk28.dim("\u2717")} ${fragment.name.padEnd(width)} ${chalk28.dim(fragment.title.padEnd(titleWidth))} ${reason4}`
|
|
5382
5417
|
).join("\n");
|
|
5383
5418
|
}
|
|
5384
5419
|
|
|
@@ -11524,10 +11559,10 @@ function configEntryNode(root, key) {
|
|
|
11524
11559
|
}
|
|
11525
11560
|
|
|
11526
11561
|
// src/commands/config/configHelpForKey.ts
|
|
11527
|
-
var
|
|
11562
|
+
var byKey2;
|
|
11528
11563
|
function configHelpForKey(key) {
|
|
11529
|
-
|
|
11530
|
-
return
|
|
11564
|
+
byKey2 ??= new Map(configHelpEntries.map((entry) => [entry.key, entry]));
|
|
11565
|
+
return byKey2.get(key);
|
|
11531
11566
|
}
|
|
11532
11567
|
|
|
11533
11568
|
// src/commands/config/isGlobalOnlyConfigKey.ts
|