@elaraai/east-codex-plugin 1.0.100 → 1.0.102

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "east-codex-plugin",
3
- "version": "1.0.100",
3
+ "version": "1.0.102",
4
4
  "description": "East programming language ecosystem - a statically typed, expression-based language for business logic, data processing, UI definitions, and durable execution",
5
5
  "author": {
6
6
  "name": "Elara AI",
package/index.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "version": 2,
3
3
  "stats": {
4
- "totalEntries": 1301,
4
+ "totalEntries": 1303,
5
5
  "totalFiles": 222,
6
6
  "packages": {
7
- "east": 582,
7
+ "east": 584,
8
8
  "east-node-std": 55,
9
9
  "east-node-io": 63,
10
10
  "east-py-datascience": 94,
@@ -14813,7 +14813,7 @@
14813
14813
  "identical"
14814
14814
  ],
14815
14815
  "imports": [
14816
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
14816
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
14817
14817
  ],
14818
14818
  "languages": [
14819
14819
  "typescript",
@@ -14847,7 +14847,7 @@
14847
14847
  "changed"
14848
14848
  ],
14849
14849
  "imports": [
14850
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
14850
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
14851
14851
  ],
14852
14852
  "languages": [
14853
14853
  "typescript",
@@ -14881,7 +14881,7 @@
14881
14881
  "replace"
14882
14882
  ],
14883
14883
  "imports": [
14884
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
14884
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
14885
14885
  ],
14886
14886
  "languages": [
14887
14887
  "typescript",
@@ -14916,7 +14916,7 @@
14916
14916
  "reverse"
14917
14917
  ],
14918
14918
  "imports": [
14919
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
14919
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
14920
14920
  ],
14921
14921
  "languages": [
14922
14922
  "typescript",
@@ -14954,7 +14954,7 @@
14954
14954
  "round-trip"
14955
14955
  ],
14956
14956
  "imports": [
14957
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
14957
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
14958
14958
  ],
14959
14959
  "languages": [
14960
14960
  "typescript",
@@ -14991,7 +14991,7 @@
14991
14991
  "ArrayType"
14992
14992
  ],
14993
14993
  "imports": [
14994
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
14994
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
14995
14995
  ],
14996
14996
  "languages": [
14997
14997
  "typescript",
@@ -15025,7 +15025,7 @@
15025
15025
  "ArrayType"
15026
15026
  ],
15027
15027
  "imports": [
15028
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15028
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15029
15029
  ],
15030
15030
  "languages": [
15031
15031
  "typescript",
@@ -15062,7 +15062,7 @@
15062
15062
  "restore"
15063
15063
  ],
15064
15064
  "imports": [
15065
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15065
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15066
15066
  ],
15067
15067
  "languages": [
15068
15068
  "typescript",
@@ -15085,6 +15085,90 @@
15085
15085
  "InvertPatch"
15086
15086
  ]
15087
15087
  },
15088
+ {
15089
+ "id": "east:patch.examples.ts:patchDiffArrayOneChange",
15090
+ "skill": "east",
15091
+ "package": "east",
15092
+ "file": "east/test/patch.examples.ts",
15093
+ "suite": "Arrays",
15094
+ "test": "Diff two 100,000-element arrays that differ in one element: the patch is one update at its position",
15095
+ "keywords": [
15096
+ "patch",
15097
+ "diff",
15098
+ "array",
15099
+ "ArrayType",
15100
+ "large",
15101
+ "update",
15102
+ "one change",
15103
+ "linear"
15104
+ ],
15105
+ "imports": [
15106
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15107
+ ],
15108
+ "languages": [
15109
+ "typescript",
15110
+ "python"
15111
+ ],
15112
+ "ir": "{\"type\":\"Function\",\"value\":{\"type\":{\"type\":\"Function\",\"value\":{\"inputs\":[],\"output\":{\"type\":\"Variant\",\"value\":[{\"name\":\"patch\",\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Struct\",\"value\":[{\"name\":\"key\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"offset\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"operation\",\"type\":{\"type\":\"Variant\",\"value\":[{\"name\":\"delete\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"insert\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"update\",\"type\":{\"type\":\"Variant\",\"value\":[{\"name\":\"replace\",\"type\":{\"type\":\"Struct\",\"value\":[{\"name\":\"before\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"after\",\"type\":{\"type\":\"Integer\",\"value\":null}}]}},{\"name\":\"unchanged\",\"type\":{\"type\":\"Null\",\"value\":null}}]}}]}}]}}},{\"name\":\"replace\",\"type\":{\"type\":\"Struct\",\"value\":[{\"name\":\"before\",\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}}},{\"name\":\"after\",\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}}}]}},{\"name\":\"unchanged\",\"type\":{\"type\":\"Null\",\"value\":null}}]}}},\"loc_id\":\"0\",\"captures\":[],\"parameters\":[],\"body\":{\"type\":\"Block\",\"value\":{\"type\":{\"type\":\"Variant\",\"value\":{\"$ref\":\"4#type/Function/output/Variant\"}},\"loc_id\":\"0\",\"statements\":[{\"type\":\"Let\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"variable\":{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},\"value\":{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"builtin\":\"ArrayRange\",\"type_parameters\":[],\"arguments\":[{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"0\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"100000\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"1\"}}}]}}}},{\"type\":\"Let\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"variable\":{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}},\"value\":{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"builtin\":\"ArrayCopy\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}}]}}}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"builtin\":\"ArrayUpdate\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"50000\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"-1\"}}}]}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Variant\",\"value\":{\"$ref\":\"7#type/Function/output/Variant\"}},\"loc_id\":\"0\",\"builtin\":\"Diff\",\"type_parameters\":[{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},{\"type\":\"Variant\",\"value\":{\"$ref\":\"8#type/Function/output/Variant\"}}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}}]}}]}}}}",
15113
+ "ts": "// Generated by east-node transpile — East IR printed as the East.function\n// builder surface. Rebuilding this module yields the same IR (normalized).\nimport { East, NullType, IntegerType, ArrayType, StructType, VariantType } from \"@elaraai/east\";\n\nexport const patchDiffArrayOneChange = East.function(\n [],\n VariantType({\n patch: ArrayType(StructType({\n key: IntegerType,\n offset: IntegerType,\n operation: VariantType({\n delete: IntegerType,\n insert: IntegerType,\n update: VariantType({\n replace: StructType({ before: IntegerType, after: IntegerType }),\n unchanged: NullType,\n }),\n }),\n })),\n replace: StructType({ before: ArrayType(IntegerType), after: ArrayType(IntegerType) }),\n unchanged: NullType,\n }),\n ($) => {\n const before = $.let(East.Array.range(East.value(0n), 100000n, 1n));\n const after = $.let(before.copy());\n $(after.update(50000n, -1n));\n return East.diff(before, after);\n },\n);\n",
15114
+ "python": "# Generated by east-py transpile — East IR printed as the East.function\n# builder surface. Rebuilding this module yields the same IR (normalized).\nfrom east import East, NullType, IntegerType, ArrayType, StructType, VariantType\n\n@East.function(\n [],\n VariantType([\n ('patch', ArrayType(StructType([\n ('key', IntegerType),\n ('offset', IntegerType),\n ('operation', VariantType([\n ('delete', IntegerType),\n ('insert', IntegerType),\n ('update', VariantType([\n ('replace', StructType([('before', IntegerType), ('after', IntegerType)])),\n ('unchanged', NullType),\n ])),\n ])),\n ]))),\n ('replace', StructType([\n ('before', ArrayType(IntegerType)),\n ('after', ArrayType(IntegerType)),\n ])),\n ('unchanged', NullType),\n ]),\n)\ndef patchDiffArrayOneChange(b):\n before = b.let(East.Array.range(East.value(0, IntegerType), 100000, 1))\n after = b.let(before.copy())\n b.do(after.update(50000, -1))\n return East.diff(ArrayType(IntegerType), before, after)\n",
15115
+ "signature": {
15116
+ "inputs": [],
15117
+ "output": "VariantType({ patch: ArrayType(StructType({ key: IntegerType, offset: IntegerType, operation: VariantType({ delete: IntegerType, insert: IntegerType, update: VariantType({ replace: StructType({ before: IntegerType, after: IntegerType }), unchanged: NullType }) }) })), replace: StructType({ before: ArrayType(IntegerType), after: ArrayType(IntegerType) }), unchanged: NullType })",
15118
+ "async": false
15119
+ },
15120
+ "inputs": "[]",
15121
+ "returns": "{\"type\":\"patch\",\"value\":[{\"key\":\"50000\",\"offset\":\"0\",\"operation\":{\"type\":\"update\",\"value\":{\"type\":\"replace\",\"value\":{\"before\":\"50000\",\"after\":\"-1\"}}}}]}",
15122
+ "builtins": [
15123
+ "ArrayCopy",
15124
+ "ArrayRange",
15125
+ "ArrayUpdate",
15126
+ "Diff"
15127
+ ]
15128
+ },
15129
+ {
15130
+ "id": "east:patch.examples.ts:patchDiffArrayMove",
15131
+ "skill": "east",
15132
+ "package": "east",
15133
+ "file": "east/test/patch.examples.ts",
15134
+ "suite": "Arrays",
15135
+ "test": "Diff an array with one element moved far along it: the patch deletes it where it was and inserts it where it went",
15136
+ "keywords": [
15137
+ "patch",
15138
+ "diff",
15139
+ "array",
15140
+ "ArrayType",
15141
+ "move",
15142
+ "reorder",
15143
+ "delete",
15144
+ "insert",
15145
+ "shortest edit script"
15146
+ ],
15147
+ "imports": [
15148
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15149
+ ],
15150
+ "languages": [
15151
+ "typescript",
15152
+ "python"
15153
+ ],
15154
+ "ir": "{\"type\":\"Function\",\"value\":{\"type\":{\"type\":\"Function\",\"value\":{\"inputs\":[],\"output\":{\"type\":\"Variant\",\"value\":[{\"name\":\"patch\",\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Struct\",\"value\":[{\"name\":\"key\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"offset\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"operation\",\"type\":{\"type\":\"Variant\",\"value\":[{\"name\":\"delete\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"insert\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"update\",\"type\":{\"type\":\"Variant\",\"value\":[{\"name\":\"replace\",\"type\":{\"type\":\"Struct\",\"value\":[{\"name\":\"before\",\"type\":{\"type\":\"Integer\",\"value\":null}},{\"name\":\"after\",\"type\":{\"type\":\"Integer\",\"value\":null}}]}},{\"name\":\"unchanged\",\"type\":{\"type\":\"Null\",\"value\":null}}]}}]}}]}}},{\"name\":\"replace\",\"type\":{\"type\":\"Struct\",\"value\":[{\"name\":\"before\",\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}}},{\"name\":\"after\",\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}}}]}},{\"name\":\"unchanged\",\"type\":{\"type\":\"Null\",\"value\":null}}]}}},\"loc_id\":\"0\",\"captures\":[],\"parameters\":[],\"body\":{\"type\":\"Block\",\"value\":{\"type\":{\"type\":\"Variant\",\"value\":{\"$ref\":\"4#type/Function/output/Variant\"}},\"loc_id\":\"0\",\"statements\":[{\"type\":\"Let\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"variable\":{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},\"value\":{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"builtin\":\"ArrayRange\",\"type_parameters\":[],\"arguments\":[{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"0\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"100000\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"1\"}}}]}}}},{\"type\":\"Let\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"variable\":{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}},\"value\":{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"builtin\":\"ArraySlice\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"0\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"10\"}}}]}}}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"builtin\":\"ArrayAppend\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"builtin\":\"ArraySlice\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"11\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"99991\"}}}]}}]}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"builtin\":\"ArrayPushLast\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"10\"}}}]}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Null\",\"value\":null},\"loc_id\":\"0\",\"builtin\":\"ArrayAppend\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"builtin\":\"ArraySlice\",\"type_parameters\":[{\"type\":\"Integer\",\"value\":null}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"99991\"}}},{\"type\":\"Value\",\"value\":{\"type\":{\"type\":\"Integer\",\"value\":null},\"loc_id\":\"0\",\"value\":{\"type\":\"Integer\",\"value\":\"100000\"}}}]}}]}},{\"type\":\"Builtin\",\"value\":{\"type\":{\"type\":\"Variant\",\"value\":{\"$ref\":\"7#type/Function/output/Variant\"}},\"loc_id\":\"0\",\"builtin\":\"Diff\",\"type_parameters\":[{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},{\"type\":\"Variant\",\"value\":{\"$ref\":\"8#type/Function/output/Variant\"}}],\"arguments\":[{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"before\",\"mutable\":true,\"captured\":false}},{\"type\":\"Variable\",\"value\":{\"type\":{\"type\":\"Array\",\"value\":{\"type\":\"Integer\",\"value\":null}},\"loc_id\":\"0\",\"name\":\"after\",\"mutable\":true,\"captured\":false}}]}}]}}}}",
15155
+ "ts": "// Generated by east-node transpile — East IR printed as the East.function\n// builder surface. Rebuilding this module yields the same IR (normalized).\nimport { East, NullType, IntegerType, ArrayType, StructType, VariantType } from \"@elaraai/east\";\n\nexport const patchDiffArrayMove = East.function(\n [],\n VariantType({\n patch: ArrayType(StructType({\n key: IntegerType,\n offset: IntegerType,\n operation: VariantType({\n delete: IntegerType,\n insert: IntegerType,\n update: VariantType({\n replace: StructType({ before: IntegerType, after: IntegerType }),\n unchanged: NullType,\n }),\n }),\n })),\n replace: StructType({ before: ArrayType(IntegerType), after: ArrayType(IntegerType) }),\n unchanged: NullType,\n }),\n ($) => {\n const before = $.let(East.Array.range(East.value(0n), 100000n, 1n));\n const after = $.let(before.slice(0n, 10n));\n $(after.append(before.slice(11n, 99991n)));\n $(after.pushLast(10n));\n $(after.append(before.slice(99991n, 100000n)));\n return East.diff(before, after);\n },\n);\n",
15156
+ "python": "# Generated by east-py transpile — East IR printed as the East.function\n# builder surface. Rebuilding this module yields the same IR (normalized).\nfrom east import East, NullType, IntegerType, ArrayType, StructType, VariantType\n\n@East.function(\n [],\n VariantType([\n ('patch', ArrayType(StructType([\n ('key', IntegerType),\n ('offset', IntegerType),\n ('operation', VariantType([\n ('delete', IntegerType),\n ('insert', IntegerType),\n ('update', VariantType([\n ('replace', StructType([('before', IntegerType), ('after', IntegerType)])),\n ('unchanged', NullType),\n ])),\n ])),\n ]))),\n ('replace', StructType([\n ('before', ArrayType(IntegerType)),\n ('after', ArrayType(IntegerType)),\n ])),\n ('unchanged', NullType),\n ]),\n)\ndef patchDiffArrayMove(b):\n before = b.let(East.Array.range(East.value(0, IntegerType), 100000, 1))\n after = b.let(before.slice(0, 10))\n b.do(after.append(before.slice(11, 99991)))\n b.do(after.push_last(10))\n b.do(after.append(before.slice(99991, 100000)))\n return East.diff(ArrayType(IntegerType), before, after)\n",
15157
+ "signature": {
15158
+ "inputs": [],
15159
+ "output": "VariantType({ patch: ArrayType(StructType({ key: IntegerType, offset: IntegerType, operation: VariantType({ delete: IntegerType, insert: IntegerType, update: VariantType({ replace: StructType({ before: IntegerType, after: IntegerType }), unchanged: NullType }) }) })), replace: StructType({ before: ArrayType(IntegerType), after: ArrayType(IntegerType) }), unchanged: NullType })",
15160
+ "async": false
15161
+ },
15162
+ "inputs": "[]",
15163
+ "returns": "{\"type\":\"patch\",\"value\":[{\"key\":\"10\",\"offset\":\"0\",\"operation\":{\"type\":\"delete\",\"value\":\"10\"}},{\"key\":\"99990\",\"offset\":\"0\",\"operation\":{\"type\":\"insert\",\"value\":\"10\"}}]}",
15164
+ "builtins": [
15165
+ "ArrayAppend",
15166
+ "ArrayPushLast",
15167
+ "ArrayRange",
15168
+ "ArraySlice",
15169
+ "Diff"
15170
+ ]
15171
+ },
15088
15172
  {
15089
15173
  "id": "east:patch.examples.ts:patchDiffSet",
15090
15174
  "skill": "east",
@@ -15100,7 +15184,7 @@
15100
15184
  "insert"
15101
15185
  ],
15102
15186
  "imports": [
15103
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15187
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15104
15188
  ],
15105
15189
  "languages": [
15106
15190
  "typescript",
@@ -15134,7 +15218,7 @@
15134
15218
  "SetType"
15135
15219
  ],
15136
15220
  "imports": [
15137
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15221
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15138
15222
  ],
15139
15223
  "languages": [
15140
15224
  "typescript",
@@ -15171,7 +15255,7 @@
15171
15255
  "insert"
15172
15256
  ],
15173
15257
  "imports": [
15174
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15258
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15175
15259
  ],
15176
15260
  "languages": [
15177
15261
  "typescript",
@@ -15205,7 +15289,7 @@
15205
15289
  "DictType"
15206
15290
  ],
15207
15291
  "imports": [
15208
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15292
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15209
15293
  ],
15210
15294
  "languages": [
15211
15295
  "typescript",
@@ -15242,7 +15326,7 @@
15242
15326
  "field"
15243
15327
  ],
15244
15328
  "imports": [
15245
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15329
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15246
15330
  ],
15247
15331
  "languages": [
15248
15332
  "typescript",
@@ -15276,7 +15360,7 @@
15276
15360
  "StructType"
15277
15361
  ],
15278
15362
  "imports": [
15279
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15363
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15280
15364
  ],
15281
15365
  "languages": [
15282
15366
  "typescript",
@@ -15312,7 +15396,7 @@
15312
15396
  "same case"
15313
15397
  ],
15314
15398
  "imports": [
15315
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15399
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15316
15400
  ],
15317
15401
  "languages": [
15318
15402
  "typescript",
@@ -15348,7 +15432,7 @@
15348
15432
  "replace"
15349
15433
  ],
15350
15434
  "imports": [
15351
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15435
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15352
15436
  ],
15353
15437
  "languages": [
15354
15438
  "typescript",
@@ -15382,7 +15466,7 @@
15382
15466
  "VariantType"
15383
15467
  ],
15384
15468
  "imports": [
15385
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15469
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15386
15470
  ],
15387
15471
  "languages": [
15388
15472
  "typescript",
@@ -15417,7 +15501,7 @@
15417
15501
  "combine"
15418
15502
  ],
15419
15503
  "imports": [
15420
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15504
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15421
15505
  ],
15422
15506
  "languages": [
15423
15507
  "typescript",
@@ -15453,7 +15537,7 @@
15453
15537
  "identity"
15454
15538
  ],
15455
15539
  "imports": [
15456
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15540
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15457
15541
  ],
15458
15542
  "languages": [
15459
15543
  "typescript",
@@ -15489,7 +15573,7 @@
15489
15573
  "identity"
15490
15574
  ],
15491
15575
  "imports": [
15492
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15576
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15493
15577
  ],
15494
15578
  "languages": [
15495
15579
  "typescript",
@@ -15527,7 +15611,7 @@
15527
15611
  "array"
15528
15612
  ],
15529
15613
  "imports": [
15530
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15614
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15531
15615
  ],
15532
15616
  "languages": [
15533
15617
  "typescript",
@@ -15566,7 +15650,7 @@
15566
15650
  "round-trip"
15567
15651
  ],
15568
15652
  "imports": [
15569
- "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, variant, SortedSet, example } from \"@elaraai/east\";"
15653
+ "import { East, IntegerType, StringType, BooleanType, ArrayType, SetType, DictType, StructType, VariantType, PatchType, variant, SortedSet, example } from \"@elaraai/east\";"
15570
15654
  ],
15571
15655
  "languages": [
15572
15656
  "typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/east-codex-plugin",
3
- "version": "1.0.100",
3
+ "version": "1.0.102",
4
4
  "description": "East programming language ecosystem - a statically typed, expression-based language for business logic, data processing, UI definitions, and durable execution",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "type": "module",
@@ -1,12 +1,8 @@
1
1
  ---
2
2
  name: e3
3
- description: "East Execution Engine (e3) - durable, content-addressed dataflow for East programs. Use when: (1) authoring a package with @elaraai/e3 (e3.input, e3.task, e3.streamTask with e3.output and e3.partition for bounded memory and work split over an input, e3.customTask, e3.function, e3.package, e3.export, East.importFunction), (2) records - audited state written only through mutations, declared whole in one e3.record(name, type, { initial, indexes, mutations, migrations }) call: mutation.reduce/edit/patch; index.on/key/keys, index.interval / index.area for reads by a time window or a 2D window, index.series / index.summary for a block of keys over a span of time tiles and their totals, and index.nested for what a record's rows nest — jobs, a value a day, child rows, trees — filed item by item, with totals and parents' subtotals; and migrated between versions (migration.value/rows/rekey, in order), (3) the e3 CLI (repo, package,… See the detailed scope below."
3
+ description: "East Execution Engine (e3): durable, content-addressed dataflow for East programs. Use when (1) authoring a package with @elaraai/e3 — e3.input, e3.task, e3.streamTask with e3.output and e3.partition (bounded memory, work split over an input), e3.customTask, e3.function, e3.package, e3.export, East.importFunction; (2) records — audited state written only through mutations (e3.record with mutation.reduce/edit/patch), their indexes (index.on/key/keys, interval, area, series, summary, nested) and migrations (migration.value/rows/rekey); (3) the e3 CLI — repo, package, workspace, dataset, task, dataflow run, run, call, mutate, seed, history, watch, convert, auth, and the cores and memory a run may use; (4) driving e3 from code (@elaraai/e3-api-client, @elaraai/e3-core, e3-api-server); (5) caching, reactive re-runs and garbage collection; (6) delegating task bodies to a rack (e3 rack); (7) e3 in a browser with @elaraai/e3-web. UI tasks are e3-ui's ui()."
4
4
  ---
5
5
 
6
- ## Detailed skill scope
7
-
8
- East Execution Engine (e3) - durable, content-addressed dataflow for East programs. Use when: (1) authoring a package with @elaraai/e3 (e3.input, e3.task, e3.streamTask with e3.output and e3.partition for bounded memory and work split over an input, e3.customTask, e3.function, e3.package, e3.export, East.importFunction), (2) records - audited state written only through mutations, declared whole in one e3.record(name, type, { initial, indexes, mutations, migrations }) call: mutation.reduce/edit/patch; index.on/key/keys, index.interval / index.area for reads by a time window or a 2D window, index.series / index.summary for a block of keys over a span of time tiles and their totals, and index.nested for what a record's rows nest — jobs, a value a day, child rows, trees — filed item by item, with totals and parents' subtotals; and migrated between versions (migration.value/rows/rekey, in order), (3) the e3 CLI (repo, package, workspace, dataset, task, dataflow run, run, call, mutate, seed, history, reindex, compact, watch, convert, auth) and the cores and memory a run may use (-j, --memory), (4) driving e3 from code: @elaraai/e3-api-client against a server, @elaraai/e3-core on a local repository, e3-api-server, (5) caching, reactive re-runs and garbage collection, (6) delegating local task bodies to a rack: e3 rack enroll/policy, dataflow run --rack, watch --start --rack, optional e3-api-server --rack, (7) e3 in a browser, no server: @elaraai/e3-web (serveUnits, serveE3, createWebE3) and what a browser cannot do. UI tasks are e3-ui's ui().
9
-
10
6
  # East Execution Engine (e3)
11
7
 
12
8
  e3 runs East programs as a durable dataflow over content-addressed data: every
@@ -295,8 +291,13 @@ Wrap a stream task's input in `e3.partition` and the body runs once per
295
291
  **piece** of it: each piece is a unit of its own — cached on its own, run in
296
292
  parallel under the budget — typed as the whole dataset (a key range of a Set or
297
293
  Dict, a position range of an Array), and the pieces' outputs combine as the
298
- output kind says. Pieces are cut by content, most holding 64 to 100 MiB of
299
- stored bytes, so an append or an insertion re-runs only the pieces it reaches.
294
+ output kind says. Pieces are cut by content, at sizes that follow what the
295
+ input weighs — one piece within 16 MiB, tens of pieces for mid-size data, and
296
+ most holding 64 to 100 MiB from 2 GiB — so an append or an insertion re-runs
297
+ only the pieces it reaches. Under the local budget's guard (Linux, macOS) a
298
+ stage starts all its units at once, each reserving the task's last peak, or the
299
+ first time what the largest piece holds of its rows decoded, as its program
300
+ reads them.
300
301
  An input not wrapped reaches every piece whole, opened lazily as every input is
301
302
  (a keyed get reads only its segments); a change to it re-runs every piece.
302
303
 
@@ -52,9 +52,12 @@ task or a unit each — and `--memory <size>` (`8G`, `512M`) what they may reser
52
52
  between them. The defaults are `E3_JOBS` and `E3_MEMORY`, else what e3 may use:
53
53
  its CPU affinity capped by a cgroup quota, and the cgroup's `memory.max` or
54
54
  physical memory, less a reserve. A unit of a split task reserves the largest
55
- peak a unit of its stage has reached in the run, so a stage runs its first unit
56
- alone and then fans out; on Linux and macOS a guard stops the newest unit when
57
- the runners together pass the budget, and runs it again once it fits. A deploy
55
+ peak a unit of its stage has reached in the run. On Linux and macOS a guard
56
+ stops the newest unit when the runners together pass the budget, and runs it
57
+ again once it fits, so there a stage starts all its units at once, each
58
+ reserving the task's last peak or, the first time, what the largest piece
59
+ holds of its rows decoded, as its program reads them; on Windows a stage runs
60
+ its first unit alone and then fans out. A deploy
58
61
  takes its `file` sources in `-j` at a time, their pieces' intake units running
59
62
  under the same budget. A source deploy, or a `watch`, exports the workspace
60
63
  packages its imported functions come from `-j` at a time, a process each, on