archal 0.9.18 → 0.9.20

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 (92) hide show
  1. package/README.md +9 -1
  2. package/agents/github-octokit/.archal.json +8 -0
  3. package/agents/github-octokit/Dockerfile +8 -0
  4. package/agents/github-octokit/README.md +113 -0
  5. package/agents/github-octokit/agent.mjs +54 -0
  6. package/agents/github-octokit/package.json +9 -0
  7. package/agents/github-octokit/scenarios/test-repo-access.md +27 -0
  8. package/agents/google-workspace-local-tools/Dockerfile +6 -0
  9. package/agents/google-workspace-local-tools/README.md +58 -0
  10. package/agents/google-workspace-local-tools/agent.mjs +196 -0
  11. package/agents/google-workspace-local-tools/archal-harness.json +7 -0
  12. package/agents/google-workspace-local-tools/run-input.yaml +16 -0
  13. package/agents/google-workspace-local-tools/scenario.md +29 -0
  14. package/agents/hermes/.archal.json +8 -0
  15. package/agents/hermes/Dockerfile +46 -0
  16. package/agents/hermes/README.md +87 -0
  17. package/agents/hermes/SOUL.md +27 -0
  18. package/agents/hermes/config.yaml +34 -0
  19. package/agents/hermes/drive.mjs +113 -0
  20. package/agents/hermes/scenarios/stripe-customers-read-only.md +32 -0
  21. package/agents/openclaw/.archal.json +8 -0
  22. package/agents/openclaw/Dockerfile +96 -0
  23. package/agents/openclaw/README.md +120 -0
  24. package/agents/openclaw/drive.mjs +311 -0
  25. package/agents/openclaw/package.json +9 -0
  26. package/agents/openclaw/scenarios/github-issue-triage-read-only.md +44 -0
  27. package/agents/openclaw/workspace/AGENTS.md +23 -0
  28. package/agents/openclaw/workspace/IDENTITY.md +8 -0
  29. package/agents/openclaw/workspace/SOUL.md +14 -0
  30. package/agents/openclaw/workspace/TOOLS.md +35 -0
  31. package/agents/pagination-test/README.md +24 -0
  32. package/agents/pagination-test/scenario.md +24 -0
  33. package/agents/replay-capsule-harness/README.md +29 -0
  34. package/agents/replay-capsule-harness/observability-install-offline-e2e.mts +1517 -0
  35. package/agents/replay-capsule-harness/replay-capsule-e2e.mjs +104 -0
  36. package/clone-assets/apify/tools.json +213 -13
  37. package/clone-assets/calcom/tools.json +510 -0
  38. package/clone-assets/clickup/tools.json +1258 -0
  39. package/clone-assets/customerio/tools.json +386 -0
  40. package/clone-assets/datadog/tools.json +734 -0
  41. package/clone-assets/github/tools.json +312 -25
  42. package/clone-assets/gitlab/tools.json +999 -0
  43. package/clone-assets/google-workspace/tools.json +18 -6
  44. package/clone-assets/hubspot/tools.json +1406 -0
  45. package/clone-assets/jira/fidelity.json +1 -1
  46. package/clone-assets/jira/tools.json +266 -543
  47. package/clone-assets/linear/tools.json +238 -40
  48. package/clone-assets/ownerrez/tools.json +548 -0
  49. package/clone-assets/pricelabs/tools.json +343 -0
  50. package/clone-assets/sentry/tools.json +745 -0
  51. package/clone-assets/slack/tools.json +1 -2
  52. package/clone-assets/stripe/tools.json +185 -46
  53. package/clone-assets/supabase/tools.json +511 -14
  54. package/clone-assets/unipile/tools.json +408 -0
  55. package/clone-assets/webflow/tools.json +415 -0
  56. package/dist/autoloop-worker-types-BEb_E44z.d.cts +196 -0
  57. package/dist/cli.cjs +151033 -75282
  58. package/dist/commands/autoloop-hosted-worker.cjs +43942 -0
  59. package/dist/commands/autoloop-hosted-worker.d.cts +143 -0
  60. package/dist/commands/autoloop-pr-verification.cjs +4227 -0
  61. package/dist/commands/autoloop-pr-verification.d.cts +17 -0
  62. package/dist/{vitest/chunk-IVXSSEYS.js → commands/autoloop-result-parser.cjs} +16515 -18857
  63. package/dist/commands/autoloop-result-parser.d.cts +39 -0
  64. package/dist/commands/autoloop-worker.cjs +36163 -0
  65. package/dist/commands/autoloop-worker.d.cts +97 -0
  66. package/dist/harness.cjs +1 -0
  67. package/dist/index.cjs +1 -1
  68. package/dist/replay.cjs +49624 -0
  69. package/dist/replay.d.cts +4625 -0
  70. package/dist/scenarios.cjs +80343 -0
  71. package/dist/scenarios.d.cts +562 -0
  72. package/dist/vitest/chunk-6CBYFCFK.js +4667 -0
  73. package/dist/vitest/chunk-ARVS45PP.js +2764 -0
  74. package/dist/vitest/index.cjs +6079 -75089
  75. package/dist/vitest/index.d.ts +7 -6
  76. package/dist/vitest/index.js +8 -8
  77. package/dist/vitest/runtime/hosted-session-reaper.cjs +801 -34187
  78. package/dist/vitest/runtime/hosted-session-reaper.js +1 -1
  79. package/dist/vitest/runtime/setup-files.js +2 -2
  80. package/package.json +14 -9
  81. package/skills/archal-agent/SKILL.md +87 -0
  82. package/skills/autoloop/SKILL.md +376 -0
  83. package/skills/autoloop/references/hosted-sources.md +62 -0
  84. package/skills/autoloop/references/trace-schema-mapping.md +73 -0
  85. package/skills/eval/SKILL.md +35 -1
  86. package/skills/install-agent/SKILL.md +221 -0
  87. package/skills/onboard/SKILL.md +80 -0
  88. package/skills/scenario/SKILL.md +19 -4
  89. package/skills/seed/SKILL.md +237 -0
  90. package/dist/seed/dynamic-generator.cjs +0 -45564
  91. package/dist/seed/dynamic-generator.d.cts +0 -106
  92. package/dist/vitest/chunk-CTSN67QR.js +0 -47188
