@temps-sdk/cli 0.1.36 → 0.1.38

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 (127) hide show
  1. package/README.md +193 -0
  2. package/dist/index.js +89808 -89620
  3. package/dist/skills/temps/SKILL.md +140 -0
  4. package/dist/skills/temps/agents/openai.yaml +7 -0
  5. package/dist/skills/temps/evals/evals.json +95 -0
  6. package/dist/skills/temps/howtos/backup-recovery.md +41 -0
  7. package/dist/skills/temps/howtos/ci-automation.md +18 -0
  8. package/dist/skills/temps/howtos/deploy-application.md +29 -0
  9. package/dist/skills/temps/howtos/diagnose-deployment.md +17 -0
  10. package/dist/skills/temps/howtos/framework-routing.md +28 -0
  11. package/dist/skills/temps/howtos/javascript-typescript.md +57 -0
  12. package/dist/skills/temps/howtos/managed-services.md +83 -0
  13. package/dist/skills/temps/howtos/observability-onboarding.md +52 -0
  14. package/dist/skills/temps/howtos/projects-and-monorepos.md +49 -0
  15. package/dist/skills/temps/howtos/python.md +42 -0
  16. package/dist/skills/temps/howtos/rust.md +30 -0
  17. package/dist/skills/temps/references/cli-runtime.md +68 -0
  18. package/dist/skills/temps/references/commands/INDEX.md +97 -0
  19. package/dist/skills/temps/references/commands/access.md +49 -0
  20. package/dist/skills/temps/references/commands/ai.md +43 -0
  21. package/dist/skills/temps/references/commands/alarms.md +87 -0
  22. package/dist/skills/temps/references/commands/analytics.md +369 -0
  23. package/dist/skills/temps/references/commands/apikeys.md +96 -0
  24. package/dist/skills/temps/references/commands/audit.md +41 -0
  25. package/dist/skills/temps/references/commands/backups.md +263 -0
  26. package/dist/skills/temps/references/commands/cloud.md +371 -0
  27. package/dist/skills/temps/references/commands/cluster.md +31 -0
  28. package/dist/skills/temps/references/commands/configure.md +55 -0
  29. package/dist/skills/temps/references/commands/containers.md +110 -0
  30. package/dist/skills/temps/references/commands/context.md +49 -0
  31. package/dist/skills/temps/references/commands/custom-domains.md +98 -0
  32. package/dist/skills/temps/references/commands/data.md +90 -0
  33. package/dist/skills/temps/references/commands/delivery-profiles.md +69 -0
  34. package/dist/skills/temps/references/commands/delivery.md +116 -0
  35. package/dist/skills/temps/references/commands/deploy-image.md +23 -0
  36. package/dist/skills/temps/references/commands/deploy-local-image.md +28 -0
  37. package/dist/skills/temps/references/commands/deploy-static.md +23 -0
  38. package/dist/skills/temps/references/commands/deploy.md +21 -0
  39. package/dist/skills/temps/references/commands/deployments.md +172 -0
  40. package/dist/skills/temps/references/commands/dns-provider.md +196 -0
  41. package/dist/skills/temps/references/commands/dns.md +181 -0
  42. package/dist/skills/temps/references/commands/domains.md +187 -0
  43. package/dist/skills/temps/references/commands/drop.md +21 -0
  44. package/dist/skills/temps/references/commands/dsn.md +84 -0
  45. package/dist/skills/temps/references/commands/email-domains.md +160 -0
  46. package/dist/skills/temps/references/commands/email-providers.md +91 -0
  47. package/dist/skills/temps/references/commands/emails.md +79 -0
  48. package/dist/skills/temps/references/commands/env-pull.md +16 -0
  49. package/dist/skills/temps/references/commands/env-push.md +17 -0
  50. package/dist/skills/temps/references/commands/environments.md +252 -0
  51. package/dist/skills/temps/references/commands/errors.md +250 -0
  52. package/dist/skills/temps/references/commands/facets.md +57 -0
  53. package/dist/skills/temps/references/commands/flags.md +143 -0
  54. package/dist/skills/temps/references/commands/funnels.md +92 -0
  55. package/dist/skills/temps/references/commands/incidents.md +111 -0
  56. package/dist/skills/temps/references/commands/init.md +16 -0
  57. package/dist/skills/temps/references/commands/instances.md +56 -0
  58. package/dist/skills/temps/references/commands/instantiations.md +53 -0
  59. package/dist/skills/temps/references/commands/ip-access.md +153 -0
  60. package/dist/skills/temps/references/commands/link.md +15 -0
  61. package/dist/skills/temps/references/commands/load-balancer.md +73 -0
  62. package/dist/skills/temps/references/commands/login.md +17 -0
  63. package/dist/skills/temps/references/commands/logout.md +16 -0
  64. package/dist/skills/temps/references/commands/logs.md +167 -0
  65. package/dist/skills/temps/references/commands/mcp-servers.md +70 -0
  66. package/dist/skills/temps/references/commands/mcp.md +65 -0
  67. package/dist/skills/temps/references/commands/metrics.md +79 -0
  68. package/dist/skills/temps/references/commands/migrate.md +109 -0
  69. package/dist/skills/temps/references/commands/monitors.md +92 -0
  70. package/dist/skills/temps/references/commands/nodes.md +200 -0
  71. package/dist/skills/temps/references/commands/notification-preferences.md +47 -0
  72. package/dist/skills/temps/references/commands/notifications.md +211 -0
  73. package/dist/skills/temps/references/commands/open.md +17 -0
  74. package/dist/skills/temps/references/commands/otel-forward.md +210 -0
  75. package/dist/skills/temps/references/commands/otel.md +38 -0
  76. package/dist/skills/temps/references/commands/platform.md +147 -0
  77. package/dist/skills/temps/references/commands/plugin.md +193 -0
  78. package/dist/skills/temps/references/commands/presets.md +35 -0
  79. package/dist/skills/temps/references/commands/project-groups.md +255 -0
  80. package/dist/skills/temps/references/commands/projects.md +270 -0
  81. package/dist/skills/temps/references/commands/providers.md +277 -0
  82. package/dist/skills/temps/references/commands/proxy-logs.md +85 -0
  83. package/dist/skills/temps/references/commands/revenue.md +48 -0
  84. package/dist/skills/temps/references/commands/rollback.md +18 -0
  85. package/dist/skills/temps/references/commands/runtime-logs.md +21 -0
  86. package/dist/skills/temps/references/commands/sandbox.md +428 -0
  87. package/dist/skills/temps/references/commands/scans.md +113 -0
  88. package/dist/skills/temps/references/commands/secrets.md +65 -0
  89. package/dist/skills/temps/references/commands/server.md +50 -0
  90. package/dist/skills/temps/references/commands/services.md +636 -0
  91. package/dist/skills/temps/references/commands/session-replay.md +76 -0
  92. package/dist/skills/temps/references/commands/settings.md +84 -0
  93. package/dist/skills/temps/references/commands/setup.md +25 -0
  94. package/dist/skills/temps/references/commands/skills.md +87 -0
  95. package/dist/skills/temps/references/commands/start.md +20 -0
  96. package/dist/skills/temps/references/commands/status-pages.md +188 -0
  97. package/dist/skills/temps/references/commands/status.md +17 -0
  98. package/dist/skills/temps/references/commands/stop.md +16 -0
  99. package/dist/skills/temps/references/commands/teams.md +129 -0
  100. package/dist/skills/temps/references/commands/templates.md +61 -0
  101. package/dist/skills/temps/references/commands/tokens.md +77 -0
  102. package/dist/skills/temps/references/commands/traces.md +42 -0
  103. package/dist/skills/temps/references/commands/traefik-discovery.md +113 -0
  104. package/dist/skills/temps/references/commands/up.md +25 -0
  105. package/dist/skills/temps/references/commands/users.md +99 -0
  106. package/dist/skills/temps/references/commands/webhooks.md +165 -0
  107. package/dist/skills/temps/references/commands/whoami.md +15 -0
  108. package/dist/skills/temps/references/commands/workflow.md +42 -0
  109. package/dist/skills/temps/references/observability/analytics.md +146 -0
  110. package/dist/skills/temps/references/observability/error-tracking.md +73 -0
  111. package/dist/skills/temps/references/observability/hygiene.md +112 -0
  112. package/dist/skills/temps/references/observability/logs.md +43 -0
  113. package/dist/skills/temps/references/observability/metrics.md +41 -0
  114. package/dist/skills/temps/references/observability/tracing.md +392 -0
  115. package/dist/skills/temps/references/runtime-contract.md +115 -0
  116. package/dist/skills/temps/references/workflows/platform-operations.md +154 -0
  117. package/dist/skills/temps/scripts/__pycache__/generate_command_references.cpython-314.pyc +0 -0
  118. package/dist/skills/temps/scripts/__pycache__/test_generate_command_references.cpython-314.pyc +0 -0
  119. package/dist/skills/temps/scripts/__pycache__/test_validate_skill.cpython-314.pyc +0 -0
  120. package/dist/skills/temps/scripts/__pycache__/validate_skill.cpython-314.pyc +0 -0
  121. package/dist/skills/temps/scripts/detect_project_capabilities.py +239 -0
  122. package/dist/skills/temps/scripts/generate_command_references.py +144 -0
  123. package/dist/skills/temps/scripts/test_detect_project_capabilities.py +124 -0
  124. package/dist/skills/temps/scripts/test_generate_command_references.py +128 -0
  125. package/dist/skills/temps/scripts/test_validate_skill.py +84 -0
  126. package/dist/skills/temps/scripts/validate_skill.py +111 -0
  127. package/package.json +2 -2
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-FileCopyrightText: 2024-2026 Temps Contributors
3
+ # SPDX-License-Identifier: MIT OR Apache-2.0
4
+
5
+ """Regression tests for the Temps skill validator."""
6
+
7
+ from __future__ import annotations
8
+
9
+ import tempfile
10
+ import unittest
11
+ from pathlib import Path
12
+
13
+ from validate_skill import GUARDED_SKILLS, check_integrity_pins
14
+
15
+
16
+ GUARD = """```bash
17
+ expected_temps_cli_integrity='{pin}'
18
+ actual_temps_cli_integrity="$(npm view @temps-sdk/cli@9.9.9 dist.integrity)"
19
+ ```
20
+ """
21
+
22
+
23
+ def write_skills(root: Path, pins: dict[str, str]) -> None:
24
+ for skill, pin in pins.items():
25
+ skill_root = root / skill
26
+ skill_root.mkdir(parents=True)
27
+ (skill_root / "SKILL.md").write_text(GUARD.format(pin=pin), encoding="utf-8")
28
+
29
+
30
+ class IntegrityPinTests(unittest.TestCase):
31
+ def test_accepts_skills_pinning_the_published_artifact(self) -> None:
32
+ with tempfile.TemporaryDirectory() as directory:
33
+ root = Path(directory)
34
+ write_skills(root, {skill: "sha512-current" for skill in GUARDED_SKILLS})
35
+
36
+ self.assertEqual(check_integrity_pins(root, "sha512-current"), [])
37
+
38
+ def test_rejects_a_pin_left_behind_by_a_version_bump(self) -> None:
39
+ with tempfile.TemporaryDirectory() as directory:
40
+ root = Path(directory)
41
+ write_skills(
42
+ root,
43
+ {
44
+ "temps": "sha512-previous",
45
+ "temps-cli": "sha512-current",
46
+ },
47
+ )
48
+
49
+ errors = check_integrity_pins(root, "sha512-current")
50
+
51
+ self.assertEqual(len(errors), 1)
52
+ self.assertIn("temps/SKILL.md", errors[0])
53
+ self.assertIn("sha512-previous", errors[0])
54
+
55
+ def test_rejects_a_skill_with_no_guard_at_all(self) -> None:
56
+ with tempfile.TemporaryDirectory() as directory:
57
+ root = Path(directory)
58
+ for skill in GUARDED_SKILLS:
59
+ (root / skill).mkdir(parents=True)
60
+ (root / skill / "SKILL.md").write_text("no guard", encoding="utf-8")
61
+
62
+ errors = check_integrity_pins(root, "sha512-current")
63
+
64
+ self.assertEqual(len(errors), 1)
65
+ self.assertIn("no expected_temps_cli_integrity guard", errors[0])
66
+
67
+ def test_reports_a_missing_guarded_skill(self) -> None:
68
+ with tempfile.TemporaryDirectory() as directory:
69
+ root = Path(directory)
70
+ write_skills(root, {GUARDED_SKILLS[0]: "sha512-current"})
71
+
72
+ errors = check_integrity_pins(root, "sha512-current")
73
+
74
+ self.assertEqual(len(errors), 1)
75
+ self.assertIn(f"skills/{GUARDED_SKILLS[1]}", errors[0])
76
+
77
+ def test_the_checked_in_skills_pin_the_published_artifact(self) -> None:
78
+ skills_root = Path(__file__).resolve().parents[2]
79
+
80
+ self.assertEqual(check_integrity_pins(skills_root), [])
81
+
82
+
83
+ if __name__ == "__main__":
84
+ unittest.main()
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-FileCopyrightText: 2024-2026 Temps Contributors
3
+ # SPDX-License-Identifier: MIT OR Apache-2.0
4
+
5
+ """Validate the Temps skill structure and local Markdown references."""
6
+
7
+ from __future__ import annotations
8
+
9
+ import json
10
+ import re
11
+ from pathlib import Path
12
+
13
+
14
+ LINK = re.compile(r"\[[^]]*\]\(([^)]+)\)")
15
+ PINNED_CLI = "@temps-sdk/cli@0.1.38"
16
+ # sha512 of the published tarball for PINNED_CLI, as reported by
17
+ # `npm view @temps-sdk/cli@<version> dist.integrity`. Refresh it in the same
18
+ # commit that bumps PINNED_CLI, once the release is actually on npm — the value
19
+ # has no version substring, so a find-and-replace bump silently leaves it stale
20
+ # and every preflight guard below fails closed against the new release.
21
+ PINNED_CLI_INTEGRITY = "sha512-JMAlVb21dV5UKXg64xoL0bEAzTa0XUEsO6e8Az4jNRy31MaiXqYtgQkcVviC/fgzZqmvdnpHt+K8N5gw6WYL7A=="
22
+ INTEGRITY_PIN = re.compile(r"expected_temps_cli_integrity='([^']*)'")
23
+ # Skills whose preflight guard installs the pinned CLI. They embed the same
24
+ # hash independently, so they are validated together.
25
+ GUARDED_SKILLS = ("temps", "temps-cli")
26
+
27
+
28
+ def check_integrity_pins(
29
+ skills_root: Path, expected: str = PINNED_CLI_INTEGRITY
30
+ ) -> list[str]:
31
+ """Every CLI preflight guard must pin the same, current package integrity."""
32
+ errors: list[str] = []
33
+ pins = 0
34
+ for skill in GUARDED_SKILLS:
35
+ skill_root = skills_root / skill
36
+ if not skill_root.is_dir():
37
+ errors.append(f"guarded skill is missing: skills/{skill}")
38
+ continue
39
+ for markdown in sorted(skill_root.rglob("*.md")):
40
+ text = markdown.read_text(encoding="utf-8")
41
+ for pin in INTEGRITY_PIN.findall(text):
42
+ pins += 1
43
+ if pin != expected:
44
+ errors.append(
45
+ f"{markdown.relative_to(skills_root)}: integrity pin {pin} "
46
+ f"does not match the published {PINNED_CLI} artifact"
47
+ )
48
+ if not pins:
49
+ errors.append(
50
+ "no expected_temps_cli_integrity guard found in "
51
+ f"{', '.join(f'skills/{skill}' for skill in GUARDED_SKILLS)}"
52
+ )
53
+ return errors
54
+
55
+
56
+ def main() -> int:
57
+ root = Path(__file__).resolve().parents[1]
58
+ errors: list[str] = check_integrity_pins(root.parent)
59
+ skill = root / "SKILL.md"
60
+ if len(skill.read_text(encoding="utf-8").splitlines()) > 500:
61
+ errors.append("SKILL.md exceeds 500 lines")
62
+
63
+ for markdown in root.rglob("*.md"):
64
+ text = markdown.read_text(encoding="utf-8")
65
+ for target in LINK.findall(text):
66
+ if target.startswith(("http://", "https://", "mailto:", "#")):
67
+ continue
68
+ path_text = target.split("#", 1)[0]
69
+ if path_text and not (markdown.parent / path_text).resolve().exists():
70
+ errors.append(f"{markdown.relative_to(root)}: missing link target {target}")
71
+ for match in re.finditer(r"@temps-sdk/cli(?:@([0-9]+\.[0-9]+\.[0-9]+))?", text):
72
+ if match.group(0) != PINNED_CLI:
73
+ errors.append(
74
+ f"{markdown.relative_to(root)}: unpinned or unexpected CLI reference {match.group(0)}"
75
+ )
76
+
77
+ index = root / "references" / "commands" / "INDEX.md"
78
+ command_files = set((root / "references" / "commands").glob("*.md")) - {index}
79
+ indexed_files = {
80
+ (index.parent / target).resolve()
81
+ for target in LINK.findall(index.read_text(encoding="utf-8"))
82
+ }
83
+ missing_from_index = sorted(path.name for path in command_files if path.resolve() not in indexed_files)
84
+ if missing_from_index:
85
+ errors.append(f"command references absent from index: {', '.join(missing_from_index)}")
86
+
87
+ evals = json.loads((root / "evals" / "evals.json").read_text(encoding="utf-8"))
88
+ if evals.get("skill_name") != root.name:
89
+ errors.append("eval suite skill_name does not match the skill directory")
90
+ seen_ids: set[int] = set()
91
+ for case in evals.get("evals", []):
92
+ case_id = case.get("id")
93
+ if not isinstance(case_id, int) or case_id in seen_ids:
94
+ errors.append(f"eval case has invalid or duplicate id: {case_id!r}")
95
+ seen_ids.add(case_id)
96
+ if not case.get("prompt") or not case.get("expected_output"):
97
+ errors.append(f"eval case {case_id!r} is missing prompt or expected_output")
98
+ if not case.get("expectations"):
99
+ errors.append(f"eval case {case_id!r} has no expectations")
100
+
101
+ if errors:
102
+ print("Temps skill validation failed:")
103
+ for error in errors:
104
+ print(f"- {error}")
105
+ return 1
106
+ print(f"Temps skill validation passed ({len(command_files)} command groups).")
107
+ return 0
108
+
109
+
110
+ if __name__ == "__main__":
111
+ raise SystemExit(main())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temps-sdk/cli",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
4
4
  "description": "CLI for Temps deployment platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,7 @@
13
13
  "dev": "bun run src/index.ts",
14
14
  "clean": "rm -rf dist",
15
15
  "prepublishOnly": "bun run clean && bun run build",
16
- "build": "bun build src/index.ts --outdir dist --target node && sed -i '' '1s|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/index.js && chmod +x dist/index.js",
16
+ "build": "bun build src/index.ts --outdir dist --target node && sed -i '' '1s|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/index.js && chmod +x dist/index.js && rm -rf dist/skills && mkdir -p dist/skills && cp -R ../../skills/temps dist/skills/temps",
17
17
  "build:bin": "bun build src/index.ts --compile --outfile bin/temps",
18
18
  "spec:update": "bun run scripts/update-openapi.ts",
19
19
  "spec:check": "bun run scripts/check-openapi.ts",