retold 4.0.1 → 4.0.2

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 (75) hide show
  1. package/.claude/settings.local.json +27 -1
  2. package/docs/README.md +7 -6
  3. package/docs/_sidebar.md +34 -21
  4. package/docs/_topbar.md +2 -2
  5. package/docs/architecture/module-architecture.md +234 -0
  6. package/docs/{modules.md → architecture/modules.md} +25 -22
  7. package/docs/cover.md +2 -2
  8. package/docs/css/docuserve.css +6 -6
  9. package/docs/examples/examples.md +71 -0
  10. package/docs/examples/todolist/todo-list-cli-client.md +178 -0
  11. package/docs/examples/todolist/todo-list-console-client.md +152 -0
  12. package/docs/examples/todolist/todo-list-model.md +114 -0
  13. package/docs/examples/todolist/todo-list-server.md +128 -0
  14. package/docs/examples/todolist/todo-list-web-client.md +177 -0
  15. package/docs/examples/todolist/todo-list.md +162 -0
  16. package/docs/getting-started.md +8 -7
  17. package/docs/index.html +4 -4
  18. package/docs/{meadow.md → modules/meadow.md} +4 -6
  19. package/docs/{orator.md → modules/orator.md} +1 -0
  20. package/docs/{pict.md → modules/pict.md} +30 -8
  21. package/docs/{utility.md → modules/utility.md} +0 -9
  22. package/docs/retold-catalog.json +896 -2317
  23. package/docs/retold-keyword-index.json +162327 -120227
  24. package/examples/todo-list/Dockerfile +45 -0
  25. package/examples/todo-list/README.md +394 -0
  26. package/examples/todo-list/cli-client/package-lock.json +418 -0
  27. package/examples/todo-list/cli-client/package.json +19 -0
  28. package/examples/todo-list/cli-client/source/TodoCLI-CLIProgram.js +30 -0
  29. package/examples/todo-list/cli-client/source/TodoCLI-Run.js +3 -0
  30. package/examples/todo-list/cli-client/source/commands/add/TodoCLI-Command-Add.js +74 -0
  31. package/examples/todo-list/cli-client/source/commands/complete/TodoCLI-Command-Complete.js +84 -0
  32. package/examples/todo-list/cli-client/source/commands/list/TodoCLI-Command-List.js +110 -0
  33. package/examples/todo-list/cli-client/source/commands/remove/TodoCLI-Command-Remove.js +49 -0
  34. package/examples/todo-list/cli-client/source/services/TodoCLI-Service-API.js +92 -0
  35. package/examples/todo-list/console-client/console-client.cjs +913 -0
  36. package/examples/todo-list/console-client/package-lock.json +426 -0
  37. package/examples/todo-list/console-client/package.json +19 -0
  38. package/examples/todo-list/console-client/views/PictView-TUI-Header.cjs +43 -0
  39. package/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs +58 -0
  40. package/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs +41 -0
  41. package/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs +104 -0
  42. package/examples/todo-list/docker-motd.sh +36 -0
  43. package/examples/todo-list/docker-run.sh +2 -0
  44. package/examples/todo-list/docker-shell.sh +2 -0
  45. package/examples/todo-list/model/MeadowSchema-Task.json +152 -0
  46. package/examples/todo-list/model/Task-Compiled.json +25 -0
  47. package/examples/todo-list/model/Task.mddl +15 -0
  48. package/examples/todo-list/model/data/seeded_todo_events.csv +1001 -0
  49. package/examples/todo-list/server/database-initialization-service.cjs +273 -0
  50. package/examples/todo-list/server/package-lock.json +6113 -0
  51. package/examples/todo-list/server/package.json +19 -0
  52. package/examples/todo-list/server/server.cjs +138 -0
  53. package/examples/todo-list/web-client/css/todolist-theme.css +235 -0
  54. package/examples/todo-list/web-client/generate-build-config.cjs +18 -0
  55. package/examples/todo-list/web-client/html/index.html +18 -0
  56. package/examples/todo-list/web-client/package-lock.json +12030 -0
  57. package/examples/todo-list/web-client/package.json +43 -0
  58. package/examples/todo-list/web-client/source/TodoList-Application-Config.json +12 -0
  59. package/examples/todo-list/web-client/source/TodoList-Application.cjs +383 -0
  60. package/examples/todo-list/web-client/source/providers/Provider-TaskData.cjs +243 -0
  61. package/examples/todo-list/web-client/source/providers/Router-Config.json +32 -0
  62. package/examples/todo-list/web-client/source/views/View-Layout.cjs +75 -0
  63. package/examples/todo-list/web-client/source/views/View-TaskForm.cjs +87 -0
  64. package/examples/todo-list/web-client/source/views/View-TaskList.cjs +127 -0
  65. package/examples/todo-list/web-client/source/views/calendar/View-MonthView.cjs +293 -0
  66. package/examples/todo-list/web-client/source/views/calendar/View-WeekView.cjs +149 -0
  67. package/examples/todo-list/web-client/source/views/calendar/View-YearView.cjs +226 -0
  68. package/modules/Include-Retold-Module-List.sh +2 -2
  69. package/package.json +5 -5
  70. package/docs/js/pict.min.js +0 -12
  71. package/docs/js/pict.min.js.map +0 -1
  72. package/docs/pict-docuserve.min.js +0 -58
  73. package/docs/pict-docuserve.min.js.map +0 -1
  74. /package/docs/{architecture.md → architecture/architecture.md} +0 -0
  75. /package/docs/{fable.md → modules/fable.md} +0 -0
@@ -52,7 +52,33 @@
52
52
  "Bash(kill:*)",
53
53
  "Bash(wait)",
54
54
  "Bash(while read d)",
