@mindot/will 0.8.0 → 0.10.0

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 (142) hide show
  1. package/README.md +15 -11
  2. package/dist/index.d.ts +188 -141
  3. package/dist/index.js +6985 -3337
  4. package/dist/index.js.map +1 -1
  5. package/dist/surface/channels/discord.d.ts +177 -0
  6. package/dist/surface/channels/discord.js +394 -0
  7. package/dist/surface/channels/discord.js.map +1 -0
  8. package/dist/{channels → surface/channels}/whatsapp.d.ts +2 -2
  9. package/dist/{channels → surface/channels}/whatsapp.js +11 -5
  10. package/dist/surface/channels/whatsapp.js.map +1 -0
  11. package/dist/{cli.js → surface/cli.js} +5382 -1573
  12. package/dist/surface/cli.js.map +1 -0
  13. package/dist/{mcp → surface/mcp}/effectors.d.ts +1 -1
  14. package/dist/{mcp → surface/mcp}/effectors.js +10 -4
  15. package/dist/surface/mcp/effectors.js.map +1 -0
  16. package/dist/{will-cS6k4uiJ.d.ts → will-evj9_vrd.d.ts} +6658 -5078
  17. package/package.json +11 -12
  18. package/src/cognition/agency/consequence.ts +356 -1
  19. package/src/cognition/agency/conversation.aim.ts +292 -0
  20. package/src/cognition/agency/engines/action.selector.ts +142 -5
  21. package/src/cognition/agency/engines/affordance.synthesizer.ts +200 -7
  22. package/src/cognition/agency/engines/deliberation.engine.ts +76 -3
  23. package/src/cognition/agency/engines/motor.schema.executor.ts +509 -32
  24. package/src/cognition/agency/engines/reafference.engine.ts +160 -4
  25. package/src/cognition/agency/execution.primitives.ts +17 -4
  26. package/src/cognition/agency/proactive.communicator.ts +19 -3
  27. package/src/cognition/agency/reconcile.learning.ts +5 -4
  28. package/src/cognition/agency/restart.ts +66 -0
  29. package/src/cognition/agency/schemas/innate.ts +96 -1
  30. package/src/cognition/agency/schemas/repertoire.ts +19 -1
  31. package/src/cognition/agency/selection.scoring.ts +49 -0
  32. package/src/cognition/agency/settlement.ts +203 -0
  33. package/src/cognition/agency/types.ts +73 -1
  34. package/src/cognition/cache/composition.ts +232 -0
  35. package/src/cognition/cache/deliberation.cache.ts +219 -0
  36. package/src/cognition/cache/fingerprint.ts +120 -0
  37. package/src/cognition/cache/types.ts +105 -0
  38. package/src/cognition/config.mirror.entities.ts +108 -1
  39. package/src/cognition/event.schemas.ts +22 -8
  40. package/src/cognition/faculties/affective.blender.ts +21 -4
  41. package/src/cognition/faculties/autobiographical.narrator.ts +5 -10
  42. package/src/cognition/faculties/circadian.oscillator.ts +36 -7
  43. package/src/cognition/faculties/episodic.consolidator.ts +59 -3
  44. package/src/cognition/faculties/executive.engine/action.record.ts +129 -0
  45. package/src/cognition/faculties/executive.engine/commands.ts +189 -14
  46. package/src/cognition/faculties/executive.engine/context.ts +106 -46
  47. package/src/cognition/faculties/executive.engine/deliberate.reasoning.ts +1 -1
  48. package/src/cognition/faculties/executive.engine/engine.ts +714 -136
  49. package/src/cognition/faculties/executive.engine/escalation.buffer.ts +230 -45
  50. package/src/cognition/faculties/executive.engine/facet.supervisor.ts +320 -65
  51. package/src/cognition/faculties/executive.engine/facet.ts +81 -26
  52. package/src/cognition/faculties/executive.engine/gating.ts +14 -14
  53. package/src/cognition/faculties/executive.engine/parser.ts +120 -38
  54. package/src/cognition/faculties/executive.engine/prompt.factory.ts +331 -38
  55. package/src/cognition/faculties/executive.engine/types.ts +84 -12
  56. package/src/cognition/faculties/exteroception.ts +99 -98
  57. package/src/cognition/faculties/goal.manager.ts +144 -16
  58. package/src/cognition/faculties/known.entity.tracker.ts +287 -29
  59. package/src/cognition/faculties/moral.evaluator.ts +8 -3
  60. package/src/cognition/faculties/persona.consolidator.ts +141 -0
  61. package/src/cognition/faculties/planning.engine/engine.ts +4 -4
  62. package/src/cognition/faculties/planning.engine/plan.frontier.ts +1 -1
  63. package/src/cognition/faculties/reputation.tracker.ts +66 -2
  64. package/src/cognition/faculties/self.model.updater.ts +19 -12
  65. package/src/cognition/faculties/semantic.engine/integrator.ts +1 -1
  66. package/src/cognition/faculties/social.perception.ts +47 -3
  67. package/src/cognition/faculties/threat.evaluator.ts +7 -0
  68. package/src/cognition/faculties/working.memory.ts +16 -21
  69. package/src/cognition/identity.entity.ts +205 -0
  70. package/src/cognition/index.ts +7 -0
  71. package/src/cognition/instruction.handler.ts +1 -1
  72. package/src/cognition/memory/vector.adapter.ts +12 -3
  73. package/src/cognition/memory/vector.embedder.ts +45 -4
  74. package/src/cognition/percept.entity.ts +122 -0
  75. package/src/cognition/persona.prior.ts +6 -0
  76. package/src/cognition/sense.boundary.ts +176 -0
  77. package/src/cognition/senses/audition.engine/engine.ts +492 -53
  78. package/src/cognition/senses/base.sense.engine.ts +105 -7
  79. package/src/cognition/senses/index.ts +83 -13
  80. package/src/cognition/senses/provenance.ts +128 -0
  81. package/src/cognition/senses/somatosensation.engine.ts +117 -9
  82. package/src/cognition/social.identity.ts +296 -0
  83. package/src/cognition/utilities/token.tracker.ts +94 -10
  84. package/src/core/orchestrator.ts +51 -0
  85. package/src/index.ts +39 -5
  86. package/src/llm/gate.ts +48 -0
  87. package/src/llm/index.ts +127 -33
  88. package/src/llm/routing.ts +6 -0
  89. package/src/llm/summarizer.ts +1 -1
  90. package/src/llm/wire.contracts.ts +57 -0
  91. package/src/pma/index.ts +68 -54
  92. package/src/stem/assembly.audit.ts +1 -0
  93. package/src/stem/guards/identity.coherence.ts +1 -1
  94. package/src/stem/index.ts +171 -23
  95. package/src/stem/mind.ts +198 -57
  96. package/src/stem/policy/arbiter.ts +10 -0
  97. package/src/stem/profiles/built-in.ts +7 -0
  98. package/src/{profiles → stem/profiles}/companion.ts +1 -1
  99. package/src/{profiles → stem/profiles}/company-brain.ts +1 -1
  100. package/src/{profiles → stem/profiles}/customer-service.ts +1 -1
  101. package/src/{profiles → stem/profiles}/game-npc.ts +1 -1
  102. package/src/{profiles → stem/profiles}/index.ts +1 -1
  103. package/src/{profiles → stem/profiles}/smart-home.ts +1 -1
  104. package/src/stem/tracts/effector/escalation.lifecycle.ts +239 -0
  105. package/src/stem/tracts/effector/policy.enforcement.ts +261 -0
  106. package/src/stem/tracts/effector/types.ts +110 -0
  107. package/src/stem/tracts/effector.controller.ts +112 -401
  108. package/src/stem/tracts/outbox.controller.ts +30 -17
  109. package/src/stem/tracts/outbox.writer.ts +40 -2
  110. package/src/stem/tracts/sensory.controller.ts +6 -6
  111. package/src/stem/tracts/session.logger.ts +6 -1
  112. package/src/stem/tracts/transport/types.ts +20 -1
  113. package/src/stem/tracts/transport.controller.ts +33 -9
  114. package/src/surface/channels/discord.ts +609 -0
  115. package/src/{channels → surface/channels}/roster.ts +1 -1
  116. package/src/surface/channels/types.ts +136 -0
  117. package/src/{channels → surface/channels}/whatsapp.ts +22 -10
  118. package/src/{cli.ts → surface/cli.ts} +14 -9
  119. package/src/{host → surface/host}/boot.ts +3 -3
  120. package/src/{host → surface/host}/utterances.ts +2 -2
  121. package/src/{mcp → surface/mcp}/effectors.ts +19 -6
  122. package/src/{mcp → surface/mcp}/server.ts +19 -5
  123. package/src/{sdk → surface/sdk}/will.ts +194 -33
  124. package/src/{serve → surface/serve}/server.ts +11 -4
  125. package/src/types.ts +24 -3
  126. package/dist/channels/discord.d.ts +0 -69
  127. package/dist/channels/discord.js +0 -193
  128. package/dist/channels/discord.js.map +0 -1
  129. package/dist/channels/whatsapp.js.map +0 -1
  130. package/dist/cli.js.map +0 -1
  131. package/dist/mcp/effectors.js.map +0 -1
  132. package/src/channels/discord.ts +0 -214
  133. package/src/channels/types.ts +0 -46
  134. package/src/cognition/faculties/executive.engine/messages.ts +0 -102
  135. package/src/extensions/livestream.ext.ts +0 -570
  136. package/src/extensions/time.ext.ts +0 -339
  137. package/src/profiles/built-in.ts +0 -7
  138. package/src/runners/coherence.runner.ts +0 -49
  139. package/src/runners/outreach.runner.ts +0 -155
  140. package/src/runners/social.runner.ts +0 -179
  141. package/src/runners/thin-shim.runner.ts +0 -205
  142. /package/dist/{cli.d.ts → surface/cli.d.ts} +0 -0