@@ -0,0 +1,104 @@
1
+ #!/usr/bin/env node
2
+ import { randomBytes } from 'node:crypto';
3
+ import { mkdir, writeFile } from 'node:fs/promises';
4
+ import { dirname, resolve } from 'node:path';
5
+
6
+ const repo = process.env.ARCHAL_REPLAY_E2E_REPO || 'vercel/next.js';
7
+ const outputPath = resolve(
8
+ process.env.ARCHAL_REPLAY_E2E_OUT || '/tmp/archal-replay-capsule-otlp.json',
9
+ );
10
+
11
+ function nowNanos(offsetMs = 0) {
12
+ return String((Date.now() + offsetMs) * 1_000_000);
13
+ }
14
+
15
+ function attr(key, value) {
16
+ return { key, value: { stringValue: typeof value === 'string' ? value : JSON.stringify(value) } };
17
+ }
18
+
19
+ async function fetchRepoSnapshot() {
20
+ const response = await fetch(`https://api.github.com/repos/${repo}`, {
21
+ headers: {
22
+ accept: 'application/vnd.github+json',
23
+ 'user-agent': 'archal-replay-capsule-e2e',
24
+ },
25
+ });
26
+ if (!response.ok) {
27
+ throw new Error(`GitHub repo snapshot failed: ${response.status} ${response.statusText}`);
28
+ }
29
+ const body = await response.json();
30
+ return {
31
+ id: body.id,
32
+ fullName: body.full_name,
33
+ private: body.private,
34
+ archived: body.archived,
35
+ defaultBranch: body.default_branch,
36
+ pushedAt: body.pushed_at,
37
+ openIssuesCount: body.open_issues_count,
38
+ };
39
+ }
40
+
41
+ const beforeRepo = await fetchRepoSnapshot();
42
+ const afterRepo = { ...beforeRepo };
43
+ const traceId = randomBytes(16).toString('hex');
44
+ const spanId = randomBytes(8).toString('hex');
45
+ const prompt = `Report whether ${repo} is archived.`;
46
+ // Deliberately wrong when the repository is not archived, so the generated
47
+ // trace is a reproducible failed behavior with a real service snapshot.
48
+ const completion = `${repo} is archived: ${String(!beforeRepo.archived)}`;
49
+
50
+ const replayCapsule = {
51
+ schema: 'archal.trace.replay-capsule',
52
+ version: 1,
53
+ stateBefore: { github: { repositories: [beforeRepo] } },
54
+ stateAfter: { github: { repositories: [afterRepo] } },
55
+ stateDiff: { github: {} },
56
+ serviceReadSet: [{ service: 'github', type: 'repository', id: beforeRepo.fullName }],
57
+ resourceRefs: [{ service: 'github', type: 'repository', id: beforeRepo.fullName }],
58
+ serviceOperations: [{
59
+ service: 'github',
60
+ operation: 'repos.get',
61
+ resourceRefs: [{ service: 'github', type: 'repository', id: beforeRepo.fullName }],
62
+ response: beforeRepo,
63
+ }],
64
+ authPrincipal: { kind: 'anonymous', scopes: [] },
65
+ modelConfig: { provider: 'local-harness', model: 'deterministic-fixture' },
66
+ promptBundle: { task: prompt },
67
+ };
68
+
69
+ const otlpPayload = {
70
+ resourceSpans: [{
71
+ resource: {
72
+ attributes: [
73
+ attr('service.name', 'archal-replay-capsule-e2e'),
74
+ ],
75
+ },
76
+ scopeSpans: [{
77
+ scope: { attributes: [] },
78
+ spans: [{
79
+ traceId,
80
+ spanId,
81
+ name: 'github.repos.get',
82
+ startTimeUnixNano: nowNanos(-250),
83
+ endTimeUnixNano: nowNanos(),
84
+ attributes: [
85
+ attr('gen_ai.prompt', prompt),
86
+ attr('gen_ai.completion', completion),
87
+ attr('archal.replay.capsule', replayCapsule),
88
+ ],
89
+ }],
90
+ }],
91
+ }],
92
+ };
93
+
94
+ await mkdir(dirname(outputPath), { recursive: true });
95
+ await writeFile(outputPath, `${JSON.stringify(otlpPayload, null, 2)}\n`);
96
+
97
+ process.stdout.write(JSON.stringify({
98
+ ok: true,
99
+ outputPath,
100
+ traceId,
101
+ repo: beforeRepo.fullName,
102
+ archived: beforeRepo.archived,
103
+ }, null, 2));
104
+ process.stdout.write('\n');
@@ -65,6 +65,74 @@
65
65
  },
