Implement main-thread Camino sessions and synchronous CRDT editing

This commit is contained in:
Timothy J. Aveni
2026-09-27 23:57:29 -07:00
parent ad72185a6c
commit 696023b4ba
24 changed files with 3784 additions and 3218 deletions
File diff suppressed because one or more lines are too long
@@ -5,152 +5,154 @@ PRESENTATION=4
SUBJECT=5
FOR=6
CREATION=7
INITIALIZE=8
WORKSPACE=9
EXECUTION=10
SNAPSHOT=11
TRANSACTION=12
REMOTE=13
TARGETS=14
PORTABLE=15
REPLICA=16
LOCAL=17
FROM=18
RESULT_BYTES=19
RPC_CALLS=20
DEADLINE_MS=21
QUERY=22
REFLECTION=23
SPECIALIZE=24
ROOT=25
DOCUMENT=26
FRAGMENTS=27
VIEW=28
MAX=29
ALLOW=30
POLL=31
QUERYABLE=32
RPC=33
QUERY_REASON=34
TYPE=35
OBJECT=36
STORABLE=37
IMPLEMENTS=38
REF=39
FRAGMENT=40
IMPORT=41
EXTERNAL=42
ATOM=43
INTERFACE=44
INTERFACES=45
PACKAGE=46
VALUE=47
RELATION=48
OPERATION=49
FUNCTION=50
CONSTRUCTOR=51
CONSTRUCTS=52
INPUT=53
CONFORM=54
AS=55
BIND=56
STATIC=57
TO=58
PRIVATE=59
SHARED=60
STATE=61
EDGE=62
PROJECTION=63
WITH=64
USING=65
ACCEPT=66
VIA=67
MATERIALIZE=68
IF=69
ABSENT=70
ON=71
POLICY=72
DEFAULT=73
SOURCE=74
REPOSITORY=75
COMMIT=76
REVISION=77
SEMANTIC_MAJOR=78
ON_DELETE=79
LIFECYCLE=80
RETAIN_OTHER=81
KEYED=82
PUBLIC_TRAVERSAL=83
ID=84
DOC=85
MODE=86
EMITS=87
RECEIVER=88
REQUIRES=89
ANY=90
GET=91
SET=92
WATCH=93
START=94
STOP=95
READ=96
WRITE=97
RESOLVE=98
CONNECT=99
DISCONNECT=100
CALL=101
WATCH_START=102
WATCH_STOP=103
SUBSCRIBE=104
UNSUBSCRIBE=105
REGISTER=106
CRDT=107
OPTIONAL_ONE=108
EXACTLY_ONE=109
MANY_UNIQUE=110
MANY=111
ORDERED=112
UNIT=113
WATCH_HANDLE=114
MESSAGE=115
ATOM_REF=116
INTERFACE_REF=117
OPTIONAL=118
LIST=119
RECORD=120
BOOL=121
BYTES=122
DOUBLE=123
INT32=124
INT64=125
STRING=126
UINT32=127
UINT64=128
TRUE=129
FALSE=130
NULL=131
ARROW=132
COLON=133
SEMI=134
COMMA=135
DOT=136
LBRACE=137
RBRACE=138
LBRACK=139
RBRACK=140
LPAREN=141
RPAREN=142
LT=143
GT=144
AMP=145
EQUAL=146
INTEGER=147
JSON_NUMBER=148
IDENTIFIER=149
STRING_LITERAL=150
LINE_COMMENT=151
BLOCK_COMMENT=152
WS=153
VARIANT=8
PREPARES=9
INITIALIZE=10
WORKSPACE=11
EXECUTION=12
SNAPSHOT=13
TRANSACTION=14
REMOTE=15
TARGETS=16
PORTABLE=17
REPLICA=18
LOCAL=19
FROM=20
RESULT_BYTES=21
RPC_CALLS=22
DEADLINE_MS=23
QUERY=24
REFLECTION=25
SPECIALIZE=26
ROOT=27
DOCUMENT=28
FRAGMENTS=29
VIEW=30
MAX=31
ALLOW=32
POLL=33
QUERYABLE=34
RPC=35
QUERY_REASON=36
TYPE=37
OBJECT=38
STORABLE=39
IMPLEMENTS=40
REF=41
FRAGMENT=42
IMPORT=43
EXTERNAL=44
ATOM=45
INTERFACE=46
INTERFACES=47
PACKAGE=48
VALUE=49
RELATION=50
OPERATION=51
FUNCTION=52
CONSTRUCTOR=53
CONSTRUCTS=54
INPUT=55
CONFORM=56
AS=57
BIND=58
STATIC=59
TO=60
PRIVATE=61
SHARED=62
STATE=63
EDGE=64
PROJECTION=65
WITH=66
USING=67
ACCEPT=68
VIA=69
MATERIALIZE=70
IF=71
ABSENT=72
ON=73
POLICY=74
DEFAULT=75
SOURCE=76
REPOSITORY=77
COMMIT=78
REVISION=79
SEMANTIC_MAJOR=80
ON_DELETE=81
LIFECYCLE=82
RETAIN_OTHER=83
KEYED=84
PUBLIC_TRAVERSAL=85
ID=86
DOC=87
MODE=88
EMITS=89
RECEIVER=90
REQUIRES=91
ANY=92
GET=93
SET=94
WATCH=95
START=96
STOP=97
READ=98
WRITE=99
RESOLVE=100
CONNECT=101
DISCONNECT=102
CALL=103
WATCH_START=104
WATCH_STOP=105
SUBSCRIBE=106
UNSUBSCRIBE=107
REGISTER=108
CRDT=109
OPTIONAL_ONE=110
EXACTLY_ONE=111
MANY_UNIQUE=112
MANY=113
ORDERED=114
UNIT=115
WATCH_HANDLE=116
MESSAGE=117
ATOM_REF=118
INTERFACE_REF=119
OPTIONAL=120
LIST=121
RECORD=122
BOOL=123
BYTES=124
DOUBLE=125
INT32=126
INT64=127
STRING=128
UINT32=129
UINT64=130
TRUE=131
FALSE=132
NULL=133
ARROW=134
COLON=135
SEMI=136
COMMA=137
DOT=138
LBRACE=139
RBRACE=140
LBRACK=141
RBRACK=142
LPAREN=143
RPAREN=144
LT=145
GT=146
AMP=147
EQUAL=148
INTEGER=149
JSON_NUMBER=150
IDENTIFIER=151
STRING_LITERAL=152
LINE_COMMENT=153
BLOCK_COMMENT=154
WS=155
'edit'=1
'module'=2
'contract'=3
@@ -158,142 +160,144 @@ WS=153
'subject'=5
'for'=6
'creation'=7
'initialize'=8
'workspace'=9
'execution'=10
'snapshot'=11
'transaction'=12
'remote'=13
'targets'=14
'portable'=15
'replica'=16
'local'=17
'from'=18
'result-bytes'=19
'rpc-calls'=20
'deadline-ms'=21
'query'=22
'reflection'=23
'specialize'=24
'root'=25
'document'=26
'fragments'=27
'view'=28
'max'=29
'allow'=30
'poll'=31
'queryable'=32
'rpc'=33
'query-reason'=34
'type'=35
'object'=36
'storable'=37
'implements'=38
'ref'=39
'fragment'=40
'import'=41
'external'=42
'atom'=43
'interface'=44
'interfaces'=45
'package'=46
'value'=47
'relation'=48
'operation'=49
'function'=50
'constructor'=51
'constructs'=52
'input'=53
'conform'=54
'as'=55
'bind'=56
'static'=57
'to'=58
'private'=59
'shared'=60
'state'=61
'edge'=62
'projection'=63
'with'=64
'using'=65
'accept'=66
'via'=67
'materialize'=68
'if'=69
'absent'=70
'on'=71
'policy'=72
'default'=73
'source'=74
'repository'=75
'commit'=76
'revision'=77
'semantic-major'=78
'on-delete'=79
'lifecycle'=80
'retain-other'=81
'keyed'=82
'public-traversal'=83
'id'=84
'doc'=85
'mode'=86
'emits'=87
'receiver'=88
'requires'=89
'any'=90
'get'=91
'set'=92
'watch'=93
'start'=94
'stop'=95
'read'=96
'write'=97
'resolve'=98
'connect'=99
'disconnect'=100
'call'=101
'watch-start'=102
'watch-stop'=103
'subscribe'=104
'unsubscribe'=105
'register'=106
'crdt'=107
'optional-one'=108
'exactly-one'=109
'many-unique'=110
'many'=111
'ordered'=112
'unit'=113
'watch-handle'=114
'message'=115
'atom-ref'=116
'interface-ref'=117
'optional'=118
'list'=119
'record'=120
'bool'=121
'bytes'=122
'double'=123
'int32'=124
'int64'=125
'string'=126
'uint32'=127
'uint64'=128
'true'=129
'false'=130
'null'=131
'->'=132
':'=133
';'=134
','=135
'.'=136
'{'=137
'}'=138
'['=139
']'=140
'('=141
')'=142
'<'=143
'>'=144
'&'=145
'='=146
'variant'=8
'prepares'=9
'initialize'=10
'workspace'=11
'execution'=12
'snapshot'=13
'transaction'=14
'remote'=15
'targets'=16
'portable'=17
'replica'=18
'local'=19
'from'=20
'result-bytes'=21
'rpc-calls'=22
'deadline-ms'=23
'query'=24
'reflection'=25
'specialize'=26
'root'=27
'document'=28
'fragments'=29
'view'=30
'max'=31
'allow'=32
'poll'=33
'queryable'=34
'rpc'=35
'query-reason'=36
'type'=37
'object'=38
'storable'=39
'implements'=40
'ref'=41
'fragment'=42
'import'=43
'external'=44
'atom'=45
'interface'=46
'interfaces'=47
'package'=48
'value'=49
'relation'=50
'operation'=51
'function'=52
'constructor'=53
'constructs'=54
'input'=55
'conform'=56
'as'=57
'bind'=58
'static'=59
'to'=60
'private'=61
'shared'=62
'state'=63
'edge'=64
'projection'=65
'with'=66
'using'=67
'accept'=68
'via'=69
'materialize'=70
'if'=71
'absent'=72
'on'=73
'policy'=74
'default'=75
'source'=76
'repository'=77
'commit'=78
'revision'=79
'semantic-major'=80
'on-delete'=81
'lifecycle'=82
'retain-other'=83
'keyed'=84
'public-traversal'=85
'id'=86
'doc'=87
'mode'=88
'emits'=89
'receiver'=90
'requires'=91
'any'=92
'get'=93
'set'=94
'watch'=95
'start'=96
'stop'=97
'read'=98
'write'=99
'resolve'=100
'connect'=101
'disconnect'=102
'call'=103
'watch-start'=104
'watch-stop'=105
'subscribe'=106
'unsubscribe'=107
'register'=108
'crdt'=109
'optional-one'=110
'exactly-one'=111
'many-unique'=112
'many'=113
'ordered'=114
'unit'=115
'watch-handle'=116
'message'=117
'atom-ref'=118
'interface-ref'=119
'optional'=120
'list'=121
'record'=122
'bool'=123
'bytes'=124
'double'=125
'int32'=126
'int64'=127
'string'=128
'uint32'=129
'uint64'=130
'true'=131
'false'=132
'null'=133
'->'=134
':'=135
';'=136
','=137
'.'=138
'{'=139
'}'=140
'['=141
']'=142
'('=143
')'=144
'<'=145
'>'=146
'&'=147
'='=148
File diff suppressed because one or more lines are too long
@@ -5,152 +5,154 @@ PRESENTATION=4
SUBJECT=5
FOR=6
CREATION=7
INITIALIZE=8
WORKSPACE=9
EXECUTION=10
SNAPSHOT=11
TRANSACTION=12
REMOTE=13
TARGETS=14
PORTABLE=15
REPLICA=16
LOCAL=17
FROM=18
RESULT_BYTES=19
RPC_CALLS=20
DEADLINE_MS=21
QUERY=22
REFLECTION=23
SPECIALIZE=24
ROOT=25
DOCUMENT=26
FRAGMENTS=27
VIEW=28
MAX=29
ALLOW=30
POLL=31
QUERYABLE=32
RPC=33
QUERY_REASON=34
TYPE=35
OBJECT=36
STORABLE=37
IMPLEMENTS=38
REF=39
FRAGMENT=40
IMPORT=41
EXTERNAL=42
ATOM=43
INTERFACE=44
INTERFACES=45
PACKAGE=46
VALUE=47
RELATION=48
OPERATION=49
FUNCTION=50
CONSTRUCTOR=51
CONSTRUCTS=52
INPUT=53
CONFORM=54
AS=55
BIND=56
STATIC=57
TO=58
PRIVATE=59
SHARED=60
STATE=61
EDGE=62
PROJECTION=63
WITH=64
USING=65
ACCEPT=66
VIA=67
MATERIALIZE=68
IF=69
ABSENT=70
ON=71
POLICY=72
DEFAULT=73
SOURCE=74
REPOSITORY=75
COMMIT=76
REVISION=77
SEMANTIC_MAJOR=78
ON_DELETE=79
LIFECYCLE=80
RETAIN_OTHER=81
KEYED=82
PUBLIC_TRAVERSAL=83
ID=84
DOC=85
MODE=86
EMITS=87
RECEIVER=88
REQUIRES=89
ANY=90
GET=91
SET=92
WATCH=93
START=94
STOP=95
READ=96
WRITE=97
RESOLVE=98
CONNECT=99
DISCONNECT=100
CALL=101
WATCH_START=102
WATCH_STOP=103
SUBSCRIBE=104
UNSUBSCRIBE=105
REGISTER=106
CRDT=107
OPTIONAL_ONE=108
EXACTLY_ONE=109
MANY_UNIQUE=110
MANY=111
ORDERED=112
UNIT=113
WATCH_HANDLE=114
MESSAGE=115
ATOM_REF=116
INTERFACE_REF=117
OPTIONAL=118
LIST=119
RECORD=120
BOOL=121
BYTES=122
DOUBLE=123
INT32=124
INT64=125
STRING=126
UINT32=127
UINT64=128
TRUE=129
FALSE=130
NULL=131
ARROW=132
COLON=133
SEMI=134
COMMA=135
DOT=136
LBRACE=137
RBRACE=138
LBRACK=139
RBRACK=140
LPAREN=141
RPAREN=142
LT=143
GT=144
AMP=145
EQUAL=146
INTEGER=147
JSON_NUMBER=148
IDENTIFIER=149
STRING_LITERAL=150
LINE_COMMENT=151
BLOCK_COMMENT=152
WS=153
VARIANT=8
PREPARES=9
INITIALIZE=10
WORKSPACE=11
EXECUTION=12
SNAPSHOT=13
TRANSACTION=14
REMOTE=15
TARGETS=16
PORTABLE=17
REPLICA=18
LOCAL=19
FROM=20
RESULT_BYTES=21
RPC_CALLS=22
DEADLINE_MS=23
QUERY=24
REFLECTION=25
SPECIALIZE=26
ROOT=27
DOCUMENT=28
FRAGMENTS=29
VIEW=30
MAX=31
ALLOW=32
POLL=33
QUERYABLE=34
RPC=35
QUERY_REASON=36
TYPE=37
OBJECT=38
STORABLE=39
IMPLEMENTS=40
REF=41
FRAGMENT=42
IMPORT=43
EXTERNAL=44
ATOM=45
INTERFACE=46
INTERFACES=47
PACKAGE=48
VALUE=49
RELATION=50
OPERATION=51
FUNCTION=52
CONSTRUCTOR=53
CONSTRUCTS=54
INPUT=55
CONFORM=56
AS=57
BIND=58
STATIC=59
TO=60
PRIVATE=61
SHARED=62
STATE=63
EDGE=64
PROJECTION=65
WITH=66
USING=67
ACCEPT=68
VIA=69
MATERIALIZE=70
IF=71
ABSENT=72
ON=73
POLICY=74
DEFAULT=75
SOURCE=76
REPOSITORY=77
COMMIT=78
REVISION=79
SEMANTIC_MAJOR=80
ON_DELETE=81
LIFECYCLE=82
RETAIN_OTHER=83
KEYED=84
PUBLIC_TRAVERSAL=85
ID=86
DOC=87
MODE=88
EMITS=89
RECEIVER=90
REQUIRES=91
ANY=92
GET=93
SET=94
WATCH=95
START=96
STOP=97
READ=98
WRITE=99
RESOLVE=100
CONNECT=101
DISCONNECT=102
CALL=103
WATCH_START=104
WATCH_STOP=105
SUBSCRIBE=106
UNSUBSCRIBE=107
REGISTER=108
CRDT=109
OPTIONAL_ONE=110
EXACTLY_ONE=111
MANY_UNIQUE=112
MANY=113
ORDERED=114
UNIT=115
WATCH_HANDLE=116
MESSAGE=117
ATOM_REF=118
INTERFACE_REF=119
OPTIONAL=120
LIST=121
RECORD=122
BOOL=123
BYTES=124
DOUBLE=125
INT32=126
INT64=127
STRING=128
UINT32=129
UINT64=130
TRUE=131
FALSE=132
NULL=133
ARROW=134
COLON=135
SEMI=136
COMMA=137
DOT=138
LBRACE=139
RBRACE=140
LBRACK=141
RBRACK=142
LPAREN=143
RPAREN=144
LT=145
GT=146
AMP=147
EQUAL=148
INTEGER=149
JSON_NUMBER=150
IDENTIFIER=151
STRING_LITERAL=152
LINE_COMMENT=153
BLOCK_COMMENT=154
WS=155
'edit'=1
'module'=2
'contract'=3
@@ -158,142 +160,144 @@ WS=153
'subject'=5
'for'=6
'creation'=7
'initialize'=8
'workspace'=9
'execution'=10
'snapshot'=11
'transaction'=12
'remote'=13
'targets'=14
'portable'=15
'replica'=16
'local'=17
'from'=18
'result-bytes'=19
'rpc-calls'=20
'deadline-ms'=21
'query'=22
'reflection'=23
'specialize'=24
'root'=25
'document'=26
'fragments'=27
'view'=28
'max'=29
'allow'=30
'poll'=31
'queryable'=32
'rpc'=33
'query-reason'=34
'type'=35
'object'=36
'storable'=37
'implements'=38
'ref'=39
'fragment'=40
'import'=41
'external'=42
'atom'=43
'interface'=44
'interfaces'=45
'package'=46
'value'=47
'relation'=48
'operation'=49
'function'=50
'constructor'=51
'constructs'=52
'input'=53
'conform'=54
'as'=55
'bind'=56
'static'=57
'to'=58
'private'=59
'shared'=60
'state'=61
'edge'=62
'projection'=63
'with'=64
'using'=65
'accept'=66
'via'=67
'materialize'=68
'if'=69
'absent'=70
'on'=71
'policy'=72
'default'=73
'source'=74
'repository'=75
'commit'=76
'revision'=77
'semantic-major'=78
'on-delete'=79
'lifecycle'=80
'retain-other'=81
'keyed'=82
'public-traversal'=83
'id'=84
'doc'=85
'mode'=86
'emits'=87
'receiver'=88
'requires'=89
'any'=90
'get'=91
'set'=92
'watch'=93
'start'=94
'stop'=95
'read'=96
'write'=97
'resolve'=98
'connect'=99
'disconnect'=100
'call'=101
'watch-start'=102
'watch-stop'=103
'subscribe'=104
'unsubscribe'=105
'register'=106
'crdt'=107
'optional-one'=108
'exactly-one'=109
'many-unique'=110
'many'=111
'ordered'=112
'unit'=113
'watch-handle'=114
'message'=115
'atom-ref'=116
'interface-ref'=117
'optional'=118
'list'=119
'record'=120
'bool'=121
'bytes'=122
'double'=123
'int32'=124
'int64'=125
'string'=126
'uint32'=127
'uint64'=128
'true'=129
'false'=130
'null'=131
'->'=132
':'=133
';'=134
','=135
'.'=136
'{'=137
'}'=138
'['=139
']'=140
'('=141
')'=142
'<'=143
'>'=144
'&'=145
'='=146
'variant'=8
'prepares'=9
'initialize'=10
'workspace'=11
'execution'=12
'snapshot'=13
'transaction'=14
'remote'=15
'targets'=16
'portable'=17
'replica'=18
'local'=19
'from'=20
'result-bytes'=21
'rpc-calls'=22
'deadline-ms'=23
'query'=24
'reflection'=25
'specialize'=26
'root'=27
'document'=28
'fragments'=29
'view'=30
'max'=31
'allow'=32
'poll'=33
'queryable'=34
'rpc'=35
'query-reason'=36
'type'=37
'object'=38
'storable'=39
'implements'=40
'ref'=41
'fragment'=42
'import'=43
'external'=44
'atom'=45
'interface'=46
'interfaces'=47
'package'=48
'value'=49
'relation'=50
'operation'=51
'function'=52
'constructor'=53
'constructs'=54
'input'=55
'conform'=56
'as'=57
'bind'=58
'static'=59
'to'=60
'private'=61
'shared'=62
'state'=63
'edge'=64
'projection'=65
'with'=66
'using'=67
'accept'=68
'via'=69
'materialize'=70
'if'=71
'absent'=72
'on'=73
'policy'=74
'default'=75
'source'=76
'repository'=77
'commit'=78
'revision'=79
'semantic-major'=80
'on-delete'=81
'lifecycle'=82
'retain-other'=83
'keyed'=84
'public-traversal'=85
'id'=86
'doc'=87
'mode'=88
'emits'=89
'receiver'=90
'requires'=91
'any'=92
'get'=93
'set'=94
'watch'=95
'start'=96
'stop'=97
'read'=98
'write'=99
'resolve'=100
'connect'=101
'disconnect'=102
'call'=103
'watch-start'=104
'watch-stop'=105
'subscribe'=106
'unsubscribe'=107
'register'=108
'crdt'=109
'optional-one'=110
'exactly-one'=111
'many-unique'=112
'many'=113
'ordered'=114
'unit'=115
'watch-handle'=116
'message'=117
'atom-ref'=118
'interface-ref'=119
'optional'=120
'list'=121
'record'=122
'bool'=123
'bytes'=124
'double'=125
'int32'=126
'int64'=127
'string'=128
'uint32'=129
'uint64'=130
'true'=131
'false'=132
'null'=133
'->'=134
':'=135
';'=136
','=137
'.'=138
'{'=139
'}'=140
'['=141
']'=142
'('=143
')'=144
'<'=145
'>'=146
'&'=147
'='=148
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -39,6 +39,7 @@ import { FragmentVariableContext } from "./QuixosCapabilityParser.js";
import { PackageOperationExportContext } from "./QuixosCapabilityParser.js";
import { PackageFunctionExportContext } from "./QuixosCapabilityParser.js";
import { AcceptanceClauseContext } from "./QuixosCapabilityParser.js";
import { PreparationClauseContext } from "./QuixosCapabilityParser.js";
import { ExecutionClauseContext } from "./QuixosCapabilityParser.js";
import { SelectedOperationsContext } from "./QuixosCapabilityParser.js";
import { PackageConstructorExportContext } from "./QuixosCapabilityParser.js";
@@ -77,6 +78,7 @@ import { DependencyBindingContext } from "./QuixosCapabilityParser.js";
import { ConstructorBindingDeclContext } from "./QuixosCapabilityParser.js";
import { ValueTypeContext } from "./QuixosCapabilityParser.js";
import { RecordFieldContext } from "./QuixosCapabilityParser.js";
import { VariantCaseContext } from "./QuixosCapabilityParser.js";
import { ScalarTypeContext } from "./QuixosCapabilityParser.js";
import { CardinalityContext } from "./QuixosCapabilityParser.js";
import { JsonLiteralContext } from "./QuixosCapabilityParser.js";
@@ -317,6 +319,12 @@ export class QuixosCapabilityVisitor<Result> extends AbstractParseTreeVisitor<Re
* @return the visitor result
*/
visitAcceptanceClause?: (ctx: AcceptanceClauseContext) => Result;
/**
* Visit a parse tree produced by `QuixosCapabilityParser.preparationClause`.
* @param ctx the parse tree
* @return the visitor result
*/
visitPreparationClause?: (ctx: PreparationClauseContext) => Result;
/**
* Visit a parse tree produced by `QuixosCapabilityParser.executionClause`.
* @param ctx the parse tree
@@ -545,6 +553,12 @@ export class QuixosCapabilityVisitor<Result> extends AbstractParseTreeVisitor<Re
* @return the visitor result
*/
visitRecordField?: (ctx: RecordFieldContext) => Result;
/**
* Visit a parse tree produced by `QuixosCapabilityParser.variantCase`.
* @param ctx the parse tree
* @return the visitor result
*/
visitVariantCase?: (ctx: VariantCaseContext) => Result;
/**
* Visit a parse tree produced by `QuixosCapabilityParser.scalarType`.
* @param ctx the parse tree