55
- "Bash(do echo \"Cleaning: $d\")"
55
+ "Bash(do echo \"Cleaning: $d\")",
56
+ "Bash(git pull:*)",
57
+ "Bash(git push:*)",
58
+ "Bash(git add:*)",
59
+ "Bash(git rebase:*)",
60
+ "Bash(git commit:*)",
61
+ "Bash(cd:*)",
62
+ "Bash(node source/cli/Meadow-Integration-CLI-Run.js:*)",
63
+ "Bash(bash:*)",
64
+ "Bash(npm test)",
65
+ "WebFetch(domain:stevenvelozo.github.io)",
66
+ "Bash(git ls-tree:*)",
67
+ "Bash(npx mocha:*)",
68
+ "Bash(pkill:*)",
69
+ "Bash(ln:*)",
70
+ "Bash(timeout 10 node:*)",
71
+ "Bash(npm ls:*)",
72
+ "Bash(node -e \"\nconst proc = require\\(''child_process''\\).spawn\\(''node'', [''server.cjs''], { cwd: ''/Users/stevenvelozo/Code/retold/examples/todo-list/server'', stdio: ''pipe'' }\\);\nlet output = '''';\nproc.stdout.on\\(''data'', \\(d\\) => { output += d.toString\\(\\); }\\);\nproc.stderr.on\\(''data'', \\(d\\) => { output += d.toString\\(\\); }\\);\nsetTimeout\\(\\(\\) => {\n const http = require\\(''http''\\);\n\n // Test 1: Static HTML serving\n http.get\\(''http://localhost:8086/'', \\(res\\) => {\n let data = '''';\n res.on\\(''data'', \\(c\\) => { data += c; }\\);\n res.on\\(''end'', \\(\\) => {\n console.log\\(''=== Test 1: Static HTML ===''\\);\n console.log\\(''Status:'', res.statusCode\\);\n console.log\\(''Contains RetoldExampleTodoWebClient:'', data.includes\\(''RetoldExampleTodoWebClient''\\)\\);\n\n // Test 2: API list\n http.get\\(''http://localhost:8086/1.0/Tasks'', \\(res2\\) => {\n let data2 = '''';\n res2.on\\(''data'', \\(c\\) => { data2 += c; }\\);\n res2.on\\(''end'', \\(\\) => {\n let tasks = JSON.parse\\(data2\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 2: API Reads ===''\\);\n console.log\\(''Tasks returned:'', tasks.length\\);\n\n // Test 3: Create\n let postData = JSON.stringify\\({Name:''CJS test'',Status:''Pending'',LengthInHours:1}\\);\n let req = http.request\\({hostname:''localhost'',port:8086,path:''/1.0/Task'',method:''POST'',headers:{''Content-Type'':''application/json''}}, \\(res3\\) => {\n let data3 = '''';\n res3.on\\(''data'', \\(c\\) => { data3 += c; }\\);\n res3.on\\(''end'', \\(\\) => {\n let created = JSON.parse\\(data3\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 3: Create ===''\\);\n console.log\\(''Created ID:'', created.IDTask, ''Name:'', created.Name\\);\n\n // Test 4: Update\n let putData = JSON.stringify\\({IDTask:created.IDTask, Name:''CJS test \\(updated\\)'', Status:''Complete''}\\);\n let req2 = http.request\\({hostname:''localhost'',port:8086,path:''/1.0/Task'',method:''PUT'',headers:{''Content-Type'':''application/json''}}, \\(res4\\) => {\n let data4 = '''';\n res4.on\\(''data'', \\(c\\) => { data4 += c; }\\);\n res4.on\\(''end'', \\(\\) => {\n let updated = JSON.parse\\(data4\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 4: Update ===''\\);\n console.log\\(''Updated:'', updated.Name, updated.Status\\);\n\n // Test 5: Delete\n let req3 = http.request\\({hostname:''localhost'',port:8086,path:''/1.0/Task/''+created.IDTask,method:''DELETE''}, \\(res5\\) => {\n let data5 = '''';\n res5.on\\(''data'', \\(c\\) => { data5 += c; }\\);\n res5.on\\(''end'', \\(\\) => {\n let del = JSON.parse\\(data5\\);\n console.log\\(''''\\);\n console.log\\(''=== Test 5: Delete ===''\\);\n console.log\\(''Deleted count:'', del.Count\\);\n console.log\\(''''\\);\n console.log\\(''=== ALL TESTS PASSED ===''\\);\n proc.kill\\(\\);\n process.exit\\(0\\);\n }\\);\n }\\);\n req3.end\\(\\);\n }\\);\n }\\);\n req2.write\\(putData\\);\n req2.end\\(\\);\n }\\);\n }\\);\n req.write\\(postData\\);\n req.end\\(\\);\n }\\);\n }\\);\n }\\);\n }\\);\n}, 3000\\);\n\")",
73
+ "Bash(node -e \" const _origStderrWrite = process.stderr.write; process.stderr.write = function \\(pChunk\\) { if \\(typeof pChunk === ''string'' && pChunk.indexOf\\(''Setulc''\\) !== -1\\) { return true; } return _origStderrWrite.apply\\(process.stderr, arguments\\); }; const blessed = require\\(''blessed''\\); const libPict = require\\(''pict''\\); const libPictApplication = require\\(''pict-application''\\); const libPictTerminalUI = require\\(''pict-terminalui''\\); const libViewLayout = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-Layout.cjs''\\); const libViewHeader = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-Header.cjs''\\); const libViewTaskList = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-TaskList.cjs''\\); const libViewStatusBar = require\\(''/Users/stevenvelozo/Code/retold/examples/todo-list/console-client/views/PictView-TUI-StatusBar.cjs''\\); console.log\\(''All console-client .cjs modules loaded OK''\\); console.log\\(''Views:'', [libViewLayout, libViewHeader, libViewTaskList, libViewStatusBar].map\\(v => v.default_configuration.ViewIdentifier\\).join\\('', ''\\)\\); process.exit\\(0\\); \")",
74
+ "Bash(node Stricture.js:*)",
75
+ "Bash(timeout 15 node:*)",
76
+ "Bash(npm update:*)",
77
+ "Bash(awk:*)",
78
+ "Bash(/Users/stevenvelozo/Code/retold/examples/todo-list/model/data/fix_csv.py << 'PYEOF'\nimport re\n\nINPUT_FILE = '/Users/stevenvelozo/Code/retold/examples/todo-list/model/data/seeded_todo_events.csv'\n\nwith open\\(INPUT_FILE, 'r'\\) as f:\n lines = f.readlines\\(\\)\n\nheader = lines[0].strip\\(\\)\noutput_lines = [header]\n\n# Pattern for the last 3 fields: date, number, status\n# DueDate is YYYY-MM-DD, LengthInHours is a number \\(int or float\\), Status is one of three values\ntail_pattern = re.compile\\(r',\\(\\\\d{4}-\\\\d{2}-\\\\d{2}\\),\\([\\\\d.]+\\),\\(Pending|In Progress|Complete\\)\\\\s*\\)\n\nfor i, line in enumerate\\(lines[1:], start=2\\):\n line = line.strip\\(\\)\n if not line:\n continue\n\n # Find the tail \\(DueDate, LengthInHours, Status\\) from the right\n match = tail_pattern.search\\(line\\)\n if not match:\n print\\(f\"WARNING: Line {i} does not match expected tail pattern: {line[:80]}\"\\)\n output_lines.append\\(line\\)\n continue\n\n tail_start = match.start\\(\\)\n due_date = match.group\\(1\\)\n length = match.group\\(2\\)\n status = match.group\\(3\\)\n\n # Everything before the tail is \"Name,Description\" \\(with possible extra commas in Description\\)\n front = line[:tail_start]\n\n # Split front into Name and Description at the first comma\n first_comma = front.index\\(','\\)\n name = front[:first_comma]\n description = front[first_comma + 1:]\n\n # Strip any existing surrounding quotes from the description\n if description.startswith\\('\"'\\) and description.endswith\\('\"'\\):\n description = description[1:-1]\n\n # Escape any double quotes inside the description \\(double them per CSV standard\\)\n description = description.replace\\('\"', '\"\"'\\)\n\n # Reconstruct the line with the description properly quoted\n fixed_line = f'{name},\"{description}\",{due_date},{length},{status}'\n output_lines.append\\(fixed_line\\)\n\nwith open\\(INPUT_FILE, 'w'\\) as f:\n f.write\\('\\\\n'.join\\(output_lines\\) + '\\\\n'\\)\n\nprint\\(f\"Processed {len\\(output_lines\\) - 1} data rows \\(plus header\\).\"\\)\nprint\\(\"File written successfully.\"\\)\nPYEOF)",
79
+ "Bash(for f in architecture.md fable.md meadow.md orator.md pict.md utility.md modules.md examples.md todo-list.md todo-list-model.md todo-list-server.md todo-list-web-client.md todo-list-console-client.md todo-list-cli-client.md)",
80
+ "Bash(do [ -f \"/Users/stevenvelozo/Code/retold/docs/$f\" ])",
81
+ "WebFetch(domain:registry.npmjs.org)"
56
82
  ]
