perttool 0.5.0 → 0.5.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +51 -28
  3. package/dist/cli.js +24 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/command/actuals-discovery.d.ts.map +1 -1
  6. package/dist/command/actuals-discovery.js +68 -11
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/history/git-probe.d.ts +4 -0
  9. package/dist/history/git-probe.d.ts.map +1 -1
  10. package/dist/history/git-probe.js +23 -14
  11. package/dist/history/git-probe.js.map +1 -1
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/schema/registry.d.ts +36 -0
  17. package/dist/schema/registry.d.ts.map +1 -0
  18. package/dist/schema/registry.js +156 -0
  19. package/dist/schema/registry.js.map +1 -0
  20. package/dist/version.d.ts +1 -1
  21. package/dist/version.js +1 -1
  22. package/package.json +5 -2
  23. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +152 -0
  24. package/schemas/Perttool.AnalysisResult.v4.schema.json +124 -0
  25. package/schemas/Perttool.CheckResult.v3.schema.json +159 -0
  26. package/schemas/Perttool.CliError.v1.schema.json +83 -0
  27. package/schemas/Perttool.CommandHelpResult.v1.schema.json +165 -0
  28. package/schemas/Perttool.Common.v1.schema.json +508 -0
  29. package/schemas/Perttool.ExportResult.v1.schema.json +96 -0
  30. package/schemas/Perttool.FormatResult.v1.schema.json +82 -0
  31. package/schemas/Perttool.GuideResult.v1.schema.json +104 -0
  32. package/schemas/Perttool.ImportResult.v1.schema.json +111 -0
  33. package/schemas/Perttool.InitResult.v1.schema.json +70 -0
  34. package/schemas/Perttool.MutationResult.v3.schema.json +143 -0
  35. package/schemas/Perttool.NextResult.v5.schema.json +139 -0
  36. package/schemas/Perttool.OverrideDecision.v1.schema.json +170 -0
  37. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +139 -0
  38. package/schemas/Perttool.ProjectResult.v3.schema.json +144 -0
  39. package/schemas/Perttool.SchemaResult.v1.schema.json +84 -0
  40. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +205 -0
  41. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +102 -0
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.OverrideDecision.v1.schema.json",
4
+ "title": "Perttool.OverrideDecision.v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "tool_version",
9
+ "operation",
10
+ "ok",
11
+ "diagnostics",
12
+ "diagnostics_truncated",
13
+ "override"
14
+ ],
15
+ "properties": {
16
+ "schema_version": {
17
+ "const": "Perttool.OverrideDecision.v1"
18
+ },
19
+ "tool_version": {
20
+ "type": "string"
21
+ },
22
+ "operation": {
23
+ "const": "recommendation.override.validate"
24
+ },
25
+ "ok": {
26
+ "type": "boolean"
27
+ },
28
+ "diagnostics": {
29
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
30
+ },
31
+ "diagnostics_truncated": {
32
+ "const": false
33
+ },
34
+ "override": {
35
+ "oneOf": [
36
+ {
37
+ "type": "object",
38
+ "required": [
39
+ "override_contract_version",
40
+ "override_id",
41
+ "source",
42
+ "actor",
43
+ "decided_at",
44
+ "reason",
45
+ "selection",
46
+ "task_decisions",
47
+ "feasibility",
48
+ "single_use"
49
+ ],
50
+ "properties": {
51
+ "override_contract_version": {
52
+ "const": 1
53
+ },
54
+ "override_id": {
55
+ "type": "string",
56
+ "pattern": "^override:sha256:[0-9a-f]{64}$"
57
+ },
58
+ "source": {
59
+ "type": "object",
60
+ "required": [
61
+ "schema_version",
62
+ "tool_version",
63
+ "source_digest",
64
+ "recommendation_interface_version",
65
+ "ranking_algorithm_id",
66
+ "ranking_algorithm_version",
67
+ "reason_taxonomy_version",
68
+ "explanation_model_version",
69
+ "expression_version",
70
+ "description_registry_version",
71
+ "result_decision_id",
72
+ "recommended_task_ids",
73
+ "capacity_overrides"
74
+ ],
75
+ "properties": {
76
+ "schema_version": {
77
+ "const": "Perttool.NextResult.v5"
78
+ },
79
+ "tool_version": {
80
+ "type": "string"
81
+ },
82
+ "source_digest": {
83
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
84
+ },
85
+ "recommendation_interface_version": {
86
+ "const": 1
87
+ },
88
+ "ranking_algorithm_id": {
89
+ "const": "perttool.recommendation-ranking.lexicographic-frontier"
90
+ },
91
+ "ranking_algorithm_version": {
92
+ "const": 1
93
+ },
94
+ "reason_taxonomy_version": {
95
+ "const": "1.0"
96
+ },
97
+ "explanation_model_version": {
98
+ "const": 1
99
+ },
100
+ "expression_version": {
101
+ "const": 1
102
+ },
103
+ "description_registry_version": {
104
+ "const": 1
105
+ },
106
+ "result_decision_id": {
107
+ "type": "string"
108
+ },
109
+ "recommended_task_ids": {
110
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
111
+ },
112
+ "capacity_overrides": {
113
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/capacityOverrides"
114
+ }
115
+ },
116
+ "additionalProperties": false
117
+ },
118
+ "actor": {
119
+ "type": "object",
120
+ "required": [
121
+ "kind",
122
+ "id",
123
+ "authentication"
124
+ ],
125
+ "properties": {
126
+ "kind": {
127
+ "const": "human"
128
+ },
129
+ "id": {
130
+ "type": "string"
131
+ },
132
+ "authentication": {
133
+ "const": "caller_asserted"
134
+ }
135
+ },
136
+ "additionalProperties": false
137
+ },
138
+ "decided_at": {
139
+ "type": "string",
140
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
141
+ },
142
+ "reason": {
143
+ "type": "object"
144
+ },
145
+ "selection": {
146
+ "type": "object"
147
+ },
148
+ "task_decisions": {
149
+ "type": "array",
150
+ "items": {
151
+ "type": "object"
152
+ }
153
+ },
154
+ "feasibility": {
155
+ "type": "object"
156
+ },
157
+ "single_use": {
158
+ "const": true
159
+ }
160
+ },
161
+ "additionalProperties": false
162
+ },
163
+ {
164
+ "type": "null"
165
+ }
166
+ ]
167
+ }
168
+ },
169
+ "additionalProperties": false
170
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.ProjectHistoryResult.v1.schema.json",
4
+ "title": "Perttool.ProjectHistoryResult.v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "tool_version",
10
+ "operation",
11
+ "ok",
12
+ "document_id",
13
+ "source",
14
+ "source_digest",
15
+ "diagnostics",
16
+ "diagnostics_truncated",
17
+ "grammar_version",
18
+ "history",
19
+ "events",
20
+ "git_recorded_transitions",
21
+ "tasks"
22
+ ],
23
+ "properties": {
24
+ "schema_version": {
25
+ "const": "Perttool.ProjectHistoryResult.v1"
26
+ },
27
+ "cli_contract_version": {
28
+ "const": 6
29
+ },
30
+ "tool_version": {
31
+ "type": "string"
32
+ },
33
+ "operation": {
34
+ "const": "project.history"
35
+ },
36
+ "ok": {
37
+ "type": "boolean"
38
+ },
39
+ "document_id": {
40
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
41
+ },
42
+ "source": {
43
+ "type": "string"
44
+ },
45
+ "source_digest": {
46
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
47
+ },
48
+ "diagnostics": {
49
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
50
+ },
51
+ "diagnostics_truncated": {
52
+ "type": "boolean"
53
+ },
54
+ "grammar_version": {
55
+ "type": [
56
+ "integer",
57
+ "null"
58
+ ]
59
+ },
60
+ "history": {
61
+ "type": "object",
62
+ "required": [
63
+ "id",
64
+ "version",
65
+ "status",
66
+ "traversal",
67
+ "repository_snapshot_id",
68
+ "repository_relative_path",
69
+ "requested_revision",
70
+ "resolved_revision",
71
+ "source_digest",
72
+ "inspected_commit_ids",
73
+ "unavailable_causes"
74
+ ],
75
+ "properties": {
76
+ "id": {
77
+ "const": "perttool.project-history"
78
+ },
79
+ "version": {
80
+ "const": 1
81
+ },
82
+ "status": {
83
+ "enum": [
84
+ "complete",
85
+ "incomplete",
86
+ "unavailable"
87
+ ]
88
+ },
89
+ "traversal": {
90
+ "const": "first_parent"
91
+ },
92
+ "repository_snapshot_id": {
93
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
94
+ },
95
+ "repository_relative_path": {
96
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
97
+ },
98
+ "requested_revision": {
99
+ "type": "string"
100
+ },
101
+ "resolved_revision": {
102
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
103
+ },
104
+ "source_digest": {
105
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
106
+ },
107
+ "inspected_commit_ids": {
108
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
109
+ },
110
+ "unavailable_causes": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "object"
114
+ }
115
+ }
116
+ },
117
+ "additionalProperties": false
118
+ },
119
+ "events": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object"
123
+ }
124
+ },
125
+ "git_recorded_transitions": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object"
129
+ }
130
+ },
131
+ "tasks": {
132
+ "type": "array",
133
+ "items": {
134
+ "type": "object"
135
+ }
136
+ }
137
+ },
138
+ "additionalProperties": false
139
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.ProjectResult.v3.schema.json",
4
+ "title": "Perttool.ProjectResult.v3",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "tool_version",
10
+ "operation",
11
+ "ok",
12
+ "document_id",
13
+ "source",
14
+ "source_digest",
15
+ "diagnostics",
16
+ "diagnostics_truncated",
17
+ "grammar_version",
18
+ "project"
19
+ ],
20
+ "properties": {
21
+ "schema_version": {
22
+ "const": "Perttool.ProjectResult.v3"
23
+ },
24
+ "cli_contract_version": {
25
+ "const": 6
26
+ },
27
+ "tool_version": {
28
+ "type": "string"
29
+ },
30
+ "operation": {
31
+ "const": "project.show"
32
+ },
33
+ "ok": {
34
+ "type": "boolean"
35
+ },
36
+ "document_id": {
37
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
38
+ },
39
+ "source": {
40
+ "type": "string"
41
+ },
42
+ "source_digest": {
43
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
44
+ },
45
+ "diagnostics": {
46
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
47
+ },
48
+ "diagnostics_truncated": {
49
+ "type": "boolean"
50
+ },
51
+ "grammar_version": {
52
+ "type": [
53
+ "integer",
54
+ "null"
55
+ ],
56
+ "minimum": 1,
57
+ "maximum": 5
58
+ },
59
+ "project": {
60
+ "oneOf": [
61
+ {
62
+ "type": "object",
63
+ "required": [
64
+ "id",
65
+ "version",
66
+ "title",
67
+ "description",
68
+ "as_of",
69
+ "duration_unit",
70
+ "velocity",
71
+ "finish",
72
+ "finish_deadline",
73
+ "governance",
74
+ "critical_epsilon",
75
+ "target_duration"
76
+ ],
77
+ "properties": {
78
+ "id": {
79
+ "type": "string"
80
+ },
81
+ "version": {
82
+ "type": "integer",
83
+ "minimum": 1,
84
+ "maximum": 5
85
+ },
86
+ "title": {
87
+ "type": "string"
88
+ },
89
+ "description": {
90
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
91
+ },
92
+ "as_of": {
93
+ "oneOf": [
94
+ {
95
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/calendarValue"
96
+ },
97
+ {
98
+ "type": "null"
99
+ }
100
+ ]
101
+ },
102
+ "duration_unit": {
103
+ "enum": [
104
+ "day",
105
+ "hour",
106
+ "point"
107
+ ]
108
+ },
109
+ "velocity": {
110
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
111
+ },
112
+ "finish": {
113
+ "type": "string"
114
+ },
115
+ "finish_deadline": {
116
+ "oneOf": [
117
+ {
118
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/calendarValue"
119
+ },
120
+ {
121
+ "type": "null"
122
+ }
123
+ ]
124
+ },
125
+ "governance": {
126
+ "type": "object"
127
+ },
128
+ "critical_epsilon": {
129
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
130
+ },
131
+ "target_duration": {
132
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
133
+ }
134
+ },
135
+ "additionalProperties": false
136
+ },
137
+ {
138
+ "type": "null"
139
+ }
140
+ ]
141
+ }
142
+ },
143
+ "additionalProperties": false
144
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.SchemaResult.v1.schema.json",
4
+ "title": "Perttool.SchemaResult.v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "tool_version",
10
+ "operation",
11
+ "ok",
12
+ "query",
13
+ "schemas",
14
+ "schema",
15
+ "diagnostics"
16
+ ],
17
+ "properties": {
18
+ "schema_version": {
19
+ "const": "Perttool.SchemaResult.v1"
20
+ },
21
+ "cli_contract_version": {
22
+ "const": 6
23
+ },
24
+ "tool_version": {
25
+ "type": "string"
26
+ },
27
+ "operation": {
28
+ "const": "schema"
29
+ },
30
+ "ok": {
31
+ "type": "boolean"
32
+ },
33
+ "query": {
34
+ "type": "object",
35
+ "required": [
36
+ "schema_id"
37
+ ],
38
+ "properties": {
39
+ "schema_id": {
40
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ },
45
+ "schemas": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "required": [
50
+ "schema_id",
51
+ "artifact_path",
52
+ "command_result",
53
+ "public_library_result"
54
+ ],
55
+ "properties": {
56
+ "schema_id": {
57
+ "type": "string"
58
+ },
59
+ "artifact_path": {
60
+ "type": "string",
61
+ "pattern": "^schemas/Perttool\\.[A-Za-z]+(?:[A-Za-z0-9]*)?\\.v[0-9]+\\.schema\\.json$"
62
+ },
63
+ "command_result": {
64
+ "type": "boolean"
65
+ },
66
+ "public_library_result": {
67
+ "type": "boolean"
68
+ }
69
+ },
70
+ "additionalProperties": false
71
+ }
72
+ },
73
+ "schema": {
74
+ "type": [
75
+ "object",
76
+ "null"
77
+ ]
78
+ },
79
+ "diagnostics": {
80
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
81
+ }
82
+ },
83
+ "additionalProperties": false
84
+ }