@@ -71,6 +71,21 @@ const DRIVE_TAGS = new Set([ 'energy', 'sleep', 'stress', 'survival', 'wellbeing
71
71
  // conscientiousness-developable baseSwitchCost, #28). Recomputed fresh each tick from
72
72
  // basePriority — never accumulates. This is what makes the focus mechanically "stick":
73
73
  // the focused goal stays top for goal selection, the executive, and planning.
74
+ /**
75
+ * Schema ids and effector names that mean "the mind said something to someone".
76
+ *
77
+ * `reach-out` is the innate schema; `text`/`talk`/`gesture`/`broadcast` are the
78
+ * effectors it resolves to. Both spellings appear as an `action.outcome`'s
79
+ * `actionType` depending on which path emitted it, and only the second set was
80
+ * ever recognised here. Mirrors `COMM_SCHEMAS` in agency/execution.primitives.
81
+ */
82
+ const COMMUNICATIVE_SCHEMAS = new Set([
83
+ 'reach-out', 'reach_out', 'communicate', 'talk', 'text', 'broadcast', 'gesture',
84
+ ])
85
+
86
+ /** Progress an action goal gains when the person it concerns actually answers. */
87
+ const ANSWER_PROGRESS_STEP = 0.12
88
+
74
89
  const FOCUS_COMMITMENT_RAMP = 30 // ticks of focus to reach full commitment weight
75
90
  const COMMITMENT_GAIN = 0.3 // scales switchCost × commitment × plan-sunk-cost
76
91
  const MAX_COMMITMENT_BOOST = 0.2 // cap — a clearly higher-priority goal still wins
@@ -88,6 +103,10 @@ export interface GoalState {
88
103
  activatedAt: Tick
89
104
  deadline?: Tick
90
105
  tags: string[]
106
+ /** Why this goal was abandoned, when it was. Set only on status 'abandoned'.
107
+ * The reason used to be pushed onto `tags`, which threw once the goal had
108
+ * been rehydrated from a deep-frozen state entity. */
109
+ abandonedReason?: string
91
110
  /** Snapshot of memory.beliefs_total when this goal was activated.
92
111
  * Used to compute epistemic progress: (currentBeliefs - baseline) / threshold. */
93
112
  beliefsAtActivation: number
@@ -199,6 +218,7 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
199
218
  'executive.facet.progress',
200
219
  'plan.completed',
201
220
  'action.outcome', // 4.1: advance action-type goals when matching outcomes fire
221
+ 'social.responsiveness', // somebody answered — the only progress a message can make
202
222
  ]
203
223
  }
204
224
  publishes(): CognitiveEventSchema[] {
@@ -298,6 +318,13 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
298
318
  this._nudgeActionGoals( p.domain, p.actionType, p.outcomeQuality )
299
319
  break
300
320
  }
321
+ // A communicative act only advances a goal once somebody answers it. The
322
+ // send itself is not progress — see _nudgeActionGoals.
323
+ case 'social.responsiveness': {
324
+ const p = e.payload as { keid: string; answered: boolean }
325
+ if( p.answered === true && p.keid ) this._nudgeAnsweredGoals( p.keid )
326
+ break
327
+ }
301
328
  }
