aontu 0.72.0 → 0.74.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 (50) hide show
  1. package/README.md +6 -6
  2. package/dist/agentsmd.js +2 -2
  3. package/dist/agentsmd.js.map +1 -1
  4. package/dist/aontu.d.ts +1 -1
  5. package/dist/aontu.js +1 -1
  6. package/dist/cli.js +27 -18
  7. package/dist/cli.js.map +1 -1
  8. package/dist/err.js +1 -1
  9. package/dist/err.js.map +1 -1
  10. package/dist/format.js +14 -16
  11. package/dist/format.js.map +1 -1
  12. package/dist/helpdoc.js +11 -11
  13. package/dist/helpdoc.js.map +1 -1
  14. package/dist/hints.js +6 -6
  15. package/dist/hints.js.map +1 -1
  16. package/dist/lang.js +5 -6
  17. package/dist/lang.js.map +1 -1
  18. package/dist/lsp.d.ts +1 -1
  19. package/dist/mod.d.ts +2 -2
  20. package/dist/mod.js +3 -3
  21. package/dist/mod.js.map +1 -1
  22. package/dist/pkg-net.js +30 -16
  23. package/dist/pkg-net.js.map +1 -1
  24. package/dist/pkg.d.ts +1 -1
  25. package/dist/pkg.js +6 -6
  26. package/dist/pkg.js.map +1 -1
  27. package/dist/view.js +3 -3
  28. package/dist/view.js.map +1 -1
  29. package/grammar/aontu.tmLanguage.json +2 -3
  30. package/package.json +17 -17
  31. package/skill/SKILL.md +7 -7
  32. package/skill/error-codes.md +3 -3
  33. package/skill/examples.md +5 -5
  34. package/skill/grammar-card.md +1 -1
  35. package/skill/init/check.sh +6 -6
  36. package/skill/init/{data.aon → data.aontu} +1 -1
  37. package/skill/init/{model.aon → model.aontu} +1 -1
  38. package/skill/tasks.md +21 -21
  39. package/src/agentsmd.ts +2 -2
  40. package/src/aontu.ts +1 -1
  41. package/src/cli.ts +28 -18
  42. package/src/err.ts +1 -1
  43. package/src/format.ts +16 -16
  44. package/src/helpdoc.ts +11 -11
  45. package/src/hints.ts +6 -6
  46. package/src/lang.ts +5 -6
  47. package/src/mod.ts +3 -3
  48. package/src/pkg-net.ts +32 -16
  49. package/src/pkg.ts +6 -6
  50. package/src/view.ts +4 -4
