spawnfile 0.1.4 → 0.1.5

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 (73) hide show
  1. package/dist/cli/lifecycleCommands.d.ts +3 -0
  2. package/dist/cli/lifecycleCommands.js +80 -0
  3. package/dist/cli/runCli.d.ts +2 -1
  4. package/dist/cli/runCli.js +4 -48
  5. package/dist/compiler/buildCompilePlan.js +12 -202
  6. package/dist/compiler/buildCompilePlanRuntime.d.ts +6 -1
  7. package/dist/compiler/buildCompilePlanRuntime.js +9 -0
  8. package/dist/compiler/buildCompilePlanTeams.js +16 -10
  9. package/dist/compiler/buildCompilePlanTraversal.d.ts +16 -0
  10. package/dist/compiler/buildCompilePlanTraversal.js +214 -0
  11. package/dist/compiler/buildCompilePlanTraversalHelpers.d.ts +18 -0
  12. package/dist/compiler/buildCompilePlanTraversalHelpers.js +22 -0
  13. package/dist/compiler/compilePlanHelpers.d.ts +3 -1
  14. package/dist/compiler/compilePlanHelpers.js +37 -1
  15. package/dist/compiler/compileProject.js +14 -0
  16. package/dist/compiler/containerArtifacts.js +18 -3
  17. package/dist/compiler/containerArtifactsPlans.js +32 -0
  18. package/dist/compiler/containerArtifactsRender.js +86 -3
  19. package/dist/compiler/containerArtifactsTypes.d.ts +7 -3
  20. package/dist/compiler/containerEntrypointRender.d.ts +1 -1
  21. package/dist/compiler/containerEntrypointRender.js +34 -24
  22. package/dist/compiler/containerTargetResources.d.ts +4 -0
  23. package/dist/compiler/containerTargetResources.js +54 -0
  24. package/dist/compiler/containerWorkspaceResourceRender.d.ts +3 -0
  25. package/dist/compiler/containerWorkspaceResourceRender.js +128 -0
  26. package/dist/compiler/executionDefaults.js +0 -3
  27. package/dist/compiler/helpers.d.ts +1 -1
  28. package/dist/compiler/index.d.ts +1 -0
  29. package/dist/compiler/index.js +1 -0
  30. package/dist/compiler/moltnetArtifacts.d.ts +11 -5
  31. package/dist/compiler/moltnetArtifacts.js +133 -117
  32. package/dist/compiler/moltnetClientConfig.js +8 -2
  33. package/dist/compiler/moltnetConfigLowering.d.ts +36 -0
  34. package/dist/compiler/moltnetConfigLowering.js +125 -0
  35. package/dist/compiler/moltnetRuntimeConfig.d.ts +2 -0
  36. package/dist/compiler/moltnetRuntimeConfig.js +69 -0
  37. package/dist/compiler/surfaces.d.ts +3 -13
  38. package/dist/compiler/surfaces.js +1 -6
  39. package/dist/compiler/syncProjectAuth.js +14 -0
  40. package/dist/compiler/types.d.ts +16 -1
  41. package/dist/compiler/upProject.d.ts +19 -0
  42. package/dist/compiler/upProject.js +37 -0
  43. package/dist/compiler/view/buildOrganizationView.js +22 -2
  44. package/dist/compiler/view/renderNetworks.js +14 -3
  45. package/dist/compiler/view/renderTree.js +8 -2
  46. package/dist/compiler/view/types.d.ts +18 -3
  47. package/dist/compiler/workspaceResources.d.ts +34 -0
  48. package/dist/compiler/workspaceResources.js +120 -0
  49. package/dist/manifest/executionSchemas.d.ts +106 -0
  50. package/dist/manifest/executionSchemas.js +140 -0
  51. package/dist/manifest/loadManifest.js +15 -27
  52. package/dist/manifest/renderSpawnfile.js +44 -52
  53. package/dist/manifest/renderSpawnfileNetworks.d.ts +2 -0
  54. package/dist/manifest/renderSpawnfileNetworks.js +63 -0
  55. package/dist/manifest/renderSpawnfileWorkspace.d.ts +2 -0
  56. package/dist/manifest/renderSpawnfileWorkspace.js +47 -0
  57. package/dist/manifest/scaffold.js +12 -6
  58. package/dist/manifest/scheduleSchemas.d.ts +15 -0
  59. package/dist/manifest/scheduleSchemas.js +26 -0
  60. package/dist/manifest/schemas.d.ts +626 -368
  61. package/dist/manifest/schemas.js +51 -191
  62. package/dist/manifest/teamNetworkSchemas.d.ts +228 -0
  63. package/dist/manifest/teamNetworkSchemas.js +295 -0
  64. package/dist/manifest/workspaceSchemas.d.ts +96 -0
  65. package/dist/manifest/workspaceSchemas.js +166 -0
  66. package/dist/report/types.d.ts +10 -0
  67. package/dist/runtime/common.d.ts +2 -1
  68. package/dist/runtime/common.js +3 -3
  69. package/dist/runtime/tinyclaw/adapter.js +9 -2
  70. package/dist/runtime/tinyclaw/schedules.d.ts +9 -0
  71. package/dist/runtime/tinyclaw/schedules.js +62 -0
  72. package/dist/runtime/types.d.ts +1 -0
  73. package/package.json +2 -1