302
329
  }
303
330
 
@@ -565,8 +592,11 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
565
592
  const goal = this._goals.get( goalId )
566
593
  if( goal && goal.status === 'active'){
567
594
  goal.status = 'abandoned'
568
- // Optionally store the reason (if GoalState had a reason field; we can add it or store in tags)
569
- reason && goal.tags.push(`abandoned:${reason.slice(0,50)}`)
595
+ // On its own field, not pushed onto `tags`. A goal rehydrated from a state
596
+ // entity holds that entity's deep-frozen arrays by reference, so the push
597
+ // threw and the goal stayed active forever — still competing for salience,
598
+ // with the rest of the deferred-effects flush for that tick lost with it.
599
+ if( reason ) goal.abandonedReason = reason.slice( 0, 200 )
570
600
 
571
601
  this._sessionLogger?.write({
572
602
  type: 'goal.abandoned',
@@ -618,13 +648,18 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
618
648
  progress: ( meta.progress as number ) ?? 0,
619
649
  status,
620
650
  parentGoalId: meta.parentGoalId as string | undefined,
621
- subGoals: ( meta.subGoals as string[] ) ?? [],
651
+ // COPY, never adopt. `meta` belongs to a state entity, and the state
652
+ // manager deep-freezes those — adopting the array by reference gives the
653
+ // goal a frozen `tags`/`subGoals`, and the next push (abandonGoal, or
654
+ // addGoal appending to a parent) throws TypeError mid-tick.
655
+ subGoals: [ ...( ( meta.subGoals as string[] ) ?? [] ) ],
622
656
  activatedAt: ( meta.activatedAt as Tick ) ?? tick,
623
657
  deadline: meta.deadline as Tick | undefined,
624
- tags: ( meta.tags as string[] ) ?? [],
658
+ tags: [ ...( ( meta.tags as string[] ) ?? [] ) ],
625
659
  beliefsAtActivation: ( meta.beliefsAtActivation as number ) ?? this._currentBeliefCount,
626
660
  completionType: ( meta.completionType as GoalState['completionType'] ) ?? 'epistemic',
627
661
  completionCondition: meta.completionCondition as string | undefined,
662
+ abandonedReason: meta.abandonedReason as string | undefined,
628
663
  })
629
664
  }
