afyx-engineering-kit 0.1.0-alpha.4 → 0.1.0-alpha.7

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 (35) hide show
  1. package/.afyx-source-revision +1 -1
  2. package/README.md +12 -0
  3. package/afyx-graph/engine/release/RELEASE-MANIFEST.json +3 -3
  4. package/afyx-graph/engine/release/SHA256SUMS +2 -2
  5. package/afyx-graph/engine/release/afyx-graph-linux-x64.tar.gz +0 -0
  6. package/afyx-graph/engine/release/afyx-graph-win32-x64.zip +0 -0
  7. package/bin/afyx-engineering-kit.mjs +22 -1
  8. package/install.ps1 +84 -13
  9. package/install.sh +91 -4
  10. package/package.json +2 -1
  11. package/scripts/afyx-install-backend.mjs +46 -0
  12. package/scripts/afyx-install-contract.mjs +139 -0
  13. package/scripts/afyx-midnight-circuit.mjs +328 -0
  14. package/scripts/afyx-npm-installer.mjs +27 -5
  15. package/scripts/install-afyx-forge.ps1 +14 -10
  16. package/scripts/install-afyx-forge.sh +13 -10
  17. package/scripts/install-afyx-graph.ps1 +75 -29
  18. package/scripts/lib/AfyxPlatform.ps1 +133 -0
  19. package/scripts/lib/AfyxPlatform.psm1 +6 -0
  20. package/scripts/package-release-zip.ps1 +124 -0
  21. package/scripts/validate-release-zip-graph.mjs +55 -0
  22. package/verify.ps1 +27 -10
  23. package/verify.sh +10 -2
  24. package/afyx-context/test-fixtures/coordination-worker.mjs +0 -52
  25. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/__init__.py +0 -1
  26. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/__manifest__.py +0 -4
  27. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/models/__init__.py +0 -1
  28. package/afyx-context/test-fixtures/graph-consumer-repo/addons/sale_extension/models/sale_order.py +0 -5
  29. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/__init__.py +0 -1
  30. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/__manifest__.py +0 -10
  31. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/models/__init__.py +0 -2
  32. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/models/sale_order.py +0 -20
  33. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/models/sale_order_audit.py +0 -11
  34. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/security/ir.model.access.csv +0 -2
  35. package/afyx-context/test-fixtures/integrated-dogfood-repo/addons/integrated_sales/views/sale_order_views.xml +0 -14