package/src/hints.ts CHANGED
@@ -181,8 +181,8 @@ const hints: Record<string, string> = {
181
181
 
182
182
  merge_conflict: 'A version-control conflict marker was found in the source. The\nfile still holds an unresolved merge: resolve it and remove the\n`<<<<<<<`, `=======` and `>>>>>>>` lines before unifying.\n \nExamples:\n <<<<<<< HEAD -> nil # A conflict marker, not a `<` operation;\n ======= -> nil # ... nor a chain of `=` characters;\n >>>>>>> other -> nil # ... nor a `>` operation.',
183
183
 
184
- include_denied: 'An @"..." include was refused by the active trust profile\n(docs/trust.md). The document asked to read a source the evaluation\'s\ninclude capability does not allow: widen the capability if the read is\nintended, or remove the include if it is not.\n \nExamples:\n a:@"./in-root.aon" -> {..} # Inside the confinement root: allowed;\n a:@"../secret.aon" -> nil # ... but escaping the root is denied;\n a:@"/etc/hostname" -> nil # ... and so is an absolute path outside it.',
185
- include_extension: 'An @\"...\" include named a file the engine does not read. THE\nEXTENSION DECIDES which of two things a file is: `.aon` and\n`.aontu` are aontu source, with the whole language in them, and\n`.json`, `.jsonld`, `.jsonc`, `.json5`, `.jsonic`, `.jsc`, `.toml`,\n`.yaml`, `.yml` and `.ini` are configuration DATA, read by that\nformat\'s own parser. Anything else -- and a name with no extension\n-- is refused rather than guessed at: a guess produces a document\nthat looks right and is not.\n \nExamples:\n a:@\"model.aon\" -> {..} # aontu source;\n a:@\"server.toml\" -> {..} # ... config data, read as TOML;\n a:@\"notes.txt\" -> nil # ... but text is not a document;\n a:@\"data\" -> nil # ... and neither is an unnamed kind.',
184
+ include_denied: 'An @"..." include was refused by the active trust profile\n(docs/trust.md). The document asked to read a source the evaluation\'s\ninclude capability does not allow: widen the capability if the read is\nintended, or remove the include if it is not.\n \nExamples:\n a:@"./in-root.aontu" -> {..} # Inside the confinement root: allowed;\n a:@"../secret.aontu" -> nil # ... but escaping the root is denied;\n a:@"/etc/hostname" -> nil # ... and so is an absolute path outside it.',
185
+ include_extension: 'An @\"...\" include named a file the engine does not read. THE\nEXTENSION DECIDES which of two things a file is: `.aontu` is aontu\nsource, with the whole language in it, and `.json`, `.jsonld`,\n`.jsonc`, `.json5`, `.jsonic`, `.jsc`, `.toml`, `.yaml`, `.yml` and\n`.ini` are configuration DATA, read by that format\'s own parser.\nAnything else -- and a name with no extension -- is refused rather\nthan guessed at: a guess produces a document that looks right and is\nnot.\n \nExamples:\n a:@\"model.aontu\" -> {..} # aontu source;\n a:@\"server.toml\" -> {..} # ... config data, read as TOML;\n a:@\"notes.txt\" -> nil # ... but text is not a document;\n a:@\"data\" -> nil # ... and neither is an unnamed kind.',
186
186
 
187
187
  func_arity: 'This function was called with the wrong number of arguments:\n{func} takes {want}, but was given {got}.\n \nExamples:\n upper(\"a\") -> \"A\" # One argument, which is what upper takes;\n upper(\"a\",\"b\") -> nil # ... so two is a mistake in the source;\n key() -> \"\" # key takes none, or one level count;\n neq(1,2,3) -> neq # ... and neq takes one or more exclusions.',
188
188
  func_arg: 'This argument does not fit the function\'s signature:\n \n {sig}\n argument {argn} (`{arg}`) was `{got}`.\n \nThe signature is the declared call surface (one line per builtin,\ntest/spec/signature.tsv); an argument slot admits a concrete value\nof its declared kind, `number` admitting every numeric leaf and\n`string` admitting a path.\n \nExamples:\n upper("a") -> "A" # A string fits upper(s: string|number);\n upper(1) -> 1 # ... and so does a number;\n upper(true) -> nil # ... but a boolean fits neither word;\n add([1],2) -> nil # ... and a list is no operand.',
@@ -291,9 +291,9 @@ const hints: Record<string, string> = {
291
291
 
292
292
 
293
293
  module_path: 'A module import is domain-shaped, but its path cannot be a\ndirectory on every platform the toolchain runs on -- so it is refused\nbefore anything is built from it. An element may not be empty, may not\nbegin or end with `.` (which is what forbids `..`), and may not be a\nreserved device name. These are Go\'s module-path rules, for Go\'s\nreason: a package path becomes a real directory.\n \nExamples:\n @"corp.example/s" -> {..} # An ordinary path is fine;\n @"corp.example/../s" -> nil # ... `..` would escape the store;\n @"corp.example/nul" -> nil # ... and Windows has no such file.',
294
- module_missing: 'A module import names a package that is not in this project. A\nmodule is resolved from LOCAL stores only -- `aontu_meta/vendor/` beside the\nproject\'s pkg.aon, then the user cache -- because evaluation never\ntouches the network. Fetching is a separate step, and the message\nnames it.\n \nExamples:\n @"corp.example/s" -> nil # Not fetched: run aontu sync;\n @"./local.aon" -> {..} # ... a local path is not a module;\n @"corp.example/s#aon1-…" -> {..} # ... and a pin does not fetch it either.',
294
+ module_missing: 'A module import names a package that is not in this project. A\nmodule is resolved from LOCAL stores only -- `aontu_meta/vendor/` beside the\nproject\'s pkg.aontu, then the user cache -- because evaluation never\ntouches the network. Fetching is a separate step, and the message\nnames it.\n \nExamples:\n @"corp.example/s" -> nil # Not fetched: run aontu sync;\n @"./local.aontu" -> {..} # ... a local path is not a module;\n @"corp.example/s#aon1-…" -> {..} # ... and a pin does not fetch it either.',
295
295
  module_local: 'A bare reference names a file: its last segment carries an\nextension the include table knows, and a package path never does. A\nlocal file is written with a `./`, `../` or `/` prefix, so every\nreference says what it is (ADR-022); a package path is\n`<domain>/<path>` and nothing else.\n \nExamples:\n @"config.json" -> nil # Meant as a file: write ./config.json;\n @"./config.json" -> {..} # ... a local file says so;\n @"corp.example/schemas" -> {..} # ... and a package path carries no extension.',
296
- module_moved: 'The package this import names has MOVED: a later version of it\ndeclares a new path, and nothing follows a move. A name that quietly\nmeant something else would be the failure the naming convention exists\nto prevent, so the refusal names the destination and stops there;\nimport the destination instead.\n \nExamples:\n @"corp.example/old" -> nil # moved: import the destination;\n @"corp.example/new" -> {..} # ... which resolves as any package does;\n aontu sync # ... after pkg.aon names it.',
296
+ module_moved: 'The package this import names has MOVED: a later version of it\ndeclares a new path, and nothing follows a move. A name that quietly\nmeant something else would be the failure the naming convention exists\nto prevent, so the refusal names the destination and stops there;\nimport the destination instead.\n \nExamples:\n @"corp.example/old" -> nil # moved: import the destination;\n @"corp.example/new" -> {..} # ... which resolves as any package does;\n aontu sync # ... after pkg.aontu names it.',
297
297
  module_integrity: 'A module resolved locally does not have the MEANING it was pinned\nto. The pin is a canon-hash -- the hash of the module unified\nstandalone -- so it survives comments, formatting and refactoring and\nbreaks on any semantic change in the module\'s transitive closure.\nVerification is always local: the repository\'s manifest is a claim.\n \nExamples:\n @"corp.example/s" -> {..} # No pin, no check;\n @"corp.example/s#aon1-x" -> nil # ... a pin that disagrees refuses;\n aontu hash <file> # ... and this is what it should be.',
298
298
  module_depth: 'Module verification nested too deep. A pinned module is checked by\nEVALUATING it, and that evaluation resolves the module\'s own imports\n-- so a vendor tree that leads back to itself would recurse until the\nhost ran out of stack. The bound makes that a stated refusal rather\nthan a crash whose verdict depends on the machine.\n \nExamples:\n @"corp.example/s" -> {..} # Ordinary nesting is far below it;\n aontu pkg vendor # ... rebuild a vendor tree that loops;\n aontu hash <file> # ... and check what it hashes to.',
299
299
 
@@ -625,8 +625,8 @@ const hints: Record<string, string> = {
625
625
  'The include still placed the file\'s values -- it is the NAME that\n' +
626
626
  'did not cross.\n' +
627
627
  ' \nExamples:\n' +
628
- ' { %u8 } = @"types.aon" -> bound, if types.aon exports %u8;\n' +
629
- ' { %secret } = @"types.aon" -> nil # ... and refused if not.',
628
+ ' { %u8 } = @"types.aontu" -> bound, if types.aontu exports %u8;\n' +
629
+ ' { %secret } = @"types.aontu" -> nil # ... and refused if not.',
630
630
 
631
631
  'patch_assignment':
632
632
  'This is not a <path>=<value> assignment. The path is what stands\n' +
package/src/lang.ts CHANGED
@@ -214,7 +214,7 @@ const MERGE_KEY = RESERVED_KEY_PREFIX + 'merge'
214
214
  const ALIAS_MARK_KEY = RESERVED_KEY_PREFIX + 'alias'
215
215
  const OPTIONAL_MARK_KEY = RESERVED_KEY_PREFIX + 'optional'
216
216
 
217
- // `{ %a } = @"f.aon"` is the pair `<head>: <include>`, so the head is
217
+ // `{ %a } = @"f.aontu"` is the pair `<head>: <include>`, so the head is
218
218
  // one token and the grammar needs nothing new.
219
219
  const IMPORT_HEAD_RE = new RegExp('^(' + ALIAS_SET + ')[ \\t]*=(?!=)')
220
220
  const EXPORT_RE = /^export[ \t]*\([ \t]*([^()\s][^()]*?)[ \t]*\)/
@@ -1752,7 +1752,6 @@ help isolate the syntax error.`,
1752
1752
 
1753
1753
 
1754
1754
  const INCLUDE_KINDS: { [kind: string]: string } = {
1755
- aon: 'source',
1756
1755
  aontu: 'source',
1757
1756
 
1758
1757
  json: 'json',
@@ -1975,7 +1974,7 @@ function makeModelResolver(options: any) {
1975
1974
  }
1976
1975
 
1977
1976
  // The gate every leg that RESOLVES A NAME passes through. The aontu:
1978
- // and module legs do not: both state `kind: 'aon'` because what they
1977
+ // and module legs do not: both state `kind: 'aontu'` because what they
1979
1978
  // serve is Aontu source by construction, not by its spelling.
1980
1979
  const gateExtension = (path: string, full: string): void => {
1981
1980
  if (undefined === includeFormat(extKindOf(full), options.textExt)) {
@@ -2054,7 +2053,7 @@ function makeModelResolver(options: any) {
2054
2053
  modelNotFound(path)
2055
2054
  }
2056
2055
  record(ctx, path, 'aontu')
2057
- return { found: true, path, full: path, kind: 'aon', src: model, search: [] }
2056
+ return { found: true, path, full: path, kind: 'aontu', src: model, search: [] }
2058
2057
  }
2059
2058
 
2060
2059
  let search: any = []
@@ -2096,7 +2095,7 @@ function makeModelResolver(options: any) {
2096
2095
  record(ctx, found.full, 'mod')
2097
2096
  return {
2098
2097
  found: true, path, full: found.full,
2099
- kind: 'aon', src: found.src, search: [],
2098
+ kind: 'aontu', src: found.src, search: [],
2100
2099
  }
2101
2100
  }
2102
2101
 
@@ -2318,7 +2317,7 @@ class Lang {
2318
2317
  this.jsonic
2319
2318
  .use(asPlugin(MultiSource), {
2320
2319
  resolver: options?.resolver || modelResolver,
2321
- implictExt: ['aon', 'aontu'],
2320
+ implictExt: ['aontu'],
2322
2321
  processor: includeProcessors(this.opts.textExt)
2323
2322
  })
2324
2323
  .use(AontuJsonic)
package/src/mod.ts CHANGED
@@ -107,8 +107,8 @@ export function moduleDir(store: string, path: string): string {
107
107
  }
108
108
 
109
109
 
110
- export const PKG_FILE = 'pkg.aon'
111
- export const LOCK_FILE = 'pkg-lock.aon'
110
+ export const PKG_FILE = 'pkg.aontu'
111
+ export const LOCK_FILE = 'pkg-lock.aontu'
112
112
  export const META_DIR = 'aontu_meta'
113
113
  export const VENDOR_DIR = 'vendor'
114
114
 
@@ -363,4 +363,4 @@ function aliasTarget(
363
363
  }
364
364
 
365
365
 
366
- const DEFAULT_MAIN = 'main.aon'
366
+ const DEFAULT_MAIN = 'main.aontu'
package/src/pkg-net.ts CHANGED
@@ -237,8 +237,8 @@ export function objectPath(kind: string, pkg: string, version?: string): string
237
237
  case 'manifest': return p + '/@v/' + version + '.manifest'
238
238
  case 'signature': return p + '/@v/' + version + '.sig'
239
239
  case 'sigstore': return p + '/@v/' + version + '.sigstore.json'
240
- case 'advisory': return '/advisory/' + pkgUrlPath(pkg) + '.aon'
241
- default: return '/tombstone/' + pkgUrlPath(pkg) + '/@v/' + version + '.aon'
240
+ case 'advisory': return '/advisory/' + pkgUrlPath(pkg) + '.aontu'
241
+ default: return '/tombstone/' + pkgUrlPath(pkg) + '/@v/' + version + '.aontu'
242
242
  }
243
243
  }
244
244
 
@@ -560,25 +560,41 @@ async function fetchAdvisory(ctx: AcquireCtx, bases: string[], pkg: string):
560
560
 
561
561
 
562
562
  // The versions this client has seen for a package, from its own
563
- // records: a version absent from the list now is a rollback.
563
+ // records: a version absent from the list now is a rollback. Both
564
+ // suffixes are read -- a record is evidence rather than a document,
565
+ // and dropping either would forget versions and weaken the check.
566
+ const SEEN_EXT = ['.aontu', '.aon']
567
+
568
+ function seenFile(dir: string, version: string): string | undefined {
569
+ return SEEN_EXT.map((ext) => pathJoin(dir, version + ext)).find(existsSync)
570
+ }
571
+
564
572
  function seenVersions(ctx: AcquireCtx, pkg: string): string[] {
565
573
  const dir = cacheSeenDir(ctx.cache, pkg)
566
574
  if (!existsSync(dir)) {
567
575
  return []
568
576
  }
569
- return readdirSync(dir).filter((f) => f.endsWith('.aon'))
570
- .map((f) => f.slice(0, -'.aon'.length)).sort(cmpBytes)
577
+ const seen = new Set<string>()
578
+ for (const name of readdirSync(dir)) {
579
+ const ext = SEEN_EXT.find((e) => name.endsWith(e))
580
+ if (undefined !== ext) {
581
+ seen.add(name.slice(0, -ext.length))
582
+ }
583
+ }
584
+ return [...seen].sort(cmpBytes)
571
585
  }
572
586
 
573
587
  function recordSeen(ctx: AcquireCtx, pkg: string, version: string, subject: string): void {
574
588
  const dir = cacheSeenDir(ctx.cache, pkg)
575
- const file = pathJoin(dir, version + '.aon')
576
- if (existsSync(file)) {
589
+ const file = pathJoin(dir, version + '.aontu')
590
+ // A record under either spelling is the first sighting, so neither is
591
+ // overwritten -- a second write would date the version to today.
592
+ if (undefined !== seenFile(dir, version)) {
577
593
  return
578
594
  }
579
595
  mkdirSync(dir, { recursive: true })
580
596
  writeFileSync(file, canonLine(
581
- { package: pkg, version, seen: timestamp(ctx.now()), subject }, ctx.options, 'seen.aon'))
597
+ { package: pkg, version, seen: timestamp(ctx.now()), subject }, ctx.options, 'seen.aontu'))
582
598
  }
583
599
 
584
600
 
@@ -867,8 +883,8 @@ export async function acquire(ctx: AcquireCtx, pkg: string, asked: string | unde
867
883
  const tmp = pathJoin(ctx.cache, 'tmp', randomBytes(8).toString('hex'))
868
884
  mkdirSync(pathJoin(tmp, META_DIR), { recursive: true })
869
885
  writeTree(tmp, entries)
870
- writeFileSync(pathJoin(tmp, META_DIR, 'manifest.aon'), manifestBytes)
871
- writeFileSync(pathJoin(tmp, META_DIR, 'proof.aon'), proofBytes)
886
+ writeFileSync(pathJoin(tmp, META_DIR, 'manifest.aontu'), manifestBytes)
887
+ writeFileSync(pathJoin(tmp, META_DIR, 'proof.aontu'), proofBytes)
872
888
  const self = packageSelf(tmp, ctx.options)
873
889
  const mod = manifest.modules[0]
874
890
  if (self.path !== pkg || self.version !== version || self.main !== mod.main) {
@@ -1435,8 +1451,8 @@ export function writeLayout(dir: string, w: LayoutWrite, options: PkgToolOptions
1435
1451
  }
1436
1452
  retracted.sort((a, b) => versionCompare(a.version, b.version))
1437
1453
  const advisory = pathJoin(dir, 'advisory', ...pkgUrlPath(pkg).split('/'))
1438
- mkdirSync(pathDirname(advisory + '.aon'), { recursive: true })
1439
- writeFileSync(advisory + '.aon',
1454
+ mkdirSync(pathDirname(advisory + '.aontu'), { recursive: true })
1455
+ writeFileSync(advisory + '.aontu',
1440
1456
  canonLine({ package: pkg, retracted }, options, 'advisory'))
1441
1457
  }
1442
1458
 
@@ -1627,7 +1643,7 @@ export async function pkgPublish(root: string, options: PkgToolOptions, http: Pk
1627
1643
  }
1628
1644
 
1629
1645
  const proof = signDigest(readFileSync(args.key as string, 'utf8'), report.digest)
1630
- const proofBytes = canonLine(proof, options, 'proof.aon')
1646
+ const proofBytes = canonLine(proof, options, 'proof.aontu')
1631
1647
  const archive = archiveOf(root)
1632
1648
  try {
1633
1649
  if (null != args.to) {
@@ -1786,7 +1802,7 @@ function refusedOutdated(report: PkgOutdatedReport, e: unknown): PkgOutdatedRepo
1786
1802
  // THE LOCAL REGISTRY AND PROXY (`aontu pkg serve`): the directory
1787
1803
  // layout served verbatim; with upstreams, fetched on a miss and kept.
1788
1804
  const OBJECT_RE =
1789
- /^\/(pkg\/[A-Za-z0-9!._/-]+\/@v\/(list|(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)\.(zip|manifest|sig|sigstore\.json))|pkg\/[A-Za-z0-9!._/-]+\/@latest|advisory\/[A-Za-z0-9!._/-]+\.aon|tombstone\/(feed\.aon|[A-Za-z0-9!._/-]+\/@v\/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)\.aon))$/
1805
+ /^\/(pkg\/[A-Za-z0-9!._/-]+\/@v\/(list|(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)\.(zip|manifest|sig|sigstore\.json))|pkg\/[A-Za-z0-9!._/-]+\/@latest|advisory\/[A-Za-z0-9!._/-]+\.aontu|tombstone\/(feed\.aontu|[A-Za-z0-9!._/-]+\/@v\/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)\.aontu))$/
1790
1806
 
1791
1807
  export function objectShape(p: string): boolean {
1792
1808
  return OBJECT_RE.test(p) && !p.split('/').some((e) => '' === e && p.indexOf('//') >= 0) &&
@@ -1927,8 +1943,8 @@ export function defaultHttp(): PkgHttp {
1927
1943
  },
1928
1944
  post: async (url: string, parts: PublishParts, token: string) => {
1929
1945
  const form = new FormData()
1930
- form.set('manifest', new Blob([Buffer.from(parts.manifest)], { type: 'text/plain' }), 'manifest.aon')
1931
- form.set('proof', new Blob([Buffer.from(parts.proof)], { type: 'text/plain' }), 'proof.aon')
1946
+ form.set('manifest', new Blob([Buffer.from(parts.manifest)], { type: 'text/plain' }), 'manifest.aontu')
1947
+ form.set('proof', new Blob([Buffer.from(parts.proof)], { type: 'text/plain' }), 'proof.aontu')
1932
1948
  form.set('archive', new Blob([Buffer.from(parts.archive)], { type: 'application/zip' }), 'archive.zip')
1933
1949
  try {
1934
1950
  const r = await fetch(url, {
package/src/pkg.ts CHANGED
@@ -272,7 +272,7 @@ export function lockText(entries: LockEntry[], options: PkgToolOptions): string
272
272
  // The generated-file header. A lockfile is machine-written, and the
273
273
  // file says so where an editor will see it.
274
274
  export const LOCK_HEADER =
275
- '# pkg-lock.aon (generated by `aontu sync`; do not edit)\n'
275
+ '# pkg-lock.aontu (generated by `aontu sync`; do not edit)\n'
276
276
 
277
277
 
278
278
  export function writeLock(root: string, entries: LockEntry[],
@@ -297,7 +297,7 @@ export type PackageSelf = {
297
297
  export function packageSelf(dir: string, options: PkgToolOptions): PackageSelf {
298
298
  const file = pathJoin(dir, PKG_FILE)
299
299
  const self: PackageSelf = {
300
- path: '', version: '', main: 'main.aon', publish: 'private', retract: [],
300
+ path: '', version: '', main: 'main.aontu', publish: 'private', retract: [],
301
301
  }
302
302
  if (!existsSync(file)) {
303
303
  return self
@@ -307,7 +307,7 @@ export function packageSelf(dir: string, options: PkgToolOptions): PackageSelf {
307
307
  const str = (v: any): string => 'string' === typeof v ? v : ''
308
308
  self.path = str(pkg?.path)
309
309
  self.version = str(pkg?.version)
310
- self.main = '' === str(pkg?.main) ? 'main.aon' : str(pkg?.main)
310
+ self.main = '' === str(pkg?.main) ? 'main.aontu' : str(pkg?.main)
311
311
  self.publish = 'public' === gen?.publish ? 'public' : 'private'
312
312
  if ('' !== str(gen?.moved)) {
313
313
  self.moved = str(gen.moved)
@@ -321,7 +321,7 @@ export function packageSelf(dir: string, options: PkgToolOptions): PackageSelf {
321
321
 
322
322
  // What a package may contain (REPOSITORY.0.md §9.4): an enumerated
323
323
  // allowlist, refused by default. The data half is ADR-012's table.
324
- export const ARCHIVE_SOURCE_EXT = ['aon', 'aontu']
324
+ export const ARCHIVE_SOURCE_EXT = ['aontu']
325
325
  export const ARCHIVE_DATA_EXT = [
326
326
  'json', 'jsonld', 'jsonc', 'json5', 'jsonic', 'jsc', 'toml', 'yaml', 'yml',
327
327
  'ini',
@@ -412,7 +412,7 @@ export function archiveOf(dir: string): Archive {
412
412
  // repository: the served manifest, verbatim.
413
413
  export function storedManifest(dir: string):
414
414
  { digest: string, files: ArchiveFile[] } | undefined {
415
- const file = pathJoin(dir, META_DIR, 'manifest.aon')
415
+ const file = pathJoin(dir, META_DIR, 'manifest.aontu')
416
416
  if (!existsSync(file)) {
417
417
  return undefined
418
418
  }
@@ -1014,5 +1014,5 @@ const MANIFEST_VERDICT: Record<string, PkgManifestReport['verdict']> = {
1014
1014
  export function manifestText(m: PkgManifest, options: PkgToolOptions,
1015
1015
  extra?: Record<string, any>): string {
1016
1016
  const src = JSON.stringify({ ...m, ...(extra ?? {}) })
1017
- return options.eval(src, 'manifest.aon').canon
1017
+ return options.eval(src, 'manifest.aontu').canon
1018
1018
  }
package/src/view.ts CHANGED
@@ -72,7 +72,7 @@ export type ViewLoss = {
72
72
  export type ViewDoc = {
73
73
  src: string
74
74
  // Where it came from, so a relative include inside it resolves and
75
- // so its label (the file name without `.aon`) is known.
75
+ // so its label (the file name without `.aontu`) is known.
76
76
  path?: string
77
77
  // The label to draw, overriding the one derived from `path`.
78
78
  name?: string
@@ -2493,7 +2493,7 @@ export function view(
2493
2493
  .map((d: ViewDoc, i) => ({
2494
2494
  src: d.src, path: d.path,
2495
2495
  label: d.name ?? (undefined === d.path
2496
- ? `doc${i + 1}` : basename(d.path).replace(/\.aon$/, '')),
2496
+ ? `doc${i + 1}` : basename(d.path).replace(/\.aontu$/, '')),
2497
2497
  }))
2498
2498
  return done(drawPoset(docs, options, as, max, loss, compare))
2499
2499
  }
@@ -2540,7 +2540,7 @@ function drawLoaded(
2540
2540
  if (undefined === gen) {
2541
2541
  // GENERATION CAN FAIL WHERE UNIFICATION DID NOT: the panel reads
2542
2542
  // generated values, so a document that is not concrete is an
2543
- // error here, exactly as `aontu file.aon` on it is.
2543
+ // error here, exactly as `aontu file.aontu` on it is.
2544
2544
  const before = ctx.err.length
2545
2545
  value = root.gen(ctx)
2546
2546
  if (before < ctx.err.length) {
@@ -2743,7 +2743,7 @@ export function viewSet(
2743
2743
  const ctx = loaded.ctx
2744
2744
  // The declarations are part of the document, so reading them
2745
2745
  // generates it -- and a view document that does not generate has no
2746
- // figures, exactly as `aontu file.aon` on it has no output.
2746
+ // figures, exactly as `aontu file.aontu` on it has no output.
2747
2747
  const before = ctx.err.length
2748
2748
  const value = root.gen(ctx)
2749
2749
  if (before < ctx.err.length) {