630
665
  }
@@ -658,7 +693,12 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
658
693
  .find( g => {
659
694
  return g.tags.includes( mapping.tags[0]! )
660
695
  && g.tags.includes( mapping.tags[1]! )
661
- && g.status === 'active'
696
+ // `pending` counts as existing. It did not, and a
697
+ // goal demoted for capacity therefore stopped
698
+ // blocking its own respawn — the drive minted a
699
+ // fresh copy every time its threshold was crossed.
700
+ // Measured: 92 identical copies of one goal.
701
+ && ( g.status === 'active' || g.status === 'pending')
662
702
  })
663
703
 
664
704
  // Never spawn a goal that is *already satisfied* — it would complete on its
@@ -685,7 +725,9 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
685
725
  // Dedup by the referent (keid: tag) when present, else by description.
686
726
  const keidTag = tags.find( t => t.startsWith('keid:') )
687
727
  const existing = Array.from( this._goals.values() ).find( g =>
688
- g.status === 'active' && ( keidTag ? g.tags.includes( keidTag ) : g.description === desc ) )
728
+ // Same rule as the drive path: a waiting goal still exists.
729
+ ( g.status === 'active' || g.status === 'pending')
730
+ && ( keidTag ? g.tags.includes( keidTag ) : g.description === desc ) )
689
731
 
