textus 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +62 -54
- data/SPEC.md +62 -187
- data/docs/architecture/README.md +88 -77
- data/exe/textus +1 -1
- data/lib/textus/action/accept.rb +53 -0
- data/lib/textus/action/audit.rb +133 -0
- data/lib/textus/action/base.rb +42 -0
- data/lib/textus/{read → action}/blame.rb +30 -22
- data/lib/textus/action/boot.rb +26 -0
- data/lib/textus/action/data_mv.rb +71 -0
- data/lib/textus/action/deps.rb +48 -0
- data/lib/textus/action/doctor.rb +26 -0
- data/lib/textus/action/drain.rb +41 -0
- data/lib/textus/action/enqueue.rb +55 -0
- data/lib/textus/action/get.rb +80 -0
- data/lib/textus/action/jobs.rb +38 -0
- data/lib/textus/action/key_delete.rb +46 -0
- data/lib/textus/action/key_delete_prefix.rb +46 -0
- data/lib/textus/action/key_mv.rb +143 -0
- data/lib/textus/action/key_mv_prefix.rb +59 -0
- data/lib/textus/action/list.rb +44 -0
- data/lib/textus/action/propose.rb +54 -0
- data/lib/textus/action/published.rb +26 -0
- data/lib/textus/action/pulse/scanner.rb +118 -0
- data/lib/textus/action/pulse.rb +87 -0
- data/lib/textus/action/put.rb +63 -0
- data/lib/textus/action/rdeps.rb +49 -0
- data/lib/textus/action/reject.rb +49 -0
- data/lib/textus/action/rule_explain.rb +95 -0
- data/lib/textus/action/rule_lint.rb +70 -0
- data/lib/textus/action/rule_list.rb +46 -0
- data/lib/textus/action/schema_envelope.rb +31 -0
- data/lib/textus/action/uid.rb +35 -0
- data/lib/textus/action/where.rb +38 -0
- data/lib/textus/action/write_verb.rb +58 -0
- data/lib/textus/background/job/base.rb +27 -0
- data/lib/textus/background/job/materialize.rb +31 -0
- data/lib/textus/background/job/refresh.rb +22 -0
- data/lib/textus/background/job/sweep.rb +31 -0
- data/lib/textus/background/job.rb +19 -0
- data/lib/textus/background/plan.rb +9 -0
- data/lib/textus/background/planner/plan.rb +113 -0
- data/lib/textus/{maintenance → background}/retention/apply.rb +7 -9
- data/lib/textus/background/worker.rb +67 -0
- data/lib/textus/boot.rb +53 -45
- data/lib/textus/command.rb +36 -0
- data/lib/textus/container.rb +1 -1
- data/lib/textus/{domain → core}/duration.rb +1 -1
- data/lib/textus/{domain → core}/freshness/evaluator.rb +11 -11
- data/lib/textus/{domain → core}/freshness/verdict.rb +2 -2
- data/lib/textus/{domain → core}/freshness.rb +2 -2
- data/lib/textus/{domain → core}/retention/sweep.rb +7 -7
- data/lib/textus/{domain → core}/retention.rb +2 -2
- data/lib/textus/{domain → core}/sentinel.rb +1 -1
- data/lib/textus/doctor/check/generator_drift.rb +1 -1
- data/lib/textus/doctor/check/handler_permit.rb +34 -0
- data/lib/textus/doctor/check/hooks.rb +11 -18
- data/lib/textus/doctor/check/illegal_keys.rb +1 -1
- data/lib/textus/doctor/check/intake_registration.rb +5 -5
- data/lib/textus/doctor/check/proposal_targets.rb +3 -3
- data/lib/textus/doctor/check/rule_ambiguity.rb +2 -2
- data/lib/textus/doctor/check/schema_violations.rb +8 -2
- data/lib/textus/doctor/check.rb +12 -9
- data/lib/textus/{read → doctor}/validator.rb +22 -13
- data/lib/textus/doctor.rb +6 -6
- data/lib/textus/envelope/io/writer.rb +65 -36
- data/lib/textus/envelope.rb +5 -3
- data/lib/textus/errors.rb +17 -9
- data/lib/textus/events.rb +21 -0
- data/lib/textus/gate/auth.rb +181 -0
- data/lib/textus/gate.rb +114 -0
- data/lib/textus/init/templates/machine_intake.rb +39 -35
- data/lib/textus/init/templates/orientation_reducer.rb +15 -11
- data/lib/textus/init.rb +90 -73
- data/lib/textus/key/path.rb +9 -2
- data/lib/textus/layout.rb +13 -0
- data/lib/textus/manifest/data.rb +14 -14
- data/lib/textus/manifest/entry/base.rb +15 -11
- data/lib/textus/manifest/entry/parser.rb +6 -6
- data/lib/textus/manifest/entry/produced.rb +3 -2
- data/lib/textus/manifest/entry/publish/mode.rb +1 -1
- data/lib/textus/manifest/entry/publish/to_paths.rb +2 -1
- data/lib/textus/manifest/entry/validators/events.rb +1 -1
- data/lib/textus/{domain/policy/handler_allowlist.rb → manifest/policy/handler_permit.rb} +4 -4
- data/lib/textus/{domain → manifest}/policy/matcher.rb +2 -2
- data/lib/textus/{domain → manifest}/policy/publish_target.rb +2 -2
- data/lib/textus/manifest/policy/react.rb +30 -0
- data/lib/textus/{domain → manifest}/policy/retention.rb +3 -3
- data/lib/textus/{domain → manifest}/policy/source.rb +24 -19
- data/lib/textus/manifest/policy.rb +36 -48
- data/lib/textus/manifest/resolver.rb +3 -2
- data/lib/textus/manifest/rules.rb +4 -4
- data/lib/textus/manifest/schema/keys.rb +17 -11
- data/lib/textus/manifest/schema/validator.rb +24 -22
- data/lib/textus/manifest/schema/vocabulary.rb +1 -1
- data/lib/textus/manifest/schema.rb +2 -2
- data/lib/textus/manifest.rb +2 -2
- data/lib/textus/{produce → pipeline}/acquire/handler.rb +2 -2
- data/lib/textus/{produce → pipeline}/acquire/intake.rb +22 -20
- data/lib/textus/{produce → pipeline}/acquire/projection.rb +13 -11
- data/lib/textus/{produce → pipeline}/acquire/serializer/json.rb +2 -2
- data/lib/textus/{produce → pipeline}/acquire/serializer/text.rb +1 -1
- data/lib/textus/{produce → pipeline}/acquire/serializer/yaml.rb +2 -2
- data/lib/textus/{produce → pipeline}/acquire/serializer.rb +1 -1
- data/lib/textus/{produce → pipeline}/engine.rb +7 -5
- data/lib/textus/{produce → pipeline}/render.rb +3 -1
- data/lib/textus/ports/audit_log.rb +31 -5
- data/lib/textus/ports/audit_subscriber.rb +4 -4
- data/lib/textus/{domain/jobs → ports/queue}/job.rb +19 -12
- data/lib/textus/ports/queue.rb +1 -1
- data/lib/textus/ports/sentinel_store.rb +2 -2
- data/lib/textus/ports/watcher_lock.rb +48 -0
- data/lib/textus/projection.rb +8 -8
- data/lib/textus/schema/tools.rb +4 -3
- data/lib/textus/session.rb +6 -3
- data/lib/textus/step/base.rb +35 -0
- data/lib/textus/step/builtin/csv_fetch.rb +19 -0
- data/lib/textus/step/builtin/ical_events_fetch.rb +30 -0
- data/lib/textus/step/builtin/json_fetch.rb +18 -0
- data/lib/textus/step/builtin/markdown_links_fetch.rb +20 -0
- data/lib/textus/step/builtin/rss_fetch.rb +26 -0
- data/lib/textus/step/builtin.rb +22 -0
- data/lib/textus/{hooks → step}/catalog.rb +3 -3
- data/lib/textus/{hooks → step}/context.rb +15 -13
- data/lib/textus/step/discovery.rb +24 -0
- data/lib/textus/{hooks → step}/error_log.rb +1 -1
- data/lib/textus/{hooks → step}/event_bus.rb +15 -16
- data/lib/textus/step/fetch.rb +13 -0
- data/lib/textus/{hooks → step}/fire_report.rb +1 -1
- data/lib/textus/step/loader.rb +108 -0
- data/lib/textus/step/observe.rb +31 -0
- data/lib/textus/step/registry_store.rb +66 -0
- data/lib/textus/{hooks → step}/signature.rb +1 -1
- data/lib/textus/step/transform.rb +12 -0
- data/lib/textus/step/validate.rb +11 -0
- data/lib/textus/step.rb +10 -0
- data/lib/textus/store.rb +17 -15
- data/lib/textus/surfaces/cli/group/data.rb +11 -0
- data/lib/textus/surfaces/cli/group/key.rb +11 -0
- data/lib/textus/surfaces/cli/group/mcp.rb +11 -0
- data/lib/textus/surfaces/cli/group/rule.rb +11 -0
- data/lib/textus/surfaces/cli/group/schema.rb +11 -0
- data/lib/textus/surfaces/cli/group.rb +50 -0
- data/lib/textus/surfaces/cli/runner.rb +236 -0
- data/lib/textus/surfaces/cli/verb/doctor.rb +21 -0
- data/lib/textus/surfaces/cli/verb/get.rb +21 -0
- data/lib/textus/surfaces/cli/verb/init.rb +20 -0
- data/lib/textus/surfaces/cli/verb/mcp_serve.rb +24 -0
- data/lib/textus/surfaces/cli/verb/put.rb +30 -0
- data/lib/textus/surfaces/cli/verb/schema_diff.rb +17 -0
- data/lib/textus/surfaces/cli/verb/schema_init.rb +21 -0
- data/lib/textus/surfaces/cli/verb/schema_migrate.rb +21 -0
- data/lib/textus/surfaces/cli/verb/watch.rb +19 -0
- data/lib/textus/surfaces/cli/verb.rb +111 -0
- data/lib/textus/surfaces/cli.rb +148 -0
- data/lib/textus/surfaces/mcp/catalog.rb +99 -0
- data/lib/textus/surfaces/mcp/errors.rb +34 -0
- data/lib/textus/surfaces/mcp/server.rb +145 -0
- data/lib/textus/surfaces/mcp/session.rb +9 -0
- data/lib/textus/surfaces/mcp/tool_schemas.rb +17 -0
- data/lib/textus/surfaces/mcp.rb +8 -0
- data/lib/textus/surfaces/role_scope.rb +38 -0
- data/lib/textus/surfaces/watcher.rb +38 -0
- data/lib/textus/version.rb +1 -1
- data/lib/textus.rb +64 -22
- metadata +132 -118
- data/lib/textus/cli/group/hook.rb +0 -9
- data/lib/textus/cli/group/key.rb +0 -9
- data/lib/textus/cli/group/mcp.rb +0 -9
- data/lib/textus/cli/group/rule.rb +0 -9
- data/lib/textus/cli/group/schema.rb +0 -9
- data/lib/textus/cli/group/zone.rb +0 -9
- data/lib/textus/cli/group.rb +0 -48
- data/lib/textus/cli/runner.rb +0 -193
- data/lib/textus/cli/verb/doctor.rb +0 -17
- data/lib/textus/cli/verb/get.rb +0 -18
- data/lib/textus/cli/verb/hook_run.rb +0 -48
- data/lib/textus/cli/verb/hooks.rb +0 -50
- data/lib/textus/cli/verb/init.rb +0 -18
- data/lib/textus/cli/verb/mcp_serve.rb +0 -22
- data/lib/textus/cli/verb/put.rb +0 -30
- data/lib/textus/cli/verb/schema_diff.rb +0 -15
- data/lib/textus/cli/verb/schema_init.rb +0 -19
- data/lib/textus/cli/verb/schema_migrate.rb +0 -19
- data/lib/textus/cli/verb/serve.rb +0 -19
- data/lib/textus/cli/verb.rb +0 -116
- data/lib/textus/cli.rb +0 -138
- data/lib/textus/dispatcher.rb +0 -54
- data/lib/textus/doctor/check/handler_allowlist.rb +0 -34
- data/lib/textus/domain/action.rb +0 -9
- data/lib/textus/domain/jobs/registry.rb +0 -37
- data/lib/textus/domain/permission.rb +0 -7
- data/lib/textus/domain/policy/base_guards.rb +0 -25
- data/lib/textus/domain/policy/evaluation.rb +0 -15
- data/lib/textus/domain/policy/guard.rb +0 -35
- data/lib/textus/domain/policy/guard_factory.rb +0 -40
- data/lib/textus/domain/policy/predicates/author_held.rb +0 -33
- data/lib/textus/domain/policy/predicates/etag_match.rb +0 -32
- data/lib/textus/domain/policy/predicates/fresh_within.rb +0 -59
- data/lib/textus/domain/policy/predicates/registry.rb +0 -39
- data/lib/textus/domain/policy/predicates/schema_valid.rb +0 -61
- data/lib/textus/domain/policy/predicates/target_is_canon.rb +0 -33
- data/lib/textus/domain/policy/predicates/zone_writable_by.rb +0 -39
- data/lib/textus/hooks/builtin.rb +0 -70
- data/lib/textus/hooks/loader.rb +0 -54
- data/lib/textus/hooks/rpc_registry.rb +0 -43
- data/lib/textus/jobs/handlers.rb +0 -62
- data/lib/textus/jobs/scheduler.rb +0 -36
- data/lib/textus/jobs/seeder.rb +0 -57
- data/lib/textus/maintenance/drain.rb +0 -42
- data/lib/textus/maintenance/key_delete_prefix.rb +0 -48
- data/lib/textus/maintenance/key_mv_prefix.rb +0 -68
- data/lib/textus/maintenance/rule_lint.rb +0 -66
- data/lib/textus/maintenance/serve.rb +0 -30
- data/lib/textus/maintenance/worker.rb +0 -74
- data/lib/textus/maintenance/zone_mv.rb +0 -64
- data/lib/textus/maintenance.rb +0 -15
- data/lib/textus/mcp/catalog.rb +0 -70
- data/lib/textus/mcp/errors.rb +0 -32
- data/lib/textus/mcp/server.rb +0 -138
- data/lib/textus/mcp/session.rb +0 -7
- data/lib/textus/mcp/tool_schemas.rb +0 -15
- data/lib/textus/mcp.rb +0 -6
- data/lib/textus/mustache.rb +0 -117
- data/lib/textus/ports/produce_on_write_subscriber.rb +0 -73
- data/lib/textus/produce/events.rb +0 -36
- data/lib/textus/read/audit.rb +0 -130
- data/lib/textus/read/boot.rb +0 -26
- data/lib/textus/read/capabilities.rb +0 -70
- data/lib/textus/read/deps.rb +0 -38
- data/lib/textus/read/doctor.rb +0 -27
- data/lib/textus/read/freshness.rb +0 -152
- data/lib/textus/read/get.rb +0 -73
- data/lib/textus/read/jobs.rb +0 -31
- data/lib/textus/read/list.rb +0 -24
- data/lib/textus/read/published.rb +0 -22
- data/lib/textus/read/pulse.rb +0 -98
- data/lib/textus/read/rdeps.rb +0 -39
- data/lib/textus/read/rule_explain.rb +0 -96
- data/lib/textus/read/rule_list.rb +0 -54
- data/lib/textus/read/schema_envelope.rb +0 -25
- data/lib/textus/read/uid.rb +0 -29
- data/lib/textus/read/validate_all.rb +0 -36
- data/lib/textus/read/where.rb +0 -24
- data/lib/textus/role_scope.rb +0 -78
- data/lib/textus/write/accept.rb +0 -58
- data/lib/textus/write/enqueue.rb +0 -50
- data/lib/textus/write/key_delete.rb +0 -65
- data/lib/textus/write/key_mv.rb +0 -141
- data/lib/textus/write/propose.rb +0 -54
- data/lib/textus/write/put.rb +0 -74
- data/lib/textus/write/reject.rb +0 -68
data/lib/textus.rb
CHANGED
|
@@ -1,48 +1,90 @@
|
|
|
1
1
|
require "zeitwerk"
|
|
2
2
|
require_relative "textus/version"
|
|
3
3
|
require_relative "textus/errors"
|
|
4
|
-
require_relative "textus/mcp"
|
|
5
|
-
require_relative "textus/mcp/errors"
|
|
4
|
+
require_relative "textus/surfaces/mcp"
|
|
5
|
+
require_relative "textus/surfaces/mcp/errors"
|
|
6
6
|
|
|
7
7
|
loader = Zeitwerk::Loader.for_gem
|
|
8
8
|
loader.inflector.inflect(
|
|
9
9
|
"cli" => "CLI",
|
|
10
10
|
"json" => "Json",
|
|
11
11
|
"yaml" => "Yaml",
|
|
12
|
-
"hook_dsl_scanner" => "HookDSLScanner",
|
|
13
12
|
"io" => "IO",
|
|
14
13
|
"mcp" => "MCP",
|
|
15
14
|
"mcp_serve" => "MCPServe",
|
|
16
15
|
)
|
|
17
16
|
loader.ignore(File.expand_path("textus/errors.rb", __dir__))
|
|
18
|
-
loader.ignore(File.expand_path("textus/mcp.rb", __dir__))
|
|
19
|
-
loader.ignore(File.expand_path("textus/mcp/errors.rb", __dir__))
|
|
17
|
+
loader.ignore(File.expand_path("textus/surfaces/mcp.rb", __dir__))
|
|
18
|
+
loader.ignore(File.expand_path("textus/surfaces/mcp/errors.rb", __dir__))
|
|
20
19
|
# Scaffold sources copied verbatim into user stores by `textus init`. They are
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# templates for user-owned step classes, not gem constants — Zeitwerk must not
|
|
21
|
+
# manage or eager-load them.
|
|
23
22
|
loader.ignore(File.expand_path("textus/init/templates", __dir__))
|
|
24
23
|
loader.setup
|
|
25
24
|
loader.eager_load
|
|
26
25
|
|
|
27
|
-
#
|
|
28
|
-
|
|
26
|
+
# Verb symbol → Action class mapping. Replaces Textus::Dispatcher::VERBS.
|
|
27
|
+
Textus::Action::VERBS = {
|
|
28
|
+
put: Textus::Action::Put,
|
|
29
|
+
propose: Textus::Action::Propose,
|
|
30
|
+
key_delete: Textus::Action::KeyDelete,
|
|
31
|
+
key_mv: Textus::Action::KeyMv,
|
|
32
|
+
accept: Textus::Action::Accept,
|
|
33
|
+
reject: Textus::Action::Reject,
|
|
34
|
+
enqueue: Textus::Action::Enqueue,
|
|
35
|
+
get: Textus::Action::Get,
|
|
36
|
+
list: Textus::Action::List,
|
|
37
|
+
where: Textus::Action::Where,
|
|
38
|
+
uid: Textus::Action::Uid,
|
|
39
|
+
blame: Textus::Action::Blame,
|
|
40
|
+
audit: Textus::Action::Audit,
|
|
41
|
+
# materialize, refresh, sweep are Worker-only — not in VERBS
|
|
42
|
+
deps: Textus::Action::Deps,
|
|
43
|
+
rdeps: Textus::Action::Rdeps,
|
|
44
|
+
pulse: Textus::Action::Pulse,
|
|
45
|
+
rule_explain: Textus::Action::RuleExplain,
|
|
46
|
+
rule_list: Textus::Action::RuleList,
|
|
47
|
+
published: Textus::Action::Published,
|
|
48
|
+
schema_show: Textus::Action::SchemaEnvelope,
|
|
49
|
+
doctor: Textus::Action::Doctor,
|
|
50
|
+
boot: Textus::Action::Boot,
|
|
51
|
+
jobs: Textus::Action::Jobs,
|
|
52
|
+
data_mv: Textus::Action::DataMv,
|
|
53
|
+
key_mv_prefix: Textus::Action::KeyMvPrefix,
|
|
54
|
+
key_delete_prefix: Textus::Action::KeyDeletePrefix,
|
|
55
|
+
drain: Textus::Action::Drain,
|
|
56
|
+
rule_lint: Textus::Action::RuleLint,
|
|
57
|
+
}.freeze
|
|
58
|
+
|
|
59
|
+
# Derive CLI_VERBS after VERBS is available.
|
|
29
60
|
Textus::Boot::CLI_VERBS = Textus::Boot.build_cli_verbs.freeze
|
|
30
61
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
62
|
+
# Dynamic verb methods on Store (deferred after VERBS is defined).
|
|
63
|
+
Textus::Action::VERBS.each_key do |verb|
|
|
64
|
+
Textus::Store.define_method(verb) do |*args, role: Textus::Role::DEFAULT, **kwargs|
|
|
65
|
+
as(role).public_send(verb, *args, **kwargs)
|
|
66
|
+
end
|
|
34
67
|
|
|
35
|
-
|
|
36
|
-
|
|
68
|
+
Textus::Surfaces::RoleScope.define_method(verb) do |*args, **kwargs|
|
|
69
|
+
klass = Textus::Action::VERBS[verb]
|
|
70
|
+
cmd_class = Textus::Gate::VERB_COMMAND[verb]
|
|
71
|
+
inputs = if klass.respond_to?(:contract?) && klass.contract?
|
|
72
|
+
Textus::Contract::Binder.inputs_from_ordered(klass.contract, args, kwargs)
|
|
73
|
+
else
|
|
74
|
+
kwargs.transform_keys(&:to_sym)
|
|
75
|
+
end
|
|
37
76
|
|
|
38
|
-
|
|
39
|
-
|
|
77
|
+
role_value = if klass.respond_to?(:contract?) && klass.contract? &&
|
|
78
|
+
klass.contract.args.any? { |a| a.name == :role }
|
|
79
|
+
inputs[:role]
|
|
80
|
+
else
|
|
81
|
+
@role
|
|
82
|
+
end
|
|
40
83
|
|
|
41
|
-
|
|
42
|
-
@
|
|
43
|
-
blocks = @hook_blocks
|
|
44
|
-
@hook_blocks = []
|
|
45
|
-
blocks
|
|
46
|
-
end
|
|
84
|
+
filled = cmd_class.members.to_h { |m| [m, inputs.merge(role: role_value)[m]] }
|
|
85
|
+
@container.gate.dispatch(cmd_class.new(**filled), correlation_id: @correlation_id)
|
|
47
86
|
end
|
|
48
87
|
end
|
|
88
|
+
|
|
89
|
+
module Textus
|
|
90
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: textus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.53.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Patrick
|
|
@@ -23,6 +23,20 @@ dependencies:
|
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '3.0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: mustache
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.1'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.1'
|
|
26
40
|
- !ruby/object:Gem::Dependency
|
|
27
41
|
name: psych
|
|
28
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -110,29 +124,49 @@ files:
|
|
|
110
124
|
- docs/reference/conventions.md
|
|
111
125
|
- exe/textus
|
|
112
126
|
- lib/textus.rb
|
|
127
|
+
- lib/textus/action/accept.rb
|
|
128
|
+
- lib/textus/action/audit.rb
|
|
129
|
+
- lib/textus/action/base.rb
|
|
130
|
+
- lib/textus/action/blame.rb
|
|
131
|
+
- lib/textus/action/boot.rb
|
|
132
|
+
- lib/textus/action/data_mv.rb
|
|
133
|
+
- lib/textus/action/deps.rb
|
|
134
|
+
- lib/textus/action/doctor.rb
|
|
135
|
+
- lib/textus/action/drain.rb
|
|
136
|
+
- lib/textus/action/enqueue.rb
|
|
137
|
+
- lib/textus/action/get.rb
|
|
138
|
+
- lib/textus/action/jobs.rb
|
|
139
|
+
- lib/textus/action/key_delete.rb
|
|
140
|
+
- lib/textus/action/key_delete_prefix.rb
|
|
141
|
+
- lib/textus/action/key_mv.rb
|
|
142
|
+
- lib/textus/action/key_mv_prefix.rb
|
|
143
|
+
- lib/textus/action/list.rb
|
|
144
|
+
- lib/textus/action/propose.rb
|
|
145
|
+
- lib/textus/action/published.rb
|
|
146
|
+
- lib/textus/action/pulse.rb
|
|
147
|
+
- lib/textus/action/pulse/scanner.rb
|
|
148
|
+
- lib/textus/action/put.rb
|
|
149
|
+
- lib/textus/action/rdeps.rb
|
|
150
|
+
- lib/textus/action/reject.rb
|
|
151
|
+
- lib/textus/action/rule_explain.rb
|
|
152
|
+
- lib/textus/action/rule_lint.rb
|
|
153
|
+
- lib/textus/action/rule_list.rb
|
|
154
|
+
- lib/textus/action/schema_envelope.rb
|
|
155
|
+
- lib/textus/action/uid.rb
|
|
156
|
+
- lib/textus/action/where.rb
|
|
157
|
+
- lib/textus/action/write_verb.rb
|
|
158
|
+
- lib/textus/background/job.rb
|
|
159
|
+
- lib/textus/background/job/base.rb
|
|
160
|
+
- lib/textus/background/job/materialize.rb
|
|
161
|
+
- lib/textus/background/job/refresh.rb
|
|
162
|
+
- lib/textus/background/job/sweep.rb
|
|
163
|
+
- lib/textus/background/plan.rb
|
|
164
|
+
- lib/textus/background/planner/plan.rb
|
|
165
|
+
- lib/textus/background/retention/apply.rb
|
|
166
|
+
- lib/textus/background/worker.rb
|
|
113
167
|
- lib/textus/boot.rb
|
|
114
168
|
- lib/textus/call.rb
|
|
115
|
-
- lib/textus/
|
|
116
|
-
- lib/textus/cli/group.rb
|
|
117
|
-
- lib/textus/cli/group/hook.rb
|
|
118
|
-
- lib/textus/cli/group/key.rb
|
|
119
|
-
- lib/textus/cli/group/mcp.rb
|
|
120
|
-
- lib/textus/cli/group/rule.rb
|
|
121
|
-
- lib/textus/cli/group/schema.rb
|
|
122
|
-
- lib/textus/cli/group/zone.rb
|
|
123
|
-
- lib/textus/cli/runner.rb
|
|
124
|
-
- lib/textus/cli/verb.rb
|
|
125
|
-
- lib/textus/cli/verb/doctor.rb
|
|
126
|
-
- lib/textus/cli/verb/get.rb
|
|
127
|
-
- lib/textus/cli/verb/hook_run.rb
|
|
128
|
-
- lib/textus/cli/verb/hooks.rb
|
|
129
|
-
- lib/textus/cli/verb/init.rb
|
|
130
|
-
- lib/textus/cli/verb/mcp_serve.rb
|
|
131
|
-
- lib/textus/cli/verb/put.rb
|
|
132
|
-
- lib/textus/cli/verb/schema_diff.rb
|
|
133
|
-
- lib/textus/cli/verb/schema_init.rb
|
|
134
|
-
- lib/textus/cli/verb/schema_migrate.rb
|
|
135
|
-
- lib/textus/cli/verb/serve.rb
|
|
169
|
+
- lib/textus/command.rb
|
|
136
170
|
- lib/textus/container.rb
|
|
137
171
|
- lib/textus/contract.rb
|
|
138
172
|
- lib/textus/contract/around.rb
|
|
@@ -141,13 +175,19 @@ files:
|
|
|
141
175
|
- lib/textus/contract/resources/cursor.rb
|
|
142
176
|
- lib/textus/contract/sources.rb
|
|
143
177
|
- lib/textus/contract/view.rb
|
|
178
|
+
- lib/textus/core/duration.rb
|
|
179
|
+
- lib/textus/core/freshness.rb
|
|
180
|
+
- lib/textus/core/freshness/evaluator.rb
|
|
181
|
+
- lib/textus/core/freshness/verdict.rb
|
|
182
|
+
- lib/textus/core/retention.rb
|
|
183
|
+
- lib/textus/core/retention/sweep.rb
|
|
184
|
+
- lib/textus/core/sentinel.rb
|
|
144
185
|
- lib/textus/cursor_store.rb
|
|
145
|
-
- lib/textus/dispatcher.rb
|
|
146
186
|
- lib/textus/doctor.rb
|
|
147
187
|
- lib/textus/doctor/check.rb
|
|
148
188
|
- lib/textus/doctor/check/audit_log.rb
|
|
149
189
|
- lib/textus/doctor/check/generator_drift.rb
|
|
150
|
-
- lib/textus/doctor/check/
|
|
190
|
+
- lib/textus/doctor/check/handler_permit.rb
|
|
151
191
|
- lib/textus/doctor/check/hooks.rb
|
|
152
192
|
- lib/textus/doctor/check/illegal_keys.rb
|
|
153
193
|
- lib/textus/doctor/check/intake_registration.rb
|
|
@@ -163,33 +203,7 @@ files:
|
|
|
163
203
|
- lib/textus/doctor/check/sentinels.rb
|
|
164
204
|
- lib/textus/doctor/check/templates.rb
|
|
165
205
|
- lib/textus/doctor/check/unowned_schema_fields.rb
|
|
166
|
-
- lib/textus/
|
|
167
|
-
- lib/textus/domain/duration.rb
|
|
168
|
-
- lib/textus/domain/freshness.rb
|
|
169
|
-
- lib/textus/domain/freshness/evaluator.rb
|
|
170
|
-
- lib/textus/domain/freshness/verdict.rb
|
|
171
|
-
- lib/textus/domain/jobs/job.rb
|
|
172
|
-
- lib/textus/domain/jobs/registry.rb
|
|
173
|
-
- lib/textus/domain/permission.rb
|
|
174
|
-
- lib/textus/domain/policy/base_guards.rb
|
|
175
|
-
- lib/textus/domain/policy/evaluation.rb
|
|
176
|
-
- lib/textus/domain/policy/guard.rb
|
|
177
|
-
- lib/textus/domain/policy/guard_factory.rb
|
|
178
|
-
- lib/textus/domain/policy/handler_allowlist.rb
|
|
179
|
-
- lib/textus/domain/policy/matcher.rb
|
|
180
|
-
- lib/textus/domain/policy/predicates/author_held.rb
|
|
181
|
-
- lib/textus/domain/policy/predicates/etag_match.rb
|
|
182
|
-
- lib/textus/domain/policy/predicates/fresh_within.rb
|
|
183
|
-
- lib/textus/domain/policy/predicates/registry.rb
|
|
184
|
-
- lib/textus/domain/policy/predicates/schema_valid.rb
|
|
185
|
-
- lib/textus/domain/policy/predicates/target_is_canon.rb
|
|
186
|
-
- lib/textus/domain/policy/predicates/zone_writable_by.rb
|
|
187
|
-
- lib/textus/domain/policy/publish_target.rb
|
|
188
|
-
- lib/textus/domain/policy/retention.rb
|
|
189
|
-
- lib/textus/domain/policy/source.rb
|
|
190
|
-
- lib/textus/domain/retention.rb
|
|
191
|
-
- lib/textus/domain/retention/sweep.rb
|
|
192
|
-
- lib/textus/domain/sentinel.rb
|
|
206
|
+
- lib/textus/doctor/validator.rb
|
|
193
207
|
- lib/textus/entry.rb
|
|
194
208
|
- lib/textus/entry/base.rb
|
|
195
209
|
- lib/textus/entry/json.rb
|
|
@@ -201,35 +215,17 @@ files:
|
|
|
201
215
|
- lib/textus/envelope/io/writer.rb
|
|
202
216
|
- lib/textus/errors.rb
|
|
203
217
|
- lib/textus/etag.rb
|
|
204
|
-
- lib/textus/
|
|
205
|
-
- lib/textus/
|
|
206
|
-
- lib/textus/
|
|
207
|
-
- lib/textus/hooks/error_log.rb
|
|
208
|
-
- lib/textus/hooks/event_bus.rb
|
|
209
|
-
- lib/textus/hooks/fire_report.rb
|
|
210
|
-
- lib/textus/hooks/loader.rb
|
|
211
|
-
- lib/textus/hooks/rpc_registry.rb
|
|
212
|
-
- lib/textus/hooks/signature.rb
|
|
218
|
+
- lib/textus/events.rb
|
|
219
|
+
- lib/textus/gate.rb
|
|
220
|
+
- lib/textus/gate/auth.rb
|
|
213
221
|
- lib/textus/init.rb
|
|
214
222
|
- lib/textus/init/templates/machine_intake.rb
|
|
215
223
|
- lib/textus/init/templates/orientation_reducer.rb
|
|
216
|
-
- lib/textus/jobs/handlers.rb
|
|
217
|
-
- lib/textus/jobs/scheduler.rb
|
|
218
|
-
- lib/textus/jobs/seeder.rb
|
|
219
224
|
- lib/textus/key/distance.rb
|
|
220
225
|
- lib/textus/key/grammar.rb
|
|
221
226
|
- lib/textus/key/matching.rb
|
|
222
227
|
- lib/textus/key/path.rb
|
|
223
228
|
- lib/textus/layout.rb
|
|
224
|
-
- lib/textus/maintenance.rb
|
|
225
|
-
- lib/textus/maintenance/drain.rb
|
|
226
|
-
- lib/textus/maintenance/key_delete_prefix.rb
|
|
227
|
-
- lib/textus/maintenance/key_mv_prefix.rb
|
|
228
|
-
- lib/textus/maintenance/retention/apply.rb
|
|
229
|
-
- lib/textus/maintenance/rule_lint.rb
|
|
230
|
-
- lib/textus/maintenance/serve.rb
|
|
231
|
-
- lib/textus/maintenance/worker.rb
|
|
232
|
-
- lib/textus/maintenance/zone_mv.rb
|
|
233
229
|
- lib/textus/manifest.rb
|
|
234
230
|
- lib/textus/manifest/capabilities.rb
|
|
235
231
|
- lib/textus/manifest/data.rb
|
|
@@ -253,76 +249,94 @@ files:
|
|
|
253
249
|
- lib/textus/manifest/entry/validators/ignore.rb
|
|
254
250
|
- lib/textus/manifest/entry/validators/publish.rb
|
|
255
251
|
- lib/textus/manifest/policy.rb
|
|
252
|
+
- lib/textus/manifest/policy/handler_permit.rb
|
|
253
|
+
- lib/textus/manifest/policy/matcher.rb
|
|
254
|
+
- lib/textus/manifest/policy/publish_target.rb
|
|
255
|
+
- lib/textus/manifest/policy/react.rb
|
|
256
|
+
- lib/textus/manifest/policy/retention.rb
|
|
257
|
+
- lib/textus/manifest/policy/source.rb
|
|
256
258
|
- lib/textus/manifest/resolver.rb
|
|
257
259
|
- lib/textus/manifest/rules.rb
|
|
258
260
|
- lib/textus/manifest/schema.rb
|
|
259
261
|
- lib/textus/manifest/schema/keys.rb
|
|
260
262
|
- lib/textus/manifest/schema/validator.rb
|
|
261
263
|
- lib/textus/manifest/schema/vocabulary.rb
|
|
262
|
-
- lib/textus/
|
|
263
|
-
- lib/textus/
|
|
264
|
-
- lib/textus/
|
|
265
|
-
- lib/textus/
|
|
266
|
-
- lib/textus/
|
|
267
|
-
- lib/textus/
|
|
268
|
-
- lib/textus/
|
|
264
|
+
- lib/textus/pipeline/acquire/handler.rb
|
|
265
|
+
- lib/textus/pipeline/acquire/intake.rb
|
|
266
|
+
- lib/textus/pipeline/acquire/projection.rb
|
|
267
|
+
- lib/textus/pipeline/acquire/serializer.rb
|
|
268
|
+
- lib/textus/pipeline/acquire/serializer/json.rb
|
|
269
|
+
- lib/textus/pipeline/acquire/serializer/text.rb
|
|
270
|
+
- lib/textus/pipeline/acquire/serializer/yaml.rb
|
|
271
|
+
- lib/textus/pipeline/engine.rb
|
|
272
|
+
- lib/textus/pipeline/render.rb
|
|
269
273
|
- lib/textus/ports/audit_log.rb
|
|
270
274
|
- lib/textus/ports/audit_subscriber.rb
|
|
271
275
|
- lib/textus/ports/build_lock.rb
|
|
272
276
|
- lib/textus/ports/clock.rb
|
|
273
|
-
- lib/textus/ports/produce_on_write_subscriber.rb
|
|
274
277
|
- lib/textus/ports/publisher.rb
|
|
275
278
|
- lib/textus/ports/queue.rb
|
|
279
|
+
- lib/textus/ports/queue/job.rb
|
|
276
280
|
- lib/textus/ports/sentinel_store.rb
|
|
277
281
|
- lib/textus/ports/storage/file_stat.rb
|
|
278
282
|
- lib/textus/ports/storage/file_store.rb
|
|
279
|
-
- lib/textus/
|
|
280
|
-
- lib/textus/produce/acquire/intake.rb
|
|
281
|
-
- lib/textus/produce/acquire/projection.rb
|
|
282
|
-
- lib/textus/produce/acquire/serializer.rb
|
|
283
|
-
- lib/textus/produce/acquire/serializer/json.rb
|
|
284
|
-
- lib/textus/produce/acquire/serializer/text.rb
|
|
285
|
-
- lib/textus/produce/acquire/serializer/yaml.rb
|
|
286
|
-
- lib/textus/produce/engine.rb
|
|
287
|
-
- lib/textus/produce/events.rb
|
|
288
|
-
- lib/textus/produce/render.rb
|
|
283
|
+
- lib/textus/ports/watcher_lock.rb
|
|
289
284
|
- lib/textus/projection.rb
|
|
290
|
-
- lib/textus/read/audit.rb
|
|
291
|
-
- lib/textus/read/blame.rb
|
|
292
|
-
- lib/textus/read/boot.rb
|
|
293
|
-
- lib/textus/read/capabilities.rb
|
|
294
|
-
- lib/textus/read/deps.rb
|
|
295
|
-
- lib/textus/read/doctor.rb
|
|
296
|
-
- lib/textus/read/freshness.rb
|
|
297
|
-
- lib/textus/read/get.rb
|
|
298
|
-
- lib/textus/read/jobs.rb
|
|
299
|
-
- lib/textus/read/list.rb
|
|
300
|
-
- lib/textus/read/published.rb
|
|
301
|
-
- lib/textus/read/pulse.rb
|
|
302
|
-
- lib/textus/read/rdeps.rb
|
|
303
|
-
- lib/textus/read/rule_explain.rb
|
|
304
|
-
- lib/textus/read/rule_list.rb
|
|
305
|
-
- lib/textus/read/schema_envelope.rb
|
|
306
|
-
- lib/textus/read/uid.rb
|
|
307
|
-
- lib/textus/read/validate_all.rb
|
|
308
|
-
- lib/textus/read/validator.rb
|
|
309
|
-
- lib/textus/read/where.rb
|
|
310
285
|
- lib/textus/role.rb
|
|
311
|
-
- lib/textus/role_scope.rb
|
|
312
286
|
- lib/textus/schema.rb
|
|
313
287
|
- lib/textus/schema/tools.rb
|
|
314
288
|
- lib/textus/schemas.rb
|
|
315
289
|
- lib/textus/session.rb
|
|
290
|
+
- lib/textus/step.rb
|
|
291
|
+
- lib/textus/step/base.rb
|
|
292
|
+
- lib/textus/step/builtin.rb
|
|
293
|
+
- lib/textus/step/builtin/csv_fetch.rb
|
|
294
|
+
- lib/textus/step/builtin/ical_events_fetch.rb
|
|
295
|
+
- lib/textus/step/builtin/json_fetch.rb
|
|
296
|
+
- lib/textus/step/builtin/markdown_links_fetch.rb
|
|
297
|
+
- lib/textus/step/builtin/rss_fetch.rb
|
|
298
|
+
- lib/textus/step/catalog.rb
|
|
299
|
+
- lib/textus/step/context.rb
|
|
300
|
+
- lib/textus/step/discovery.rb
|
|
301
|
+
- lib/textus/step/error_log.rb
|
|
302
|
+
- lib/textus/step/event_bus.rb
|
|
303
|
+
- lib/textus/step/fetch.rb
|
|
304
|
+
- lib/textus/step/fire_report.rb
|
|
305
|
+
- lib/textus/step/loader.rb
|
|
306
|
+
- lib/textus/step/observe.rb
|
|
307
|
+
- lib/textus/step/registry_store.rb
|
|
308
|
+
- lib/textus/step/signature.rb
|
|
309
|
+
- lib/textus/step/transform.rb
|
|
310
|
+
- lib/textus/step/validate.rb
|
|
316
311
|
- lib/textus/store.rb
|
|
312
|
+
- lib/textus/surfaces/cli.rb
|
|
313
|
+
- lib/textus/surfaces/cli/group.rb
|
|
314
|
+
- lib/textus/surfaces/cli/group/data.rb
|
|
315
|
+
- lib/textus/surfaces/cli/group/key.rb
|
|
316
|
+
- lib/textus/surfaces/cli/group/mcp.rb
|
|
317
|
+
- lib/textus/surfaces/cli/group/rule.rb
|
|
318
|
+
- lib/textus/surfaces/cli/group/schema.rb
|
|
319
|
+
- lib/textus/surfaces/cli/runner.rb
|
|
320
|
+
- lib/textus/surfaces/cli/verb.rb
|
|
321
|
+
- lib/textus/surfaces/cli/verb/doctor.rb
|
|
322
|
+
- lib/textus/surfaces/cli/verb/get.rb
|
|
323
|
+
- lib/textus/surfaces/cli/verb/init.rb
|
|
324
|
+
- lib/textus/surfaces/cli/verb/mcp_serve.rb
|
|
325
|
+
- lib/textus/surfaces/cli/verb/put.rb
|
|
326
|
+
- lib/textus/surfaces/cli/verb/schema_diff.rb
|
|
327
|
+
- lib/textus/surfaces/cli/verb/schema_init.rb
|
|
328
|
+
- lib/textus/surfaces/cli/verb/schema_migrate.rb
|
|
329
|
+
- lib/textus/surfaces/cli/verb/watch.rb
|
|
330
|
+
- lib/textus/surfaces/mcp.rb
|
|
331
|
+
- lib/textus/surfaces/mcp/catalog.rb
|
|
332
|
+
- lib/textus/surfaces/mcp/errors.rb
|
|
333
|
+
- lib/textus/surfaces/mcp/server.rb
|
|
334
|
+
- lib/textus/surfaces/mcp/session.rb
|
|
335
|
+
- lib/textus/surfaces/mcp/tool_schemas.rb
|
|
336
|
+
- lib/textus/surfaces/role_scope.rb
|
|
337
|
+
- lib/textus/surfaces/watcher.rb
|
|
317
338
|
- lib/textus/uid.rb
|
|
318
339
|
- lib/textus/version.rb
|
|
319
|
-
- lib/textus/write/accept.rb
|
|
320
|
-
- lib/textus/write/enqueue.rb
|
|
321
|
-
- lib/textus/write/key_delete.rb
|
|
322
|
-
- lib/textus/write/key_mv.rb
|
|
323
|
-
- lib/textus/write/propose.rb
|
|
324
|
-
- lib/textus/write/put.rb
|
|
325
|
-
- lib/textus/write/reject.rb
|
|
326
340
|
homepage: https://github.com/patrick204nqh/textus
|
|
327
341
|
licenses:
|
|
328
342
|
- MIT
|
data/lib/textus/cli/group/key.rb
DELETED
data/lib/textus/cli/group/mcp.rb
DELETED
data/lib/textus/cli/group.rb
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
module Textus
|
|
2
|
-
class CLI
|
|
3
|
-
class Group < Verb
|
|
4
|
-
class << self
|
|
5
|
-
# Subcommands are auto-derived: any Verb descendant whose
|
|
6
|
-
# `parent_group` is this group counts as a subcommand. Sorted
|
|
7
|
-
# alphabetically by command_name for stable help output.
|
|
8
|
-
def subcommands
|
|
9
|
-
Textus::CLI::Runner.install!
|
|
10
|
-
Verb.descendants
|
|
11
|
-
.select { |k| k.parent_group == self && k.command_name }
|
|
12
|
-
.sort_by(&:command_name)
|
|
13
|
-
.to_h { |k| [k.command_name, k] }
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def needs_store?
|
|
17
|
-
# Delegate to the matched subcommand at parse time; default true.
|
|
18
|
-
true
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def parse(argv)
|
|
23
|
-
subs = self.class.subcommands
|
|
24
|
-
subname = argv.shift
|
|
25
|
-
if subname.nil?
|
|
26
|
-
raise UsageError.new(
|
|
27
|
-
"#{self.class.command_name} requires a subcommand: #{subs.keys.join(", ")}",
|
|
28
|
-
)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
@sub_klass = subs[subname]
|
|
32
|
-
unless @sub_klass
|
|
33
|
-
raise UsageError.new(
|
|
34
|
-
"unknown #{self.class.command_name} subcommand '#{subname}'. " \
|
|
35
|
-
"Valid: #{subs.keys.join(", ")}",
|
|
36
|
-
)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
@sub = @sub_klass.new(stdin: @stdin, stdout: @stdout, stderr: @stderr, cwd: @cwd)
|
|
40
|
-
@sub.parse(argv)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def call(store)
|
|
44
|
-
@sub.call(@sub_klass.needs_store? ? store : nil)
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|