graphddb 0.9.0 → 0.9.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 (34) hide show
  1. package/README.md +89 -40
  2. package/dist/cdc/index.d.ts +4 -4
  3. package/dist/cdc/index.js +3 -3
  4. package/dist/{chunk-KOIJ4SNO.js → chunk-7OCXY4R6.js} +1 -1
  5. package/dist/{chunk-ZNU7OI5I.js → chunk-GWWRXIHF.js} +19 -4
  6. package/dist/{chunk-XZTA4VJH.js → chunk-HLFNCKFV.js} +84 -6
  7. package/dist/{chunk-SSVG6NQK.js → chunk-MBJ4JVRM.js} +28 -12
  8. package/dist/{chunk-NWTEUWJD.js → chunk-PHXUFAY2.js} +2 -2
  9. package/dist/{chunk-YGQ2NO6J.js → chunk-VECUS35D.js} +2 -2
  10. package/dist/cli.js +5 -5
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +3 -3
  13. package/dist/internal/index.d.ts +5 -5
  14. package/dist/internal/index.js +4 -4
  15. package/dist/{key-Dne-a20Q.d.ts → key-CWytoEaE.d.ts} +54 -1
  16. package/dist/linter/index.d.ts +5 -5
  17. package/dist/{linter-Cr1Hnw7n.d.ts → linter-jEwmZotm.d.ts} +1 -1
  18. package/dist/{prepared-artifact-BXkARxwO.d.ts → prepared-artifact-CwH5ezFq.d.ts} +3 -3
  19. package/dist/spec/index.d.ts +8 -8
  20. package/dist/spec/index.js +5 -5
  21. package/dist/testing/index.d.ts +2 -2
  22. package/dist/testing/index.js +32 -5
  23. package/dist/transform/index.d.ts +1 -1
  24. package/dist/transform/index.js +1 -1
  25. package/dist/{types-CfxzTEFL.d.ts → types-CgXS-4Ox.d.ts} +37 -8
  26. package/dist/{types-BnFsTZwl.d.ts → types-nk5okD7d.d.ts} +1 -1
  27. package/docs/diagrams/execution-paths.en.svg +14 -0
  28. package/docs/diagrams/execution-paths.ja.svg +14 -0
  29. package/docs/diagrams/query-pipeline.en.svg +10 -0
  30. package/docs/diagrams/query-pipeline.ja.svg +10 -0
  31. package/docs/diagrams/ssot-derivation.en.svg +13 -0
  32. package/docs/diagrams/ssot-derivation.ja.svg +13 -0
  33. package/docs/python-bridge.md +66 -28
  34. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4,16 +4,16 @@ import {
4
4
  buildOperations,
5
5
  portableIrDocument,
6
6
  renderKeyExprToTemplate
7
- } from "./chunk-SSVG6NQK.js";
7
+ } from "./chunk-MBJ4JVRM.js";
8
8
  import {
9
9
  buildManifest
10
- } from "./chunk-NWTEUWJD.js";
11
- import "./chunk-XZTA4VJH.js";
12
- import "./chunk-KOIJ4SNO.js";
10
+ } from "./chunk-PHXUFAY2.js";
11
+ import "./chunk-HLFNCKFV.js";
12
+ import "./chunk-7OCXY4R6.js";
13
13
  import "./chunk-WOFRHRXY.js";
14
14
  import {
15
15
  MetadataRegistry
16
- } from "./chunk-ZNU7OI5I.js";
16
+ } from "./chunk-GWWRXIHF.js";
17
17
  import {
18
18
  createDefaultLinter
19
19
  } from "./chunk-XTWXMOHD.js";
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { ak as SelectableOf, al as PrimaryKeyOf, e as ProjectionTransform, f as MaintainEvent, j as MembershipPredicate, h as MaintainConsistency, i as MaintainUpdateMode, am as MembershipPredicateOp, an as publishQuery, ao as publishCommand, D as DDBModel, ap as RetryPolicy, aq as Middleware } from './key-Dne-a20Q.js';
2
- export { ar as CdcModelRegistry, as as CdcSubscribeHandlers, at as Change, au as Column, av as ColumnMap, aw as CondSlot, ax as CtxBase, ay as CtxModel, az as FilterInput, aA as GsiDefinitionMarker, aB as GsiOptions, aC as InlineSnapshotSpec, aD as Item, aE as KeyDefinitionMarker, aF as KeySegment, aG as KeySlot, aH as KeyStructure, M as ModelStatic, aI as MutateAuthoringOptions, aJ as ParamDescriptor, aK as ParamStructure, aL as PartialQueryKeyOf, aM as PersistCtx, aN as PersistOrigin, aO as QueryKeyOf, aP as QueryResult, aQ as RawCondition, aR as ReadOpCtx, aS as ReadOpKind, aT as ReadParams, aU as ReadRequestCtx, aV as ReadRequestKind, aW as RelationBuilder, aX as RelationSelect, aY as RelationSpec, aZ as RequestContext, a_ as SegmentSpec, d as SegmentedKey, a$ as SelectBuilder, b0 as SelectOf, b1 as UniqueQueryKeyOf, b2 as Updatable, b3 as WriteCtx, b4 as WriteInput, b5 as WriteKind, b6 as WriteMiddleware, b7 as cond, b8 as entityWrites, b9 as getEntityWrites, ba as gsi, bb as identity, bc as k, bd as key, be as mutate, bf as preview, bg as when } from './key-Dne-a20Q.js';
1
+ import { ak as SelectableOf, al as PrimaryKeyOf, e as ProjectionTransform, f as MaintainEvent, j as MembershipPredicate, h as MaintainConsistency, i as MaintainUpdateMode, am as MembershipPredicateOp, an as publishQuery, ao as publishCommand, D as DDBModel, ap as RetryPolicy, aq as Middleware } from './key-CWytoEaE.js';
2
+ export { ar as CdcModelRegistry, as as CdcSubscribeHandlers, at as Change, au as Column, av as ColumnMap, aw as CondSlot, ax as CtxBase, ay as CtxModel, az as FilterInput, aA as GsiDefinitionMarker, aB as GsiOptions, aC as InlineSnapshotSpec, aD as Item, aE as KeyDefinitionMarker, aF as KeySegment, aG as KeySlot, aH as KeyStructure, M as ModelStatic, aI as MutateAuthoringOptions, aJ as ParamDescriptor, aK as ParamStructure, aL as PartialQueryKeyOf, aM as PersistCtx, aN as PersistOrigin, aO as QueryKeyOf, aP as QueryResult, aQ as RawCondition, aR as ReadOpCtx, aS as ReadOpKind, aT as ReadParams, aU as ReadRequestCtx, aV as ReadRequestKind, aW as RelationBuilder, aX as RelationSelect, aY as RelationSpec, aZ as RequestContext, a_ as SegmentSpec, d as SegmentedKey, a$ as SelectBuilder, b0 as SelectOf, b1 as UniqueQueryKeyOf, b2 as Updatable, b3 as WriteCtx, b4 as WriteInput, b5 as WriteKind, b6 as WriteMiddleware, b7 as cond, b8 as entityWrites, b9 as getEntityWrites, ba as gsi, bb as identity, bc as k, bd as key, be as mutate, bf as preview, bg as when } from './key-CWytoEaE.js';
3
3
  import * as _aws_sdk_client_dynamodb from '@aws-sdk/client-dynamodb';
4
4
  import { p as publishBehaviors } from './behaviors-DDltNivc.js';
5
5
  export { b as BehaviorComponentFns, a as BehaviorMethodSpec, B as BehaviorModelContract, P as PublishBehaviorsOptions, c as behaviorComponents, i as isBehaviorModelContract } from './behaviors-DDltNivc.js';
