merge: reconcile 2.9.0 proof release with latest native AI extension updates

This commit is contained in:
cflmy committed 2026-11-18 16:58:35 +08:00
commit c952765845
30 files changed
+3418 -67

No files matched your search

+70
View File
@@ -0,0 +1,70 @@
---
markup: occlusion
title: AI native flow offline smoke
import:
flow: ext/ai/flow.mq.md
context: ext/ai/context.mq.md
json: lib/json.mq.md
sys: lib/sys.mq.md
---
# main
This fixture tests the real Marqdo interface without a model provider.
It refuses an invalid choice and retrieves only the designated function
rather than guessing another SKILL or importing the full document.
**opts = > json.parse text=["chat","office"]**
**pick = > flow.parse_choice reply="选择:office" options=`opts`**
**value = > json.get value=`pick` key="value"**
1. `value` == "office"
**_ = 1**
2. *
**debug_pick = > json.stringify value=`pick`**
> print text=`debug_pick`
> sys.exit code=11
**structured = > flow.parse_choice reply="{\"choice\":\"chat\"}" options=`opts`**
**structure_value = > json.get value=`structured` key="value"**
1. `structure_value` == "chat"
**_ = 1**
2. *
> sys.exit code=16
**invalid = > flow.parse_choice reply="chat 或 office" options=`opts`**
**not_ok = > json.get value=`invalid` key="ok"**
1. `not_ok`
> sys.exit code=12
2. *
**_ = 1**
**ctx = > context.scope scope="function" class="main" function="probe" max_chars=200**
**ok = > json.get value=`ctx` key="ok"**
1. `ok`
**_ = 1**
2. *
> sys.exit code=13
**packed = > context.compose user="Test the route" class="main" function="probe" budget_tokens=2048**
**pack_schema = > json.get value=`packed` key="schema"**
1. `pack_schema` == "ContextPackV2"
**_ = 1**
2. *
> sys.exit code=15
**gate = > flow.input id="ai_native_flow_ci_gate" question="Continue?" options=`opts` source_revision="fixture-v1" freeform=False**
**answered = > flow.reply id="ai_native_flow_ci_gate" reply="office" source_revision="fixture-v1"**
**answer = > json.get value=`answered` key="value"**
1. `answer` == "office"
**_ = 1**
2. *
> sys.exit code=14
Return *"ai-flow-native-ok"*.
## probe
This private helper's narrative should be extracted by the scoped selector
without including the root SKILL or neighboring function definitions.
Return *"probe"*.
+124
View File
@@ -0,0 +1,124 @@
---
markup: occlusion
title: ABI-native durable agent workflow test
import:
workflow: ext/ai/workflow.mq.md
json: lib/json.mq.md
sys: lib/sys.mq.md
time: lib/time.mq.md
---
# main
Offline test: the same Marqdo program advances through model choice, user
input and terminal state with plugin-owned durable checkpoints. The run ID and
checkpoint directory include the current millisecond so repeated local runs
start clean instead of reopening yesterday's completed workflow.
**now = > time.now_ms**
**stamp = > json.stringify value=`now`**
**rid = "abi_flow_ci_" + stamp**
**dir = ".marqdo/ai-native-workflow-" + stamp**
**steps = > json.parse text=[{"id":"intent","kind":"model","prompt":"Choose next skill","options":["chat","office"]},{"id":"confirm","kind":"input","question":"Continue?","options":["yes","no"]},{"id":"end","kind":"return"}]**
**opened = > workflow.open id=`rid` steps=`steps` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**o = > json.get value=`opened` key="ok"**
1. `o`
**_ = 1**
2. *
> sys.exit code=21
**seen = > workflow.inspect id=`rid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**seen_status = > json.get value=`seen` key="action"**
**seen_total = > json.get value=`seen` key="total_steps"**
1. `seen_status` == "waiting_model"
1. `seen_total` == 3
**_ = 1**
2. *
> sys.exit code=30
2. *
> sys.exit code=31
**listed = > workflow.list session_id="ci-session" resume_dir=`dir`**
**listed_ok = > json.get value=`listed` key="ok"**
**listed_items = > json.get value=`listed` key="items"**
**listed_n = > len value=`listed_items`**
1. `listed_ok`
1. `listed_n` > 0
**_ = 1**
2. *
> sys.exit code=32
2. *
> sys.exit code=33
**first = > workflow.next id=`rid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**first_state = > json.get value=`first` key="status"**
1. `first_state` == "waiting_model"
**_ = 1**
2. *
> sys.exit code=22
**c1 = > workflow.commit id=`rid` step_id="intent" response="chat" source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**done1 = > json.get value=`c1` key="ok"**
1. `done1`
**_ = 1**
2. *
> sys.exit code=23
**progress = > workflow.inspect id=`rid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**progress_done = > json.get value=`progress` key="completed_steps"**
1. `progress_done` == 1
**_ = 1**
2. *
> sys.exit code=34
**second = > workflow.tick id=`rid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**second_state = > json.get value=`second` key="status"**
1. `second_state` == "waiting_input"
**_ = 1**
2. *
> sys.exit code=24
**c2 = > workflow.commit id=`rid` step_id="confirm" response="yes" source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**done2 = > json.get value=`c2` key="ok"**
1. `done2`
**_ = 1**
2. *
> sys.exit code=25
**c3 = > workflow.tick id=`rid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**complete = > workflow.next id=`rid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**status = > json.get value=`complete` key="status"**
1. `status` == "succeeded"
**_ = 1**
2. *
> sys.exit code=26
**partial_steps = > json.parse text=[{"id":"children","kind":"parallel","effect_class":"read","tasks":[{"path":"worker-a.mq.md"},{"path":"worker-b.mq.md"}]}]**
**prid = "abi_flow_partial_ci_" + stamp**
**new_batch = > workflow.open id=`prid` steps=`partial_steps` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**parts = > json.parse text=[{"ok":true,"value":{"code":0,"value":"useful"}},{"ok":false,"error":"timeout"}]**
**stopped = > workflow.commit id=`prid` step_id="children" response=`parts` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**reloaded = > workflow.next id=`prid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**partial = > json.get value=`reloaded` key="partial"**
**survivors = > json.get value=`partial` key="succeeded"**
1. `survivors` == 1
**_ = 1**
2. *
> sys.exit code=27
**retry_plan = > workflow.retry_plan id=`prid` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**allowed = > json.get value=`retry_plan` key="ok"**
1. `allowed`
**_ = 1**
2. *
> sys.exit code=28
**repaired = > json.parse text=[{"ok":true,"value":{"code":0,"value":"repaired"}}]**
**merged = > workflow.retry_commit id=`prid` results=`repaired` source_revision="flow-v1" session_id="ci-session" resume_dir=`dir`**
**merged_ok = > json.get value=`merged` key="ok"**
1. `merged_ok`
**_ = 1**
2. *
> sys.exit code=29
Return *"durable-agent-flow-ok"*.