feat(core): add native skill activation
This commit is contained in:
parent
524ee8fc03
commit
23adaaaeab
26 changed files with 814 additions and 76 deletions
|
|
@ -141,6 +141,20 @@ export const Synthetic = Event.define({
|
|||
})
|
||||
export type Synthetic = typeof Synthetic.Type
|
||||
|
||||
export namespace Skill {
|
||||
export const Activated = Event.define({
|
||||
type: "session.next.skill.activated",
|
||||
...options,
|
||||
schema: {
|
||||
...Base,
|
||||
messageID: SessionMessage.ID,
|
||||
name: Schema.String,
|
||||
text: Schema.String,
|
||||
},
|
||||
})
|
||||
export type Activated = typeof Activated.Type
|
||||
}
|
||||
|
||||
export namespace Shell {
|
||||
export const Started = Event.define({
|
||||
type: "session.next.shell.started",
|
||||
|
|
@ -476,6 +490,7 @@ export const DurableDefinitions = Event.inventory(
|
|||
PromptAdmitted,
|
||||
ContextUpdated,
|
||||
Synthetic,
|
||||
Skill.Activated,
|
||||
Shell.Started,
|
||||
Shell.Ended,
|
||||
Step.Started,
|
||||
|
|
@ -509,6 +524,7 @@ export const Definitions = Event.inventory(
|
|||
PromptAdmitted,
|
||||
ContextUpdated,
|
||||
Synthetic,
|
||||
Skill.Activated,
|
||||
Shell.Started,
|
||||
Shell.Ended,
|
||||
Step.Started,
|
||||
|
|
|
|||
|
|
@ -65,6 +65,14 @@ export const System = Schema.Struct({
|
|||
text: Schema.String,
|
||||
}).annotate({ identifier: "Session.Message.System" })
|
||||
|
||||
export interface Skill extends Schema.Schema.Type<typeof Skill> {}
|
||||
export const Skill = Schema.Struct({
|
||||
...Base,
|
||||
type: Schema.Literal("skill"),
|
||||
name: Schema.String,
|
||||
text: Schema.String,
|
||||
}).annotate({ identifier: "Session.Message.Skill" })
|
||||
|
||||
export interface Shell extends Schema.Schema.Type<typeof Shell> {}
|
||||
export const Shell = Schema.Struct({
|
||||
...Base,
|
||||
|
|
@ -203,11 +211,12 @@ export const Message = Schema.Union([
|
|||
User,
|
||||
Synthetic,
|
||||
System,
|
||||
Skill,
|
||||
Shell,
|
||||
Assistant,
|
||||
Compaction,
|
||||
])
|
||||
.pipe(Schema.toTaggedUnion("type"))
|
||||
.annotate({ identifier: "Session.Message" })
|
||||
export type Message = AgentSwitched | ModelSwitched | User | Synthetic | System | Shell | Assistant | Compaction
|
||||
export type Message = AgentSwitched | ModelSwitched | User | Synthetic | System | Skill | Shell | Assistant | Compaction
|
||||
export type Type = Message["type"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue