@haneinfo/assignment 0.0.0-stage → 0.1.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.
Files changed (60) hide show
  1. package/LICENSE +14 -0
  2. package/agent-guide.md +95 -0
  3. package/dist/assignment.controller.d.ts +53 -0
  4. package/dist/assignment.controller.d.ts.map +1 -0
  5. package/dist/assignment.controller.js +96 -0
  6. package/dist/assignment.controller.js.map +1 -0
  7. package/dist/assignment.module.d.ts +10 -0
  8. package/dist/assignment.module.d.ts.map +1 -0
  9. package/dist/assignment.module.js +58 -0
  10. package/dist/assignment.module.js.map +1 -0
  11. package/dist/assignment.service.d.ts +92 -0
  12. package/dist/assignment.service.d.ts.map +1 -0
  13. package/dist/assignment.service.js +267 -0
  14. package/dist/assignment.service.js.map +1 -0
  15. package/dist/index.d.ts +10 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +29 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/kind.d.ts +8 -0
  20. package/dist/kind.d.ts.map +1 -0
  21. package/dist/kind.js +37 -0
  22. package/dist/kind.js.map +1 -0
  23. package/dist/mcp-tools.d.ts +16 -0
  24. package/dist/mcp-tools.d.ts.map +1 -0
  25. package/dist/mcp-tools.js +79 -0
  26. package/dist/mcp-tools.js.map +1 -0
  27. package/dist/plugin.d.ts +10 -0
  28. package/dist/plugin.d.ts.map +1 -0
  29. package/dist/plugin.js +85 -0
  30. package/dist/plugin.js.map +1 -0
  31. package/dist/prisma-store.d.ts +7 -0
  32. package/dist/prisma-store.d.ts.map +1 -0
  33. package/dist/prisma-store.js +67 -0
  34. package/dist/prisma-store.js.map +1 -0
  35. package/dist/semantics.d.ts +9 -0
  36. package/dist/semantics.d.ts.map +1 -0
  37. package/dist/semantics.js +80 -0
  38. package/dist/semantics.js.map +1 -0
  39. package/dist/store.d.ts +52 -0
  40. package/dist/store.d.ts.map +1 -0
  41. package/dist/store.js +63 -0
  42. package/dist/store.js.map +1 -0
  43. package/dist/testing.d.ts +19 -0
  44. package/dist/testing.d.ts.map +1 -0
  45. package/dist/testing.js +23 -0
  46. package/dist/testing.js.map +1 -0
  47. package/dist/types.d.ts +24 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/types.js +3 -0
  50. package/dist/types.js.map +1 -0
  51. package/examples/definitions/equipment-loan/equipment-manager-approval.assignment.json +21 -0
  52. package/haneinfo.plugin.json +70 -0
  53. package/package.json +81 -3
  54. package/plugin.d.ts +2 -0
  55. package/plugin.js +4 -0
  56. package/prisma/assignment.prisma +32 -0
  57. package/schemas/assignment.spec.json +104 -0
  58. package/testing.d.ts +2 -0
  59. package/testing.js +2 -0
  60. package/README.md +0 -3
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Assignment spec",
4
+ "description": "When an instance of the referenced StateMachine enters onEnter, the assignees get a task; their response takes the response's transition.",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["stateMachine", "onEnter", "assignees", "policy", "responses"],
8
+ "properties": {
9
+ "stateMachine": {
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["kind", "code"],
13
+ "properties": {
14
+ "kind": { "const": "StateMachine" },
15
+ "code": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" }
16
+ }
17
+ },
18
+ "onEnter": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "description": "State key; entering it opens the tasks."
22
+ },
23
+ "title": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "maxLength": 200,
27
+ "description": "Task title shown to the assignees. Defaults to metadata.name."
28
+ },
29
+ "assignees": {
30
+ "type": "array",
31
+ "minItems": 1,
32
+ "maxItems": 20,
33
+ "items": {
34
+ "oneOf": [
35
+ {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["type", "userIds"],
39
+ "properties": {
40
+ "type": { "const": "SPECIFIC_USER" },
41
+ "userIds": {
42
+ "type": "array",
43
+ "minItems": 1,
44
+ "items": { "type": "string", "minLength": 1 }
45
+ }
46
+ }
47
+ },
48
+ {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": ["type", "role"],
52
+ "properties": {
53
+ "type": { "const": "ROLE" },
54
+ "role": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$" }
55
+ }
56
+ },
57
+ {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": ["type", "fieldId"],
61
+ "properties": {
62
+ "type": { "const": "FORM_FIELD_USER" },
63
+ "fieldId": { "type": "string", "minLength": 1 }
64
+ }
65
+ },
66
+ {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": ["type"],
70
+ "properties": { "type": { "const": "SUBMITTER" } }
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ "policy": {
76
+ "enum": ["SINGLE", "ANY_ONE", "JOINT"],
77
+ "description": "SINGLE and ANY_ONE: the first response decides. JOINT: everyone must give the non-decisive response; one decisive response decides at once."
78
+ },
79
+ "responses": {
80
+ "type": "array",
81
+ "minItems": 1,
82
+ "maxItems": 10,
83
+ "items": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": ["key", "label", "transition"],
87
+ "properties": {
88
+ "key": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]*$" },
89
+ "label": { "type": "string", "minLength": 1, "maxLength": 200 },
90
+ "transition": { "type": "string", "minLength": 1 },
91
+ "decisive": {
92
+ "type": "boolean",
93
+ "description": "JOINT only: this response completes the assignment at once (e.g. reject)."
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "dueIn": {
99
+ "type": "string",
100
+ "pattern": "^P(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?$",
101
+ "description": "ISO 8601 duration from opening to the due time, e.g. P2D. What happens when it passes is a Timer's job."
102
+ }
103
+ }
104
+ }
package/testing.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // See plugin.js for why this file exists (classic/node10 moduleResolution compatibility shim).
2
+ export * from './dist/testing';
package/testing.js ADDED
@@ -0,0 +1,2 @@
1
+ // Compatibility shim for classic/node10 moduleResolution; see plugin.js.
2
+ module.exports = require('./dist/testing');
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.