@hasna/assistants 1.1.26 → 1.1.28

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/index.js CHANGED
@@ -78406,15 +78406,37 @@ class BuiltinCommands {
78406
78406
  **About Hasna**
78407
78407
 
78408
78408
  `;
78409
- message += `Hasna is a company that wants to make AI more useful for everyone.
78409
+ message += `Hasna is on a mission to make AI more useful to everyone.
78410
+ `;
78411
+ message += `We build tools that bring the power of AI into your everyday workflow \u2014 no expertise required.
78410
78412
  `;
78411
78413
  message += `Website: hasna.com
78412
78414
  `;
78413
78415
  message += `
78414
- **About assistants**
78416
+ **About Hasna Assistants**
78417
+
78418
+ `;
78419
+ message += `Hasna Assistants is a general-purpose AI assistant that lives in your terminal.
78420
+ `;
78421
+ message += `It connects natively to 100+ tools \u2014 email, calendars, databases, cloud storage, CRMs, and more \u2014 so you can get things done without switching apps.
78415
78422
 
78416
78423
  `;
78417
- message += `assistants is a terminal-first AI environment for connecting tools, running tasks, and collaborating with agents.
78424
+ message += `What you can do:
78425
+ `;
78426
+ message += `- Ask questions and get answers in plain language
78427
+ `;
78428
+ message += `- Automate repetitive tasks across your tools
78429
+ `;
78430
+ message += `- Read, write, and manage files on your machine
78431
+ `;
78432
+ message += `- Run multi-step workflows with built-in skills
78433
+ `;
78434
+ message += `- Schedule commands to run on a timer
78435
+ `;
78436
+ message += `- Collaborate with multiple AI agents via swarm mode
78437
+
78438
+ `;
78439
+ message += `Whether you are a developer, a founder, or just someone who wants AI to handle the boring stuff \u2014 Assistants is built for you.
78418
78440
  `;
78419
78441
  context.emit("text", message);
78420
78442
  context.emit("done");
@@ -84586,7 +84608,7 @@ Format the summary as a brief bullet-point list. This summary will replace the c
84586
84608
  budgetCommand() {
84587
84609
  return {
84588
84610
  name: "budgets",
84589
- aliases: ["budget", "budets"],
84611
+ aliases: ["budget"],
84590
84612
  description: "View and manage resource budgets (tokens, calls, duration limits)",
84591
84613
  builtin: true,
84592
84614
  selfHandled: true,
@@ -84648,7 +84670,7 @@ Format the summary as a brief bullet-point list. This summary will replace the c
84648
84670
  message2 += `/budgets help Show this help
84649
84671
  `;
84650
84672
  message2 += `
84651
- Aliases: /budget, /budets
84673
+ Alias: /budget
84652
84674
  `;
84653
84675
  context.emit("text", message2);
84654
84676
  context.emit("done");
@@ -87154,7 +87176,7 @@ Not a git repository or git not available.
87154
87176
  context.setProjectContext(projectContext);
87155
87177
  }
87156
87178
  }
87157
- var VERSION2 = "1.1.26";
87179
+ var VERSION2 = "1.1.28";
87158
87180
  var init_builtin = __esm(async () => {
87159
87181
  init_src2();
87160
87182
  init_store();
@@ -210883,8 +210905,7 @@ var COMMANDS = [
210883
210905
  { name: "/projects", description: "manage projects in this folder" },
210884
210906
  { name: "/plans", description: "manage project plans" },
210885
210907
  { name: "/schedules", description: "manage scheduled commands" },
210886
- { name: "/budgets", description: "manage budgets (interactive, /budget alias)" },
210887
- { name: "/budets", description: "manage budget profiles (alias)" },
210908
+ { name: "/budgets", description: "manage budget profiles" },
210888
210909
  { name: "/assistants", description: "switch or list assistants" },
210889
210910
  { name: "/identity", description: "manage assistant identity" },
210890
210911
  { name: "/whoami", description: "show current identity" },
@@ -229252,20 +229273,29 @@ function GuardrailsPanel({
229252
229273
  return;
229253
229274
  }
229254
229275
  if (mode === "policies") {
229276
+ const policiesListSize = policies.length + 1;
229255
229277
  if (key.upArrow) {
229256
- setSelectedIndex((prev) => prev === 0 ? Math.max(0, totalItems - 1) : prev - 1);
229278
+ setSelectedIndex((prev) => prev === 0 ? policiesListSize - 1 : prev - 1);
229257
229279
  return;
229258
229280
  }
229259
229281
  if (key.downArrow) {
229260
- setSelectedIndex((prev) => prev >= totalItems - 1 ? 0 : prev + 1);
229282
+ setSelectedIndex((prev) => prev >= policiesListSize - 1 ? 0 : prev + 1);
229261
229283
  return;
229262
229284
  }
229263
229285
  if (key.return) {
229264
- const policy = policies[selectedIndex];
229265
- if (policy) {
229266
- setDetailPolicyId(policy.id);
229267
- setRuleIndex(0);
229268
- setMode("policy-detail");
229286
+ if (selectedIndex === policies.length) {
229287
+ setCreateName("");
229288
+ setCreateScopeIdx(2);
229289
+ setCreateActionIdx(0);
229290
+ setCreateField(0);
229291
+ setMode("policy-create");
229292
+ } else {
229293
+ const policy = policies[selectedIndex];
229294
+ if (policy) {
229295
+ setDetailPolicyId(policy.id);
229296
+ setRuleIndex(0);
229297
+ setMode("policy-detail");
229298
+ }
229269
229299
  }
229270
229300
  return;
229271
229301
  }
@@ -229824,54 +229854,66 @@ function GuardrailsPanel({
229824
229854
  paddingX: 1,
229825
229855
  height: Math.min(12, policies.length + 2),
229826
229856
  overflowY: "hidden",
229827
- children: policies.length === 0 ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
229828
- paddingY: 1,
229829
- children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229830
- dimColor: true,
229831
- children: "No policies. Press n to create one."
229832
- }, undefined, false, undefined, this)
229833
- }, undefined, false, undefined, this) : policies.map((policy, index) => {
229834
- const isSelected = index === selectedIndex;
229835
- const scopeColor = SCOPE_COLORS[policy.scope] || "white";
229836
- return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
229857
+ children: [
229858
+ policies.length === 0 ? /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
229859
+ paddingY: 1,
229837
229860
  children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229838
- inverse: isSelected,
229839
- children: [
229840
- isSelected ? ">" : " ",
229841
- " ",
229842
- /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229843
- color: policy.enabled ? "green" : "red",
229844
- children: [
229845
- "[",
229846
- policy.enabled ? "on " : "off",
229847
- "]"
229848
- ]
229849
- }, undefined, true, undefined, this),
229850
- " ",
229851
- /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229852
- bold: isSelected,
229853
- children: (policy.name || policy.id).slice(0, 20).padEnd(20)
229854
- }, undefined, false, undefined, this),
229855
- " ",
229856
- /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229857
- color: scopeColor,
229858
- children: policy.scope.padEnd(10)
229859
- }, undefined, false, undefined, this),
229860
- " ",
229861
- /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229862
- dimColor: true,
229863
- children: policy.location
229864
- }, undefined, false, undefined, this)
229865
- ]
229866
- }, undefined, true, undefined, this)
229867
- }, policy.id, false, undefined, this);
229868
- })
229869
- }, undefined, false, undefined, this),
229861
+ dimColor: true,
229862
+ children: "No policies. Press n to create one."
229863
+ }, undefined, false, undefined, this)
229864
+ }, undefined, false, undefined, this) : policies.map((policy, index) => {
229865
+ const isSelected = index === selectedIndex;
229866
+ const scopeColor = SCOPE_COLORS[policy.scope] || "white";
229867
+ return /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
229868
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229869
+ inverse: isSelected,
229870
+ children: [
229871
+ isSelected ? ">" : " ",
229872
+ " ",
229873
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229874
+ color: policy.enabled ? "green" : "red",
229875
+ children: [
229876
+ "[",
229877
+ policy.enabled ? "on " : "off",
229878
+ "]"
229879
+ ]
229880
+ }, undefined, true, undefined, this),
229881
+ " ",
229882
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229883
+ bold: isSelected,
229884
+ children: (policy.name || policy.id).slice(0, 20).padEnd(20)
229885
+ }, undefined, false, undefined, this),
229886
+ " ",
229887
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229888
+ color: scopeColor,
229889
+ children: policy.scope.padEnd(10)
229890
+ }, undefined, false, undefined, this),
229891
+ " ",
229892
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229893
+ dimColor: true,
229894
+ children: policy.location
229895
+ }, undefined, false, undefined, this)
229896
+ ]
229897
+ }, undefined, true, undefined, this)
229898
+ }, policy.id, false, undefined, this);
229899
+ }),
229900
+ /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
229901
+ marginTop: policies.length > 0 ? 1 : 0,
229902
+ paddingY: 0,
229903
+ children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229904
+ inverse: selectedIndex === policies.length,
229905
+ dimColor: selectedIndex !== policies.length,
229906
+ color: selectedIndex === policies.length ? "cyan" : undefined,
229907
+ children: "+ New policy (n)"
229908
+ }, undefined, false, undefined, this)
229909
+ }, undefined, false, undefined, this)
229910
+ ]
229911
+ }, undefined, true, undefined, this),
229870
229912
  /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Box_default, {
229871
229913
  marginTop: 1,
229872
229914
  children: /* @__PURE__ */ jsx_dev_runtime30.jsxDEV(Text3, {
229873
229915
  dimColor: true,
229874
- children: "[n]ew [e]nable [d]isable [Enter] detail [b]ack [q]uit | \u2191\u2193 navigate"
229916
+ children: "[e]nable [d]isable [Enter] detail [b]ack [q]uit | \u2191\u2193 navigate"
229875
229917
  }, undefined, false, undefined, this)
229876
229918
  }, undefined, false, undefined, this)
229877
229919
  ]
@@ -231033,7 +231075,7 @@ function BudgetsPanel({
231033
231075
  const editSessionStatus = showingActiveProfile ? sessionStatus : createDraftStatus("session", activeOrDraftProfileForEdit?.config.session);
231034
231076
  const editSwarmStatus = showingActiveProfile ? swarmStatus : createDraftStatus("swarm", activeOrDraftProfileForEdit?.config.swarm);
231035
231077
  import_react57.useEffect(() => {
231036
- setSelectedIndex((prev) => Math.min(prev, Math.max(0, profiles.length - 1)));
231078
+ setSelectedIndex((prev) => Math.min(prev, profiles.length));
231037
231079
  }, [profiles.length]);
231038
231080
  import_react57.useEffect(() => {
231039
231081
  if (!editingProfileId)
@@ -231118,7 +231160,9 @@ function BudgetsPanel({
231118
231160
  return;
231119
231161
  }
231120
231162
  if (key.return) {
231121
- if (selectedProfile) {
231163
+ if (selectedIndex === profiles.length) {
231164
+ startCreateForm();
231165
+ } else if (selectedProfile) {
231122
231166
  onSelectProfile(selectedProfile.id);
231123
231167
  }
231124
231168
  return;
@@ -231128,15 +231172,11 @@ function BudgetsPanel({
231128
231172
  return;
231129
231173
  }
231130
231174
  if (key.upArrow) {
231131
- if (profiles.length === 0)
231132
- return;
231133
- setSelectedIndex((prev) => prev === 0 ? profiles.length - 1 : prev - 1);
231175
+ setSelectedIndex((prev) => prev === 0 ? profiles.length : prev - 1);
231134
231176
  return;
231135
231177
  }
231136
231178
  if (key.downArrow) {
231137
- if (profiles.length === 0)
231138
- return;
231139
- setSelectedIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
231179
+ setSelectedIndex((prev) => prev === profiles.length ? 0 : prev + 1);
231140
231180
  return;
231141
231181
  }
231142
231182
  }, { isActive: true });
@@ -231389,34 +231429,46 @@ function BudgetsPanel({
231389
231429
  borderStyle: "round",
231390
231430
  borderColor: "gray",
231391
231431
  paddingX: 1,
231392
- children: profiles.length === 0 ? /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
231393
- paddingY: 1,
231394
- children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
231395
- dimColor: true,
231396
- children: "No budget profiles. Press n to create one."
231397
- }, undefined, false, undefined, this)
231398
- }, undefined, false, undefined, this) : profiles.map((profile, index) => {
231399
- const isSelected = index === selectedIndex;
231400
- const isActive = profile.id === activeProfileId;
231401
- return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
231432
+ children: [
231433
+ profiles.length === 0 ? /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
231434
+ paddingY: 1,
231435
+ children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
231436
+ dimColor: true,
231437
+ children: "No budget profiles. Press n to create one."
231438
+ }, undefined, false, undefined, this)
231439
+ }, undefined, false, undefined, this) : profiles.map((profile, index) => {
231440
+ const isSelected = index === selectedIndex;
231441
+ const isActive = profile.id === activeProfileId;
231442
+ return /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
231443
+ paddingY: 0,
231444
+ children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
231445
+ inverse: isSelected,
231446
+ color: isActive ? "green" : undefined,
231447
+ dimColor: !isSelected && !isActive,
231448
+ children: [
231449
+ isActive ? "*" : " ",
231450
+ " ",
231451
+ index + 1,
231452
+ ". ",
231453
+ profile.name.padEnd(22),
231454
+ " ",
231455
+ profile.description || ""
231456
+ ]
231457
+ }, undefined, true, undefined, this)
231458
+ }, profile.id, false, undefined, this);
231459
+ }),
231460
+ /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
231461
+ marginTop: profiles.length > 0 ? 1 : 0,
231402
231462
  paddingY: 0,
231403
231463
  children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
231404
- inverse: isSelected,
231405
- color: isActive ? "green" : undefined,
231406
- dimColor: !isSelected && !isActive,
231407
- children: [
231408
- isActive ? "*" : " ",
231409
- " ",
231410
- index + 1,
231411
- ". ",
231412
- profile.name.padEnd(22),
231413
- " ",
231414
- profile.description || ""
231415
- ]
231416
- }, undefined, true, undefined, this)
231417
- }, profile.id, false, undefined, this);
231418
- })
231419
- }, undefined, false, undefined, this),
231464
+ inverse: selectedIndex === profiles.length,
231465
+ dimColor: selectedIndex !== profiles.length,
231466
+ color: selectedIndex === profiles.length ? "cyan" : undefined,
231467
+ children: "+ New profile (n)"
231468
+ }, undefined, false, undefined, this)
231469
+ }, undefined, false, undefined, this)
231470
+ ]
231471
+ }, undefined, true, undefined, this),
231420
231472
  selectedProfile && /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Box_default, {
231421
231473
  marginTop: 1,
231422
231474
  children: /* @__PURE__ */ jsx_dev_runtime32.jsxDEV(Text3, {
@@ -244238,7 +244290,7 @@ Interactive Mode:
244238
244290
  // packages/terminal/src/index.tsx
244239
244291
  var jsx_dev_runtime49 = __toESM(require_jsx_dev_runtime(), 1);
244240
244292
  setRuntime(bunRuntime);
244241
- var VERSION4 = "1.1.26";
244293
+ var VERSION4 = "1.1.28";
244242
244294
  var SYNC_START = "\x1B[?2026h";
244243
244295
  var SYNC_END = "\x1B[?2026l";
244244
244296
  function enableSynchronizedOutput() {
@@ -244378,4 +244430,4 @@ export {
244378
244430
  main
244379
244431
  };
244380
244432
 
244381
- //# debugId=6204ABF8948FEE3864756E2164756E21
244433
+ //# debugId=B524D128870443BF64756E2164756E21