@@ -1,52 +0,0 @@
1
- import fs from 'node:fs';
2
- import { AfyxContextEngine } from '../src/engine.js';
3
- import { ContextStore } from '../src/storage.js';
4
-
5
- const sleeper = new Int32Array(new SharedArrayBuffer(4));
6
- const [mode, stateDir, ownerId, sessionId, readyPath, gatePath, outputPath, payload = '', id = 'worker', timeout = '5000'] = process.argv.slice(2);
7
-
8
- function waitForGate() {
9
- fs.writeFileSync(readyPath, `${process.pid}\n`, { flag: 'wx' });
10
- const deadline = Date.now() + 15_000;
11
- while (!fs.existsSync(gatePath)) {
12
- if (Date.now() >= deadline) throw new Error('coordination fixture gate timed out');
13
- Atomics.wait(sleeper, 0, 0, 10);
14
- }
15
- }
16
-
17
- try {
18
- if (mode === 'hold') {
19
- const store = new ContextStore({ stateDir, ownerId, sessionId, lockTimeoutMs: Number(timeout) });
20
- store.withExclusiveAccess(() => {
21
- waitForGate();
22
- Atomics.wait(sleeper, 0, 0, 30_000);
23
- });
24
- } else if (mode === 'interrupt-write') {
25
- const engine = new AfyxContextEngine({ stateDir, ownerId, sessionId, lockTimeoutMs: Number(timeout) });
26
- const renameSync = fs.renameSync;
27
- fs.renameSync = (source, destination) => {
28
- if (destination === engine.store.sessionPath) {
29
- fs.writeFileSync(readyPath, `${process.pid}\n`, { flag: 'wx' });
30
- Atomics.wait(sleeper, 0, 0, 30_000);
31
- }
32
- return renameSync(source, destination);
33
- };
34
- engine.reduce({ segments: [{ id, content: payload }] });
35
- } else if (mode === 'reduce') {
36
- waitForGate();
37
- const engine = new AfyxContextEngine({ stateDir, ownerId, sessionId, lockTimeoutMs: Number(timeout) });
38
- const result = engine.reduce({ segments: [{ id, content: payload }] });
39
- fs.writeFileSync(outputPath, JSON.stringify({ ok: true, result }), { flag: 'wx' });
40
- } else {
41
- throw new Error(`unknown coordination fixture mode: ${mode}`);
42
- }
43
- } catch (error) {
44
- if (outputPath) {
45
- fs.writeFileSync(outputPath, JSON.stringify({
46
- ok: false,
47
- code: error?.code ?? 'INTERNAL',
48
- message: error?.message ?? String(error),
49
- }), { flag: 'wx' });
50
- }
51
- process.exitCode = 2;
52
- }
@@ -1,4 +0,0 @@
1
- {
2
- "name": "Synthetic Sale Extension",
3
- "version": "1.0.0",
4
- }
@@ -1,5 +0,0 @@
1
- class SaleOrder:
2
- _inherit = "sale.order"
3
-
4
- def synthetic_total(self):
5
- return 42
@@ -1,10 +0,0 @@
1
- {
2
- "name": "AFYX Integrated Sales Fixture",
3
- "version": "17.0.1.0.0",
4
- "depends": ["sale"],
5
- "data": [
6
- "security/ir.model.access.csv",
7
- "views/sale_order_views.xml",
8
- ],
9
- "installable": True,
10
- }
@@ -1,2 +0,0 @@
1
- from . import sale_order
2
- from . import sale_order_audit
@@ -1,20 +0,0 @@
1
- from odoo import api, fields, models
2
-
3
-
4
- class SaleOrder(models.Model):
5
- _inherit = "sale.order"
6
-
7
- afyx_review_note = fields.Char(copy=False)
8
- afyx_total_snapshot = fields.Monetary(compute="_compute_afyx_total_snapshot")
9
-
10
- @api.depends("order_line.price_subtotal")
11
- def _compute_afyx_total_snapshot(self):
12
- for order in self:
13
- order.afyx_total_snapshot = sum(order.order_line.mapped("price_subtotal"))
14
-
15
- def afyx_repeated_summary(self):
16
- return "AFYX integrated sale summary " * 48
17
-
18
- def SECURITY(self):
19
- """SECURITY ACCESS DENIED evidence must remain byte complete."""
20
- return self.afyx_review_note
@@ -1,11 +0,0 @@
1
- from odoo import fields, models
2
-
3
-
4
- class SaleOrderAudit(models.Model):
5
- _inherit = "sale.order"
6
-
7
- afyx_audit_marker = fields.Char(copy=False)
8
-
9
- def afyx_diagnostic_boundary(self):
10
- """ERROR FAILURE TRACEBACK evidence must remain byte complete."""
11
- return self.afyx_audit_marker
@@ -1,2 +0,0 @@
1
- id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2
- access_sale_order_afyx_fixture,access.sale.order.afyx.fixture,sale.model_sale_order,sales_team.group_sale_salesman,1,0,0,0
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <odoo>
3
- <record id="view_order_form_afyx_integrated" model="ir.ui.view">
4
- <field name="name">sale.order.form.afyx.integrated</field>
5
- <field name="model">sale.order</field>
6
- <field name="inherit_id" ref="sale.view_order_form"/>
7
- <field name="arch" type="xml">
8
- <xpath expr="//field[@name='partner_id']" position="after">
9
- <field name="afyx_review_note"/>
10
- <field name="afyx_total_snapshot" readonly="1"/>
11
- </xpath>
12
- </field>
13
- </record>
14
- </odoo>