6
- import { M as ModelKind, F as FieldOptions, D as DynamoType, R as RelationOptions, A as AggregateOptions, a as AggregateValue } from './types-BnFsTZwl.js';
7
- export { a0 as LiteralParam, a1 as MapParam, a2 as NumberParam, a3 as Param, a4 as ParamKind, a5 as StringParam, a6 as param } from './types-CfxzTEFL.js';
6
+ import { M as ModelKind, F as FieldOptions, D as DynamoType, R as RelationOptions, A as AggregateOptions, a as AggregateValue } from './types-nk5okD7d.js';
7
+ export { a0 as LiteralParam, a1 as MapParam, a2 as NumberParam, a3 as Param, a4 as ParamKind, a5 as StringParam, a6 as param } from './types-CgXS-4Ox.js';
8
8
  import 'behavior-contracts';
9
9
 
10
10
  /**
package/dist/index.js CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  mutate,
4
4
  publishCommand,
5
5
  publishQuery
6
- } from "./chunk-XZTA4VJH.js";
6
+ } from "./chunk-HLFNCKFV.js";
7
7
  import {
8
8
  entityWrites,
9
9
  getEntityWrites,
10
10
  identity,
11
11
  preview
12
- } from "./chunk-KOIJ4SNO.js";
12
+ } from "./chunk-7OCXY4R6.js";
13
13
  import {
14
14
  when
15
15
  } from "./chunk-WOFRHRXY.js";
@@ -22,7 +22,7 @@ import {
22
22
  deriveContractEffect,
23
23
  gsi,
24
24
  param
25
- } from "./chunk-ZNU7OI5I.js";
25
+ } from "./chunk-GWWRXIHF.js";
26
26
  import {
27
27
  TableMapping,
28
28
  k,
@@ -1,8 +1,8 @@
1
- import { P as PreparedWriteOpSpec, a as PreparedPlanDocument } from '../prepared-artifact-BXkARxwO.js';
2
- export { b as PreparedBindSpec, c as PreparedPlanSpec, d as PreparedReadRouteSpec } from '../prepared-artifact-BXkARxwO.js';
3
- import { M as Manifest } from '../types-CfxzTEFL.js';
4
- import { M as ModelStatic, D as DDBModel, S as Slot, P as PreparedWriteExecOptions, C as CommandReturn, a as ParallelOpResult, b as PreparedBody, c as PreparedStatement } from '../key-Dne-a20Q.js';
5
- import '../types-BnFsTZwl.js';
1
+ import { P as PreparedWriteOpSpec, a as PreparedPlanDocument } from '../prepared-artifact-CwH5ezFq.js';
2
+ export { b as PreparedBindSpec, c as PreparedPlanSpec, d as PreparedReadRouteSpec } from '../prepared-artifact-CwH5ezFq.js';
3
+ import { M as Manifest } from '../types-CgXS-4Ox.js';
4
+ import { M as ModelStatic, D as DDBModel, S as Slot, P as PreparedWriteExecOptions, C as CommandReturn, a as ParallelOpResult, b as PreparedBody, c as PreparedStatement } from '../key-CWytoEaE.js';
5
+ import '../types-nk5okD7d.js';
6
6
  import 'behavior-contracts';
7
7
 
8
8
  /**
@@ -2,15 +2,15 @@ import {
2
2
  PREPARED_FORMAT_VERSION,
3
3
  buildManifestEntity,
4
4
  entityFingerprint
5
- } from "../chunk-NWTEUWJD.js";
5
+ } from "../chunk-PHXUFAY2.js";
6
6
  import {
7
7
  LOGICAL_EFFECT_CATEGORIES,
8
8
  PreparedReadStatement,
9
9
  executeLogicalParallelWrites,
10
10
  executeLogicalWriteOps,
11
11
  serializeEffectParams
12
- } from "../chunk-XZTA4VJH.js";
13
- import "../chunk-KOIJ4SNO.js";
12
+ } from "../chunk-HLFNCKFV.js";
13
+ import "../chunk-7OCXY4R6.js";
14
14
  import {
15
15
  MARKER_ROW_ENTITY,
16
16
  SPEC_VERSION_KEY_EXPR,
@@ -21,7 +21,7 @@ import {
21
21
  buildConditionExpression,
22
22
  execItemKeySignature,
23
23
  resolveConditionTree
24
- } from "../chunk-ZNU7OI5I.js";
24
+ } from "../chunk-GWWRXIHF.js";
25
25
  import {
26
26
  TableMapping
27
27
  } from "../chunk-XTWXMOHD.js";
@@ -1,4 +1,4 @@
1
- import { a3 as Param, E as ExpressionSpec, a4 as ParamKind, T as TransactionSpec, Y as TransactionItemSpec } from './types-CfxzTEFL.js';
1
+ import { a3 as Param, E as ExpressionSpec, a4 as ParamKind, T as TransactionSpec, Y as TransactionItemSpec } from './types-CgXS-4Ox.js';
2
2
 
3
3
  /**
4
4
  * CDC emulator types (issue #72). These types are **cdc-module-owned**; core
@@ -1653,6 +1653,13 @@ interface OperationDefinition<T extends DDBModel, Op extends OperationKind, K, S
1653
1653
  readonly select: S;
1654
1654
  /** The parameterized changes for `update`; `undefined` otherwise. */
1655
1655
  readonly changes: Ch;
1656
+ /**
1657
+ * The parameterized atomic-`ADD` record for a standalone `update` (issue #301):
1658
+ * field name → a `param.number()` caller-delta leaf. Distinct from {@link changes}
1659
+ * (a SET) — each entry serializes to `CommandSpec.add` (`ADD #field :delta`).
1660
+ * `undefined` unless the command declared `add`.
1661
+ */
1662
+ readonly add?: Readonly<Record<string, unknown>>;
1656
1663
  /**
1657
1664
  * The declarative write condition for `put` / `update` / `delete`; `undefined`
1658
1665
  * when no condition is attached or for reads (issue #46).
@@ -2512,6 +2519,16 @@ interface MutationFragment {
2512
2519
  readonly intent: MutationIntent;
2513
2520
  readonly entity: EntityRef;
2514
2521
  readonly input: FragmentInput;
2522
+ /**
2523
+ * Atomic-**`ADD`** field binding on the self row (issue #301): model field name →
2524
+ * a {@link MutationInputRef} (`$.field`, a `param.number()` caller delta). Distinct
2525
+ * from {@link input} (a `SET`): the compiler ({@link
2526
+ * import('../spec/mutation-command.js').compileFragment}) lowers each leaf onto the
2527
+ * command spec's `add` record (an `ADD #field :delta`), so the runtime issues an
2528
+ * atomic increment (no read, concurrency-safe). Absent when the fragment declares no
2529
+ * `add`. Present only on an `update` fragment.
2530
+ */
2531
+ readonly add?: FragmentInput;
2515
2532
  readonly use?: EntityWritesDefinition;
2516
2533
  /**
2517
2534
  * The declarative write **condition** (gate) authored on the descriptor (issue
@@ -2581,6 +2598,16 @@ interface WriteDescriptor {
2581
2598
  readonly key: DescriptorBinding;
2582
2599
  /** The non-key field binding; optional (a `remove` writes no fields). */
2583
2600
  readonly input?: DescriptorBinding;
2601
+ /**
2602
+ * Optional atomic-**`ADD`** binding on the self row (issue #301) — `{ field: $.field }`
2603
+ * whose leaves are `$.field` input refs bound from `param.number()` caller deltas.
2604
+ * Distinct from `input` (a `SET`): an `add` field lowers to a `TransactionValueLeaf`
2605
+ * on the compiled command spec's `add` record (an `ADD #field :delta`), NOT to a
2606
+ * `changes` SET. Legal only on an `update` fragment. When present alongside a
2607
+ * `condition`, the runtime applies the ADD unconditionally (two-stage: ADD+SET under
2608
+ * the condition, fallback ADD-only on ConditionalCheckFailed).
2609
+ */
2610
+ readonly add?: DescriptorBinding;
2584
2611
  /**
2585
2612
  * Optional declarative write gate — the #114-A condition subset (issue #242,
2586
2613
  * Phase 2). Compiled, serialized, and evaluated at runtime; see the interface doc.
@@ -3038,6 +3065,13 @@ interface ContractMethodOp<Op extends OperationKind = OperationKind> {
3038
3065
  readonly select?: Readonly<Record<string, unknown>>;
3039
3066
  /** The changes structure for `update`; `undefined` otherwise. */
