@cortexkit/aft-bridge 0.58.1 → 0.59.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.
Files changed (114) hide show
  1. package/dist/bash-format.d.ts.map +1 -1
  2. package/dist/bash-format.js +5 -0
  3. package/dist/bash-format.js.map +1 -1
  4. package/dist/bash-hints.d.ts +159 -20
  5. package/dist/bash-hints.d.ts.map +1 -1
  6. package/dist/bash-hints.js +343 -37
  7. package/dist/bash-hints.js.map +1 -1
  8. package/dist/bash-host-fallback.d.ts +27 -0
  9. package/dist/bash-host-fallback.d.ts.map +1 -1
  10. package/dist/bash-host-fallback.js +55 -16
  11. package/dist/bash-host-fallback.js.map +1 -1
  12. package/dist/binary-identity.d.ts +13 -0
  13. package/dist/binary-identity.d.ts.map +1 -1
  14. package/dist/binary-identity.js +91 -2
  15. package/dist/binary-identity.js.map +1 -1
  16. package/dist/bridge.d.ts +12 -3
  17. package/dist/bridge.d.ts.map +1 -1
  18. package/dist/bridge.js +85 -40
  19. package/dist/bridge.js.map +1 -1
  20. package/dist/callgraph-format.d.ts.map +1 -1
  21. package/dist/callgraph-format.js +18 -10
  22. package/dist/callgraph-format.js.map +1 -1
  23. package/dist/child-process.d.ts.map +1 -1
  24. package/dist/child-process.js +10 -1
  25. package/dist/child-process.js.map +1 -1
  26. package/dist/coerce.d.ts +27 -0
  27. package/dist/coerce.d.ts.map +1 -1
  28. package/dist/coerce.js +64 -0
  29. package/dist/coerce.js.map +1 -1
  30. package/dist/config-error.d.ts +2 -2
  31. package/dist/config-error.js +2 -2
  32. package/dist/config-watch.d.ts +2 -0
  33. package/dist/config-watch.d.ts.map +1 -1
  34. package/dist/config-watch.js +35 -0
  35. package/dist/config-watch.js.map +1 -1
  36. package/dist/durable-log.d.ts +11 -0
  37. package/dist/durable-log.d.ts.map +1 -1
  38. package/dist/durable-log.js +67 -24
  39. package/dist/durable-log.js.map +1 -1
  40. package/dist/error-contract.d.ts +14 -5
  41. package/dist/error-contract.d.ts.map +1 -1
  42. package/dist/error-contract.js +42 -9
  43. package/dist/error-contract.js.map +1 -1
  44. package/dist/feature-config.d.ts +35 -18
  45. package/dist/feature-config.d.ts.map +1 -1
  46. package/dist/feature-config.js +161 -94
  47. package/dist/feature-config.js.map +1 -1
  48. package/dist/index.d.ts +9 -7
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +9 -7
  51. package/dist/index.js.map +1 -1
  52. package/dist/location-lifecycle.d.ts.map +1 -1
  53. package/dist/location-lifecycle.js +22 -4
  54. package/dist/location-lifecycle.js.map +1 -1
  55. package/dist/message-detach.d.ts +15 -0
  56. package/dist/message-detach.d.ts.map +1 -1
  57. package/dist/message-detach.js +48 -0
  58. package/dist/message-detach.js.map +1 -1
  59. package/dist/migration-notices.d.ts.map +1 -1
  60. package/dist/migration-notices.js +12 -5
  61. package/dist/migration-notices.js.map +1 -1
  62. package/dist/migration.d.ts +1 -0
  63. package/dist/migration.d.ts.map +1 -1
  64. package/dist/migration.js +39 -12
  65. package/dist/migration.js.map +1 -1
  66. package/dist/onnx-runtime.d.ts +5 -0
  67. package/dist/onnx-runtime.d.ts.map +1 -1
  68. package/dist/onnx-runtime.js +55 -32
  69. package/dist/onnx-runtime.js.map +1 -1
  70. package/dist/path-aliases.d.ts.map +1 -1
  71. package/dist/path-aliases.js +8 -7
  72. package/dist/path-aliases.js.map +1 -1
  73. package/dist/path-display.d.ts +5 -0
  74. package/dist/path-display.d.ts.map +1 -0
  75. package/dist/path-display.js +21 -0
  76. package/dist/path-display.js.map +1 -0
  77. package/dist/paths.d.ts.map +1 -1
  78. package/dist/paths.js +7 -6
  79. package/dist/paths.js.map +1 -1
  80. package/dist/private-storage.d.ts +9 -0
  81. package/dist/private-storage.d.ts.map +1 -0
  82. package/dist/private-storage.js +75 -0
  83. package/dist/private-storage.js.map +1 -0
  84. package/dist/protocol.d.ts +4 -0
  85. package/dist/protocol.d.ts.map +1 -1
  86. package/dist/revivable-transport.d.ts +4 -2
  87. package/dist/revivable-transport.d.ts.map +1 -1
  88. package/dist/revivable-transport.js +48 -19
  89. package/dist/revivable-transport.js.map +1 -1
  90. package/dist/storage-paths.d.ts +3 -4
  91. package/dist/storage-paths.d.ts.map +1 -1
  92. package/dist/storage-paths.js +4 -5
  93. package/dist/storage-paths.js.map +1 -1
  94. package/dist/subc-transport.d.ts +62 -3
  95. package/dist/subc-transport.d.ts.map +1 -1
  96. package/dist/subc-transport.js +460 -53
  97. package/dist/subc-transport.js.map +1 -1
  98. package/dist/tar-executable.d.ts +1 -1
  99. package/dist/tar-executable.d.ts.map +1 -1
  100. package/dist/tar-executable.js +16 -2
  101. package/dist/tar-executable.js.map +1 -1
  102. package/dist/test-child-environment.d.ts +8 -0
  103. package/dist/test-child-environment.d.ts.map +1 -0
  104. package/dist/test-child-environment.js +105 -0
  105. package/dist/test-child-environment.js.map +1 -0
  106. package/dist/transport.d.ts +29 -0
  107. package/dist/transport.d.ts.map +1 -1
  108. package/dist/transport.js +26 -1
  109. package/dist/transport.js.map +1 -1
  110. package/dist/zoom-format.d.ts +1 -0
  111. package/dist/zoom-format.d.ts.map +1 -1
  112. package/dist/zoom-format.js +5 -1
  113. package/dist/zoom-format.js.map +1 -1
  114. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"bash-format.d.ts","sourceRoot":"","sources":["../src/bash-format.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAiB5E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAQzD;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
1
+ {"version":3,"file":"bash-format.d.ts","sourceRoot":"","sources":["../src/bash-format.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAsB5E;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAQzD;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
@@ -15,6 +15,11 @@ export function formatForegroundResult(data) {
15
15
  }
16
16
  if (status === "timed_out") {
17
17
  rendered += `\n[command timed out]`;
18
+ // Name the limit that killed it, so AFT's own default limit is not
19
+ // mistaken for the command failing.
20
+ if (typeof data.status_reason === "string" && data.status_reason !== "") {
21
+ rendered += ` ${data.status_reason}`;
22
+ }
18
23
  }
19
24
  if (typeof exit === "number" && exit !== 0) {
20
25
  rendered += `\n[exit code: ${exit}]`;
@@ -1 +1 @@
1
- {"version":3,"file":"bash-format.js","sourceRoot":"","sources":["../src/bash-format.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,gGAAgG;AAChG,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,OAAO,GAAG,MAAM,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,IAA6B;IAClE,MAAM,MAAM,GAAI,IAAI,CAAC,cAAqC,IAAI,EAAE,CAAC;IACjE,MAAM,UAAU,GAAG,IAAI,CAAC,WAAiC,CAAC;IAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,g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AAC3D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC;AAC3B,CAAC"}
@@ -2,38 +2,177 @@
2
2
  export type WatchCallerRole = "worker" | "primary";
3
3
  /** Sync bash_watch deadline used by a primary session that passes no timeout. */
4
4
  export declare const DEFAULT_PRIMARY_WATCH_TIMEOUT_MS = 30000;
5
+ /** Largest bash_watch timeout accepted by the OpenCode and Pi plugins' tool schemas. */
6
+ export declare const MAX_WATCH_TIMEOUT_MS = 1800000;
5
7
  /**
6
- * Description of the bash_watch timeout parameter. It must stay true for both
7
- * roles without naming them, because every caller sees the same schema.
8
+ * Default `bash.worker_wait_max_ms`: the longest a delegated worker's wait on
9
+ * one command blocks before control returns to it. Mirrors
10
+ * `DEFAULT_BASH_WORKER_WAIT_MAX_MS` in the engine's `config.rs`. A worker that
11
+ * blocked with no limit once sat behind a stuck test run for fifteen hours;
12
+ * with the limit it gets control back, sees the command is still running, and
13
+ * decides whether to wait again or kill it.
8
14
  */
9
- export declare const WATCH_TIMEOUT_PARAM_DESCRIPTION = "Sync-only timeout in milliseconds. Default 30000 (the configured maximum for delegated sessions); max `bash.watch_sync_max_ms` (120000 by default).";
15
+ export declare const DEFAULT_WORKER_WAIT_MAX_MS = 1800000;
16
+ /** Smallest accepted `bash.worker_wait_max_ms`; mirrors `MIN_BASH_WORKER_WAIT_MAX_MS`. */
17
+ export declare const MIN_WORKER_WAIT_MAX_MS = 60000;
10
18
  /**
11
- * Effective sync bash_watch deadline. A delegated worker cannot end its turn
12
- * while a command runs, so a short default only makes it loop, re-reading its
13
- * whole context on every call; it gets the configured cap instead. A primary
14
- * keeps the short default because it can do other work or end its turn.
19
+ * Longest delay a JavaScript timer accepts (2^31 - 1 ms, about 24.8 days); a
20
+ * larger one fires almost at once. Bridge transport timeouts derived from a
21
+ * configured limit are clamped to it.
15
22
  */
16
- export declare function resolveWatchTimeoutMs(requestedMs: number | undefined, role: WatchCallerRole, capMs: number): number;
23
+ export declare const LONGEST_TIMER_DELAY_MS = 2147483647;
24
+ /**
25
+ * How a delegated worker's waits are bounded, worded once for every tool
26
+ * description. It names the setting, not its value, so the prompt prefix is
27
+ * the same for every user.
28
+ */
29
+ export declare const WORKER_WAIT_LIMIT_PHRASE = "the worker wait limit (`bash.worker_wait_max_ms`, 30 minutes by default)";
30
+ /**
31
+ * Description of the bash_watch tool's sync-wait defaults, embedded in both
32
+ * plugins' tool descriptions. Every caller sees the same description, so it
33
+ * has to state both roles' real behaviour.
34
+ */
35
+ export declare const WATCH_SYNC_DEFAULTS_DESCRIPTION = "Sync waits default to 30s in a main session (max `bash.watch_sync_max_ms`, 120s by default); in a delegated session a sync wait without a timeout waits up to the worker wait limit (`bash.worker_wait_max_ms`, 30 minutes by default), then reports it is still running; watch again to keep waiting";
36
+ /**
37
+ * Description of the bash_watch timeout parameter. Every caller sees the same
38
+ * schema, so it has to be true for both roles.
39
+ */
40
+ export declare const WATCH_TIMEOUT_PARAM_DESCRIPTION = "Sync-only timeout in milliseconds. In a main session: default 30000, max `bash.watch_sync_max_ms` (120000 by default). In a delegated session: omit it to wait up to the worker wait limit (`bash.worker_wait_max_ms`, 30 minutes by default), after which the watch reports the command is still running; a value you pass is used as given.";
41
+ /**
42
+ * Effective sync bash_watch deadline in milliseconds.
43
+ *
44
+ * A delegated worker cannot be woken once its turn ends, so it has nothing
45
+ * useful to do while its command runs except wait, and a short deadline only
46
+ * makes it call bash_watch again, re-reading its whole context each time. It
47
+ * therefore waits up to the worker wait limit (`workerWaitMaxMs`,
48
+ * `bash.worker_wait_max_ms`) by default: long enough that re-watching is
49
+ * rare, short enough that a stuck command cannot hold it forever. A timeout
50
+ * it passes is honoured as given rather than clamped to the primary cap. A
51
+ * primary keeps the short default and the cap because it can do other work
52
+ * or end its turn and be woken by the completion reminder.
53
+ */
54
+ export declare function resolveWatchTimeoutMs(requestedMs: number | undefined, role: WatchCallerRole, capMs: number, workerWaitMaxMs: number): number;
55
+ /**
56
+ * Largest bash_watch timeout a caller of this role may pass. A primary is
57
+ * bounded by the configured cap; a worker only by the schema maximum.
58
+ */
59
+ export declare function maxWatchTimeoutMs(role: WatchCallerRole, capMs: number): number;
60
+ /**
61
+ * Delay before the next bash_watch status poll. The first seconds poll fast so
62
+ * a short command's exit or a quick pattern is seen promptly; after that the
63
+ * interval grows, because a wait that can last as long as a build would
64
+ * otherwise send ten status requests a second for its whole length. The
65
+ * longest interval is also the worst-case delay before a new message or an
66
+ * abort ends the wait.
67
+ */
68
+ export declare function watchPollDelayMs(elapsedMs: number): number;
69
+ /**
70
+ * Clock and sleep used by the bash_watch wait loops. Production uses the
71
+ * monotonic clock and a real timer; tests replace both fields so a wait that
72
+ * lasts minutes of simulated time runs in milliseconds.
73
+ */
74
+ export declare const watchClock: {
75
+ now: () => number;
76
+ sleep: (ms: number, signal?: AbortSignal) => Promise<void>;
77
+ };
78
+ /** Sleep that resolves early when `signal` aborts, so an aborted wait ends at once. */
79
+ export declare function abortableSleep(ms: number, signal?: AbortSignal): Promise<void>;
17
80
  /**
18
81
  * Opening of every sync bash_watch reply line: the real time the watch held
19
82
  * the call, next to the limit it was allowed. Printing both lets a reader see
20
83
  * at a glance whether the watch ran to its limit or returned early, and when
21
84
  * the limit is the configured cap it names the knob, so a caller that wanted
22
- * longer knows what bounded it. `elapsedMs` must come from a monotonic clock
23
- * (see monotonicNowMs).
85
+ * longer knows what bounded it. `limitMs` is undefined for a wait with no
86
+ * deadline, and `capMs` is undefined when the caller is not bounded by the
87
+ * configured cap (a delegated worker). `elapsedMs` must come from a monotonic
88
+ * clock (see monotonicNowMs).
89
+ */
90
+ export declare function formatWatchWaited(elapsedMs: number, limitMs: number | undefined, capMs: number | undefined): string;
91
+ /**
92
+ * Appended to a primary's bash_watch reply whose sync deadline passed without
93
+ * a match. The deadline is a property of the watch, not of the command, so the
94
+ * caller is told the command is still running and that the completion
95
+ * reminder wakes it. A worker gets {@link workerWatchStillRunning} instead.
96
+ */
97
+ export declare function watchTimeoutSteer(): string;
98
+ /** A duration in words: whole minutes as minutes, anything else in seconds. */
99
+ export declare function formatWaitDuration(ms: number): string;
100
+ /**
101
+ * The sentence naming a task's own kill deadline, from the `hard_kill` field
102
+ * and `started_at` of the engine's task status (`{ limit_ms, source }`), or how
103
+ * the task was killed when its hard kill fired (`status_reason`). It reports an
104
+ * absolute UTC deadline measured from command start and the approximate time
105
+ * remaining. Mirrors `kill_deadline_sentence` in the engine.
106
+ */
107
+ export declare function taskKillDeadlineText(data: Record<string, unknown>, role: WatchCallerRole, nowMs?: number): string;
108
+ /**
109
+ * A wait should not hand back a still-running task just before its own kill
110
+ * deadline. Five seconds covers the slowest status poll and kill publication.
111
+ */
112
+ export declare function taskKillDeadlineWithinHandoffMargin(data: Record<string, unknown>): boolean;
113
+ /** The last lines of `output`, so a worker can judge whether a command is stuck. */
114
+ export declare function outputTail(output: string | undefined): string;
115
+ /**
116
+ * Appended to a delegated worker's bash_watch reply whose deadline passed
117
+ * while the command still runs (by default the worker wait limit). The
118
+ * deadline is a property of the watch, not of the command: a worker that read
119
+ * a bare "timeout reached" line as its own execution failing declared a
120
+ * failed result while its command was still going. So it is told plainly that
121
+ * the command is still running, how long it has run, and its latest output,
122
+ * then given both moves by name: watch again to keep waiting, or kill a
123
+ * command that should have finished. `taskIdArg` and `timeoutParam` are the
124
+ * host's spellings of the bash_watch arguments.
125
+ */
126
+ export declare function workerWatchStillRunning(options: {
127
+ taskId: string;
128
+ waitedMs: number;
129
+ ranMs: number | undefined;
130
+ output: string | undefined;
131
+ taskIdArg?: string;
132
+ timeoutParam?: string;
133
+ }): string;
134
+ /**
135
+ * How long a sync bash_watch with no deadline keeps retrying while every
136
+ * status poll times out because the bridge is busy. Without this bound a wait
137
+ * with no deadline would retry a wedged bridge forever; after it, the watch
138
+ * returns and says the task state is unknown.
139
+ */
140
+ export declare const WATCH_UNAVAILABLE_GIVE_UP_MS = 120000;
141
+ /**
142
+ * What a delegated worker is told whenever its watch returned while its task
143
+ * is still running. A worker cannot be woken after its turn ends, so the only
144
+ * right move is to wait again.
145
+ */
146
+ export declare const WORKER_KEEP_WAITING = "Call bash_watch again to keep waiting; don't report a result until the command finishes.";
147
+ /**
148
+ * Tail of a sync bash_watch reply interrupted by a new message, saying what
149
+ * happens to the still-running task next. A primary is woken later by the
150
+ * completion reminder or an async watch, as `primaryTail` says; a worker
151
+ * cannot be woken once its turn ends, so it is told to wait again instead.
152
+ */
153
+ export declare function interruptedWatchTail(role: WatchCallerRole, primaryTail: string): string;
154
+ /**
155
+ * Appended to a bash reply shown to a delegated worker (subagent) whose
156
+ * command now runs in the background. AFT's own reply already says the task
157
+ * won't wake the worker; this names the plugin-owned bash_watch tool, which
158
+ * AFT cannot assume a host has. The suggested call passes no timeout on
159
+ * purpose: a worker's watch without one waits up to the worker wait limit,
160
+ * the longest it may, so any number would only make it wake sooner and watch
161
+ * again. `taskIdArg` is the host's spelling of the task id argument.
162
+ */
163
+ export declare function workerBackgroundTaskNote(taskId: string, taskIdArg?: string): string;
164
+ /**
165
+ * Line a bash_status snapshot of a still-running task ends with. A primary is
166
+ * woken by the completion reminder; a delegated worker is not, so it is
167
+ * pointed at bash_watch instead.
24
168
  */
25
- export declare function formatWatchWaited(elapsedMs: number, limitMs: number, capMs: number): string;
169
+ export declare function runningTaskStatusHint(role: WatchCallerRole): string;
26
170
  /**
27
- * Appended to a bash_watch reply whose sync deadline passed without a match.
28
- * The deadline is a property of the watch, not of the command: a delegated
29
- * worker that read the bare "timeout reached" line as its own execution being
30
- * interrupted declared a failed result while its long-running command was
31
- * still going. Each role gets only the move that applies to it: a worker must
32
- * keep watching and not report, while a primary may end its turn because the
33
- * completion reminder wakes it. `timeoutParam` is the host's spelling of the
34
- * bash_watch timeout argument, so the worker is told a name it can pass.
171
+ * Tail of a sync bash_watch reply that ended because the bridge stayed busy,
172
+ * so the task's state is unknown. Only a primary can rely on the completion
173
+ * notification to wake it.
35
174
  */
36
- export declare function watchTimeoutSteer(role: WatchCallerRole, capMs: number, timeoutParam?: string): string;
175
+ export declare function watchUnavailableSteer(role: WatchCallerRole): string;
37
176
  /**
38
177
  * Append the `aft_conflicts` hint when the output indicates a real git merge
39
178
  * or rebase produced conflicts.
@@ -1 +1 @@
1
- {"version":3,"file":"bash-hints.d.ts","sourceRoot":"","sources":["../src/bash-hints.ts"],"names":[],"mappings":"AAWA,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD,iFAAiF;AACjF,eAAO,MAAM,gCAAgC,QAAS,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,wJAC2G,CAAC;AAExJ;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,GACZ,MAAM,CAGR;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,EACb,YAAY,SAAc,GACzB,MAAM,CAKR;AAqBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAM/D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAYjE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,mBAAmB,EAAE,OAAO,EAC5B,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAQR"}
1
+ {"version":3,"file":"bash-hints.d.ts","sourceRoot":"","sources":["../src/bash-hints.ts"],"names":[],"mappings":"AAaA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