690
732
  // Don't spawn a goal that's already satisfied (born-done guard — see _activateFromDrives).
691
733
  if( !existing && !this._isConditionMet( cCond, state ) )
@@ -770,6 +812,32 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
770
812
  return 0
771
813
  }
772
814
 
815
+ /**
816
+ * Reconcile the active set to capacity — in BOTH directions.
817
+ *
818
+ * Demotion alone made `pending` a one-way door, and a mind fell through it.
819
+ * Nothing in this file promoted a goal back (the only other write of `'active'`
820
+ * is `pending_verification`'s, a different status), so a goal demoted for
821
+ * capacity was demoted for good. Worse, `pending` is excluded from every other
822
+ * mechanism that could have retired it: it is not in `getActiveGoals()`, not
823
+ * progress-updated, not reachable by the patience/grit sweep (which skips any
824
+ * status but `'active'`) — yet it IS re-persisted every tick and rehydrated on
825
+ * every restore. Inert and immortal at once.
826
+ *
827
+ * Measured on a live COO: 96 goal entities, of which **83 pending, 0 active**,
828
+ * and 92 of the 96 the same drive-spawned goal. `activeGoalCount` sat at 0, so
829
+ * `goalless_crisis` fired every 20 ticks forever while she carried 83 goals —
830
+ * and the `goal` term, the joint-largest weight in the affordance competition,
831
+ * contributed nothing to any choice she made.
832
+ *
833
+ * Promotion also restores GC reachability, which is the quieter half of the
834
+ * fix: an over-patient stale goal can only be abandoned while it is active.
835
+ *
836
+ * `activatedAt` is deliberately NOT refreshed on promotion. Refreshing it would
837
+ * let a goal cycle demote→promote and reset its own patience each time, making
838
+ * it unretirable — the immortality this fix exists to end, reintroduced by the
839
+ * back door. A goal's age is when it was taken up, not when it last got a slot.
840
+ */
773
841
  private _resolveConflicts(): void {
774
842
  const active = this.getActiveGoals()
775
843
 
@@ -778,6 +846,21 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
778
846
  const lowest = active.pop()
779
847
  if( lowest ) lowest.status = 'pending'
780
848
  }
849
+
850
+ // ...and take the best waiting goals back up when there is room. Only ever
851
+ // reached when UNDER capacity, so this cannot undo the demotion above:
852
+ // the loop leaves the set at exactly capacity, and this one starts below it.
853
+ if( active.length >= this._maxActiveGoals ) return
854
+
855
+ const waiting = Array.from( this._goals.values() )
856
+ .filter( g => g.status === 'pending')
857
+ .sort( ( a, b ) => b.priority - a.priority )
858
+
859
+ for( const goal of waiting ){
860
+ if( active.length >= this._maxActiveGoals ) break
861
+ goal.status = 'active'
862
+ active.push( goal )
863
+ }
781
864
  }
782
865
 
783
866
  // ── Internal: progress ───────────────────────────────────
@@ -852,11 +935,26 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
852
935
  const dLow = domain.toLowerCase()
853
936
  const aLow = actionType.toLowerCase()
854
937
 
855
- // Communication actions 'talk' and 'text' are always treated as
856
- // matching the 'communication' and 'reply' tag families so goals created
857
- // in response to incoming messages get their progress nudged.
858
- const isCommunicationAction = aLow === 'talk' || aLow === 'text'
859
- || dLow === 'communication'
938
+ // A communicative act makes NO progress by being sent.
939
+ //
940
+ // This is the whole shape of the repetition failure, seen from the goal side.
941
+ // `action.outcome` for a message fires the moment the outbox accepts it, with
942
+ // `outcomeQuality` describing the delivery — so crediting it here would have a
943
+ // goal like "get a clear answer to one operational question" complete itself
944
+ // after nine unanswered messages, and the mind would be right to keep sending
945
+ // because sending was visibly working.
946
+ //
947
+ // The answer is progress. It arrives later, through `social.responsiveness`,
948
+ // and lands in _nudgeAnsweredGoals.
949
+ //
950
+ // (Before this the question was moot in the worst way: `actionType` for an
951
+ // outreach is the SCHEMA id, `reach-out`, and the old test looked only for
952
+ // 'talk'/'text', so no communicative act ever reached a goal at all. Measured
953
+ // on a live Will: 8 goals, 28 reach-outs, and `lastActionAttemptTick` unset on
954
+ // every single goal. The bridge was not miscalibrated, it was disconnected —
955
+ // which is why fixing the match alone would have turned a silent failure into
956
+ // a loud one.)
957
+ if( COMMUNICATIVE_SCHEMAS.has( aLow ) || dLow === 'communication') return
860
958
 
