bingocode 1.1.184 → 1.1.186

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bingocode",
3
- "version": "1.1.184",
3
+ "version": "1.1.186",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "claude": "bin/claude-win.cjs",
@@ -135,16 +135,7 @@ type State = {
135
135
  // (useScheduledTasks). Set by cronScheduler.start() when the JSON has
136
136
  // entries, or by CronCreateTool. Not persisted.
137
137
  scheduledTasksEnabled: boolean
138
- // Session-only goal condition for /goal command. Null when no active goal.
139
- goalCondition: string | null
140
- goalIterationCount: number
141
- goalMaxIterations: number
142
- // Goal evaluator history for detecting repeated gaps
143
- goalEvalHistory: {
144
- lastGap: string | null
145
- consecutiveSameGapCount: number
146
- }
147
- // Session-only cron tasks created via CronCreate with durable: false.
138
+ // Session-only cron tasks created via CronCreate with durable: false.
148
139
  // Fire on schedule like file-backed tasks but are never written to
149
140
  // .claude/scheduled_tasks.json — they die with the process. Typed via
150
141
  // SessionCronTask below (not importing from cronTasks.ts keeps
@@ -366,15 +357,7 @@ function getInitialState(): State {
366
357
  sessionBypassPermissionsMode: false,
367
358
  // Scheduled tasks disabled until flag or dialog enables them
368
359
  scheduledTasksEnabled: false,
369
- // Goal condition for /goal command (null = no active goal)
370
- goalCondition: null,
371
- goalIterationCount: 0,
372
- goalMaxIterations: 20,
373
- goalEvalHistory: {
374
- lastGap: null,
375
- consecutiveSameGapCount: 0,
376
- },
377
- sessionCronTasks: [],
360
+ sessionCronTasks: [],
378
361
  sessionCreatedTeams: new Set(),
379
362
  // Session-only trust flag (not persisted to disk)
380
363
  sessionTrustAccepted: false,
@@ -1794,85 +1777,4 @@ export function setPromptId(id: string | null): void {
1794
1777
  // ============================================================================
1795
1778
 
1796
1779
  // ============================================================================
1797
- // /goal session state accessors (DEPRECATED — use goalStore.ts instead)
1798
- // ============================================================================
1799
- // These accessors are kept for backwards compatibility with existing code.
1800
- // They delegate to the new GoalStore in src/utils/goalStore.ts.
1801
- // New code should import from goalStore.ts directly.
1802
- // TODO: remove after all consumers are migrated.
1803
-
1804
- import { getGoalState as _getGoalState } from '../utils/goalStore.js'
1805
-
1806
- export function getGoalCondition(): string | null {
1807
- try {
1808
- return _getGoalState().userGoal?.text ?? _getGoalState().operationalGoal?.text ?? null
1809
- } catch {
1810
- return STATE.goalCondition // fallback to old field during migration
1811
- }
1812
- }
1813
-
1814
- export function setGoalCondition(condition: string | null): void {
1815
- if (condition) {
1816
- try {
1817
- // Delegate to new store for structured goal management
1818
- const { setUserGoal: _setUserGoal, setOperationalGoal: _setOperationalGoal } = require('../utils/goalStore.js')
1819
- _setUserGoal(condition)
1820
- _setOperationalGoal(condition)
1821
- } catch {
1822
- STATE.goalCondition = condition // fallback
1823
- STATE.goalIterationCount = 0
1824
- }
1825
- } else {
1826
- STATE.goalCondition = null
1827
- STATE.goalIterationCount = 0
1828
- }
1829
- }
1830
-
1831
- export function getGoalIterationCount(): number {
1832
- try {
1833
- return _getGoalState().metrics.iterationCount
1834
- } catch {
1835
- return STATE.goalIterationCount
1836
- }
1837
- }
1838
-
1839
- export function incrementGoalIterationCount(): void {
1840
- try {
1841
- const { incrementIteration } = require('../utils/goalStore.js')
1842
- incrementIteration()
1843
- } catch {
1844
- STATE.goalIterationCount++
1845
- }
1846
- }
1847
-
1848
- export function getGoalMaxIterations(): number {
1849
- try {
1850
- return _getGoalState().metrics.maxIterations
1851
- } catch {
1852
- return STATE.goalMaxIterations
1853
- }
1854
- }
1855
-
1856
- // Goal evaluator history accessors (DEPRECATED — use goalStore.ts)
1857
- export function getGoalEvalHistory() {
1858
- try {
1859
- return _getGoalState().metrics.evalHistory
1860
- } catch {
1861
- return STATE.goalEvalHistory
1862
- }
1863
- }
1864
-
1865
- export function updateGoalEvalHistory(lastGap: string | null): void {
1866
- try {
1867
- const { recordEvalGap: _recordEvalGap } = require('../utils/goalStore.js')
1868
- _recordEvalGap(lastGap)
1869
- } catch {
1870
- if (lastGap === STATE.goalEvalHistory.lastGap) {
1871
- STATE.goalEvalHistory.consecutiveSameGapCount++
1872
- } else {
1873
- STATE.goalEvalHistory.lastGap = lastGap
1874
- STATE.goalEvalHistory.consecutiveSameGapCount = 1
1875
- }
1876
- }
1877
- }
1878
1780
 
@@ -0,0 +1,23 @@
1
+ import * as React from 'react'
2
+ import type { LocalJSXCommandContext } from '../../commands.js'
3
+ import type { LocalJSXCommandOnDone } from '../../types/command.js'
4
+ import { updateSettingsForSource } from '../../utils/settings/settings.js'
5
+
6
+ export async function call(
7
+ onDone: LocalJSXCommandOnDone,
8
+ context: LocalJSXCommandContext,
9
+ args?: string,
10
+ ): Promise<React.ReactNode | null> {
11
+ const arg = args?.trim().toLowerCase()
12
+
13
+ if (arg === 'off') {
14
+ updateSettingsForSource('userSettings', { execMode: false })
15
+ onDone('✗ Exec Mode disabled')
16
+ return null
17
+ }
18
+
19
+ // Default: always enable (not a toggle)
20
+ updateSettingsForSource('userSettings', { execMode: true })
21
+ onDone('✓ Exec Mode enabled')
22
+ return null
23
+ }
@@ -0,0 +1,15 @@
1
+ import type { Command } from '../../commands.js'
2
+
3
+ const exec: Command = {
4
+ type: 'local-jsx',
5
+ name: 'exec',
6
+ description:
7
+ 'Enable execution policy — dispatch-first, context protection, compressed output',
8
+ aliases: ['executor'],
9
+ argumentHint: '[off]',
10
+ isEnabled: () => true,
11
+ immediate: true,
12
+ load: () => import('./exec.js'),
13
+ }
14
+
15
+ export default exec