@abide/abide 0.118.0 → 0.120.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.
- package/CHANGELOG.md +17 -0
- package/bin/abide.ts +74 -11
- package/docs/REGISTRY.md +5 -4
- package/docs/RULEBOOK.md +35 -0
- package/docs/abide.md +363 -127
- package/package.json +1 -1
- package/scaffold/src/getGreeting.test.ts +1 -0
- package/scaffold/src/index.abide +4 -1
- package/scaffold/src/index.test.ts +2 -0
- package/scaffold/src/layout.abide +6 -6
- package/src/compiler/Lowering.ts +20 -2
- package/src/compiler/PositionTable.ts +1 -0
- package/src/compiler/Refusals.ts +1 -0
- package/src/compiler/TypeSession.ts +11 -8
- package/src/compiler/aliasedSymbol.ts +1 -1
- package/src/compiler/ambientReadsIn.ts +1 -0
- package/src/compiler/appLayout.ts +4 -2
- package/src/compiler/argsDefaultsIn.ts +1 -0
- package/src/compiler/argsSchemaOf.ts +1 -0
- package/src/compiler/checkApp.ts +3 -1
- package/src/compiler/checkedShadow.ts +2 -1
- package/src/compiler/classifyRead.ts +1 -0
- package/src/compiler/classifyTemplate.ts +1 -0
- package/src/compiler/compileApp.ts +4 -2
- package/src/compiler/compiledEntry.ts +1 -0
- package/src/compiler/componentGraph.ts +1 -0
- package/src/compiler/declaredExports.ts +4 -2
- package/src/compiler/emitClient.ts +19 -14
- package/src/compiler/emitComponent.ts +1 -0
- package/src/compiler/emitSource.ts +2 -1
- package/src/compiler/formatAbide.ts +857 -0
- package/src/compiler/formatDiagnosis.ts +1 -0
- package/src/compiler/handlersUnder.ts +2 -1
- package/src/compiler/hookCalls.ts +1 -0
- package/src/compiler/lineOf.ts +17 -0
- package/src/compiler/matchersOf.ts +13 -3
- package/src/compiler/mountsOf.ts +2 -0
- package/src/compiler/paramFile.ts +1 -0
- package/src/compiler/parseAbide.ts +48 -28
- package/src/compiler/projectShadow.ts +10 -3
- package/src/compiler/reactiveOptions.ts +1 -0
- package/src/compiler/reactiveTypes.ts +2 -1
- package/src/compiler/readsIn.ts +3 -2
- package/src/compiler/renderMarkup.ts +3 -2
- package/src/compiler/resolverIn.ts +2 -0
- package/src/compiler/sameTemplate.ts +150 -0
- package/src/compiler/scaffold.ts +4 -11
- package/src/compiler/serveLanguage.ts +46 -19
- package/src/compiler/sharedModuleWrites.ts +2 -1
- package/src/compiler/sourceMapOf.ts +1 -0
- package/src/compiler/splitImports.ts +2 -0
- package/src/compiler/templateWarnings.ts +2 -2
- package/src/compiler/trackingWarnings.ts +1 -0
- package/src/compiler/writeDefaultProject.ts +5 -1
- package/src/server/BRIDGE_SCHEME.ts +3 -0
- package/src/server/BRIDGE_VERSION.ts +1 -1
- package/src/server/abideModules.ts +2 -0
- package/src/server/answerFailure.ts +1 -0
- package/src/server/answerRequest.ts +15 -14
- package/src/server/answerRpc.ts +3 -2
- package/src/server/answerSocket.ts +2 -1
- package/src/server/answerValue.ts +1 -0
- package/src/server/answerWorker.ts +1 -0
- package/src/server/appTree.ts +3 -1
- package/src/server/argsFor.ts +1 -0
- package/src/server/assistant.ts +2 -1
- package/src/server/banner.ts +2 -0
- package/src/server/bridgeRelay.ts +1 -0
- package/src/server/callerOf.ts +1 -0
- package/src/server/claudeApi.ts +1 -0
- package/src/server/claudeCode.ts +30 -14
- package/src/server/clientBundle.ts +1 -0
- package/src/server/coerceArgs.ts +1 -2
- package/src/server/commands.ts +9 -0
- package/src/server/compressAnswer.ts +2 -1
- package/src/server/config.ts +2 -0
- package/src/server/createApp.ts +4 -2
- package/src/server/crossingOrigin.ts +1 -0
- package/src/server/csp.ts +1 -0
- package/src/server/deferredBuilds.ts +1 -0
- package/src/server/derivedArgs.ts +1 -0
- package/src/server/devWorker.ts +2 -1
- package/src/server/faceOf.ts +2 -7
- package/src/server/generatedSurfaces.ts +5 -1
- package/src/server/hooks.ts +1 -0
- package/src/server/iconAccent.ts +1 -1
- package/src/server/installServer.ts +1 -0
- package/src/server/installSourceMaps.ts +1 -0
- package/src/server/launcherPage.ts +2 -2
- package/src/server/manifestOf.ts +1 -0
- package/src/server/muxUpgrade.ts +1 -0
- package/src/server/nativeMenu.ts +2 -0
- package/src/server/principal.ts +2 -1
- package/src/server/remote.ts +1 -0
- package/src/server/render.ts +3 -3
- package/src/server/renderComponent.ts +1 -0
- package/src/server/reportHealth.ts +1 -0
- package/src/server/requestScope.ts +3 -1
- package/src/server/runDesktop.ts +3 -2
- package/src/server/seedBuffer.ts +1 -0
- package/src/server/serveDev.ts +3 -2
- package/src/server/shell.ts +2 -0
- package/src/server/streamEvent.ts +1 -0
- package/src/server/surfaceOf.ts +1 -0
- package/src/server/testBuild.ts +1 -0
- package/src/server/testMount.ts +1 -0
- package/src/server/trace.ts +2 -0
- package/src/server/withAbideSources.ts +1 -0
- package/src/shared/Attributes.ts +12 -8
- package/src/shared/cookies.ts +1 -1
- package/src/shared/escapeText.ts +1 -1
- package/src/shared/index.ts +1 -5
- package/src/shared/jsonSchema.ts +1 -3
- package/src/shared/menuBridge.ts +1 -2
- package/src/shared/outbox.ts +1 -1
- package/src/shared/reactive/Keyed.ts +2 -2
- package/src/shared/reactive/Reactive.ts +12 -16
- package/src/shared/reactive/index.ts +3 -4
- package/src/shared/reactive/isReactive.ts +1 -1
- package/src/shared/reactive/scoped.ts +2 -2
- package/src/shared/reactive/share.ts +1 -1
- package/src/shared/reactive/watch.ts +4 -4
- package/src/shared/refuse.ts +1 -1
- package/src/shared/rpc.ts +8 -11
- package/src/shared/url.ts +1 -1
- package/src/shared/validateJson.ts +1 -1
- package/src/ui/ArmRegion.ts +1 -0
- package/src/ui/Level.ts +1 -0
- package/src/ui/List.ts +1 -0
- package/src/ui/RawRun.ts +1 -0
- package/src/ui/Router.ts +1 -0
- package/src/ui/TryRegion.ts +1 -0
- package/src/ui/adoptWalk.ts +2 -1
- package/src/ui/bindElement.ts +1 -0
- package/src/ui/bindFiles.ts +1 -0
- package/src/ui/bindGroup.ts +1 -0
- package/src/ui/bindProperty.ts +1 -0
- package/src/ui/bindSpread.ts +1 -0
- package/src/ui/index.ts +1 -6
- package/src/ui/outboxQueue.ts +1 -1
- package/src/ui/parseMarkup.ts +2 -1
- package/src/ui/reconcile.ts +2 -1
- package/src/ui/reconcileHead.ts +1 -0
- package/src/ui/regions.ts +2 -1
- package/src/ui/registerWorker.ts +1 -0
- package/src/ui/rows.ts +1 -0
- package/src/ui/setMarkup.ts +1 -0
- package/src/ui/setText.ts +1 -0
- package/src/ui/socketWire.ts +4 -3
- package/src/ui/wire.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @abide/abide
|
|
2
2
|
|
|
3
|
+
## 0.120.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2af648d: a pairing link beside the command — abide-bridge install registers a macOS app that opens it and asks before it pairs (RULEBOOK 44.40-44.43) ([`409d5ac`](https://github.com/briancray/abide/commit/409d5ac7f95338cb3f44a21cc76cd977387eab42))
|
|
8
|
+
|
|
9
|
+
## 0.119.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- a9f8ad1: abide format formats every .abide — its scripts, styles and expressions by bun fmt, its markup by its nesting — and leaves one as written where the template would change (RULEBOOK 38.125-38.130) ([`fb0b837`](https://github.com/briancray/abide/commit/fb0b837b1264a4193371388a61fb64ec81f16638))
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- a9f8ad1: bun fmt replaces biome, and an unused local or parameter is a type error ([`259f9b1`](https://github.com/briancray/abide/commit/259f9b18b9c2bd12b6ab5c9d9784adb2b8d2edd1))
|
|
18
|
+
- a9f8ad1: format the repo with abide format and bun fmt ([`d7cd46d`](https://github.com/briancray/abide/commit/d7cd46da1e0cd523631d38d923f8bb08d1f0716f))
|
|
19
|
+
|
|
3
20
|
## 0.118.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/bin/abide.ts
CHANGED
|
@@ -4,17 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
import { existsSync, realpathSync } from 'node:fs' // bun exposes no sync existence check or realpath of its own
|
|
6
6
|
import { mkdir, rename, rm } from 'node:fs/promises' // bun exposes no directory creation, rename or recursive directory removal of its own
|
|
7
|
-
import { dirname, resolve } from 'node:path' // bun exposes no path helpers of its own
|
|
7
|
+
import { dirname, relative, resolve } from 'node:path' // bun exposes no path helpers of its own
|
|
8
8
|
import { brotliCompress, constants } from 'node:zlib' // bun's brotli is `CompressionStream`, which compresses on the main thread — 1390 ms against this pool's 300 ms over the docs bundle
|
|
9
|
+
|
|
9
10
|
import { paints } from '#compiler/appLayout.ts'
|
|
10
11
|
import { appMap, mapText } from '#compiler/appMap.ts'
|
|
11
12
|
import { checkApp } from '#compiler/checkApp.ts'
|
|
12
13
|
import {
|
|
13
|
-
type CompiledApp,
|
|
14
14
|
compilationOf,
|
|
15
15
|
compileApp,
|
|
16
|
+
type CompiledApp,
|
|
16
17
|
} from '#compiler/compileApp.ts'
|
|
17
18
|
import { compiledEntry } from '#compiler/compiledEntry.ts'
|
|
19
|
+
import { formatAbide } from '#compiler/formatAbide.ts'
|
|
18
20
|
import { formatDiagnosis } from '#compiler/formatDiagnosis.ts'
|
|
19
21
|
import { parseAbide } from '#compiler/parseAbide.ts'
|
|
20
22
|
import { scaffold } from '#compiler/scaffold.ts'
|
|
@@ -40,18 +42,23 @@ import { appOnDisk, appRoot, noAppHere } from '#server/createApp.ts'
|
|
|
40
42
|
import { executableName } from '#server/executableName.ts'
|
|
41
43
|
import { iconAccent } from '#server/iconAccent.ts'
|
|
42
44
|
import { namesUnder } from '#server/namesUnder.ts'
|
|
45
|
+
import { skipped } from '#server/placement.ts'
|
|
43
46
|
import { DEFAULT_DOCUMENT, intoHead } from '#server/render.ts'
|
|
44
47
|
import { runtimeRefusal } from '#server/runtimeRefusal.ts'
|
|
45
48
|
import { pathsUnder, serveBuild } from '#server/serveBuild.ts'
|
|
46
49
|
import { serveDev } from '#server/serveDev.ts'
|
|
47
50
|
import { escapeText } from '#shared/escapeText.ts'
|
|
48
51
|
import { ICON_ADDRESSES, LAUNCHER_PAGE } from '#shared/LAUNCHER_FILES.ts'
|
|
52
|
+
|
|
49
53
|
import abidePackage from '../package.json' with { type: 'json' }
|
|
50
54
|
|
|
51
55
|
// 38.123 — the bun this process runs on, held to abide's `engines.bun` before anything is built or
|
|
52
56
|
// booted. A compiled app carries the bun `abide compile` ran on, which this held already.
|
|
53
57
|
const RUNTIME_REFUSAL = runtimeRefusal(Bun.version, abidePackage.engines.bun)
|
|
54
58
|
|
|
59
|
+
/** How many files `abide format` formats at once, each spawning `bun fmt` for its pieces. */
|
|
60
|
+
const FILES_AT_ONCE = 8
|
|
61
|
+
|
|
55
62
|
/** Where the app a command builds or serves is, and where its build goes — both absolute. */
|
|
56
63
|
type AppDirectories = { root: string; out: string }
|
|
57
64
|
|
|
@@ -81,6 +88,10 @@ const DISK: Host = {
|
|
|
81
88
|
dev: inApp(dev),
|
|
82
89
|
build: inApp(build),
|
|
83
90
|
check: inApp(check),
|
|
91
|
+
format: (given) =>
|
|
92
|
+
given.positionals.length > 1
|
|
93
|
+
? format(namedDirectories(given.positionals), given)
|
|
94
|
+
: inApp(({ root }) => format([root], given))(given),
|
|
84
95
|
routes: inApp(routes),
|
|
85
96
|
compile: inApp(compile),
|
|
86
97
|
bundle: inApp(bundle),
|
|
@@ -699,9 +710,9 @@ async function scaffoldCommand({
|
|
|
699
710
|
return 1
|
|
700
711
|
}
|
|
701
712
|
const into = resolve(name)
|
|
702
|
-
const { written, skipped } = await scaffold(name, into)
|
|
713
|
+
const { written, skipped: kept } = await scaffold(name, into)
|
|
703
714
|
for (const path of written) console.log(` wrote ${path}`)
|
|
704
|
-
for (const path of
|
|
715
|
+
for (const path of kept) console.log(` kept ${path}`)
|
|
705
716
|
console.log(
|
|
706
717
|
// The starter's own script: `abide` alone is on no PATH until it is installed globally.
|
|
707
718
|
`\nabide scaffold: ${into}\n\n cd ${name}\n bun install\n bun run dev`,
|
|
@@ -729,13 +740,7 @@ async function check(
|
|
|
729
740
|
{ root }: AppDirectories,
|
|
730
741
|
{ positionals }: Given,
|
|
731
742
|
): Promise<number> {
|
|
732
|
-
const within
|
|
733
|
-
for (const directory of positionals.slice(1))
|
|
734
|
-
within.push(
|
|
735
|
-
existsSync(directory)
|
|
736
|
-
? realpathSync(resolve(directory))
|
|
737
|
-
: resolve(directory),
|
|
738
|
-
)
|
|
743
|
+
const within = namedDirectories(positionals)
|
|
739
744
|
const found = await checkApp(root)
|
|
740
745
|
let errors = 0
|
|
741
746
|
let warnings = 0
|
|
@@ -760,6 +765,64 @@ async function check(
|
|
|
760
765
|
return errors > 0 ? 1 : 0
|
|
761
766
|
}
|
|
762
767
|
|
|
768
|
+
/** The directories a command's `[dir…]` names, each as the real path a finding is filed under. */
|
|
769
|
+
function namedDirectories(positionals: string[]): string[] {
|
|
770
|
+
const named: string[] = []
|
|
771
|
+
for (const directory of positionals.slice(1))
|
|
772
|
+
named.push(
|
|
773
|
+
existsSync(directory)
|
|
774
|
+
? realpathSync(resolve(directory))
|
|
775
|
+
: resolve(directory),
|
|
776
|
+
)
|
|
777
|
+
return named
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* `abide format`: formats every `.abide` under `within` — the directories named, or the app where
|
|
782
|
+
* none are — and fails where any file was left as written. 38.125, 38.128.
|
|
783
|
+
*
|
|
784
|
+
* `--check` writes nothing, and fails where a file would change. 38.129.
|
|
785
|
+
*
|
|
786
|
+
* NAMED DIRECTORIES NEED NO APP, unlike `check`'s: a formatter reads one file at a time, so a
|
|
787
|
+
* monorepo formats every app under it in one run.
|
|
788
|
+
*/
|
|
789
|
+
async function format(within: string[], { values }: Given): Promise<number> {
|
|
790
|
+
const paths: string[] = []
|
|
791
|
+
for (const directory of within)
|
|
792
|
+
for (const name of namesUnder(directory, '**/*.abide'))
|
|
793
|
+
if (!name.split('/').some(skipped))
|
|
794
|
+
paths.push(`${directory}/${name}`)
|
|
795
|
+
let changed = 0
|
|
796
|
+
let errors = 0
|
|
797
|
+
// A file's pieces are formatted in parallel already, so files are taken a few at a time.
|
|
798
|
+
let next = 0
|
|
799
|
+
const take = async (): Promise<void> => {
|
|
800
|
+
while (next < paths.length) {
|
|
801
|
+
const path = paths[next] as string
|
|
802
|
+
next += 1
|
|
803
|
+
const text = await Bun.file(path).text()
|
|
804
|
+
const formatted = await formatAbide(path, text)
|
|
805
|
+
for (const finding of formatted.findings) {
|
|
806
|
+
errors += 1
|
|
807
|
+
console.log(formatDiagnosis(finding, process.cwd()))
|
|
808
|
+
}
|
|
809
|
+
if (formatted.text === text) continue
|
|
810
|
+
changed += 1
|
|
811
|
+
if (values.check)
|
|
812
|
+
console.log(
|
|
813
|
+
`${relative(process.cwd(), path)} - needs formatting`,
|
|
814
|
+
)
|
|
815
|
+
else await Bun.write(path, formatted.text)
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
await Promise.all(Array.from({ length: FILES_AT_ONCE }, take))
|
|
819
|
+
const files = `${changed} file${changed === 1 ? '' : 's'}`
|
|
820
|
+
console.log(
|
|
821
|
+
`abide format: ${values.check ? `${files} to format` : `${files} formatted`} of ${paths.length}, ${errors} error${errors === 1 ? '' : 's'}`,
|
|
822
|
+
)
|
|
823
|
+
return errors > 0 || (values.check && changed > 0) ? 1 : 0
|
|
824
|
+
}
|
|
825
|
+
|
|
763
826
|
/**
|
|
764
827
|
* `abide lsp`: the language server over stdio.
|
|
765
828
|
*
|
package/docs/REGISTRY.md
CHANGED
|
@@ -351,9 +351,9 @@ type Gated<Gate, Accepted> = [Schema<Accepted>] extends [Gate] ? never : Failed<
|
|
|
351
351
|
| --- | --- | --- | --- |
|
|
352
352
|
| `claudeCode` | `(config?: ClaudeCodeConfig) => Provider` | The visitor's own Claude Code, reached through the bridge paired with their browser, as a provider. | 44.5, 44.13, 44.17, 44.18, 44.19, 44.24, 44.25, 44.27, 44.30, 44.33 |
|
|
353
353
|
| `ClaudeCodeConfig` | `{ model?: string; fallbackModel?: string; systemPrompt?: string; appendSystemPrompt?: string; effort?: 'low' \| 'medium' \| 'high' \| 'xhigh' \| 'max'; maxBudgetUsd?: number; betas?: string[]; disallowedTools?: string[]; tools?: string[] }` | The Claude Code options a site may set for a turn, and the built-in tools it asks the visitor for. | 44.16, 44.29 |
|
|
354
|
-
| `claudeCode.bridgeCommand` | `(options?: { tools?: string[] }) => { command: string; expires: number }` | The command that
|
|
355
|
-
| `claudeCode.bridge` | `(options?: { tools?: string[] }) => AsyncGenerator<BridgeStatus>` | This browser's pairing, as it changes. | 44.20, 44.22, 44.32, 44.33, 44.34 |
|
|
356
|
-
| `BridgeStatus` | `{ paired: boolean; command: string \| undefined }` | Whether a bridge is paired, and the command that
|
|
354
|
+
| `claudeCode.bridgeCommand` | `(options?: { tools?: string[] }) => { command: string; link: string; expires: number }` | The command and the link that pair a bridge with this browser, granting the built-in tools it is given. | 44.14, 44.32, 44.33, 44.40, 44.41, 44.42, 44.43 |
|
|
355
|
+
| `claudeCode.bridge` | `(options?: { tools?: string[] }) => AsyncGenerator<BridgeStatus>` | This browser's pairing, as it changes. | 44.20, 44.22, 44.32, 44.33, 44.34, 44.40 |
|
|
356
|
+
| `BridgeStatus` | `{ paired: boolean; command: string \| undefined; link: string \| undefined }` | Whether a bridge is paired, and the command and the link that pair one where none is. | 44.20, 44.40 |
|
|
357
357
|
| `/__abide/bridge` | `GET`, `POST` | Where a bridge pairs, and is relayed its turns. | 36.7, 44.14, 44.15, 44.19, 44.23, 44.26, 16.57, 16.78 |
|
|
358
358
|
|
|
359
359
|
# Ambient values
|
|
@@ -861,6 +861,7 @@ rows a runner prints, and an adapter for an abide app.
|
|
|
861
861
|
| `abide scaffold <name>` | Writes a starter project. | 38.1, 38.42, 38.103, 38.104, 38.106, 38.112, 38.122, 38.124 |
|
|
862
862
|
| `abide run <file> [args…]` | Runs a script under the abide runtime. | 38.2, 38.57 |
|
|
863
863
|
| `abide check [dir…]` | The type-checker over a `.abide` tree. | 38.3, 38.31, 38.32, 38.33, 38.40, 38.105, 38.123 |
|
|
864
|
+
| `abide format [--check] [dir…]` | The formatter over a `.abide` tree. | 38.25, 38.125, 38.126, 38.127, 38.128, 38.129 |
|
|
864
865
|
| `abide routes [--json]` | Every address the app answers, the file answering it, what each matcher takes, and where each hook is filed. | 38.108, 38.123 |
|
|
865
866
|
| `abide dev [--port <n>]` | Watches the project and keeps the app up. | 16.23, 16.56, 37.8, 37.9, 38.4, 38.14, 38.15, 38.16, 38.17, 38.19, 38.24, 38.25, 38.26, 38.28, 38.30, 38.35, 38.36, 38.37, 38.38, 38.41, 38.43, 38.58, 38.63, 38.64, 38.65, 38.94, 38.96, 38.97, 38.123 |
|
|
866
867
|
| `abide build` | Builds the client into content-hashed chunks and a manifest. | 38.43, 38.5, 38.18, 38.25, 38.26, 38.27, 38.30, 38.66, 38.94, 38.123 |
|
|
@@ -872,6 +873,6 @@ rows a runner prints, and an adapter for an abide app.
|
|
|
872
873
|
| `abide watch <address> [args]` | A live subscription to one of the app's followed `GET`s. | 38.69 |
|
|
873
874
|
| `abide compile [--target] [--out] [--platforms]` | One standalone executable. | 37.8, 37.10, 37.11, 37.12, 38.10, 38.25, 38.26, 38.44, 38.45, 38.46, 38.47, 38.48, 38.49, 38.50, 38.51, 38.52, 38.56, 38.93, 38.97, 38.123 |
|
|
874
875
|
| `abide bundle [--out]` | A desktop app for the host platform, with a window on the app. | 38.10, 38.25, 38.26, 38.70, 38.71, 38.72, 38.73, 38.74, 38.75, 38.76, 38.77, 38.78, 38.79, 38.80, 38.81, 38.82, 38.83, 38.84, 38.85, 38.86, 38.87, 38.88, 38.89, 38.90, 38.91, 38.92, 38.101, 38.102, 38.123 |
|
|
875
|
-
| `abide lsp` | The `.abide` language server, over stdio. | 38.11, 38.34, 38.39, 38.98, 38.116, 38.117, 38.118 |
|
|
876
|
+
| `abide lsp` | The `.abide` language server, over stdio. | 38.11, 38.34, 38.39, 38.98, 38.116, 38.117, 38.118, 38.130 |
|
|
876
877
|
| `--help` · `-h` · `abide help` | Usage, generated from the command list. | 38.12, 38.113, 38.114 |
|
|
877
878
|
| `--version` · `-v` | The version of abide, or of the app a compiled executable holds. | 38.115 |
|
package/docs/RULEBOOK.md
CHANGED
|
@@ -2825,6 +2825,28 @@ the range.
|
|
|
2825
2825
|
|
|
2826
2826
|
38.124 The project `abide scaffold` writes MUST carry a `bench` script that runs `harness-bench`.
|
|
2827
2827
|
|
|
2828
|
+
38.125 `abide format` MUST hand each `<script>` block and each `<style>` of every `.abide` under the
|
|
2829
|
+
directories named, or under the app where none are, to `bun fmt` as TypeScript and as CSS, under the
|
|
2830
|
+
options `bun fmt` reads for that file, and MUST leave as written a file those options'
|
|
2831
|
+
`ignorePatterns` name.
|
|
2832
|
+
|
|
2833
|
+
38.126 `abide format` MUST hand each expression a slot, an attribute, a spread, a `{#if}`, a
|
|
2834
|
+
`{:else if}` or a `{#for}` holds to `bun fmt` as an expression, and MUST keep one as written where
|
|
2835
|
+
the printed expression would end the attribute value it stands in.
|
|
2836
|
+
|
|
2837
|
+
38.127 `abide format` MUST indent the markup by its element and block nesting, and MUST NOT change
|
|
2838
|
+
the template the file parses to: a run 33.17 drops between two nodes MUST NOT gain indentation, and
|
|
2839
|
+
the body of a `<pre>`, a `<textarea>` and a markup `<script>` MUST stay as written.
|
|
2840
|
+
|
|
2841
|
+
38.128 `abide format` MUST leave as written a file the parser refuses, a file whose formatted text
|
|
2842
|
+
would parse to a different template (38.127), and a piece `bun fmt` refuses, MUST report each on its
|
|
2843
|
+
line, MUST go on formatting the rest, and MUST exit non-zero where it reports one.
|
|
2844
|
+
|
|
2845
|
+
38.129 `abide format --check` MUST write nothing, and MUST exit non-zero where a file would change.
|
|
2846
|
+
|
|
2847
|
+
38.130 `abide lsp` MUST answer a formatting request with what `abide format` makes of the text the
|
|
2848
|
+
editor holds.
|
|
2849
|
+
|
|
2828
2850
|
# 39. Head and view transitions
|
|
2829
2851
|
|
|
2830
2852
|
39.1 A `<head>` element in a `.abide` file MUST contribute its children to the document head.
|
|
@@ -3376,6 +3398,19 @@ its type, in its place in its turn.
|
|
|
3376
3398
|
44.39 `assistant` MUST hand a `Provider` each turn as its `AssistantContent` pieces, a turn's string
|
|
3377
3399
|
as one text piece.
|
|
3378
3400
|
|
|
3401
|
+
44.40 A pairing `claudeCode.bridgeCommand` or `claudeCode.bridge` mints MUST carry, beside its command,
|
|
3402
|
+
a link in the `abide-bridge` scheme naming the same site, code, bridge release and built-in tools.
|
|
3403
|
+
|
|
3404
|
+
44.41 A bridge MUST open only a link of the `abide-bridge` scheme whose site is https or loopback and
|
|
3405
|
+
whose release is a version alone, and MUST run the release it names.
|
|
3406
|
+
|
|
3407
|
+
44.42 A bridge opening an `abide-bridge` link MUST ask the visitor before it pairs, every time, naming
|
|
3408
|
+
the site, the built-in tools and the bridge release the link asks for.
|
|
3409
|
+
|
|
3410
|
+
44.43 `abide-bridge install` MUST write the app that opens links under the visitor's own Application
|
|
3411
|
+
Support and register it there, and `abide-bridge uninstall` MUST unregister it and remove all
|
|
3412
|
+
install wrote.
|
|
3413
|
+
|
|
3379
3414
|
# 45. Offline
|
|
3380
3415
|
|
|
3381
3416
|
45.1 Where `ABIDE_OFFLINE` is on, a page `abide build` built MUST register the worker
|