3040
3067
  readonly changes?: Readonly<Record<string, unknown>>;
3068
+ /**
3069
+ * The atomic-`ADD` structure for `update` (issue #301): model field name → a
3070
+ * `param.number()` caller-delta leaf (a `{token}` template). Distinct from
3071
+ * {@link changes} (a SET): each entry lowers to `ADD #field :delta`. Present only on
3072
+ * a standalone `update` command that declared `add`; `undefined` otherwise.
3073
+ */
3074
+ readonly add?: Readonly<Record<string, unknown>>;
3041
3075
  /** The item structure for `put`; `undefined` otherwise. */
3042
3076
  readonly item?: Readonly<Record<string, unknown>>;
3043
3077
  /** The optional declarative write condition for writes. */
@@ -3679,6 +3713,25 @@ interface PublicWriteDescriptor {
3679
3713
  readonly upsert?: ModelRef;
3680
3714
  readonly key: Readonly<Record<string, unknown>>;
3681
3715
  readonly input?: Readonly<Record<string, unknown>>;
3716
+ /**
3717
+ * Atomic **`ADD`** deltas on the SELF row (issue #301) — `{ field: param.number() }`
3718
+ * declaring an `ADD #field :delta` with a **caller-param** delta. Distinct from
3719
+ * `input` (a `SET` that overwrites): `add` is an atomic server-side increment that
3720
+ * needs no prior read and is concurrency-safe (the aggregate-tree `mark`'s
3721
+ * `version++`). Legal only on an `update` intent, with each value a
3722
+ * `param.number()`. An `add` field may NOT also appear in `input` (a field is either
3723
+ * SET or ADD, not both) nor be a primary-key field (a key cannot be incremented).
3724
+ *
3725
+ * **Two-stage semantics**: when an `update` carries BOTH `add` and a `condition`, the
3726
+ * `add` is UNCONDITIONAL (it must always apply — the mark's `version++` must always
3727
+ * happen) while `input` (SET) is gated by `condition`. Because DynamoDB rejects the
3728
+ * ENTIRE `UpdateItem` when the `ConditionExpression` fails, the RUNTIME performs a
3729
+ * transparent two-stage: `ADD + SET` under the condition (1 write, the common path);
3730
+ * on `ConditionalCheckFailedException`, a fallback `ADD`-only write (no SET, no
3731
+ * condition — the `version` still increments). read=0, retry=0. The author does NOT
3732
+ * write the fallback — it is derived from `add` + `condition` presence.
3733
+ */
3734
+ readonly add?: Readonly<Record<string, unknown>>;
3682
3735
  readonly condition?: Readonly<Record<string, unknown>> | RawCondition<any, any>;
3683
3736
  readonly result?: {
3684
3737
  readonly select?: Readonly<Record<string, boolean>>;
@@ -1,8 +1,8 @@
1
- import { L as Linter, a as LintRule } from '../linter-Cr1Hnw7n.js';
2
- export { b as LintResult } from '../linter-Cr1Hnw7n.js';
3
- import '../types-BnFsTZwl.js';
4
- import '../key-Dne-a20Q.js';
5
- import '../types-CfxzTEFL.js';
1
+ import { L as Linter, a as LintRule } from '../linter-jEwmZotm.js';
2
+ export { b as LintResult } from '../linter-jEwmZotm.js';
3
+ import '../types-nk5okD7d.js';
4
+ import '../key-CWytoEaE.js';
5
+ import '../types-CgXS-4Ox.js';
6
6
  import 'behavior-contracts';
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { E as EntityMetadata } from './types-BnFsTZwl.js';
1
+ import { E as EntityMetadata } from './types-nk5okD7d.js';
2
2
 
3
3
  declare class MetadataRegistry {
4
4
  private static store;
@@ -1,6 +1,6 @@
1
- import { E as EntityMetadata } from './types-BnFsTZwl.js';
2
- import { C as ContractSpec, Q as QuerySpec, a as CommandSpec, T as TransactionSpec, b as ContextSpec, S as SPEC_VERSION_KEY_EXPR, P as ParamSpec } from './types-CfxzTEFL.js';
3
- import { Q as QueryModelContract, k as QueryMethodSpec, l as CommandModelContract, m as CommandMethodSpec } from './key-Dne-a20Q.js';
1
+ import { E as EntityMetadata } from './types-nk5okD7d.js';
2
+ import { C as ContractSpec, Q as QuerySpec, a as CommandSpec, T as TransactionSpec, b as ContextSpec, S as SPEC_VERSION_KEY_EXPR, P as ParamSpec } from './types-CgXS-4Ox.js';
3
+ import { Q as QueryModelContract, k as QueryMethodSpec, l as CommandModelContract, m as CommandMethodSpec } from './key-CWytoEaE.js';
4
4
 
5
5
  /**
6
6
  * Contract-layer serialization (issue #59, CQRS Contract layer, Epic #57;
@@ -1,14 +1,14 @@
1
- import { $ as AnyOperationDefinition, a0 as TransactionDefinition, b as PreparedBody } from '../key-Dne-a20Q.js';
2
- export { a1 as CompiledFragment, a2 as CompiledMutationPlan, a3 as DerivedConditionCheck, a4 as DerivedEdgeWrite, a5 as DerivedIdempotencyGuard, a6 as DerivedMaintainOutbox, a7 as DerivedMaintainWrite, a8 as DerivedOutboxEvent, a9 as DerivedUniqueGuard, aa as DerivedUpdate, ab as EntityRefResolver, ac as MAX_TRANSACT_COMPOSE_ITEMS, ad as assertNoCrossFragmentMaintainCollision, ae as compileFragment, af as compileMutationPlan, ag as compileSingleFragmentPlan, ah as resetMaintenanceGraphCache, ai as resolveLifecycle, aj as resolveMaintainers } from '../key-Dne-a20Q.js';
3
- import { M as MetadataRegistry } from '../linter-Cr1Hnw7n.js';
1
+ import { $ as AnyOperationDefinition, a0 as TransactionDefinition, b as PreparedBody } from '../key-CWytoEaE.js';
2
+ export { a1 as CompiledFragment, a2 as CompiledMutationPlan, a3 as DerivedConditionCheck, a4 as DerivedEdgeWrite, a5 as DerivedIdempotencyGuard, a6 as DerivedMaintainOutbox, a7 as DerivedMaintainWrite, a8 as DerivedOutboxEvent, a9 as DerivedUniqueGuard, aa as DerivedUpdate, ab as EntityRefResolver, ac as MAX_TRANSACT_COMPOSE_ITEMS, ad as assertNoCrossFragmentMaintainCollision, ae as compileFragment, af as compileMutationPlan, ag as compileSingleFragmentPlan, ah as resetMaintenanceGraphCache, ai as resolveLifecycle, aj as resolveMaintainers } from '../key-CWytoEaE.js';
3
+ import { M as MetadataRegistry } from '../linter-jEwmZotm.js';
4
4
  import { B as BehaviorModelContract } from '../behaviors-DDltNivc.js';
5
5
  export { a as BehaviorMethodSpec } from '../behaviors-DDltNivc.js';
6
- import { C as ContractMap, e as ContextOwnershipMap, c as PreparedPlanSpec, a as PreparedPlanDocument } from '../prepared-artifact-BXkARxwO.js';
7
- export { A as AnyModelContract, B as BuiltContracts, f as ContextOwnership, g as PREPARED_FORMAT_VERSION, h as PreparedBindMap, b as PreparedBindSpec, d as PreparedReadRouteSpec, P as PreparedWriteOpSpec, i as buildContexts, j as buildContracts, k as canonicalJson, l as entityFingerprint, p as planFingerprint } from '../prepared-artifact-BXkARxwO.js';
8
- import { O as OperationsDocument, Q as QuerySpec, M as Manifest, T as TransactionSpec, C as ContractSpec, B as BridgeBundle, c as ConditionSpec, E as ExpressionSpec, a as CommandSpec, d as SpecVersion } from '../types-CfxzTEFL.js';
9
- export { e as CommandContractMethodSpec, f as CommandResolutionTarget, g as ComposeSpec, h as CompositionPlanSpec, b as ContextSpec, i as ContractCardinality, j as ContractCommandResult, k as ContractInputArity, l as ContractKeySpec, m as ContractKind, n as ContractResolution, o as EXPR_VERSION, p as ExecutionPlanSpec, q as ExpressionArrNode, r as ExpressionFloatNode, s as ExpressionIntNode, t as ExpressionNode, u as ExpressionObjNode, v as ExpressionOpNode, w as ExpressionOperator, x as ExpressionRefNode, y as ExpressionRefOptNode, z as ExpressionScalar, F as FilterSpec, A as ManifestEntity, D as ManifestField, G as ManifestFieldType, H as ManifestGsi, I as ManifestKey, J as ManifestRelation, K as ManifestTable, L as OperationSpec, P as ParamSpec, N as QueryContractMethodSpec, R as RangeConditionSpec, U as ReadOperationType, V as SPEC_VERSION, S as SPEC_VERSION_KEY_EXPR, W as SPEC_VERSION_SCP, X as SPEC_VERSION_SUPPORTED, Y as TransactionItemSpec, Z as TransactionItemType, _ as WhenSpec, $ as WriteOperationType } from '../types-CfxzTEFL.js';
6
+ import { C as ContractMap, e as ContextOwnershipMap, c as PreparedPlanSpec, a as PreparedPlanDocument } from '../prepared-artifact-CwH5ezFq.js';
7
+ export { A as AnyModelContract, B as BuiltContracts, f as ContextOwnership, g as PREPARED_FORMAT_VERSION, h as PreparedBindMap, b as PreparedBindSpec, d as PreparedReadRouteSpec, P as PreparedWriteOpSpec, i as buildContexts, j as buildContracts, k as canonicalJson, l as entityFingerprint, p as planFingerprint } from '../prepared-artifact-CwH5ezFq.js';
8
+ import { O as OperationsDocument, Q as QuerySpec, M as Manifest, T as TransactionSpec, C as ContractSpec, B as BridgeBundle, c as ConditionSpec, E as ExpressionSpec, a as CommandSpec, d as SpecVersion } from '../types-CgXS-4Ox.js';
9
+ export { e as CommandContractMethodSpec, f as CommandResolutionTarget, g as ComposeSpec, h as CompositionPlanSpec, b as ContextSpec, i as ContractCardinality, j as ContractCommandResult, k as ContractInputArity, l as ContractKeySpec, m as ContractKind, n as ContractResolution, o as EXPR_VERSION, p as ExecutionPlanSpec, q as ExpressionArrNode, r as ExpressionFloatNode, s as ExpressionIntNode, t as ExpressionNode, u as ExpressionObjNode, v as ExpressionOpNode, w as ExpressionOperator, x as ExpressionRefNode, y as ExpressionRefOptNode, z as ExpressionScalar, F as FilterSpec, A as ManifestEntity, D as ManifestField, G as ManifestFieldType, H as ManifestGsi, I as ManifestKey, J as ManifestRelation, K as ManifestTable, L as OperationSpec, P as ParamSpec, N as QueryContractMethodSpec, R as RangeConditionSpec, U as ReadOperationType, V as SPEC_VERSION, S as SPEC_VERSION_KEY_EXPR, W as SPEC_VERSION_SCP, X as SPEC_VERSION_SUPPORTED, Y as TransactionItemSpec, Z as TransactionItemType, _ as WhenSpec, $ as WriteOperationType } from '../types-CgXS-4Ox.js';
10
10
  import { Component, ComponentGraphIR } from 'behavior-contracts';
11
- import '../types-BnFsTZwl.js';
11
+ import '../types-nk5okD7d.js';
12
12
 
13
13
  /**
14
14
  * Static parameterized operation-spec generation (issue #42, Phase 0b).
@@ -14,14 +14,14 @@ import {
14
14
  collectContractN1Violations,
15
15
  compilePreparedPlan,
16
16
  portableIrDocument
17
- } from "../chunk-SSVG6NQK.js";
17
+ } from "../chunk-MBJ4JVRM.js";
18
18
  import {
19
19
  PREPARED_FORMAT_VERSION,
20
20
  buildManifest,
21
21
  canonicalJson,
22
22
  entityFingerprint,
23
23
  planFingerprint
24
- } from "../chunk-NWTEUWJD.js";
24
+ } from "../chunk-PHXUFAY2.js";
25
25
  import {
26
26
  MAX_TRANSACT_COMPOSE_ITEMS,
27
27
  assertBundleSerializable,
@@ -36,8 +36,8 @@ import {
36
36
  resetMaintenanceGraphCache,
37
37
  resolveLifecycle,
38
38
  resolveMaintainers
39
- } from "../chunk-XZTA4VJH.js";
40
- import "../chunk-KOIJ4SNO.js";
39
+ } from "../chunk-HLFNCKFV.js";
40
+ import "../chunk-7OCXY4R6.js";
41
41
  import {
42
42
  EXPR_VERSION,
43
43
  SPEC_VERSION,
@@ -47,7 +47,7 @@ import {
47
47
  canonicalizeExpressionSpec,
48
48
  operationsSpecVersion
49
49
  } from "../chunk-WOFRHRXY.js";
50
- import "../chunk-ZNU7OI5I.js";
50
+ import "../chunk-GWWRXIHF.js";
51
51
  import "../chunk-XTWXMOHD.js";
52
52
  export {
53
53
  EXPR_VERSION,
@@ -1,5 +1,5 @@
1
- import { n as Executor, o as DynamoDBOperation, R as ReadExecOptions, p as ExecutorResult, B as BatchGetExecInput, q as PutInput, W as WriteExecOptions, r as WriteResult, U as UpdateInput, s as DeleteInput, t as BatchWriteExecItem, u as BatchExecOptions, T as TransactWriteExecItem, M as ModelStatic, D as DDBModel, v as ChangeEvent } from '../key-Dne-a20Q.js';
2
- import '../types-CfxzTEFL.js';
1
+ import { n as Executor, o as DynamoDBOperation, R as ReadExecOptions, p as ExecutorResult, B as BatchGetExecInput, q as PutInput, W as WriteExecOptions, r as WriteResult, U as UpdateInput, s as DeleteInput, t as BatchWriteExecItem, u as BatchExecOptions, T as TransactWriteExecItem, M as ModelStatic, D as DDBModel, v as ChangeEvent } from '../key-CWytoEaE.js';
2
+ import '../types-CgXS-4Ox.js';
3
3
  import 'behavior-contracts';
4
4
 
5
5
  /**
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createCdcEmulator
3
- } from "../chunk-YGQ2NO6J.js";
4
- import "../chunk-KOIJ4SNO.js";
3
+ } from "../chunk-VECUS35D.js";
4
+ import "../chunk-7OCXY4R6.js";
5
5
  import {
6
6
  ClientManager,
7
7
  MetadataRegistry,
8
8
  resolveModelClass
9
- } from "../chunk-ZNU7OI5I.js";
9
+ } from "../chunk-GWWRXIHF.js";
10
10
  import {
11
11
  TableMapping
12
12
  } from "../chunk-XTWXMOHD.js";
@@ -470,8 +470,9 @@ function removePath(target, segments) {
470
470
  delete cursor[segments[segments.length - 1]];
471
471
  }
472
472
  function applyUpdateExpression(item, expression, clauses) {
473
- const setMatch = /SET\s+(.*?)(?:\s+REMOVE\s+|$)/.exec(expression);
474
- const removeMatch = /REMOVE\s+(.*)$/.exec(expression);
473
+ const setMatch = /SET\s+(.*?)(?:\s+REMOVE\s+|\s+ADD\s+|$)/.exec(expression);
474
+ const removeMatch = /REMOVE\s+(.*?)(?:\s+ADD\s+|$)/.exec(expression);
475
+ const addMatch = /ADD\s+(.*)$/.exec(expression);
475
476
  if (setMatch && setMatch[1].trim().length > 0) {
476
477
  const assignments = splitTopLevel(setMatch[1]);
477
478
  for (const assignment of assignments) {
@@ -496,6 +497,32 @@ function applyUpdateExpression(item, expression, clauses) {
496
497
  removePath(item, resolvePath(trimmed, clauses.names));
497
498
  }
498
499
  }
500
+ if (addMatch && addMatch[1].trim().length > 0) {
501
+ const clausesList = splitTopLevel(addMatch[1]);
502
+ for (const clause of clausesList) {
503
+ const trimmed = clause.trim();
504
+ if (trimmed.length === 0) continue;
505
+ const sp = trimmed.indexOf(" ");
506
+ if (sp < 0) {
507
+ throw new Error(`memory update: malformed ADD clause '${trimmed}'`);
508
+ }
509
+ const pathExpr = trimmed.slice(0, sp).trim();
510
+ const valueAlias = trimmed.slice(sp + 1).trim();
511
+ if (!(valueAlias in clauses.values)) {
512
+ throw new Error(`memory update: unbound value alias '${valueAlias}'`);
513
+ }
514
+ const delta = clauses.values[valueAlias];
515
+ if (typeof delta !== "number") {
516
+ throw new Error(
517
+ `memory update: ADD delta for '${pathExpr}' is not numeric (${typeof delta})`
518
+ );
519
+ }
520
+ const segments = resolvePath(pathExpr, clauses.names);
521
+ const current = segments.length === 1 ? item[segments[0]] : void 0;
522
+ const base = typeof current === "number" ? current : 0;
523
+ setPath(item, segments, base + delta);
524
+ }
525
+ }
499
526
  }
500
527
  function splitTopLevel(clause) {
501
528
  const parts = [];
@@ -1,5 +1,5 @@
1
1
  import ts from 'typescript';
2
- import { E as ExpressionSpec } from '../types-CfxzTEFL.js';
2
+ import { E as ExpressionSpec } from '../types-CgXS-4Ox.js';
3
3
  import 'behavior-contracts';
4
4
 
5
5
  /**
@@ -3,7 +3,7 @@ import {
3
3
  SCP_LOWERED_MARKER,
4
4
  canonicalizeExpressionSpec
5
5
  } from "../chunk-WOFRHRXY.js";
6
- import "../chunk-ZNU7OI5I.js";
6
+ import "../chunk-GWWRXIHF.js";
7
7
  import "../chunk-XTWXMOHD.js";
8
8
 
9
9
  // src/transform/prepared-transform.ts
@@ -721,7 +721,9 @@ type WriteOperationType = 'PutItem' | 'UpdateItem' | 'DeleteItem';
721
721
  * - `{ kind: 'attributeNotExists'; field }` → `attribute_not_exists(<field>)` — the
722
722
  * named attribute must be absent (field-level uniqueness / first-write guard).
723
723
  * - `{ kind: 'equals'; fields }` → `#f = :v AND …` field equality (each value a
724
- * `{param}` / literal template).
724
+ * `{param}` string template or a typed literal — a `number` / `boolean` literal
725
+ * is carried verbatim so it compares as `N` / `BOOL`, not a stringified `S`,
726
+ * issue #299).
725
727
  * - `{ kind: 'expr'; declarative }` → the full declarative operator tree (issue
726
728
  * #114-A): comparison (`gt`/`ge`/`lt`/`le`/`ne`), `between`, `in`,
727
729
  * `begins_with`/`contains`/`notContains`, `attributeType`, and the logical
@@ -743,7 +745,7 @@ type ConditionSpec = {
743
745
  readonly field: string;
744
746
  } | {
745
747
  readonly kind: 'equals';
746
- readonly fields: Readonly<Record<string, string>>;
748
+ readonly fields: Readonly<Record<string, TransactionValueLeaf>>;
747
749
  } | {
748
750
  readonly kind: 'expr';
749
751
  readonly declarative: unknown;
@@ -792,10 +794,33 @@ interface CommandSpec {
792
794
  * Absent for `PutItem` (the whole item is built from `item`).
793
795
  */
794
796
  readonly keyCondition?: Readonly<Record<string, string>>;
795
- /** The full item template for `PutItem` (field name → template / literal). */
796
- readonly item?: Readonly<Record<string, string>>;
797
- /** Field-level changes for `UpdateItem` (field name template / literal). */
798
- readonly changes?: Readonly<Record<string, string>>;
797
+ /**
798
+ * The full item template for `PutItem` (field name → template / typed literal).
799
+ * A string value is a template ({@link TransactionValueLeaf}); a `number` /
800
+ * `boolean` is a typed literal carried verbatim so it lands as `N` / `BOOL`
801
+ * rather than a stringified `S` (issue #299, mirroring the transaction #245).
802
+ */
803
+ readonly item?: Readonly<Record<string, TransactionValueLeaf>>;
804
+ /**
805
+ * Field-level changes for `UpdateItem` (field name → template / typed literal).
806
+ * A string value is a template; a `number` / `boolean` is a typed literal
807
+ * carried verbatim (issue #299).
808
+ */
809
+ readonly changes?: Readonly<Record<string, TransactionValueLeaf>>;
810
+ /**
811
+ * Atomic-`ADD` deltas for a standalone `UpdateItem` (issue #301): field name →
812
+ * template / typed literal. Distinct from {@link changes} (a SET): each entry emits
813
+ * `ADD #field :delta` — an atomic, read-free, concurrency-safe increment (the
814
+ * aggregate-tree `mark`'s `version++`). The delta rides as a `{token}` template
815
+ * resolved from a caller `param.number()`. When present together with
816
+ * {@link condition}, the ADD is UNCONDITIONAL and the runtime executes a transparent
817
+ * TWO-STAGE write: `ADD + SET` under the condition (1 write); on
818
+ * `ConditionalCheckFailedException`, a fallback `ADD`-only write (no SET, no
819
+ * condition — the counter still increments). read=0, retry=0. Absent unless the
820
+ * command declared `add`, so a command with no `add` serializes byte-identically to
821
+ * the pre-#301 spec.
822
+ */
823
+ readonly add?: Readonly<Record<string, TransactionValueLeaf>>;
799
824
  /** Optional write condition (subset). */
800
825
  readonly condition?: ConditionSpec;
801
826
  /**
@@ -1023,8 +1048,12 @@ interface MaintainItemSpec {
1023
1048
  interface MaintainCounterSpec {
1024
1049
  /** The target attribute the counter increments (e.g. `postCount`). */
1025
1050
  readonly attribute: string;
1026
- /** The signed `ADD` delta as a numeric template string (`"1"` / `"-1"`). */
1027
- readonly delta: string;
1051
+ /**
1052
+ * The signed `ADD` delta. A compile-time constant delta is carried as a typed
1053
+ * `number` (`1` / `-1`) so it marshals as `N` (issue #299); a `{param}` numeric
1054
+ * template rides as a string. (Pre-#299 a constant was stringified to `"1"`.)
1055
+ */
1056
+ readonly delta: TransactionValueLeaf;
1028
1057
  }
1029
1058
  /** A declarative transaction definition's full execution spec. */
1030
1059
  interface TransactionSpec {
@@ -1,4 +1,4 @@
1
- import { d as SegmentedKey, e as ProjectionTransform, f as MaintainEvent, g as ProjectionMap, h as MaintainConsistency, i as MaintainUpdateMode, E as EffectPath, j as MembershipPredicate } from './key-Dne-a20Q.js';
1
+ import { d as SegmentedKey, e as ProjectionTransform, f as MaintainEvent, g as ProjectionMap, h as MaintainConsistency, i as MaintainUpdateMode, E as EffectPath, j as MembershipPredicate } from './key-CWytoEaE.js';
2
2
 
3
3
  type DynamoType = 'S' | 'N' | 'BOOL' | 'B' | 'SS' | 'NS' | 'L' | 'M';
4
4
  interface FieldOptions {
@@ -0,0 +1,14 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 988 555.6" width="988" height="555.6" font-family="Helvetica Neue, Arial, Hiragino Sans, sans-serif">
2
+ <defs>
3
+ <marker id="marker-filledArrow-33415c" markerWidth="7" markerHeight="7" refX="7" refY="3.5" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#33415c"/></marker>
4
+ <marker id="marker-filledArrow-6b46c1" markerWidth="7" markerHeight="7" refX="7" refY="3.5" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#6b46c1"/></marker>
5
+ </defs>
6
+ <rect x="0" y="0" width="988" height="555.6" fill="#ffffff"/>
7
+ <g id="vstack_1"><g id="hstack_1"><g id="box_1"><rect x="18" y="62.099999999999994" width="160" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="def"><rect x="178" y="18" width="264" height="89.19999999999999" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_2"><g id="text_1"><text x="310" y="46.75" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="310" dy="0">Contract / behavior authoring</tspan></text></g><g id="text_2"><text x="310" y="69.075" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="310" dy="0">publishQuery / publishCommand /</tspan></text></g><g id="text_3"><text x="310" y="90.175" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="310" dy="0">publishBehaviors</tspan></text></g></g></g><g id="box_2"><rect x="442" y="62.099999999999994" width="120" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="plan"><rect x="562" y="18" width="248" height="89.19999999999999" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_3"><g id="text_4"><text x="686" y="46.75" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="686" dy="0">Static planner</tspan></text></g><g id="text_5"><text x="685.9999999999999" y="69.075" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="685.9999999999999" dy="0">symbolic key evaluation /</tspan></text></g><g id="text_6"><text x="686" y="90.175" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="686" dy="0">bridge guard (rejects non-declarative)</tspan></text></g></g></g></g><g id="hstack_2"><g id="box_3"><rect x="18" y="195.29999999999998" width="340" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="ir"><rect x="358" y="151.2" width="272" height="89.19999999999999" rx="10" fill="#eef3fc" stroke="#2b4bab" stroke-width="1.5"/><g id="vstack_4"><g id="text_7"><text x="494" y="179.95" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="494" dy="0">Portable IR (bridge bundle)</tspan></text></g><g id="text_8"><text x="494" y="202.27499999999998" text-anchor="middle" fill="#444444" font-size="11.5"><tspan x="494" dy="0">manifest.json + operations.json</tspan></text></g><g id="text_9"><text x="494" y="223.37499999999997" text-anchor="middle" fill="#444444" font-size="11.5"><tspan x="494" dy="0">components[] graph</tspan></text></g></g></g></g><g id="hstack_3"><g id="p1"><rect x="18" y="296.4" width="294" height="168" rx="10" fill="white" stroke="#2f855a" stroke-width="1.5"/><g id="vstack_5"><g id="hstack_4"><g id="box_4"><rect x="30" y="329.87" width="108.79999999999997" height="22.7" rx="11.35" fill="#2f855a" stroke="#e5e7eb" stroke-width="0"/><g id="text_10"><text x="84.39999999999998" y="344.895" text-anchor="middle" fill="white" font-size="10.5" font-weight="bold"><tspan x="84.39999999999998" dy="0">Path 1 — default</tspan></text></g></g><g id="text_11"><text x="146.79999999999995" y="345.77" text-anchor="start" fill="#22543d" font-size="13" font-weight="bold"><tspan x="146.79999999999995" dy="0">Dynamic JSON</tspan></text></g></g><g id="text_12"><text x="30" y="374.90999999999997" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="30" dy="0">Loads components[] at runtime;</tspan></text></g><g id="text_13"><text x="30" y="401.03" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="30" dy="0">the shared run_behavior interprets it.</tspan></text></g><g id="text_14"><text x="30" y="427.15" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="30" dy="0">Swap behavior without a deploy.</tspan></text></g></g></g><g id="box_5"><rect x="312" y="296.4" width="35" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="p2"><rect x="347" y="296.4" width="294" height="168" rx="10" fill="white" stroke="#2b6cb0" stroke-width="1.5"/><g id="vstack_6"><g id="hstack_5"><g id="box_6"><rect x="359" y="316.80999999999995" width="102.49999999999997" height="22.7" rx="11.35" fill="#2b6cb0" stroke="#e5e7eb" stroke-width="0"/><g id="text_15"><text x="410.25" y="331.8349999999999" text-anchor="middle" fill="white" font-size="10.5" font-weight="bold"><tspan x="410.25" dy="0">Path 2 — opt-in</tspan></text></g></g><g id="text_16"><text x="469.5" y="332.7099999999999" text-anchor="start" fill="#1d3a8f" font-size="13" font-weight="bold"><tspan x="469.5" dy="0">codegen-static</tspan></text></g></g><g id="text_17"><text x="359" y="361.8499999999999" text-anchor="start" fill="#1d3a8f" font-size="10.8" font-weight="medium"><tspan x="359" dy="0">generate behaviors</tspan></text></g><g id="text_18"><text x="359" y="387.9699999999999" text-anchor="start" fill="#1d3a8f" font-size="10.8" font-weight="medium"><tspan x="359" dy="0">--lang &lt;ts|python|go|rust|php&gt;</tspan></text></g><g id="text_19"><text x="359" y="414.0899999999999" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="359" dy="0">Bakes the IR in as native literals.</tspan></text></g><g id="text_20"><text x="359" y="440.2099999999999" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="359" dy="0">Fingerprint check loud-rejects stale.</tspan></text></g></g></g><g id="box_7"><rect x="641" y="296.4" width="35" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="p3"><rect x="676" y="296.4" width="294" height="168" rx="10" fill="white" stroke="#6b46c1" stroke-width="1.5"/><g id="vstack_7"><g id="hstack_6"><g id="box_8"><rect x="688" y="329.87" width="77.29999999999998" height="22.7" rx="11.35" fill="#6b46c1" stroke="#e5e7eb" stroke-width="0"/><g id="text_21"><text x="726.65" y="344.895" text-anchor="middle" fill="white" font-size="10.5" font-weight="bold"><tspan x="726.65" dy="0">consumer UX</tspan></text></g></g><g id="text_22"><text x="773.3" y="345.77" text-anchor="start" fill="#44337a" font-size="13" font-weight="bold"><tspan x="773.3" dy="0">Typed bindings</tspan></text></g></g><g id="text_23"><text x="688" y="374.90999999999997" text-anchor="start" fill="#44337a" font-size="10.8" font-weight="medium"><tspan x="688" dy="0">generate python|php|rust|go</tspan></text></g><g id="text_24"><text x="688" y="401.03" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="688" dy="0">Generates typed repositories / DTOs.</tspan></text></g><g id="text_25"><text x="688" y="427.15" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="688" dy="0">Not an engine — delegates to path 1 / 2.</tspan></text></g></g></g></g><g id="note"><rect x="18" y="486.4" width="952" height="51.199999999999996" rx="8" fill="#fbfcfe" stroke="#5886cd" stroke-width="1.2" stroke-dasharray="6 4"/><g id="vstack_8"><g id="text_26"><text x="32" y="506.47499999999997" text-anchor="start" fill="#33415c" font-size="11.5"><tspan x="32" dy="0">The 2 execution paths + 1 consumer surface coexist permanently (#257).</tspan></text></g><g id="text_27"><text x="32" y="525.575" text-anchor="start" fill="#33415c" font-size="11.5"><tspan x="32" dy="0">All 5 languages (TS / Python / Rust / Go / PHP) execute the same IR, and conformance pins the results byte-identical.</tspan></text></g></g></g></g>
8
+ <g id="connector_1"><path d="M 442 62.599999999999994 C 481.6 62.599999999999994, 522.4 62.599999999999994, 562 62.599999999999994" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
9
+ <g id="connector_2"><path d="M 686 107.19999999999999 C 686 154.873020294502, 548.4 103.52697970549798, 548.4 151.2" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
10
+ <g id="connector_3"><path d="M 398.8 240.39999999999998 C 398.8 319.7363101990507, 165 217.06368980094925, 165 296.4" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
11
+ <g id="connector_4"><path d="M 494 240.39999999999998 C 494 258.88, 494 277.91999999999996, 494 296.4" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
12
+ <g id="connector_5"><path d="M 589.2 240.39999999999998 C 589.2 319.7363101990507, 823 217.06368980094925, 823 296.4" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
13
+ <g id="connector_6"><path d="M 676 380.4 C 664.45 380.4, 652.55 380.4, 641 380.4" fill="none" stroke="#6b46c1" stroke-width="1.6" stroke-dasharray="6 4" marker-end="url(#marker-filledArrow-6b46c1)"/></g>
14
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 988 536.5" width="988" height="536.5" font-family="Helvetica Neue, Arial, Hiragino Sans, sans-serif">
2
+ <defs>
3
+ <marker id="marker-filledArrow-33415c" markerWidth="7" markerHeight="7" refX="7" refY="3.5" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#33415c"/></marker>
4
+ <marker id="marker-filledArrow-6b46c1" markerWidth="7" markerHeight="7" refX="7" refY="3.5" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#6b46c1"/></marker>
5
+ </defs>
6
+ <rect x="0" y="0" width="988" height="536.5" fill="#ffffff"/>
7
+ <g id="vstack_1"><g id="hstack_1"><g id="box_1"><rect x="18" y="62.099999999999994" width="160" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="def"><rect x="178" y="18" width="264" height="89.19999999999999" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_2"><g id="text_1"><text x="310" y="46.75" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="310" dy="0">コントラクト / ビヘイビア定義</tspan></text></g><g id="text_2"><text x="310" y="69.075" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="310" dy="0">publishQuery / publishCommand /</tspan></text></g><g id="text_3"><text x="310" y="90.175" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="310" dy="0">publishBehaviors</tspan></text></g></g></g><g id="box_2"><rect x="442" y="62.099999999999994" width="120" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="plan"><rect x="562" y="18" width="248" height="89.19999999999999" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_3"><g id="text_4"><text x="686" y="46.75" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="686" dy="0">Static planner</tspan></text></g><g id="text_5"><text x="686" y="69.075" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="686" dy="0">symbolic key evaluation /</tspan></text></g><g id="text_6"><text x="686" y="90.175" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="686" dy="0">bridge guard(非宣言的な定義を拒否)</tspan></text></g></g></g></g><g id="hstack_2"><g id="box_3"><rect x="18" y="195.29999999999998" width="340" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="ir"><rect x="358" y="151.2" width="272" height="89.19999999999999" rx="10" fill="#eef3fc" stroke="#2b4bab" stroke-width="1.5"/><g id="vstack_4"><g id="text_7"><text x="494" y="179.95" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="494" dy="0">Portable IR(bridge bundle)</tspan></text></g><g id="text_8"><text x="494" y="202.27499999999998" text-anchor="middle" fill="#444444" font-size="11.5"><tspan x="494" dy="0">manifest.json + operations.json</tspan></text></g><g id="text_9"><text x="494" y="223.37499999999997" text-anchor="middle" fill="#444444" font-size="11.5"><tspan x="494" dy="0">components[] グラフ</tspan></text></g></g></g></g><g id="hstack_3"><g id="p1"><rect x="18" y="296.4" width="294" height="168" rx="10" fill="white" stroke="#2f855a" stroke-width="1.5"/><g id="vstack_5"><g id="hstack_4"><g id="box_4"><rect x="30" y="329.87" width="81.5" height="22.7" rx="11.35" fill="#2f855a" stroke="#e5e7eb" stroke-width="0"/><g id="text_10"><text x="70.75" y="344.895" text-anchor="middle" fill="white" font-size="10.5" font-weight="bold"><tspan x="70.75" dy="0">経路 1 — 既定</tspan></text></g></g><g id="text_11"><text x="119.5" y="345.77" text-anchor="start" fill="#22543d" font-size="13" font-weight="bold"><tspan x="119.5" dy="0">JSON 動的</tspan></text></g></g><g id="text_12"><text x="30" y="374.90999999999997" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="30" dy="0">components[] を実行時にロードし、</tspan></text></g><g id="text_13"><text x="30" y="401.03" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="30" dy="0">共有 run_behavior が解釈実行する。</tspan></text></g><g id="text_14"><text x="30" y="427.15" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="30" dy="0">デプロイなしの振る舞い差し替え向け。</tspan></text></g></g></g><g id="box_5"><rect x="312" y="296.4" width="35" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="p2"><rect x="347" y="296.4" width="294" height="168" rx="10" fill="white" stroke="#2b6cb0" stroke-width="1.5"/><g id="vstack_6"><g id="hstack_5"><g id="box_6"><rect x="359" y="316.80999999999995" width="98.29999999999998" height="22.7" rx="11.35" fill="#2b6cb0" stroke="#e5e7eb" stroke-width="0"/><g id="text_15"><text x="408.15" y="331.8349999999999" text-anchor="middle" fill="white" font-size="10.5" font-weight="bold"><tspan x="408.15" dy="0">経路 2 — opt-in</tspan></text></g></g><g id="text_16"><text x="465.29999999999995" y="332.7099999999999" text-anchor="start" fill="#1d3a8f" font-size="13" font-weight="bold"><tspan x="465.29999999999995" dy="0">codegen-static</tspan></text></g></g><g id="text_17"><text x="359" y="361.8499999999999" text-anchor="start" fill="#1d3a8f" font-size="10.8" font-weight="medium"><tspan x="359" dy="0">generate behaviors</tspan></text></g><g id="text_18"><text x="359" y="387.9699999999999" text-anchor="start" fill="#1d3a8f" font-size="10.8" font-weight="medium"><tspan x="359" dy="0">--lang &lt;ts|python|go|rust|php&gt;</tspan></text></g><g id="text_19"><text x="359" y="414.0899999999999" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="359" dy="0">IR をネイティブリテラルとして焼き込み。</tspan></text></g><g id="text_20"><text x="359" y="440.2099999999999" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="359" dy="0">fingerprint 照合で stale を loud reject。</tspan></text></g></g></g><g id="box_7"><rect x="641" y="296.4" width="35" height="1" fill="#ffffff" stroke="#e5e7eb" stroke-width="0" opacity="0"/></g><g id="p3"><rect x="676" y="296.4" width="294" height="168" rx="10" fill="white" stroke="#6b46c1" stroke-width="1.5"/><g id="vstack_7"><g id="hstack_6"><g id="box_8"><rect x="688" y="329.87" width="39.5" height="22.7" rx="11.35" fill="#6b46c1" stroke="#e5e7eb" stroke-width="0"/><g id="text_21"><text x="707.75" y="344.895" text-anchor="middle" fill="white" font-size="10.5" font-weight="bold"><tspan x="707.75" dy="0">消費面</tspan></text></g></g><g id="text_22"><text x="735.5" y="345.77" text-anchor="start" fill="#44337a" font-size="13" font-weight="bold"><tspan x="735.5" dy="0">型付き bindings</tspan></text></g></g><g id="text_23"><text x="688" y="374.90999999999997" text-anchor="start" fill="#44337a" font-size="10.8" font-weight="medium"><tspan x="688" dy="0">generate python|php|rust|go</tspan></text></g><g id="text_24"><text x="688" y="401.03" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="688" dy="0">typed repositories / DTO を生成。</tspan></text></g><g id="text_25"><text x="688" y="427.15" text-anchor="start" fill="#444444" font-size="10.8"><tspan x="688" dy="0">実行エンジンではなく経路 1 / 2 へ委譲。</tspan></text></g></g></g></g><g id="note"><rect x="18" y="486.4" width="952" height="32.099999999999994" rx="8" fill="#fbfcfe" stroke="#5886cd" stroke-width="1.2" stroke-dasharray="6 4"/><g id="vstack_8"><g id="text_26"><text x="32" y="506.47499999999997" text-anchor="start" fill="#33415c" font-size="11.5"><tspan x="32" dy="0">実行 2 経路 + 消費面 1 面は恒久併存(#257)。5言語(TS / Python / Rust / Go / PHP)が同一の IR を実行し、conformance が byte-identical を固定する。</tspan></text></g></g></g></g>
8
+ <g id="connector_1"><path d="M 442 62.599999999999994 C 481.6 62.599999999999994, 522.4 62.599999999999994, 562 62.599999999999994" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
9
+ <g id="connector_2"><path d="M 686 107.19999999999999 C 686 154.873020294502, 548.4 103.52697970549798, 548.4 151.2" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
10
+ <g id="connector_3"><path d="M 398.8 240.39999999999998 C 398.8 319.7363101990507, 165 217.06368980094925, 165 296.4" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
11
+ <g id="connector_4"><path d="M 494 240.39999999999998 C 494 258.88, 494 277.91999999999996, 494 296.4" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
12
+ <g id="connector_5"><path d="M 589.2 240.39999999999998 C 589.2 319.7363101990507, 823 217.06368980094925, 823 296.4" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
13
+ <g id="connector_6"><path d="M 676 380.4 C 664.45 380.4, 652.55 380.4, 641 380.4" fill="none" stroke="#6b46c1" stroke-width="1.6" stroke-dasharray="6 4" marker-end="url(#marker-filledArrow-6b46c1)"/></g>
14
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 950 122.9" width="950" height="122.9" font-family="Helvetica Neue, Arial, Hiragino Sans, sans-serif">
2
+ <defs>
3
+ <marker id="marker-filledArrow-33415c" markerWidth="7" markerHeight="7" refX="7" refY="3.5" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#33415c"/></marker>
4
+ </defs>
5
+ <rect x="0" y="0" width="950" height="122.9" fill="#ffffff"/>
6
+ <g id="hstack_1"><g id="m"><rect x="18" y="27.400000000000006" width="196" height="68.1" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_1"><g id="text_1"><text x="116" y="56.150000000000006" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="116" dy="0">TS Model</tspan></text></g><g id="text_2"><text x="116" y="78.47500000000001" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="116" dy="0">Entity / Key / GSI / Relation</tspan></text></g></g></g><g id="p"><rect x="268" y="27.400000000000006" width="236" height="68.1" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_2"><g id="text_3"><text x="386" y="56.150000000000006" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="386" dy="0">Planner</tspan></text></g><g id="text_4"><text x="386" y="78.47500000000001" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="386" dy="0">access-pattern resolution / projection</tspan></text></g></g></g><g id="r"><rect x="558" y="27.400000000000006" width="196" height="68.1" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_3"><g id="text_5"><text x="656" y="56.150000000000006" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="656" dy="0">Runtime</tspan></text></g><g id="text_6"><text x="656" y="78.47500000000001" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="656" dy="0">execute / retry / hydrate</tspan></text></g></g></g><g id="d"><path d="M 808,26.69 A 62,8.690000000000001 0 0,1 932,26.69 L 932,96.21000000000001 A 62,8.690000000000001 0 0,1 808,96.21000000000001 L 808,26.69" fill="#eef3fc" stroke="#4a6bd8" stroke-width="1.5"/><path d="M 808,26.69 A 62,8.690000000000001 0 0,0 932,26.69" fill="none" stroke="#4a6bd8" stroke-width="1.5"/><g id="text_7"><text x="870" y="66.175" text-anchor="middle" fill="#2b4bab" font-size="13.5" font-weight="bold"><tspan x="870" dy="0">DynamoDB</tspan></text></g></g></g>
7
+ <g id="connector_1"><path d="M 214 61.45 C 231.82 61.45, 250.18 61.45, 268 61.45" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
8
+ <g id="connector_2"><path d="M 504 61.45 C 521.82 61.45, 540.18 61.45, 558 61.45" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
9
+ <g id="connector_3"><path d="M 754 61.45 C 771.82 61.45, 790.18 61.45, 808 61.45" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 930 122.9" width="930" height="122.9" font-family="Helvetica Neue, Arial, Hiragino Sans, sans-serif">
2
+ <defs>
3
+ <marker id="marker-filledArrow-33415c" markerWidth="7" markerHeight="7" refX="7" refY="3.5" orient="auto-start-reverse"><path d="M 0,0 L 7,3.5 L 0,7 Z" fill="#33415c"/></marker>
4
+ </defs>
5
+ <rect x="0" y="0" width="930" height="122.9" fill="#ffffff"/>
6
+ <g id="hstack_1"><g id="m"><rect x="18" y="27.400000000000006" width="196" height="68.1" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_1"><g id="text_1"><text x="116" y="56.150000000000006" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="116" dy="0">TS Model</tspan></text></g><g id="text_2"><text x="116" y="78.47500000000001" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="116" dy="0">Entity / Key / GSI / Relation</tspan></text></g></g></g><g id="p"><rect x="268" y="27.400000000000006" width="216" height="68.1" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_2"><g id="text_3"><text x="376" y="56.150000000000006" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="376" dy="0">Planner</tspan></text></g><g id="text_4"><text x="376" y="78.47500000000001" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="376" dy="0">access pattern 解決 / projection</tspan></text></g></g></g><g id="r"><rect x="538" y="27.400000000000006" width="196" height="68.1" rx="10" fill="white" stroke="#5886cd" stroke-width="1.5"/><g id="vstack_3"><g id="text_5"><text x="636" y="56.150000000000006" text-anchor="middle" fill="#1d3a8f" font-size="15" font-weight="bold"><tspan x="636" dy="0">Runtime</tspan></text></g><g id="text_6"><text x="636" y="78.47500000000001" text-anchor="middle" fill="#555555" font-size="11.5"><tspan x="636" dy="0">execute / retry / hydrate</tspan></text></g></g></g><g id="d"><path d="M 788,26.69 A 62,8.690000000000001 0 0,1 912,26.69 L 912,96.21000000000001 A 62,8.690000000000001 0 0,1 788,96.21000000000001 L 788,26.69" fill="#eef3fc" stroke="#4a6bd8" stroke-width="1.5"/><path d="M 788,26.69 A 62,8.690000000000001 0 0,0 912,26.69" fill="none" stroke="#4a6bd8" stroke-width="1.5"/><g id="text_7"><text x="850" y="66.175" text-anchor="middle" fill="#2b4bab" font-size="13.5" font-weight="bold"><tspan x="850" dy="0">DynamoDB</tspan></text></g></g></g>
7
+ <g id="connector_1"><path d="M 214 61.45 C 231.82 61.45, 250.18 61.45, 268 61.45" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
8
+ <g id="connector_2"><path d="M 484 61.45 C 501.82 61.45, 520.18 61.45, 538 61.45" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
9
+ <g id="connector_3"><path d="M 734 61.45 C 751.82 61.45, 770.18 61.45, 788 61.45" fill="none" stroke="#33415c" stroke-width="2" marker-end="url(#marker-filledArrow-33415c)"/></g>
10
+ </svg>