mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
84 lines
4.1 KiB
Swift
84 lines
4.1 KiB
Swift
//
|
|
// JourneyStep.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct JourneyStep: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Args are the tool's default arguments, merged under whatever the caller passes at run time, so a step ships with the arguments that make it work. */
|
|
public var args: [String: JSONValue]?
|
|
/** Dependencies are step ids that must be done/skipped before this step is available. The wire key is `deps` (the blueprint contract); the Go field keeps its descriptive name. */
|
|
public var deps: [String]?
|
|
/** Detail is the juncture — what the Guide explains, or asks for, at this step. */
|
|
public var detail: String?
|
|
/** Draft, when set, is the prompt the embedded AI answers first; its output is folded into one of Args before the tool runs, so the model writes the content and the tool only delivers it. */
|
|
public var draft: String?
|
|
/** DraftInto names the argument the drafted text lands in. Empty means \"brief\". */
|
|
public var draftInto: String?
|
|
/** Enabled is the admin on/off lever. A NIL pointer reads as ENABLED (absence == on): a legacy/org curriculum that omits the field keeps every step, and only an explicit `enabled: false` (an admin disable) drops a step from the journey. See on() in blueprint.go and the Blueprint.Curriculum() projection. */
|
|
public var enabled: Bool?
|
|
/** ID is the stable slug the whole plane addresses this step by — the value in `deps`, in `next`, in the progress rows, and in the URL of every step route. Renaming it orphans an org's recorded progress for this step. */
|
|
public var id: String?
|
|
/** Section is the id of the phase this step groups under. A disabled section takes its steps out of the journey with it. */
|
|
public var section: String?
|
|
/** Signal, when set, names a machine detector (detect.go). When the detector reports the org's real state present, the step auto-marks done. */
|
|
public var signal: String?
|
|
/** Title is the one-line quest as a person reads it in the checklist. */
|
|
public var title: String?
|
|
/** Tool, when set, names the MCP tool the Business AI runs for \"do it for me\". A step with no tool can only be completed by a person; it is the field the `automatable` flag on every projection of this step is derived from. */
|
|
public var tool: String?
|
|
|
|
public init(args: [String: JSONValue]? = nil, deps: [String]? = nil, detail: String? = nil, draft: String? = nil, draftInto: String? = nil, enabled: Bool? = nil, id: String? = nil, section: String? = nil, signal: String? = nil, title: String? = nil, tool: String? = nil) {
|
|
self.args = args
|
|
self.deps = deps
|
|
self.detail = detail
|
|
self.draft = draft
|
|
self.draftInto = draftInto
|
|
self.enabled = enabled
|
|
self.id = id
|
|
self.section = section
|
|
self.signal = signal
|
|
self.title = title
|
|
self.tool = tool
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case args
|
|
case deps
|
|
case detail
|
|
case draft
|
|
case draftInto
|
|
case enabled
|
|
case id
|
|
case section
|
|
case signal
|
|
case title
|
|
case tool
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(args, forKey: .args)
|
|
try container.encodeIfPresent(deps, forKey: .deps)
|
|
try container.encodeIfPresent(detail, forKey: .detail)
|
|
try container.encodeIfPresent(draft, forKey: .draft)
|
|
try container.encodeIfPresent(draftInto, forKey: .draftInto)
|
|
try container.encodeIfPresent(enabled, forKey: .enabled)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(section, forKey: .section)
|
|
try container.encodeIfPresent(signal, forKey: .signal)
|
|
try container.encodeIfPresent(title, forKey: .title)
|
|
try container.encodeIfPresent(tool, forKey: .tool)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension JourneyStep: Identifiable {}
|