factoryhub 0.1.0 → 0.1.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 (87) hide show
  1. package/README.md +9 -3
  2. package/factories/index.json +231 -0
  3. package/factories/newsletter-note/README.md +11 -0
  4. package/factories/newsletter-note/agents/reviewer/agent.md +10 -0
  5. package/factories/newsletter-note/agents/writer/agent.md +11 -0
  6. package/factories/newsletter-note/factory.yaml +12 -0
  7. package/factories/newsletter-note/flow.yaml +45 -0
  8. package/factories/newsletter-note/mindburn.tests.yaml +80 -0
  9. package/factories/release-desk/README.md +13 -0
  10. package/factories/release-desk/agents/editor/agent.md +10 -0
  11. package/factories/release-desk/agents/reviewer/agent.md +10 -0
  12. package/factories/release-desk/factory.yaml +13 -0
  13. package/factories/release-desk/flow.yaml +67 -0
  14. package/factories/release-desk/mindburn.tests.yaml +163 -0
  15. package/factories/short-video-cut/README.md +11 -0
  16. package/factories/short-video-cut/agents/reviewer/agent.md +10 -0
  17. package/factories/short-video-cut/agents/writer/agent.md +11 -0
  18. package/factories/short-video-cut/factory.yaml +13 -0
  19. package/factories/short-video-cut/flow.yaml +46 -0
  20. package/factories/short-video-cut/mindburn.tests.yaml +80 -0
  21. package/factories/video-facts/README.md +11 -0
  22. package/factories/video-facts/agents/analyst/agent.md +10 -0
  23. package/factories/video-facts/agents/reviewer/agent.md +10 -0
  24. package/factories/video-facts/factory.yaml +13 -0
  25. package/factories/video-facts/flow.yaml +39 -0
  26. package/factories/video-facts/mindburn.tests.yaml +34 -0
  27. package/factories/video-to-posts/README.md +35 -0
  28. package/factories/video-to-posts/agents/analyst/agent.md +10 -0
  29. package/factories/video-to-posts/agents/reviewer/agent.md +10 -0
  30. package/factories/video-to-posts/agents/writer/agent.md +11 -0
  31. package/factories/video-to-posts/factory.yaml +12 -0
  32. package/factories/video-to-posts/flow.yaml +62 -0
  33. package/factories/video-to-posts/mindburn.tests.yaml +34 -0
  34. package/factories/week-of-posts/README.md +11 -0
  35. package/factories/week-of-posts/agents/reviewer/agent.md +10 -0
  36. package/factories/week-of-posts/agents/writer/agent.md +11 -0
  37. package/factories/week-of-posts/factory.yaml +12 -0
  38. package/factories/week-of-posts/flow.yaml +46 -0
  39. package/factories/week-of-posts/mindburn.tests.yaml +80 -0
  40. package/package.json +15 -2
  41. package/packages/cli/package.json +1 -1
  42. package/packages/cli/src/commands/export.mjs +0 -1
  43. package/packages/cli/src/commands/get.mjs +0 -1
  44. package/packages/cli/src/commands/inspect.mjs +0 -1
  45. package/packages/cli/src/commands/list.mjs +1 -6
  46. package/packages/cli/src/commands/login.mjs +161 -0
  47. package/packages/cli/src/commands/logout.mjs +43 -0
  48. package/packages/cli/src/commands/mcp.mjs +0 -1
  49. package/packages/cli/src/commands/new.mjs +0 -1
  50. package/packages/cli/src/commands/pack.mjs +0 -1
  51. package/packages/cli/src/commands/publish.mjs +62 -0
  52. package/packages/cli/src/commands/pull.mjs +59 -0
  53. package/packages/cli/src/commands/push.mjs +115 -0
  54. package/packages/cli/src/commands/resume.mjs +0 -1
  55. package/packages/cli/src/commands/run.mjs +182 -20
  56. package/packages/cli/src/commands/runs.mjs +52 -0
  57. package/packages/cli/src/commands/search.mjs +0 -1
  58. package/packages/cli/src/commands/validate.mjs +1 -3
  59. package/packages/cli/src/commands/whoami.mjs +34 -0
  60. package/packages/cli/src/hosted.mjs +159 -0
  61. package/packages/cli/src/main.mjs +80 -14
  62. package/packages/cli/src/tool-sources.mjs +272 -0
  63. package/packages/cli/src/util.mjs +37 -0
  64. package/packages/engine/lib/credentials.mjs +121 -0
  65. package/packages/engine/lib/hosted.mjs +119 -0
  66. package/packages/engine/lib/hub.mjs +376 -24
  67. package/packages/engine/lib/nango.mjs +157 -0
  68. package/packages/engine/lib/node.mjs +161 -33
  69. package/packages/engine/lib/providers.mjs +8 -3
  70. package/packages/engine/lib/run.mjs +70 -9
  71. package/packages/engine/lib/text.mjs +5 -0
  72. package/packages/engine/package.json +8 -2
  73. package/packages/engine/src/factory-engine.mjs +415 -68
  74. package/packages/engine/src/flow-sources.mjs +135 -0
  75. package/packages/engine/src/mcp-client.mjs +429 -0
  76. package/packages/engine/src/run.mjs +81 -5
  77. package/packages/engine/src/tool-sources.mjs +566 -0
  78. package/packages/mcp/package.json +1 -1
  79. package/packages/mcp/src/server.mjs +47 -17
  80. package/packages/sdk/package.json +28 -0
  81. package/packages/sdk/src/index.d.ts +163 -0
  82. package/packages/sdk/src/index.mjs +266 -0
  83. package/spec/README.md +7 -1
  84. package/spec/factory-format.md +264 -19
  85. package/spec/schema/factory.yaml.json +815 -0
  86. package/spec/schema/flow.schema.json +24 -2
  87. package/spec/skill-export.md +3 -0
