@syncended/dsh-automations 0.5.0 → 0.5.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.
package/README.md CHANGED
@@ -60,7 +60,7 @@ dsh plugin --profile web remove @syncended/dsh-automations
60
60
  | Project | Existing absolute directory. Its canonical filesystem identity becomes the Session cwd and `workspace-write` root. |
61
61
  | Prompt | The user message sent to a fresh Harness Agent. |
62
62
  | Provider / model | Choose a configured provider in the searchable picker or enter an unlisted adapter route, then choose or enter its model. Leave both blank to resolve the current Harness default at dispatch time. |
63
- | Reasoning effort | Choose `Default` or an exact-model effort advertised by the adapter. Custom adapter-owned effort IDs remain editable and are validated when the run starts. |
63
+ | Reasoning effort | Choose `Default` or an exact-model effort advertised by the adapter. If capability lookup is unavailable, common IDs are shown as advisory fallbacks; custom IDs remain editable and are validated when the run starts. |
64
64
  | Agent preset | Leave blank for the current Harness default, or select a specific composition. |
65
65
  | Permission preset | Bundles DSH sandbox and approval policies. Default: `workspace-write`. |
66
66
  | Timeout | Wall-clock run limit. Cancellation is cooperative through the Agent loop. |
package/lib/client.js CHANGED
@@ -124,6 +124,14 @@ window.__ModuleLoader__.load({
124
124
  });
125
125
 
126
126
  const MODEL_METADATA_CACHE = new Map();
127
+ const COMMON_EFFORT_FALLBACKS = [
128
+ { id: "off", name: "Off", description: "Disable extended reasoning when the adapter supports it." },
129
+ { id: "minimal", name: "Minimal", description: "Use the lightest available reasoning level." },
130
+ { id: "low", name: "Low", description: "Use a lower-cost reasoning level." },
131
+ { id: "medium", name: "Medium", description: "Use a balanced reasoning level." },
132
+ { id: "high", name: "High", description: "Use a deeper reasoning level." },
133
+ { id: "max", name: "Max", description: "Use the strongest available reasoning level." },
134
+ ];
127
135
  const OVERLAP_OPTIONS = [
128
136
  { value: "skip", label: "skip", hint: "Skip the run if a previous run is still active." },
129
137
  { value: "queue", label: "queue", hint: "Defer the run until the previous run finishes." },
@@ -1018,12 +1026,18 @@ window.__ModuleLoader__.load({
1018
1026
  });
1019
1027
  }
1020
1028
 
1029
+ function providerFallbackName(id) {
1030
+ return humanizePresetId(id)
1031
+ .replace(/^Openai\b/, "OpenAI")
1032
+ .replace(/^Deepseek\b/, "DeepSeek");
1033
+ }
1034
+
1021
1035
  function normalizedProviders(providers) {
1022
1036
  return (Array.isArray(providers) ? providers : [])
1023
1037
  .filter((provider) => provider && typeof provider.id === "string" && provider.id !== "")
1024
1038
  .map((provider) => ({
1025
1039
  id: provider.id,
1026
- name: typeof provider.name === "string" && provider.name !== "" ? provider.name : provider.id,
1040
+ name: typeof provider.name === "string" && provider.name !== "" ? provider.name : providerFallbackName(provider.id),
1027
1041
  models: (Array.isArray(provider.models) ? provider.models : [])
1028
1042
  .map((model) => typeof model === "string"
1029
1043
  ? { id: model, name: model }
@@ -1137,6 +1151,15 @@ window.__ModuleLoader__.load({
1137
1151
  : { key: cacheKey, status: cacheKey ? "loading" : "idle", data: null, error: null };
1138
1152
  }
1139
1153
 
1154
+ function reasoningEffortsForState(modelState) {
1155
+ const advertised = modelState.status === "ready" && modelState.data?.reasoning
1156
+ && Array.isArray(modelState.data.reasoning.efforts)
1157
+ ? modelState.data.reasoning.efforts
1158
+ : null;
1159
+ if (advertised) return advertised;
1160
+ return modelState.status === "error" ? COMMON_EFFORT_FALLBACKS : [];
1161
+ }
1162
+
1140
1163
  function ReasoningEffortPicker({ id, value, provider, model, defaultModel, onChange }) {
1141
1164
  const inherited = provider.trim() === "" && model.trim() === "";
1142
1165
  const exactProvider = inherited ? String(defaultModel?.provider || "") : provider.trim();
@@ -1145,7 +1168,7 @@ window.__ModuleLoader__.load({
1145
1168
  const reasoning = modelState.status === "ready" && modelState.data
1146
1169
  ? modelState.data.reasoning
1147
1170
  : undefined;
1148
- const efforts = reasoning && Array.isArray(reasoning.efforts) ? reasoning.efforts : [];
1171
+ const efforts = reasoningEffortsForState(modelState);
1149
1172
  const known = value === "" || efforts.some((effort) => effort.id === value);
1150
1173
  const advertisedDefault = inherited
1151
1174
  ? defaultModel?.reasoningEffort
@@ -1189,7 +1212,7 @@ window.__ModuleLoader__.load({
1189
1212
  } else if (modelState.status === "loading") {
1190
1213
  panelNotice = "Loading effort levels for " + exactProvider + " / " + exactModel + "…";
1191
1214
  } else if (modelState.status === "error") {
1192
- panelNotice = "Effort metadata is unavailable. You can still enter an adapter-supported ID.";
1215
+ panelNotice = "Exact-model metadata is unavailable. Common effort IDs are advisory; custom IDs remain available.";
1193
1216
  } else if (modelState.status === "ready" && !reasoning) {
1194
1217
  panelNotice = "This model does not advertise selectable effort levels. Custom IDs remain available.";
1195
1218
  }
@@ -2680,6 +2703,8 @@ window.__ModuleLoader__.load({
2680
2703
  canonicalTimezone,
2681
2704
  comboboxSearchResults,
2682
2705
  normalizedProviders,
2706
+ providerFallbackName,
2707
+ reasoningEffortsForState,
2683
2708
  timezoneOffsetLabel,
2684
2709
  timezoneNavigationIndex,
2685
2710
  timezoneOptionPresentation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncended/dsh-automations",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Durable cron automations for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",