Class: Agentilda::Linear::Action
- Inherits:
-
Data
- Object
- Data
- Agentilda::Linear::Action
- Defined in:
- lib/agentilda/linear/import.rb
Overview
One thing that would happen in Linear.
args is deliberately shaped as the Linear MCP server's save_issue
arguments, because that server addresses everything by
the names a human already knows — a team by its key, a project by its
name, a workflow state by its name, an issue by its identifier. Emitting
exactly that shape means the JSON this produces can drive either
transport unchanged: Push turns it into GraphQL, and the skill hands
it to the MCP tools as-is. One contract, so the two cannot drift.
Instance Attribute Summary collapse
-
#args ⇒ Hash
readonly
The MCP argument shape.
-
#digest ⇒ String
readonly
Fingerprint of
args, recorded after a push. -
#identifier ⇒ String?
readonly
What Linear already calls it, when it exists.
-
#kind ⇒ Symbol
readonly
:issuefor a plan,:subissuefor a unit of one. -
#op ⇒ Symbol
readonly
:create,:updateor:skip. -
#ordinal ⇒ String
readonly
The plan this belongs to, e.g.
-
#reason ⇒ String
readonly
Why this operation and not another.
-
#title ⇒ String
readonly
For the human reading the dry run.
-
#unit ⇒ String?
readonly
The Unit#key, nil for a plan's own issue.
Instance Method Summary collapse
-
#child? ⇒ Boolean
Whether this issue hangs off another.
-
#pending? ⇒ Boolean
Whether this would change anything.
-
#to_h_json ⇒ Hash
For
--format json.
Instance Attribute Details
#args ⇒ Hash (readonly)
Returns the MCP argument shape.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#digest ⇒ String (readonly)
Returns fingerprint of args, recorded after a push.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#identifier ⇒ String? (readonly)
Returns what Linear already calls it, when it exists.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#kind ⇒ Symbol (readonly)
Returns :issue for a plan, :subissue for a unit of one.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#op ⇒ Symbol (readonly)
Returns :create, :update or :skip.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#ordinal ⇒ String (readonly)
Returns the plan this belongs to, e.g. "003.00".
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#reason ⇒ String (readonly)
Returns why this operation and not another.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#title ⇒ String (readonly)
Returns for the human reading the dry run.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
#unit ⇒ String? (readonly)
Returns the Unit#key, nil for a plan's own issue.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/agentilda/linear/import.rb', line 35 Action = Data.define(:kind, :op, :ordinal, :unit, :identifier, :title, :digest, :args, :reason) do # @return [Boolean] whether this would change anything def pending? = op != :skip # @return [Boolean] whether this issue hangs off another def child? = kind == :subissue # @return [Hash] for `--format json` def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end end |
Instance Method Details
#child? ⇒ Boolean
Returns whether this issue hangs off another.
40 |
# File 'lib/agentilda/linear/import.rb', line 40 def child? = kind == :subissue |
#pending? ⇒ Boolean
Returns whether this would change anything.
37 |
# File 'lib/agentilda/linear/import.rb', line 37 def pending? = op != :skip |
#to_h_json ⇒ Hash
Returns for --format json.
43 44 45 |
# File 'lib/agentilda/linear/import.rb', line 43 def to_h_json {kind:, op:, plan: ordinal, unit:, identifier:, title:, digest:, args:}.compact end |