66
66
  "hidden": false
67
67
  },
68
+ {
69
+ "name": "apify_list_actor_builds",
70
+ "description": "Lists builds for an actor in an Apify-shaped collection.",
71
+ "inputSchema": {
72
+ "type": "object",
73
+ "properties": {
74
+ "actorId": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "required": [
79
+ "actorId"
80
+ ],
81
+ "additionalProperties": true
82
+ },
83
+ "hidden": false
84
+ },
85
+ {
86
+ "name": "apify_list_actor_runs",
87
+ "description": "Lists runs for an actor in an Apify-shaped collection.",
88
+ "inputSchema": {
89
+ "type": "object",
90
+ "properties": {
91
+ "actorId": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "required": [
96
+ "actorId"
97
+ ],
98
+ "additionalProperties": true
99
+ },
100
+ "hidden": false
101
+ },
102
+ {
103
+ "name": "apify_list_actor_versions",
104
+ "description": "Lists versions for an actor in an Apify-shaped collection.",
105
+ "inputSchema": {
106
+ "type": "object",
107
+ "properties": {
108
+ "actorId": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "required": [
113
+ "actorId"
114
+ ],
115
+ "additionalProperties": true
116
+ },
117
+ "hidden": false
118
+ },
119
+ {
120
+ "name": "apify_list_actor_tasks",
121
+ "description": "Lists tasks for an actor in an Apify-shaped collection.",
122
+ "inputSchema": {
123
+ "type": "object",
124
+ "properties": {
125
+ "actorId": {
126
+ "type": "string"
127
+ }
128
+ },
129
+ "required": [
130
+ "actorId"
131
+ ],
132
+ "additionalProperties": true
133
+ },
134
+ "hidden": false
135
+ },
68
136
  {
69
137
  "name": "apify_stateful_list_datasets",
70
138
  "description": "Lists datasets including datasets created during the session.",
@@ -153,6 +221,23 @@
153
221
  },
154
222
  "hidden": false
155
223
  },
224
+ {
225
+ "name": "apify_stateful_get_dataset_statistics",
226
+ "description": "Returns dataset statistics for a stateful dataset.",
227
+ "inputSchema": {
228
+ "type": "object",
229
+ "properties": {
230
+ "datasetId": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": [
235
+ "datasetId"
236
+ ],
237
+ "additionalProperties": true
238
+ },
239
+ "hidden": false
240
+ },
156
241
  {
157
242
  "name": "apify_stateful_list_key_value_stores",
158
243
  "description": "Lists key-value stores created during the session.",
@@ -538,7 +623,28 @@
538
623
  },
539
624
  {
540
625
  "name": "apify_stateful_delete_request_queue_request",
541
- "description": "Deletes a request by id from a queue.",
626
+ "description": "Back-compat alias for DELETE request lock semantics.",
627
+ "inputSchema": {
628
+ "type": "object",
629
+ "properties": {
630
+ "queueId": {
631
+ "type": "string"
632
+ },
633
+ "requestId": {
634
+ "type": "string"
635
+ }
636
+ },
637
+ "required": [
638
+ "queueId",
639
+ "requestId"
640
+ ],
641
+ "additionalProperties": true
642
+ },
643
+ "hidden": false
644
+ },
645
+ {
646
+ "name": "apify_stateful_delete_request_queue_request_lock",
647
+ "description": "Unlocks a request by id in a queue via DELETE /lock semantics.",
542
648
  "inputSchema": {
543
649
  "type": "object",
544
650
  "properties": {
@@ -574,9 +680,53 @@
574
680
  },
575
681
  "hidden": false
576
682
  },
683
+ {
684
+ "name": "apify_stateful_create_schedule",
685
+ "description": "Creates a schedule persisted in session state.",
686
+ "inputSchema": {
687
+ "type": "object",
688
+ "properties": {},
689
+ "additionalProperties": true
690
+ },
691
+ "hidden": false
692
+ },
693
+ {
694
+ "name": "apify_stateful_get_schedule",
695
+ "description": "Gets a schedule by id from session state.",
696
+ "inputSchema": {
697
+ "type": "object",
698
+ "properties": {
699
+ "scheduleId": {
700
+ "type": "string"
701
+ }
702
+ },
703
+ "required": [
704
+ "scheduleId"
705
+ ],
706
+ "additionalProperties": true
707
+ },
708
+ "hidden": false
709
+ },
710
+ {
711
+ "name": "apify_stateful_delete_schedule",
712
+ "description": "Deletes a schedule by id from session state.",
713
+ "inputSchema": {
714
+ "type": "object",
715
+ "properties": {
716
+ "scheduleId": {
717
+ "type": "string"
718
+ }
719
+ },
720
+ "required": [
721
+ "scheduleId"
722
+ ],
723
+ "additionalProperties": true
724
+ },
725
+ "hidden": false
726
+ },
577
727
  {
578
728
  "name": "apify_get_user",
579
- "description": "Returns the recorded REST response for apify_get_user.",
729
+ "description": "Gets the authenticated Apify user profile.",
580
730
  "inputSchema": {
581
731
  "type": "object",
582
732
  "properties": {},
@@ -586,7 +736,7 @@
586
736
  },
587
737
  {
588
738
  "name": "apify_abort_build",
589
- "description": "Returns the recorded REST response for apify_abort_build.",
739
+ "description": "Returns Apify-shaped not-found for unmodeled build aborts.",
590
740
  "inputSchema": {
591
741
  "type": "object",
592
742
  "properties": {},
@@ -596,7 +746,7 @@
596
746
  },
597
747
  {
598
748
  "name": "apify_get_build_openapi",
599
- "description": "Returns the recorded REST response for apify_get_build_openapi.",
749
+ "description": "Returns Apify-shaped not-found for unmodeled actor build OpenAPI specs.",
600
750
  "inputSchema": {
601
751
  "type": "object",
602
752
  "properties": {},
@@ -606,7 +756,7 @@
606
756
  },
607
757
  {
608
758
  "name": "apify_list_runs",
609
- "description": "Returns the recorded REST response for apify_list_runs.",
759
+ "description": "Lists actor runs created during the session.",
610
760
  "inputSchema": {
611
761
  "type": "object",
612
762
  "properties": {},
@@ -616,7 +766,7 @@
616
766
  },
617
767
  {
618
768
  "name": "apify_get_run",
619
- "description": "Returns the recorded REST response for apify_get_run.",
769
+ "description": "Returns Apify-shaped not-found for unmodeled actor runs.",
620
770
  "inputSchema": {
621
771
  "type": "object",
622
772
  "properties": {},
@@ -626,7 +776,7 @@
626
776
  },
627
777
  {
628
778
  "name": "apify_abort_run",
629
- "description": "Returns the recorded REST response for apify_abort_run.",
779
+ "description": "Returns Apify-shaped not-found for unmodeled actor run aborts.",
630
780
  "inputSchema": {
631
781
  "type": "object",
632
782
  "properties": {},
@@ -635,8 +785,8 @@
635
785
  "hidden": false
636
786
  },
637
787
  {
638
- "name": "apify_list_datasets",
639
- "description": "Returns the recorded REST response for apify_list_datasets.",
788
+ "name": "apify_list_schedules",
789
+ "description": "Lists schedules created during the session.",
640
790
  "inputSchema": {
641
791
  "type": "object",
642
792
  "properties": {},
@@ -645,8 +795,8 @@
645
795
  "hidden": false
646
796
  },
647
797
  {
648
- "name": "apify_list_kv_stores",
649
- "description": "Returns the recorded REST response for apify_list_kv_stores.",
798
+ "name": "apify_get_v2_store",
799
+ "description": "Lists public Actor Store entries available to this clone.",
650
800
  "inputSchema": {
651
801
  "type": "object",
652
802
  "properties": {},
@@ -655,8 +805,58 @@
655
805
  "hidden": false
656
806
  },
657
807
  {
658
- "name": "apify_list_schedules",
659
- "description": "Returns the recorded REST response for apify_list_schedules.",
808
+ "name": "apify_get_v2_store_item",
809
+ "description": "Returns Apify-shaped not-found for missing Actor Store detail reads.",
810
+ "inputSchema": {
811
+ "type": "object",
812
+ "properties": {},
813
+ "additionalProperties": true
814
+ },
815
+ "hidden": false
816
+ },
817
+ {
818
+ "name": "apify_get_webhooks",
819
+ "description": "Lists webhooks created during the session.",
820
+ "inputSchema": {
821
+ "type": "object",
822
+ "properties": {},
823
+ "additionalProperties": true
824
+ },
825
+ "hidden": false
826
+ },
827
+ {
828
+ "name": "apify_post_v2_store",
829
+ "description": "Returns the upstream method-not-allowed error for POST /v2/store.",
830
+ "inputSchema": {
831
+ "type": "object",
832
+ "properties": {},
833
+ "additionalProperties": true
834
+ },
835
+ "hidden": false
836
+ },
837
+ {
838
+ "name": "apify_post_webhooks",
839
+ "description": "Returns upstream webhook create validation errors.",
840
+ "inputSchema": {
841
+ "type": "object",
842
+ "properties": {},
843
+ "additionalProperties": true
844
+ },
845
+ "hidden": false
846
+ },
847
+ {
848
+ "name": "apify_get_webhook",
849
+ "description": "Returns upstream record-not-found for missing webhook detail reads.",
850
+ "inputSchema": {
851
+ "type": "object",
852
+ "properties": {},
853
+ "additionalProperties": true
854
+ },
855
+ "hidden": false
856
+ },
857
+ {
858
+ "name": "apify_post_webhook_test",
859
+ "description": "Returns upstream record-not-found for missing webhook test sends.",
660
860
  "inputSchema": {
661
861
  "type": "object",
662
862
  "properties": {},