57
83
  }
58
84
  }
package/docs/README.md CHANGED
@@ -148,13 +148,14 @@ _Fable.log.info('Retold application started.');
148
148
 
149
149
  ## Learn More
150
150
 
151
- - **[Architecture](architecture.md)** — Detailed layer-by-layer breakdown of the module stack
151
+ - **[Architecture](architecture/architecture.md)** — Detailed layer-by-layer breakdown of the module stack
152
152
  - **[Getting Started](getting-started.md)** — Building your first Retold application
153
- - **[Fable In Depth](fable.md)** — The core ecosystem and service provider pattern
154
- - **[Meadow In Depth](meadow.md)** — Data access, schemas, and query generation
155
- - **[Orator In Depth](orator.md)** — API servers and endpoint generation
156
- - **[Pict In Depth](pict.md)** — MVC tools for browser and console UIs
157
- - **[All Modules](modules.md)** — Exhaustive list of every Retold repository
153
+ - **[Examples](examples/examples.md)** — Complete runnable applications including the Todo List full-stack example
154
+ - **[Fable In Depth](modules/fable.md)** — The core ecosystem and service provider pattern
155
+ - **[Meadow In Depth](modules/meadow.md)** — Data access, schemas, and query generation
156
+ - **[Orator In Depth](modules/orator.md)** — API servers and endpoint generation
157
+ - **[Pict In Depth](modules/pict.md)** — MVC tools for browser and console UIs
158
+ - **[All Modules](modules/modules.md)** — Exhaustive list of every Retold repository
158
159
 
159
160
  ## License
160
161
 
package/docs/_sidebar.md CHANGED
@@ -1,10 +1,20 @@
1
1
  - Getting Started
2
2
 
3
- - [Architecture](architecture.md)
4
3
  - [Getting Started](getting-started.md)
5
- - [All Modules](modules.md)
4
+ - [Architecture](architecture/architecture.md)
5
+ - [Ecosystem Architecture](architecture/module-architecture.md)
6
+ - [All Modules](architecture/modules.md)
6
7
 
7
- - [Fable — Core Ecosystem](fable.md)
8
+ - [Examples](examples/examples.md)
9
+
10
+ - [Todo List Application](examples/todolist/todo-list.md)
11
+ - [Todo List: System Model](examples/todolist/todo-list-model.md)
12
+ - [Todo List: API Server](examples/todolist/todo-list-server.md)
13
+ - [Todo List: Web Client](examples/todolist/todo-list-web-client.md)
14
+ - [Todo List: Console Client](examples/todolist/todo-list-console-client.md)
15
+ - [Todo List: CLI Client](examples/todolist/todo-list-cli-client.md)
16
+
17
+ - [Fable — Core Ecosystem](modules/fable.md)
8
18
 
9
19
  - [fable](/fable/fable/)
10
20
  - [fable-serviceproviderbase](/fable/fable-serviceproviderbase/)
@@ -13,23 +23,22 @@
13
23
  - [fable-uuid](/fable/fable-uuid/)
14
24
  - [fable-log-logger-bunyan](/fable/fable-log-logger-bunyan/)
15
25
 
16
- - [Meadow — Data Access](meadow.md)
26
+ - [Meadow — Data Access](modules/meadow.md)
17
27
 
18
- - [meadow](/meadow/meadow/)
19
- - [foxhound](/meadow/foxhound/)
20
28
  - [stricture](/meadow/stricture/)
29
+ - [foxhound](/meadow/foxhound/)
30
+ - [bibliograph](/meadow/bibliograph/)
31
+ - [meadow](/meadow/meadow/)
32
+ - [parime](/meadow/parime/)
21
33
  - [meadow-endpoints](/meadow/meadow-endpoints/)
22
- - [retold-data-service](/meadow/retold-data-service/)
23
34
  - [meadow-connection-mysql](/meadow/meadow-connection-mysql/)
