agentful 0.4.0 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.cjs +27 -43
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -3044,7 +3044,7 @@ var VERSION, brand, useColor, wrap, paint, tuiDesign, sym, ui;
3044
3044
  var init_branding = __esm({
3045
3045
  "src/branding.ts"() {
3046
3046
  "use strict";
3047
- VERSION = "0.4.0" ? "0.4.0" : null.version;
3047
+ VERSION = "0.4.2" ? "0.4.2" : null.version;
3048
3048
  brand = {
3049
3049
  name: "agentful",
3050
3050
  // the command users type
@@ -3068,8 +3068,6 @@ var init_branding = __esm({
3068
3068
  bold: wrap("1")
3069
3069
  };
3070
3070
  tuiDesign = {
3071
- /** Sits in front of the input line. U+276F, the shell prompt sigil. */
3072
- promptMark: "\u276F",
3073
3071
  /** Marks an item in progress in the sidebar's task list. U+203A. */
3074
3072
  activeMark: "\u203A"
3075
3073
  };
@@ -3510,7 +3508,6 @@ function brandingPluginSource() {
3510
3508
  const logoLiteral = JSON.stringify(logo_default.replace(/\n+$/, "").split("\n"));
3511
3509
  return `// Generated by ${brand.name} v${VERSION} \u2014 do not edit; rewritten on every start.
3512
3510
  const LOGO = ${logoLiteral}
3513
- const MARK = ${JSON.stringify(tuiDesign.promptMark)}
3514
3511
  const ACTIVE = ${JSON.stringify(tuiDesign.activeMark)}
3515
3512
  const USD = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' })
3516
3513
 
@@ -3549,26 +3546,11 @@ const plugin = {
3549
3546
  const t = () => api.theme.current
3550
3547
 
3551
3548
  // \u2500\u2500 band pieces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
3552
- // The engine closes its prompt with a heavy line (an upper-half block, not
3553
- // a box-drawing rune), so the band's own top line has to match it or the
3554
- // two read as unrelated. Sidebar dividers stay thin: they repeat four
3555
- // times and must not compete with the input.
3556
- const HEAVY = {
3557
- topLeft: '\u2580', topRight: '\u2580', bottomLeft: '\u2580', bottomRight: '\u2580',
3558
- horizontal: '\u2580', vertical: '\u2580',
3559
- topT: '\u2580', bottomT: '\u2580', leftT: '\u2580', rightT: '\u2580', cross: '\u2580',
3560
- }
3561
-
3562
- function Rule(props) {
3563
- return (
3564
- <box
3565
- height={1}
3566
- flexShrink={0}
3567
- border={['top']}
3568
- borderColor={props.heavy ? t().border : t().borderSubtle}
3569
- customBorderChars={props.heavy ? HEAVY : undefined}
3570
- />
3571
- )
3549
+ // Sidebar dividers only. The prompt has no rule of its own: the engine
3550
+ // already draws one under it, and a second line above it made the input
3551
+ // look boxed in.
3552
+ function Rule() {
3553
+ return <box height={1} flexShrink={0} border={['top']} borderColor={t().borderSubtle} />
3572
3554
  }
3573
3555
 
3574
3556
  function Row(props) {
@@ -3698,23 +3680,25 @@ const plugin = {
3698
3680
  }
3699
3681
 
3700
3682
  /**
3701
- * The band: our hairline on top, the marker in the gutter, and the
3702
- * engine's own input between them. The rule sits INSIDE the right column
3703
- * so it starts exactly where the engine draws its own rule under the
3704
- * input \u2014 the two lines of the band must share a left edge. The marker is
3705
- * pushed down by two rows for the same reason: one for the rule, one for
3706
- * the padding the engine's prompt adds above its first line.
3683
+ * The engine's own input, with its rail taken off.
3684
+ *
3685
+ * The engine wraps the input in a box with border ["left"] \u2014 the
3686
+ * agent-coloured rail. There is no prop, config key or theme token that
3687
+ * hides it (checked against v1.18.18 and against main), so we clip it:
3688
+ * the wrapper hides its overflow and the prompt hangs one column to the
3689
+ * left, which puts the rail outside the visible area. Everything else
3690
+ * keeps working because it is only a shift.
3691
+ *
3692
+ * \u26A0\uFE0F One column is the limit. The status line under the input (our hint
3693
+ * on the left) sits OUTSIDE that padded box and carries a margin of just
3694
+ * 1, so a wider clip eats the start of the working directory \u2014
3695
+ * "/Users/\u2026" came out as "sers/\u2026" at -3. The rendering check asserts the
3696
+ * working directory for exactly this reason.
3707
3697
  */
3708
- function Band(props) {
3698
+ function Field(props) {
3709
3699
  return (
3710
- <box flexDirection="row" width="100%">
3711
- <box flexShrink={0} paddingTop={2} paddingRight={1}>
3712
- <text fg={t().primary}>{MARK}</text>
3713
- </box>
3714
- <box flexGrow={1} flexDirection="column">
3715
- <Rule heavy />
3716
- {props.children}
3717
- </box>
3700
+ <box width="100%" overflow="hidden">
3701
+ <box marginLeft={-1} width="100%">{props.children}</box>
3718
3702
  </box>
3719
3703
  )
3720
3704
  }
@@ -3740,19 +3724,19 @@ const plugin = {
3740
3724
 
3741
3725
  home_prompt(ctx, data) {
3742
3726
  return (
3743
- <Band>
3727
+ <Field>
3744
3728
  <Prompt
3745
3729
  ref={data.ref}
3746
3730
  placeholders={PLACEHOLDERS}
3747
3731
  right={<HostSlot name="home_prompt_right" />}
3748
3732
  />
3749
- </Band>
3733
+ </Field>
3750
3734
  )
3751
3735
  },
3752
3736
 
3753
3737
  session_prompt(ctx, data) {
3754
3738
  return (
3755
- <Band>
3739
+ <Field>
3756
3740
  <Prompt
3757
3741
  sessionID={data.session_id}
3758
3742
  visible={data.visible}
@@ -3763,7 +3747,7 @@ const plugin = {
3763
3747
  hint={<Hint sessionID={data.session_id} />}
3764
3748
  right={<HostSlot name="session_prompt_right" session_id={data.session_id} />}
3765
3749
  />
3766
- </Band>
3750
+ </Field>
3767
3751
  )
3768
3752
  },
3769
3753
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentful",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Agentful in your terminal — local development with push-to-cloud previews",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://agentful.dev",