@@ -0,0 +1,62 @@
1
+ import { createDiagnostic } from "../common.js";
2
+ const TINYCLAW_SCHEDULE_CHANNEL = "schedule";
3
+ const TINYCLAW_SCHEDULE_SENDER = "Spawnfile Scheduler";
4
+ const createTinyClawSchedule = (node) => {
5
+ if (!node.schedule || node.schedule.kind !== "cron") {
6
+ return null;
7
+ }
8
+ return {
9
+ agentId: node.name,
10
+ channel: TINYCLAW_SCHEDULE_CHANNEL,
11
+ createdAt: 0,
12
+ cron: node.schedule.cron,
13
+ enabled: true,
14
+ id: `spawnfile-${node.name}`,
15
+ label: `Spawnfile schedule for ${node.name}`,
16
+ message: node.schedule.prompt ?? "Run the scheduled Spawnfile task.",
17
+ sender: TINYCLAW_SCHEDULE_SENDER
18
+ };
19
+ };
20
+ export const createTinyClawSchedulesFile = (inputs) => {
21
+ const schedules = inputs
22
+ .flatMap((input) => {
23
+ if (input.kind !== "agent" || input.value.kind !== "agent") {
24
+ return [];
25
+ }
26
+ return [createTinyClawSchedule(input.value)];
27
+ })
28
+ .filter((schedule) => Boolean(schedule))
29
+ .sort((left, right) => left.id.localeCompare(right.id));
30
+ return schedules.length > 0
31
+ ? {
32
+ content: `${JSON.stringify(schedules, null, 2)}\n`,
33
+ path: "home/schedules.json"
34
+ }
35
+ : null;
36
+ };
37
+ export const scheduleOutcomeFor = (node) => {
38
+ if (!node.schedule) {
39
+ return {};
40
+ }
41
+ if (node.schedule.kind === "cron") {
42
+ return {
43
+ message: "TinyClaw native cron scheduler is emitted as schedules.json",
44
+ outcome: "supported"
45
+ };
46
+ }
47
+ if (node.schedule.kind === "disabled") {
48
+ return {
49
+ message: "Disabled schedule emits no wake registration",
50
+ outcome: "supported"
51
+ };
52
+ }
53
+ return {
54
+ message: "TinyClaw native schedule lowering supports cron schedules in Spawnfile v0.1",
55
+ outcome: "degraded"
56
+ };
57
+ };
58
+ export const createScheduleDiagnostics = (node) => node.schedule?.kind === "every"
59
+ ? [
60
+ createDiagnostic("warn", "TinyClaw native schedule lowering supports cron schedules in Spawnfile v0.1; every schedules are degraded")
61
+ ]
62
+ : [];
@@ -33,6 +33,7 @@ export interface ContainerTarget {
33
33
  export interface RuntimeContainerInstancePaths {
34
34
  configPathTemplate: string;
35
35
  homePathTemplate?: string;
36
+ sourceWorkspacePathTemplate?: string;
36
37
  workspacePathTemplate: string;
37
38
  }
38
39
  export interface RuntimeContainerConfigEnvBinding {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spawnfile",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Canonical source compiler for autonomous agents and teams.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,6 +29,7 @@
29
29
  "runtimes:sync": "./scripts/runtimes.sh && ./scripts/blueprints.sh",
30
30
  "test:e2e:docker-auth": "tsx src/e2e/cli.ts",
31
31
  "test:e2e:moltnet-team-chat": "tsx src/e2e/cli.ts moltnet-team-chat",
32
+ "test:e2e:operational-smoke": "tsx src/e2e/cli.ts operational-smoke",
32
33
  "test": "vitest run",
33
34
  "typecheck": "tsc --project tsconfig.json --noEmit"
34
35
  },