24
35
  - [meadow-connection-mssql](/meadow/meadow-connection-mssql/)
25
36
  - [meadow-connection-sqlite](/meadow/meadow-connection-sqlite/)
37
+ - [retold-data-service](/meadow/retold-data-service/)
26
38
  - [retold-harness](/meadow/retold-harness/)
27
- - [bibliograph](/meadow/bibliograph/)
28
- - [parime](/meadow/parime/)
29
39
  - [meadow-integration](/meadow/meadow-integration/)
30
- - [meadow-graph-client](/meadow/meadow-graph-client/)
31
40
 
32
- - [Orator — API Server](orator.md)
41
+ - [Orator — API Server](modules/orator.md)
33
42
 
34
43
  - [orator](/orator/orator/)
35
44
  - [orator-serviceserver-restify](/orator/orator-serviceserver-restify/)
@@ -37,29 +46,33 @@
37
46
  - [orator-http-proxy](/orator/orator-http-proxy/)
38
47
  - [tidings](/orator/tidings/)
39
48
  - [orator-endpoint](/orator/orator-endpoint/)
49
+ - [orator-conversion](/orator/orator-conversion/)
40
50
 
41
- - [Pict — MVC Tools](pict.md)
51
+ - [Pict — MVC Tools](modules/pict.md)
42
52
 
43
53
  - [pict](/pict/pict/)
44
- - [pict-view](/pict/pict-view/)
45
54
  - [pict-template](/pict/pict-template/)
55
+ - [pict-view](/pict/pict-view/)
46
56
  - [pict-provider](/pict/pict-provider/)
47
57
  - [pict-application](/pict/pict-application/)
48
- - [pict-section-form](/pict/pict-section-form/)
58
+ - [pict-panel](/pict/pict-panel/)
59
+ - [pict-nonlinearconfig](/pict/pict-nonlinearconfig/)
60
+ - [pict-section-flow](/pict/pict-section-flow/)
61
+ - [pict-docuserve](/pict/pict-docuserve/)
62
+ - [cryptbrau](/pict/cryptbrau/)
63
+ - [informary](/pict/informary/)
64
+ - [pict-service-commandlineutility](/pict/pict-service-commandlineutility/)
49
65
  - [pict-section-recordset](/pict/pict-section-recordset/)
50
- - [pict-section-tuigrid](/pict/pict-section-tuigrid/)
51
66
  - [pict-section-content](/pict/pict-section-content/)
52
- - [pict-panel](/pict/pict-panel/)
67
+ - [pict-section-form](/pict/pict-section-form/)
68
+ - [pict-section-tuigrid](/pict/pict-section-tuigrid/)
53
69
  - [pict-router](/pict/pict-router/)
54
- - [informary](/pict/informary/)
55
- - [cryptbrau](/pict/cryptbrau/)
56
70
  - [pict-serviceproviderbase](/pict/pict-serviceproviderbase/)
57
- - [pict-service-commandlineutility](/pict/pict-service-commandlineutility/)
71
+ - [pict-terminalui](/pict/pict-terminalui/)
58
72
 
59
- - [Utility — Build Tools](utility.md)
73
+ - [Utility — Build Tools](modules/utility.md)
60
74
 
61
75
  - [indoctrinate](/utility/indoctrinate/)
62
76
  - [manyfest](/utility/manyfest/)
63
77
  - [quackage](/utility/quackage/)
64
- - [choreographic](/utility/choreographic/)
65
78
  - [ultravisor](/utility/ultravisor/)
package/docs/_topbar.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Retold
2
2
 
3
3
  - [Getting Started](getting-started.md)
