sh3-core 0.19.0 → 0.19.3
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/Sh3.svelte +3 -1
- package/dist/actions/menuBarModel.js +8 -0
- package/dist/actions/menuBarModel.test.js +61 -0
- package/dist/app/admin/ApiKeysView.svelte +6 -5
- package/dist/app/store/PermissionConfirmModal.svelte +23 -0
- package/dist/app/store/PermissionConfirmModal.svelte.d.ts +1 -0
- package/dist/app/store/StoreView.svelte +6 -1
- package/dist/chrome/CompactChrome.svelte.test.js +7 -4
- package/dist/env/client.d.ts +5 -4
- package/dist/env/client.js +11 -17
- package/dist/env/serverUrl.d.ts +2 -0
- package/dist/env/serverUrl.js +8 -0
- package/dist/gestures/gestureRegistry.test.js +1 -0
- package/dist/gestures/index.d.ts +17 -0
- package/dist/gestures/index.js +27 -0
- package/dist/keys/client.js +6 -7
- package/dist/keys/revocation-bus.svelte.js +11 -1
- package/dist/layout/compact/CarouselTabs.svelte +152 -15
- package/dist/layout/compact/CarouselTabs.svelte.test.js +222 -2
- package/dist/layout/compact/CompactRenderer.svelte +1 -1
- package/dist/layout/compact/CompactRenderer.svelte.test.js +5 -3
- package/dist/layout/compact/derive.js +7 -16
- package/dist/layout/compact/derive.test.js +30 -9
- package/dist/layout/drag.svelte.js +16 -3
- package/dist/layout/inspection.d.ts +20 -9
- package/dist/layout/inspection.js +66 -11
- package/dist/layout/inspection.svelte.test.d.ts +1 -0
- package/dist/layout/inspection.svelte.test.js +114 -0
- package/dist/layout/store.schemaVersion.test.js +2 -2
- package/dist/layout/types.d.ts +11 -8
- package/dist/layout/types.js +1 -1
- package/dist/layout/types.test.js +2 -2
- package/dist/overlays/FloatFrame.svelte +93 -22
- package/dist/primitives/ResizableSplitter.svelte +42 -8
- package/dist/registry/checkFetch.d.ts +6 -0
- package/dist/registry/checkFetch.js +23 -0
- package/dist/sh3/views/KeysAndPeers.svelte +4 -3
- package/dist/shards/activate-runtime.test.js +99 -1
- package/dist/shards/activate.svelte.js +20 -5
- package/dist/shards/ctx-fetch.test.js +70 -0
- package/dist/shards/registry.d.ts +8 -1
- package/dist/shards/registry.js +13 -2
- package/dist/shards/registry.test.js +25 -4
- package/dist/shards/types.d.ts +30 -1
- package/dist/shell-shard/ScrollbackView.svelte +145 -67
- package/dist/shell-shard/ScrollbackView.svelte.test.d.ts +1 -0
- package/dist/shell-shard/ScrollbackView.svelte.test.js +182 -0
- package/dist/shell-shard/dispatch-gating.test.js +38 -2
- package/dist/shell-shard/dispatch.js +9 -1
- package/dist/shell-shard/registry-resolve.test.js +50 -0
- package/dist/shell-shard/registry.d.ts +2 -1
- package/dist/shell-shard/registry.js +12 -2
- package/dist/shell-shard/verbs/help.js +5 -4
- package/dist/shell-shard/verbs/help.svelte.test.js +5 -2
- package/dist/verbs/types.d.ts +10 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -21,19 +21,29 @@ export class VerbRegistry {
|
|
|
21
21
|
* @param opts.globalOnly When true, only verbs declared with `globalVerb:
|
|
22
22
|
* true` resolve locally; everything else forwards. Used by the dispatch
|
|
23
23
|
* path to gate sh3-domain verbs to sh3 mode while keeping framework
|
|
24
|
-
* controls (clear, mode) reachable from every mode.
|
|
24
|
+
* controls (clear, mode) reachable from every mode. The leading-`/`
|
|
25
|
+
* escape ignores this flag — slash means "resolve as if in sh3 mode."
|
|
25
26
|
*/
|
|
26
27
|
resolve(line, opts = {}) {
|
|
27
28
|
const trimmed = line.trim();
|
|
28
29
|
if (!trimmed)
|
|
29
30
|
return { kind: 'forward', line };
|
|
30
|
-
// Escape hatch: '$ <rest>' always forwards
|
|
31
|
+
// Escape hatch: '$ <rest>' always forwards (used to call into bash from sh3)
|
|
31
32
|
if (trimmed.startsWith('$ ')) {
|
|
32
33
|
return { kind: 'forward', line: trimmed.slice(2) };
|
|
33
34
|
}
|
|
34
35
|
if (trimmed === '$') {
|
|
35
36
|
return { kind: 'forward', line: '' };
|
|
36
37
|
}
|
|
38
|
+
// Inverse escape: '/' makes the line resolve against sh3 verbs regardless
|
|
39
|
+
// of the active mode. `/foo args` ≡ `foo args` typed in sh3 mode.
|
|
40
|
+
// Whitespace after the slash is tolerated. `/` alone is a no-op forward.
|
|
41
|
+
if (trimmed.startsWith('/')) {
|
|
42
|
+
const body = trimmed.slice(1).trimStart();
|
|
43
|
+
if (!body)
|
|
44
|
+
return { kind: 'forward', line: '' };
|
|
45
|
+
return this.resolve(body, { globalOnly: false });
|
|
46
|
+
}
|
|
37
47
|
// First whitespace-separated token
|
|
38
48
|
const space = trimmed.indexOf(' ');
|
|
39
49
|
const head = space === -1 ? trimmed : trimmed.slice(0, space);
|
|
@@ -9,10 +9,11 @@ export function makeHelpVerb() {
|
|
|
9
9
|
summary: 'List verbs or show detail for one.',
|
|
10
10
|
globalVerb: true,
|
|
11
11
|
async run(ctx) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
// Lists every registered verb regardless of the active mode — the
|
|
13
|
+
// `/<verb>` escape (see registry.resolve) makes any sh3 verb reachable
|
|
14
|
+
// from any mode, so filtering the listing down to globalVerb-flagged
|
|
15
|
+
// entries would understate what the user can actually run.
|
|
16
|
+
const rows = listVerbs().map((v) => ({ name: v.name, summary: v.summary }));
|
|
16
17
|
ctx.scrollback.push({
|
|
17
18
|
kind: 'rich',
|
|
18
19
|
componentKey: HELP_TABLE_KEY,
|
|
@@ -35,7 +35,7 @@ describe('help verb', () => {
|
|
|
35
35
|
expect(names).toContain('mode');
|
|
36
36
|
expect(names).toContain('help');
|
|
37
37
|
});
|
|
38
|
-
it('lists
|
|
38
|
+
it('lists every registered verb in a custom mode (slash escape makes all sh3 verbs reachable)', async () => {
|
|
39
39
|
const help = makeHelpVerb();
|
|
40
40
|
const { ctx, pushed } = makeCtx('gemini');
|
|
41
41
|
await help.run(ctx, []);
|
|
@@ -44,7 +44,10 @@ describe('help verb', () => {
|
|
|
44
44
|
expect(names).toContain('clear');
|
|
45
45
|
expect(names).toContain('mode');
|
|
46
46
|
expect(names).toContain('help');
|
|
47
|
-
|
|
47
|
+
// sh3-domain verbs now appear in the listing too — users invoke them
|
|
48
|
+
// via /apps from non-sh3 modes; hiding them would understate the
|
|
49
|
+
// surface that's actually callable.
|
|
50
|
+
expect(names).toContain('apps');
|
|
48
51
|
});
|
|
49
52
|
it('is flagged globalVerb so it resolves in custom modes', () => {
|
|
50
53
|
const help = makeHelpVerb();
|
package/dist/verbs/types.d.ts
CHANGED
|
@@ -216,11 +216,16 @@ export interface Verb {
|
|
|
216
216
|
name: string;
|
|
217
217
|
summary: string;
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
219
|
+
* @deprecated Prefer the `/<verb>` user escape (resolver.ts `/` branch),
|
|
220
|
+
* which lets any sh3 verb be invoked from bash or custom modes without
|
|
221
|
+
* the author opting in. The flag still works for one minor cycle so
|
|
222
|
+
* existing shards keep resolving their flagged verbs without the slash.
|
|
223
|
+
*
|
|
224
|
+
* When true (legacy behavior), this verb resolves in every sh3 mode —
|
|
225
|
+
* including bash and external shards' custom modes. Defaults to false:
|
|
226
|
+
* sh3-domain verbs only resolve when `mode.id === 'sh3'`. Reserve this
|
|
227
|
+
* flag for verbs whose action is mode-agnostic (e.g. `clear` clears the
|
|
228
|
+
* local scrollback, `mode` switches modes — both make sense everywhere).
|
|
224
229
|
*/
|
|
225
230
|
globalVerb?: boolean;
|
|
226
231
|
/**
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Auto-generated from package.json — do not edit manually. */
|
|
2
|
-
export declare const VERSION = "0.19.
|
|
2
|
+
export declare const VERSION = "0.19.3";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Auto-generated from package.json — do not edit manually. */
|
|
2
|
-
export const VERSION = '0.19.
|
|
2
|
+
export const VERSION = '0.19.3';
|