Details (original message): Implement the intent core, conformance suite, catalog alignment, examples, and the intentctl diagnostics CLI.
20 lines
769 B
Go
20 lines
769 B
Go
package intent
|
|
|
|
import "context"
|
|
|
|
// PendingExpectation 宿主在上一轮对话结束时声明的预期后续意图。
|
|
// 典型场景:宿主向用户发起澄清提问后,预期下一轮命中澄清选项对应的意图。
|
|
type PendingExpectation struct {
|
|
// IntentIDs 预期的意图 id 列表(须为快照内已启用的 spec)。
|
|
IntentIDs []string
|
|
// Reason 预期由来,供日志与诊断;模块不解释。
|
|
Reason string
|
|
}
|
|
|
|
// ExpectationProvider 提供当前会话的挂起预期(Stage 1 扩展点)。
|
|
// 返回 nil 或空 IntentIDs 表示本轮没有挂起预期,识别直接进入规则阶段。
|
|
// 由宿主实现:模块不持有会话状态。
|
|
type ExpectationProvider interface {
|
|
Pending(ctx context.Context) *PendingExpectation
|
|
}
|