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,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.GuideResult.v1.schema.json",
4
+ "title": "Perttool.GuideResult.v1",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "tool_version",
10
+ "operation",
11
+ "ok",
12
+ "diagnostics",
13
+ "topic_id",
14
+ "level",
15
+ "title",
16
+ "summary",
17
+ "sections",
18
+ "syntax",
19
+ "examples",
20
+ "related",
21
+ "topics"
22
+ ],
23
+ "properties": {
24
+ "schema_version": {
25
+ "const": "Perttool.GuideResult.v1"
26
+ },
27
+ "cli_contract_version": {
28
+ "const": 6
29
+ },
30
+ "tool_version": {
31
+ "type": "string"
32
+ },
33
+ "operation": {
34
+ "const": "guide"
35
+ },
36
+ "ok": {
37
+ "type": "boolean"
38
+ },
39
+ "diagnostics": {
40
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
41
+ },
42
+ "topic_id": {
43
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
44
+ },
45
+ "level": {
46
+ "enum": [
47
+ "index",
48
+ "quick",
49
+ "detail"
50
+ ]
51
+ },
52
+ "title": {
53
+ "type": "string"
54
+ },
55
+ "summary": {
56
+ "type": "string"
57
+ },
58
+ "sections": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object"
62
+ }
63
+ },
64
+ "syntax": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "examples": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object"
74
+ }
75
+ },
76
+ "related": {
77
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
78
+ },
79
+ "topics": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "required": [
84
+ "id",
85
+ "title",
86
+ "summary"
87
+ ],
88
+ "properties": {
89
+ "id": {
90
+ "type": "string"
91
+ },
92
+ "title": {
93
+ "type": "string"
94
+ },
95
+ "summary": {
96
+ "type": "string"
97
+ }
98
+ },
99
+ "additionalProperties": false
100
+ }
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.ImportResult.v1.schema.json",
4
+ "title": "Perttool.ImportResult.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
+ "artifact_format",
18
+ "profile",
19
+ "analysis",
20
+ "capacity_overrides",
21
+ "artifact",
22
+ "artifact_digest",
23
+ "loss_report",
24
+ "generated_ids",
25
+ "write"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": "Perttool.ImportResult.v1"
30
+ },
31
+ "cli_contract_version": {
32
+ "const": 6
33
+ },
34
+ "tool_version": {
35
+ "type": "string"
36
+ },
37
+ "operation": {
38
+ "const": "dag.import"
39
+ },
40
+ "ok": {
41
+ "type": "boolean"
42
+ },
43
+ "document_id": {
44
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
45
+ },
46
+ "source": {
47
+ "type": "string"
48
+ },
49
+ "source_digest": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
51
+ },
52
+ "diagnostics": {
53
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
54
+ },
55
+ "diagnostics_truncated": {
56
+ "type": "boolean"
57
+ },
58
+ "artifact_format": {
59
+ "const": "pert"
60
+ },
61
+ "profile": {
62
+ "enum": [
63
+ "perttool",
64
+ "plain"
65
+ ]
66
+ },
67
+ "analysis": {
68
+ "enum": [
69
+ "none",
70
+ "precedence",
71
+ "resource",
72
+ "both"
73
+ ]
74
+ },
75
+ "capacity_overrides": {
76
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/capacityOverrides"
77
+ },
78
+ "artifact": {
79
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
80
+ },
81
+ "artifact_digest": {
82
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
83
+ },
84
+ "loss_report": {
85
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/lossReport"
86
+ },
87
+ "generated_ids": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "required": [
92
+ "source_element",
93
+ "generated_id"
94
+ ],
95
+ "properties": {
96
+ "source_element": {
97
+ "type": "string"
98
+ },
99
+ "generated_id": {
100
+ "type": "string"
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ }
105
+ },
106
+ "write": {
107
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
108
+ }
109
+ },
110
+ "additionalProperties": false
111
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.InitResult.v1.schema.json",
4
+ "title": "Perttool.InitResult.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
+ "candidate_text",
16
+ "candidate_digest",
17
+ "edits",
18
+ "write",
19
+ "diagnostics",
20
+ "diagnostics_truncated"
21
+ ],
22
+ "properties": {
23
+ "schema_version": {
24
+ "const": "Perttool.InitResult.v1"
25
+ },
26
+ "cli_contract_version": {
27
+ "const": 6
28
+ },
29
+ "tool_version": {
30
+ "type": "string"
31
+ },
32
+ "operation": {
33
+ "const": "project.init"
34
+ },
35
+ "ok": {
36
+ "type": "boolean"
37
+ },
38
+ "document_id": {
39
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
40
+ },
41
+ "source": {
42
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
43
+ },
44
+ "source_digest": {
45
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
46
+ },
47
+ "candidate_text": {
48
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
49
+ },
50
+ "candidate_digest": {
51
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
52
+ },
53
+ "edits": {
54
+ "type": "array",
55
+ "items": {
56
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/edit"
57
+ }
58
+ },
59
+ "write": {
60
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
61
+ },
62
+ "diagnostics": {
63
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
64
+ },
65
+ "diagnostics_truncated": {
66
+ "type": "boolean"
67
+ }
68
+ },
69
+ "additionalProperties": false
70
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.MutationResult.v3.schema.json",
4
+ "title": "Perttool.MutationResult.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
+ "changed",
18
+ "original_digest",
19
+ "updated_digest",
20
+ "updated_text",
21
+ "diff",
22
+ "edits",
23
+ "write",
24
+ "governance",
25
+ "lifecycle"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": "Perttool.MutationResult.v3"
30
+ },
31
+ "cli_contract_version": {
32
+ "const": 6
33
+ },
34
+ "tool_version": {
35
+ "type": "string"
36
+ },
37
+ "operation": {
38
+ "type": "string"
39
+ },
40
+ "ok": {
41
+ "type": "boolean"
42
+ },
43
+ "document_id": {
44
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
45
+ },
46
+ "source": {
47
+ "type": "string"
48
+ },
49
+ "source_digest": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
51
+ },
52
+ "diagnostics": {
53
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
54
+ },
55
+ "diagnostics_truncated": {
56
+ "type": "boolean"
57
+ },
58
+ "changed": {
59
+ "type": "boolean"
60
+ },
61
+ "original_digest": {
62
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
63
+ },
64
+ "updated_digest": {
65
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDigest"
66
+ },
67
+ "updated_text": {
68
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
69
+ },
70
+ "diff": {
71
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
72
+ },
73
+ "edits": {
74
+ "type": "array",
75
+ "items": {
76
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/edit"
77
+ }
78
+ },
79
+ "write": {
80
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/write"
81
+ },
82
+ "governance": {
83
+ "oneOf": [
84
+ {
85
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/governanceDecision"
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ]
91
+ },
92
+ "lifecycle": {
93
+ "oneOf": [
94
+ {
95
+ "type": "object",
96
+ "required": [
97
+ "model_version",
98
+ "task_id",
99
+ "from_state",
100
+ "to_state",
101
+ "event",
102
+ "coverage"
103
+ ],
104
+ "properties": {
105
+ "model_version": {
106
+ "const": 1
107
+ },
108
+ "task_id": {
109
+ "type": "string"
110
+ },
111
+ "from_state": {
112
+ "type": "string"
113
+ },
114
+ "to_state": {
115
+ "type": "string"
116
+ },
117
+ "event": {
118
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/workEvent"
119
+ },
120
+ "coverage": {
121
+ "enum": [
122
+ "none",
123
+ "finish_only",
124
+ "complete"
125
+ ]
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ {
131
+ "type": "null"
132
+ }
133
+ ]
134
+ },
135
+ "advance": {
136
+ "type": [
137
+ "object",
138
+ "null"
139
+ ]
140
+ }
141
+ },
142
+ "additionalProperties": false
143
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mako10k/perttool/schemas/Perttool.NextResult.v5.schema.json",
4
+ "title": "Perttool.NextResult.v5",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "cli_contract_version",
9
+ "recommendation_interface_version",
10
+ "tool_version",
11
+ "operation",
12
+ "ok",
13
+ "document_id",
14
+ "source",
15
+ "source_digest",
16
+ "diagnostics",
17
+ "diagnostics_truncated",
18
+ "grammar_version",
19
+ "temporal"
20
+ ],
21
+ "properties": {
22
+ "schema_version": {
23
+ "const": "Perttool.NextResult.v5"
24
+ },
25
+ "cli_contract_version": {
26
+ "const": 6
27
+ },
28
+ "recommendation_interface_version": {
29
+ "const": 1
30
+ },
31
+ "tool_version": {
32
+ "type": "string"
33
+ },
34
+ "operation": {
35
+ "const": "dag.next"
36
+ },
37
+ "ok": {
38
+ "type": "boolean"
39
+ },
40
+ "document_id": {
41
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
42
+ },
43
+ "source": {
44
+ "type": "string"
45
+ },
46
+ "source_digest": {
47
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
48
+ },
49
+ "diagnostics": {
50
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/diagnostics"
51
+ },
52
+ "diagnostics_truncated": {
53
+ "type": "boolean"
54
+ },
55
+ "grammar_version": {
56
+ "type": [
57
+ "integer",
58
+ "null"
59
+ ],
60
+ "minimum": 1,
61
+ "maximum": 5
62
+ },
63
+ "precision": {
64
+ "type": "integer",
65
+ "minimum": 0,
66
+ "maximum": 9
67
+ },
68
+ "duration_unit": {
69
+ "enum": [
70
+ "day",
71
+ "hour",
72
+ "point"
73
+ ]
74
+ },
75
+ "velocity": {
76
+ "type": [
77
+ "object",
78
+ "null"
79
+ ]
80
+ },
81
+ "velocity_forecast": {
82
+ "type": [
83
+ "object",
84
+ "null"
85
+ ]
86
+ },
87
+ "capacity_overrides": {
88
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/capacityOverrides"
89
+ },
90
+ "recommendation": {
91
+ "type": "object"
92
+ },
93
+ "groups": {
94
+ "type": "object",
95
+ "required": [
96
+ "active",
97
+ "ready",
98
+ "runnable_now",
99
+ "blocked_now",
100
+ "upcoming",
101
+ "suspended"
102
+ ],
103
+ "properties": {
104
+ "active": {
105
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
106
+ },
107
+ "ready": {
108
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
109
+ },
110
+ "runnable_now": {
111
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
112
+ },
113
+ "blocked_now": {
114
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
115
+ },
116
+ "upcoming": {
117
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
118
+ },
119
+ "suspended": {
120
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
121
+ }
122
+ },
123
+ "additionalProperties": false
124
+ },
125
+ "tasks": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object"
129
+ }
130
+ },
131
+ "temporal": {
132
+ "type": [
133
+ "object",
134
+ "null"
135
+ ]
136
+ }
137
+ },
138
+ "additionalProperties": false
139
+ }