@@ -5,12 +5,22 @@
5
5
  "description": "A factory's executable workflow, format v1alpha1 (mindburn.flow/v1). Describes the document after YAML parsing. Rules across steps and files (references, cycles, agent files) are in spec/factory-format.md, section 6.",
6
6
  "type": "object",
7
7
  "required": ["steps"],
8
+ "allOf": [
9
+ {
10
+ "description": "A check that says on_fail: stop needs requires: [blocking-checks], so a runner without blocking checks refuses the flow instead of delivering work its checker refused.",
11
+ "if": {
12
+ "required": ["steps"],
13
+ "properties": { "steps": { "type": "object", "not": { "type": "object", "additionalProperties": { "not": { "$ref": "#/$defs/stopCheck" } } } } }
14
+ },
15
+ "then": { "required": ["requires"], "properties": { "requires": { "type": "array", "contains": { "const": "blocking-checks" } } } }
16
+ }
17
+ ],
8
18
  "properties": {
9
19
  "flow": { "description": "The flow format.", "const": "mindburn.flow/v1" },
10
20
  "requires": {
11
- "description": "Execution features the flow depends on.",
21
+ "description": "Execution features the flow depends on. A flow with a check that says on_fail: stop MUST require blocking-checks.",
12
22
  "type": "array",
13
- "items": { "enum": ["scoped-context", "multiple-outputs"] }
23
+ "items": { "enum": ["scoped-context", "multiple-outputs", "blocking-checks"] }
14
24
  },
15
25
  "title": { "type": "string" },
16
26
  "author": { "type": "string" },
@@ -69,6 +79,7 @@
69
79
  "properties": {
70
80
  "id": { "type": "string" },
71
81
  "name": { "type": "string" },
82
+ "title": { "description": "The member factory's title, at most 120 characters.", "type": "string", "maxLength": 120 },
72
83
  "version": { "type": "string" },
73
84
  "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
74
85
  }
@@ -125,6 +136,7 @@
125
136
  "checks": { "$ref": "#/$defs/name" },
126
137
  "shows": { "$ref": "#/$defs/name" },
127
138
  "rounds": { "type": "integer", "minimum": 0, "maximum": 5 },
139
+ "on_fail": { "description": "For a check: what happens when the work still fails after its redos. flag (the default) delivers it and flags the check; stop holds it for the owner to release or discard. stop needs requires: [blocking-checks].", "enum": ["stop", "flag"] },
128
140
  "tools": { "$ref": "#/$defs/toolList" },
129
141
  "mcp": {}, "mcpServers": {}, "mcp_servers": {}, "connectors": {}, "plugins": {}, "skills": {},
130
142
  "context": {
@@ -157,9 +169,19 @@
157
169
  {
158
170
  "if": { "required": ["shows"] },
159
171
  "then": { "properties": { "kind": { "const": "approve" } }, "required": ["kind"] }
172
+ },
173
+ {
174
+ "if": { "required": ["on_fail"] },
175
+ "then": { "required": ["kind"], "properties": { "kind": { "const": "check" } } }
160
176
  }
161
177
  ]
162
178
  },
179
+ "stopCheck": {
180
+ "description": "A step that says on_fail: stop.",
181
+ "type": "object",
182
+ "required": ["on_fail"],
183
+ "properties": { "on_fail": { "const": "stop" } }
184
+ },
163
185
  "bindings": {
164
186
  "type": "object",
165
187
  "propertyNames": { "pattern": "^[a-z][a-z0-9_]{0,63}$" },
@@ -82,6 +82,9 @@ After the frontmatter, a blank line, then these parts in order:
82
82
  needs, its tools, then its task;
83
83
  - check: title, the reviewer agent, what it needs, the step it checks, the
84
84
  criteria as a quotation, and what happens when it fails, by `rounds`;
85
+ for a check with `on_fail: stop`, the stop text in
86
+ [the format, 5.3](factory-format.md#blocking-checks), which
87
+ `exportSkill()` does not write yet at this commit;
85
88
  - approve: title, "Who: the person", what it needs, then
86
89
  `Stop and ask the person to approve the result of "<subject title>".`,
87
90
  "Show it to them in full", its task, and what approve, change (by