861
959
  for( const goal of this._goals.values() ){
862
960
  if( goal.status !== 'active' && goal.status !== 'blocked') continue
@@ -868,9 +966,7 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
868
966
  || t === aLow
869
967
  || dLow.includes( t ) || t.includes( dLow )
870
968
  || aLow.includes( t ) || t.includes( aLow )
871
- }) || ( isCommunicationAction && goal.tags.some( t =>
872
- t === 'communication' || t === 'reply' || t === 'conversation'
873
- ) )
969
+ })
874
970
 
875
971
  if( hasMatch ){
876
972
  goal.progress = Math.min( 1, goal.progress + outcomeQuality * 0.12 )
@@ -880,6 +976,33 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
880
976
  }
881
977
  }
882
978
 
979
+ /**
980
+ * Somebody answered. Advance the action goals that were about reaching them.
981
+ *
982
+ * Linked the way every other goal→person link in the system is linked: the
983
+ * `keid:<id>` tag (selection.scoring's `collectGoalTargets` reads the same one
984
+ * to lift a reach-out's goal relevance) or `requestingEntityId`, set when a
985
+ * conversation escalation created the goal. Nothing here guesses from wording.
986
+ *
987
+ * Unmatched by design: a goal with no link to this person gets nothing, even if
988
+ * it is tagged 'communication'. Being answered by one person is not progress on
989
+ * wanting to talk to another.
990
+ */
991
+ private _nudgeAnsweredGoals( keid: string ): void {
992
+ const tag = `keid:${ keid }`.toLowerCase()
993
+
994
+ for( const goal of this._goals.values() ){
995
+ if( goal.status !== 'active' && goal.status !== 'blocked') continue
996
+ if( goal.completionType !== 'action') continue
997
+ if( goal.requestingEntityId !== keid
998
+ && !goal.tags.some( t => t.toLowerCase() === tag ) ) continue
999
+
1000
+ goal.progress = Math.min( 1, goal.progress + ANSWER_PROGRESS_STEP )
1001
+ goal.lastActionAttemptTick = this._currentTick
1002
+ goal.lastActionType = 'answered'
1003
+ }
1004
+ }
1005
+
883
1006
  /** True when a metric completionCondition (e.g. "emotion.boredom < 40") is already met. */
884
1007
  private _isConditionMet( condition: string | undefined, state: ReadonlySimulationState ): boolean {
885
1008
  if( !condition ) return false
@@ -994,9 +1117,14 @@ export class GoalManager implements SimulationEngine, CognitiveEngine {
994
1117
  progress: goal.progress,
995
1118
  status: goal.status,
996
1119
  parentGoalId: goal.parentGoalId,
997
- subGoals: goal.subGoals,
1120
+ // COPY on the way out too. The state manager deep-freezes what it
1121
+ // stores, so handing it these arrays by reference freezes the
1122
+ // manager's OWN copies — a goal created this session, never
1123
+ // rehydrated, still ends up with an unpushable `tags`.
1124
+ subGoals: [ ...goal.subGoals ],
998
1125
  deadline: goal.deadline,
999
- tags: goal.tags,
1126
+ tags: [ ...goal.tags ],
1127
+ abandonedReason: goal.abandonedReason,
1000
1128
  beliefsAtActivation: goal.beliefsAtActivation,
1001
1129
  completionType: goal.completionType,
1002
1130
  completionCondition: goal.completionCondition,