4
- - [Architecture](architecture.md)
5
- - [All Modules](modules.md)
4
+ - [Architecture](architecture/architecture.md)
5
+ - [All Modules](architecture/modules.md)
6
6
  - [GitHub](https://github.com/stevenvelozo/retold)
@@ -0,0 +1,234 @@
1
+ # Ecosystem Architecture - Module Philosophy
2
+
3
+ Retold modules each embody a specific design philosophy. Together they form a coherent system for building applications — from the stateless service core, through data access and API generation, up to state-driven UI rendering. At the same time, each module is designed to be used (*and useful*) independently. You can adopt Fable's configuration and logging without using Pict. You can use Meadow for data access without Orator. These modules are decoupled by design, but also fit together in a complementary way.
4
+
5
+ ```mermaid
6
+ graph TB
7
+ subgraph Clients["Client Applications"]
8
+ direction LR
9
+ browser["Browser App<br/><i>Pict + Pict-Application<br/>+ Pict-Views</i>"]
10
+ console["Console App<br/><i>Pict + Terminal UI</i>"]
11
+ cli["CLI Tool<br/><i>CommandLineUtility</i>"]
12
+ end
13
+
14
+ internet(("The Internet<br/>☁"))
15
+
16
+ subgraph Server["Server / Mid-Tier"]
17
+ direction TB
18
+ orator["Orator<br/><i>HTTP Server Abstraction</i>"]
19
+ endpoints["Meadow-Endpoints<br/><i>Auto-generated REST API</i>"]
20
+ meadow["Meadow<br/><i>Data Access Abstraction</i>"]
21
+
22
+ subgraph DataTools["Schema & Query Tools"]
23
+ direction LR
24
+ foxhound["FoxHound<br/><i>Query Generation</i>"]
25
+ stricture["Stricture<br/><i>MicroDDL → Schema</i>"]
26
+ end
27
+
28
+ orator --> endpoints
29
+ endpoints --> meadow
30
+ meadow --> DataTools
31
+ end
32
+
33
+ subgraph Foundation["Foundation (Stateless)"]
34
+ direction LR
35
+ fable["Fable<br/><i>DI, Config, Logging</i>"]
36
+ manyfest["Manyfest<br/><i>Address-Based<br/>Object Access</i>"]
37
+ end
38
+
39
+ Clients -- "HTTP requests" --> internet
40
+ internet -- "HTTP requests" --> orator
41
+
42
+ browser -. "Fable services" .-> Foundation
43
+ Server --> Foundation
44
+
45
+ style Clients fill:#e8f5e9,stroke:#43a047,color:#333
46
+ style browser fill:#fff,stroke:#66bb6a,color:#333
47
+ style console fill:#fff,stroke:#66bb6a,color:#333
48
+ style cli fill:#fff,stroke:#66bb6a,color:#333
49
+ style internet fill:#e1f5fe,stroke:#03a9f4,color:#333,stroke-width:2px
50
+ style Server fill:#e3f2fd,stroke:#42a5f5,color:#333
51
+ style orator fill:#fff,stroke:#64b5f6,color:#333
52
+ style endpoints fill:#fff,stroke:#64b5f6,color:#333
53
+ style meadow fill:#fff3e0,stroke:#ffa726,color:#333
54
+ style DataTools fill:#fff8e1,stroke:#ffcc80,color:#333
55
+ style foxhound fill:#fff,stroke:#ffcc80,color:#333
56
+ style stricture fill:#fff,stroke:#ffcc80,color:#333
57
+ style Foundation fill:#fce4ec,stroke:#ef5350,color:#333
58
+ style fable fill:#fff,stroke:#ef9a9a,color:#333
59
+ style manyfest fill:#fff,stroke:#ef9a9a,color:#333
60
+ ```
61
+
62
+ Clients — browsers, terminals, CLI tools — communicate with the server over HTTP. Orator receives those requests, Meadow-Endpoints maps them to data operations, and Meadow executes them against the database. Fable provides the stateless service container that every module on both sides of the network depends on. Manyfest provides the consistent data-addressing language used everywhere.
63
+
64
+ ---
65
+
66
+ ## Fable Is Stateless
67
+
68
+ Fable draws a hard line between **configuration** and **state**.
69
+
70
+ In Retold's vocabulary, *state* is **application data** — the records in a database, the items in a shopping cart, the text a user has typed into a form. State changes as users interact with the system. It is the core subject matter of the application.
71
+
72
+ Configuration is everything else: the address of the database server, the port the API listens on, the log level, the product name. Configuration describes how the application runs in its environment, not what the application is doing. Fable manages configuration. It does not manage state.
73
+
74
+ This distinction matters because the "Out of the Tar Pit" problem — the paper Fable's design references — identifies uncontrolled state as the primary source of software complexity. By keeping the service container stateless, Fable ensures that the foundation layer has no opinion about your data. Services register with Fable, receive configuration and logging, and operate on whatever data flows through them without Fable holding onto it.
75
+
76
+ Every Retold module extends `fable-serviceproviderbase` and registers with a Fable instance. That instance provides dependency injection, logging, UUID generation, and shared settings. But the Fable instance itself stores no application data. It is the wiring, not the warehouse.
77
+
78
+ ## Pict Is for State and Transformation
79
+
80
+ If Fable is deliberately stateless, Pict is deliberately stateful. Pict's job is to hold application state and transform it consistently into output using a templating language.
81
+
82
+ Pict provides three dedicated state containers:
83
+
84
+ | Container | Purpose | Example Contents |
85
+ |-----------|---------|------------------|
86
+ | **AppData** | Primary application state | User records, form values, loaded entities |
87
+ | **Bundle** | Supporting reference data | Lookup tables, dropdown options, translations |
88
+ | **TempData** | Ephemeral intermediate data | Chart caches, calculated summaries, UI flags |
89
+
90
+ All state lives in known locations. Templates reference state through address expressions like `AppData.Tasks[0].Name`. Code accesses the same state through the same addresses. There is one source of truth and one notation for reaching it.
91
+
92
+ The key insight is that **state and lifecycle are coupled**. Pict's lifecycle phases — Solve, Render, Marshal — all operate on these state containers:
93
+
94
+ 1. **Solve** reads state and writes derived values back into state
95
+ 2. **Render** reads state and produces output through templates
96
+ 3. **Marshal** collects input and writes it back into state
97
+
98
+ This cycle is predictable and debuggable. At any point in the lifecycle you can inspect the state containers and know exactly what data the application is working with.
99
+
100
+ Pict intentionally separates logic from templates. Templates describe *what* to render; code (in views and providers) describes *when* and *how* data moves. You can override templates without altering behavior, and you can alter behavior without touching templates.
101
+
102
+ ## Pict-Application Manages the Lifecycle
103
+
104
+ Pict-Application is the orchestration layer. It coordinates the startup, data loading, solving, rendering, and marshaling of an entire application composed of multiple views and providers.
105
+
106
+ The lifecycle follows a defined sequence:
107
+
108
+ ```mermaid
109
+ graph LR
110
+ init["Initialize<br/><i>Register views,<br/>providers, templates</i>"]
111
+ data["Load Data<br/><i>Fetch from APIs,<br/>populate AppData</i>"]
112
+ solve["Solve<br/><i>Calculate derived<br/>values</i>"]
113
+ render["Render<br/><i>Transform state<br/>into output</i>"]
114
+ marshal["Marshal<br/><i>Collect input<br/>back into state</i>"]
115
+
116
+ init --> data --> solve --> render --> marshal
117
+ marshal -. "user interaction" .-> solve
118
+
119
+ style init fill:#fce4ec,stroke:#ef5350,color:#333
120
+ style data fill:#fff3e0,stroke:#ffa726,color:#333
121
+ style solve fill:#e8f5e9,stroke:#43a047,color:#333
122
+ style render fill:#e3f2fd,stroke:#42a5f5,color:#333
123
+ style marshal fill:#f3e5f5,stroke:#ab47bc,color:#333
124
+ ```
125
+
126
+ Each view and provider within the application participates in these phases. Pict-Application ensures they execute in the correct order (controlled by configurable ordinals) and provides auto-behaviors to reduce boilerplate — for example, automatically solving and rendering after initialization completes.
127
+
128
+ The application also manages authentication flows, data loading sequences, and the coordination between views that need to share state. It is the conductor; views and providers are the musicians.
129
+
130
+ ## Pict-View Is Not Just a Screen
131
+
132
+ A Pict view is any representation of information. It is not a page. It is not a screen. It is not a route.
133
+
134
+ A single screen might contain dozens of views: a header view, a navigation view, a list view, a detail panel view, a status bar view. Or a single view might render to a log file, a terminal widget, or a test harness instead of a browser DOM. The view is the unit of *rendering*, not the unit of *navigation*.
135
+
136
+ Each view contains **renderables** — individual render instructions that specify:
137
+
138
+ - Which **template** to use
139
+ - Which **data address** to read from state
140
+ - Which **destination** to render into
141
+ - Which **method** to use (replace, append, prepend)
142
+
143
+ This makes views composable. Small views handle small concerns. Larger patterns emerge from combining them. A form section view renders input fields. A recordset view renders a list of records. A content view renders static markup. You assemble an application from these building blocks.
144
+
145
+ Because views render through a content assignment abstraction, they are not bound to the browser DOM. The same view code can render to a blessed terminal widget, a log stream, or a mock environment for testing — by swapping the content assignment functions. The view does not know or care where its output ends up.
146
+
147
+ ## Orator Abstracts Web Servers
148
+
149
+ Orator provides a thin abstraction over HTTP servers. Your application code interacts with Orator's interface — defining routes, middleware, and lifecycle hooks — without coupling to a specific server implementation.
150
+
151
+ The default implementation uses Restify (`orator-serviceserver-restify`), but the abstraction means you could swap in a different HTTP library or use IPC mode for testing without changing application routes or middleware. Orator handles the HTTP lifecycle: receiving requests, running middleware, dispatching to handlers, and sending responses.
152
+
153
+ Orator also provides static file serving (`orator-static-server`) and reverse proxy capabilities (`orator-http-proxy`), making it a complete server-side HTTP toolkit without being a heavyweight framework.
154
+
155
+ The philosophy is deliberate thinness. Orator does not dictate application structure. It provides the plumbing for getting HTTP requests to your code and responses back to the client.
156
+
157
+ ## Meadow Abstracts Data Access
158
+
159
+ Meadow is a provider-agnostic data broker. You define entities once — their fields, types, and relationships — and Meadow handles CRUD operations against whatever database is connected.
160
+
161
+ The abstraction has real teeth: the same Meadow entity definition works with MySQL, MSSQL, SQLite, and ALASQL (for in-browser use). Switch databases by swapping a connection module. Your application code, entity definitions, and endpoint configurations do not change.
162
+
163
+ Meadow automatically manages audit columns (who created a record, who last updated it, and when), soft deletes (marking records as deleted without removing them), GUID-based uniqueness, and data marshalling between JavaScript objects and database rows.
164
+
165
+ The data access pattern is deliberately simple: Create, Read, Reads (list), Update, Delete, Count, and Undelete. These seven operations cover the vast majority of data access needs. When they do not, behavior hooks let you inject custom logic at any point in the operation lifecycle.
166
+
167
+ ## Meadow-Endpoints Connects Data Access to a Consistent API
168
+
169
+ Meadow-Endpoints takes a Meadow entity and automatically generates a full REST API for it. Define an entity called `Book` and you immediately get `GET /Books`, `GET /Book/:id`, `POST /Book`, `PUT /Book`, `DEL /Book/:id`, and more — with filtering, pagination, sorting, and schema introspection built in.
170
+
171
+ This is not code generation that produces files you maintain. The endpoints are generated at runtime from the entity definition. Change the schema, restart the server, and the API updates. Add a new entity, wire it to Meadow-Endpoints, and the routes appear.
172
+
173
+ Behavior hooks provide the extension points. Need authentication? Add a `before` hook. Need to transform data before it reaches the client? Add an `after` hook. Need custom validation? Hook into the create and update paths. The auto-generated API is the foundation; hooks let you customize without replacing it.
174
+
175
+ ## FoxHound Generates Queries
176
+
177
+ FoxHound is the query generation engine inside Meadow. It provides a chainable API for building queries — adding filters, setting sort order, configuring pagination — and then generates the correct SQL dialect for whichever database you are using.
178
+
179
+ ```javascript
180
+ _Query.addFilter('Status', 'Complete')
181
+ .setSort('CreatedDate')
182
+ .setBegin(0).setCap(50)
183
+ .buildReadQuery();
184
+ ```
185
+
186
+ This same code produces valid MySQL, MSSQL, SQLite, or ALASQL depending on the dialect. Application code never writes raw SQL. FoxHound's job is to be the single translation layer between a database-agnostic query description and dialect-specific SQL.
187
+
188
+ FoxHound also powers the **FilteredTo** URL syntax used by Meadow-Endpoints, which encodes filters, sorts, and pagination into URL paths for GET requests. This means clients can express complex queries through standard HTTP URLs without POST bodies.
189
+
190
+ ## Stricture Transforms MicroDDL into Schemas
191
+
192
+ Stricture provides a compact notation — MicroDDL — for defining data models. A MicroDDL file is a human-readable text format where each line defines a column using single-character sigils:
193
+
194
+ ```
195
+ !ID
196
+ @GUIDTask
197
+ #Name
198
+ #Description
199
+ #Status
200
+ &Hours
201
+ %Due
202
+ ```
203
+
204
+ From this terse input, Stricture generates:
205
+
206
+ - **JSON schemas** for Meadow entity definitions
207
+ - **CREATE TABLE statements** for MySQL, MSSQL, or SQLite
208
+ - **Documentation** describing the data model
209
+ - **Seed data templates** for testing
210
+
211
+ The philosophy is *define once, generate everywhere*. The MicroDDL is the single source of truth for a data model. Every downstream artifact — database tables, API schemas, documentation — derives from it. Change the MicroDDL, regenerate, and all representations stay in sync.
212
+
213
+ ## Manyfest Provides Address-Based Object Access
214
+
215
+ Manyfest solves a recurring problem: the same data structure is described and accessed differently at every layer of an application. The database has column names. The API has JSON keys. The frontend has display labels. Business logic has domain terms.
216
+
217
+ Manyfest unifies this through **address-based access**. An address is a string like `Record.Contact.Email` that describes a location in a nested JavaScript object. Manyfest provides safe accessors that navigate the address without throwing exceptions on missing intermediate objects:
218
+
219
+ ```javascript
220
+ // Safe read — returns undefined if any part of the path is missing
221
+ let email = _Manyfest.getValueAtAddress(pRecord, 'Contact.Email');
222
+
223
+ // Safe write — creates intermediate objects as needed
224
+ _Manyfest.setValueAtAddress(pRecord, 'Contact.Email', 'new@example.com');
225
+ ```
226
+
227
+ Beyond safe access, Manyfest provides **descriptors** — metadata that maps addresses to human-readable names, short names, descriptions, data types, and hashes. This means a single Manyfest definition can drive:
228
+
229
+ - API field documentation
230
+ - Form field labels and validation
231
+ - Report column headers
232
+ - Data transformation between layers
233
+
234
+ The address notation is the same notation Pict uses for template expressions and state access. This consistency means a Manyfest schema defined for the data layer can flow all the way through to form labels in the browser without translation.
@@ -13,25 +13,24 @@ An exhaustive list of every repository in the Retold suite, organized by group.
13
13
  | [fable-uuid](/fable/fable-uuid/) | `fable-uuid` | UUID generator supporting RFC 4122 v4 and configurable random strings |
14
14
  | [fable-log-logger-bunyan](/fable/fable-log-logger-bunyan/) | `fable-log-logger-bunyan` | Bunyan structured logging provider for Fable-Log |
15
15
 
16
- ## Meadow — Data Access Layer (13 modules)
16
+ ## Meadow — Data Access Layer (12 modules)
17
17
 
18
18
  | Module | npm | Description |
19
19
  |--------|-----|-------------|
20
- | [meadow](/meadow/meadow/) | `meadow` | Provider-agnostic data broker with CRUD operations, audit tracking, and soft deletes |
21
- | [foxhound](/meadow/foxhound/) | `foxhound` | Fluent query DSL generating dialect-specific SQL for MySQL, MSSQL, SQLite, and ALASQL |
22
20
  | [stricture](/meadow/stricture/) | `stricture` | MicroDDL schema definition language generating JSON, SQL DDL, and documentation |
21
+ | [foxhound](/meadow/foxhound/) | `foxhound` | Fluent query DSL generating dialect-specific SQL for MySQL, MSSQL, SQLite, and ALASQL |
22
+ | [bibliograph](/meadow/bibliograph/) | `bibliograph` | Key-value record comprehension for change tracking in data ingestion pipelines |
23
+ | [meadow](/meadow/meadow/) | `meadow` | Provider-agnostic data broker with CRUD operations, audit tracking, and soft deletes |
24
+ | [parime](/meadow/parime/) | `parime` | Generic data lake behaviors and services |
23
25
  | [meadow-endpoints](/meadow/meadow-endpoints/) | `meadow-endpoints` | Automatic RESTful CRUD endpoint generation from Meadow entities with behavior injection |
24
26
  | [meadow-connection-mysql](/meadow/meadow-connection-mysql/) | `meadow-connection-mysql` | MySQL/MariaDB pooled connection provider for Meadow |
25
27
  | [meadow-connection-mssql](/meadow/meadow-connection-mssql/) | `meadow-connection-mssql` | Microsoft SQL Server connection provider for Meadow |
26
28
  | [meadow-connection-sqlite](/meadow/meadow-connection-sqlite/) | `meadow-connection-sqlite` | SQLite connection provider for Meadow via better-sqlite3 |
27
29
  | [retold-data-service](/meadow/retold-data-service/) | `retold-data-service` | All-in-one Fable service assembling schema → entity → endpoints → REST API |
28
30
  | [retold-harness](/meadow/retold-harness/) | `retold-harness` | Pre-built API harness with a bookstore demo (8 entities, 10,000+ records) |
29
- | [bibliograph](/meadow/bibliograph/) | `bibliograph` | Key-value record comprehension for change tracking in data ingestion pipelines |
30
- | [parime](/meadow/parime/) | `parime` | Generic data lake behaviors and services |
31
31
  | [meadow-integration](/meadow/meadow-integration/) | `meadow-integration` | Data integration tools for CSV import, schema mapping, and centralized formats |
32
- | [meadow-graph-client](/meadow/meadow-graph-client/) | `meadow-graph-client` | Client for pulling related record sets from relational database graphs |
33
32
 
34
- ## Orator — API Server (6 modules)
33
+ ## Orator — API Server (7 modules)
35
34
 
36
35
  | Module | npm | Description |
37
36
  |--------|-----|-------------|
@@ -41,35 +40,39 @@ An exhaustive list of every repository in the Retold suite, organized by group.
41
40
  | [orator-http-proxy](/orator/orator-http-proxy/) | `orator-http-proxy` | HTTP reverse proxy for forwarding requests to backend services |
42
41
  | [tidings](/orator/tidings/) | `tidings` | Extensible reporting system for generating HTML, PDF, and other format reports |
43
42
  | [orator-endpoint](/orator/orator-endpoint/) | `orator-endpoint` | Pluggable API endpoint base class for reusable route handlers |
43
+ | [orator-conversion](/orator/orator-conversion/) | `orator-conversion` | File format conversion endpoints for Orator service servers |
44
44
 
45
- ## Pict — MVC Tools (15 modules)
45
+ ## Pict — MVC Tools (19 modules)
46
46
 
47
47
  | Module | npm | Description |
48
48
  |--------|-----|-------------|
49
49
  | [pict](/pict/pict/) | `pict` | Non-opinionated MVC module with template expression engine for text-based UIs |
50
- | [pict-view](/pict/pict-view/) | `pict-view` | View base class with full lifecycle (init, render, solve, marshal), renderables, and CSS |
51
50
  | [pict-template](/pict/pict-template/) | `pict-template` | Template handler base class for custom expression types |
51
+ | [pict-view](/pict/pict-view/) | `pict-view` | View base class with full lifecycle (init, render, solve, marshal), renderables, and CSS |
52
52
  | [pict-provider](/pict/pict-provider/) | `pict-provider` | Data provider base class for delivering data to views |
53
53
  | [pict-application](/pict/pict-application/) | `pict-application` | Application base class coordinating views, state, and lifecycle |
54
- | [pict-section-form](/pict/pict-section-form/) | `pict-section-form` | Configuration-driven dynamic forms with 13+ input types and data marshaling |
54
+ | [pict-panel](/pict/pict-panel/) | `pict-panel` | Hot-loadable control panel component for browser applications |
55
+ | [pict-nonlinearconfig](/pict/pict-nonlinearconfig/) | `pict-nonlinearconfig` | Pict nonlinear configuration manager |
56
+ | [pict-section-flow](/pict/pict-section-flow/) | `pict-section-flow` | Pict section flow diagram |
57
+ | [pict-docuserve](/pict/pict-docuserve/) | `pict-docuserve` | Single-page documentation viewer built on Pict |
58
+ | [cryptbrau](/pict/cryptbrau/) | `cryptbrau` | Simple in-browser symmetric encryption |
59
+ | [informary](/pict/informary/) | `informary` | Dependency-free browser form marshaling with undo/redo and field-level deltas |
60
+ | [pict-service-commandlineutility](/pict/pict-service-commandlineutility/) | `pict-service-commandlineutility` | CLI utility module built on Commander for Pict-based command-line tools |
55
61
  | [pict-section-recordset](/pict/pict-section-recordset/) | `pict-section-recordset` | CRUD record management views from Meadow endpoint schemas |
62
+ | [pict-section-content](/pict/pict-section-content/) | `pict-section-content` | Markdown parsing and content rendering with Mermaid diagrams and KaTeX math |
63
+ | [pict-section-form](/pict/pict-section-form/) | `pict-section-form` | Configuration-driven dynamic forms with 13+ input types and data marshaling |
56
64
  | [pict-section-tuigrid](/pict/pict-section-tuigrid/) | `pict-section-tuigrid` | Toast UI Grid integration for tabular data display and editing |
57
- | [pict-section-content](/pict/pict-section-content/) | `pict-section-content` | Content display sections for static and dynamic content blocks |
58
- | [pict-panel](/pict/pict-panel/) | `pict-panel` | Hot-loadable control panel component for browser applications |
59
65
  | [pict-router](/pict/pict-router/) | `pict-router` | Hash-based URL routing via Navigo with template string route functions |
60
- | [informary](/pict/informary/) | `informary` | Dependency-free browser form marshaling with undo/redo and field-level deltas |
61
- | [cryptbrau](/pict/cryptbrau/) | `cryptbrau` | Simple in-browser symmetric encryption |
62
66
  | [pict-serviceproviderbase](/pict/pict-serviceproviderbase/) | `pict-serviceproviderbase` | Base classes for Pict services with pre-initialization support |
63
- | [pict-service-commandlineutility](/pict/pict-service-commandlineutility/) | `pict-service-commandlineutility` | CLI utility module built on Commander for Pict-based command-line tools |
67
+ | [pict-terminalui](/pict/pict-terminalui/) | `pict-terminalui` | Blessed-based terminal interface for Pict views |
64
68
 
65
- ## Utility — Build & Documentation Tools (5 modules)
69
+ ## Utility — Build & Documentation Tools (4 modules)
66
70
 
67
71
  | Module | npm | Description |
68
72
  |--------|-----|-------------|
69
73
  | [indoctrinate](/utility/indoctrinate/) | `indoctrinate` | Documentation scaffolding with content cataloging, label-based filtering, and multi-format output |
70
74
  | [manyfest](/utility/manyfest/) | `manyfest` | JSON manifest for consistent data description, validation, and address-based access across layers |
71
75
  | [quackage](/utility/quackage/) | `quackage` | Standardized build tool for browser bundles, transpilation, testing, and packaging |
72
- | [choreographic](/utility/choreographic/) | `choreographic` | Scaffolding for single-run data processing scripts with organized output |
73
76
  | [ultravisor](/utility/ultravisor/) | `ultravisor` | Process supervision with scheduled tasks, distributed nodes, and LLM integration |
74
77
 
75
78
  ## Summary
@@ -77,11 +80,11 @@ An exhaustive list of every repository in the Retold suite, organized by group.
77
80
  | Group | Count | Focus |
78
81
  |-------|-------|-------|
79
82
  | Fable | 6 | Core ecosystem, DI, configuration, logging |
80
- | Meadow | 13 | Data access, ORM, query DSL, schema, connectors |
81
- | Orator | 6 | API server, HTTP, static files, proxy, reporting |
82
- | Pict | 15 | MVC, views, templates, forms, grids, routing |
83
- | Utility | 5 | Build tools, manifests, docs, process supervision |
84
- | **Total** | **45** | |
83
+ | Meadow | 12 | Data access, ORM, query DSL, schema, connectors |
84
+ | Orator | 7 | API server, HTTP, static files, proxy, reporting, conversion |
85
+ | Pict | 19 | MVC, views, templates, forms, grids, routing, docs, TUI |
86
+ | Utility | 4 | Build tools, manifests, docs, process supervision |
87
+ | **Total** | **48** | |
85
88
 
86
89
  ## GitHub Repositories
87
90
 
package/docs/cover.md CHANGED
@@ -10,6 +10,6 @@
10
10
  - **Pict** — MVC tools, views, templates, forms
11
11
 
12
12
  [Get Started](getting-started.md)
13
- [Architecture](architecture.md)
14
- [All Modules](modules.md)
13
+ [Architecture](architecture/architecture.md)
14
+ [All Modules](modules/modules.md)
15
15
  [GitHub](https://github.com/stevenvelozo/retold)
@@ -13,7 +13,7 @@ html, body {
13
13
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
14
14
  font-size: 16px;
15
15
  line-height: 1.5;
16
- color: #333;
16
+ color: #423D37;
17
17
  background-color: #fff;
18
18
  -webkit-font-smoothing: antialiased;
19
19
  -moz-osx-font-smoothing: grayscale;
@@ -26,12 +26,12 @@ h1, h2, h3, h4, h5, h6 {
26
26
  }
27
27
 
28
28
  a {
29
- color: #42b983;
29
+ color: #2E7D74;
30
30
  text-decoration: none;
31
31
  }
32
32
 
33
33
  a:hover {
34
- color: #38a373;
34
+ color: #256861;
35
35
  }
36
36
 
37
37
  /* Application container */
@@ -45,16 +45,16 @@ a:hover {
45
45
  }
46
46
 
47
47
  ::-webkit-scrollbar-track {
48
- background: #f1f1f1;
48
+ background: #F5F0E8;
49
49
  }
50
50
 
51
51
  ::-webkit-scrollbar-thumb {
52
- background: #bdc3c7;
52
+ background: #D4CCBE;
53
53
  border-radius: 4px;
54
54
  }
55
55
 
56
56
  ::-webkit-scrollbar-thumb:hover {
57
- background: #95a5a6;
57
+ background: #B5AA9A;
58
58
  }
59
59
 
60
60
  /* Responsive adjustments */