fix: empty templates ship input_schema.json and reference it from actor.json#819
Draft
DaveHanns wants to merge 1 commit into
Draft
fix: empty templates ship input_schema.json and reference it from actor.json#819DaveHanns wants to merge 1 commit into
DaveHanns wants to merge 1 commit into
Conversation
…or.json
Empty templates (ts-empty, js-empty, python-empty) were the only common
scaffolding starting points that did not ship a `.actor/input_schema.json`.
Agents using these templates would create the schema file themselves but
omit the `.input` reference in `.actor/actor.json`, relying on the
deprecated auto-discovery fallback.
## What changed
### `agent-bases/{ts,js,python}.AGENTS.md` (the shared bases that
propagate into every per-template AGENTS.md via CI)
- **Do list (line 28-29 in each)**: added a new bullet right after the
existing "set sensible defaults in `.actor/input_schema.json`"
bullet:
> explicitly reference the input schema from `.actor/actor.json` by
> adding `"input": "./input_schema.json"` — do not rely on
> auto-discovery, which is deprecated
- **Project structure tree**: updated `actor.json` and
`input_schema.json` annotations so the linkage is visible at a
glance.
### `templates/{ts,js,python}-empty/.actor/actor.json`
- Added `"input": "./input_schema.json"` between the `meta` block and
the `dockerfile` field. Preserves all other content + 4-space
indentation.
### `templates/{ts,js,python}-empty/.actor/input_schema.json` (new
file in each)
- Ships a minimal starter schema with a single `example` string field
(described as "Replace this with your actual input fields"). Mirrors
the `python-start` / `ts-start` pattern of shipping a working schema
the user replaces. Agents see the linkage live and produce
`.input`-referenced schemas by default.
## Rationale
The "start" templates already ship both `.actor/input_schema.json` and
the `.input` reference in `actor.json`. The "empty" templates were the
outlier, leaving agents without a live example to crib from. Bringing
them into line + adding the explicit AGENTS.md instruction closes the
loop from both directions: the scaffold demonstrates the pattern, and
the agent docs reinforce it.
Refs: chocholous/apify-evals F40.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Empty templates (
ts-empty,js-empty,python-empty) were the only common scaffolding starting points that did not ship a.actor/input_schema.json— and theiractor.jsondidn't carry a.inputreference either. Agents extrapolating from these templates produce Actors that rely on the platform's deprecated auto-discovery fallback (seeapify-docsinput_schema/specification.md line 21).This PR brings them into line with the
starttemplates (which already ship both files + the linkage) and updates the sharedagent-bases/{ts,js,python}.AGENTS.mdfiles so the explicit-reference pattern is taught in the docs that propagate to every per-template AGENTS.md.Scope
.actor/input_schema.jsonstarter filetemplates/{ts,js,python}-empty/.actor/input_schema.json(3 new).actor/actor.jsongains"input": "./input_schema.json"templates/{ts,js,python}-empty/.actor/actor.json(3 modified)agent-bases/{ts,js,python}.AGENTS.md— Do-list bullet + project-tree annotationPer the README:
agent-bases/<lang>.AGENTS.mdfiles propagate to every per-template AGENTS.md via CI, so the 3 base edits lift every template.Starter
input_schema.jsoncontentEach empty template ships:
{ "$schema": "https://apify.com/schemas/v1/input.ide.json", "title": "Actor Input", "type": "object", "schemaVersion": 1, "properties": { "example": { "title": "Example Field", "type": "string", "description": "Replace this with your actual input fields.", "editor": "textfield" } }, "required": [] }Single placeholder field, no required fields, lowest-friction for agents/users to replace with the real schema.
AGENTS.md changes (applied to all 3 shared bases)
- set sensible defaults in `.actor/input_schema.json` for all optional fields +- explicitly reference the input schema from `.actor/actor.json` by adding `"input": "./input_schema.json"` — do not rely on auto-discovery, which is deprecatedPlus the project-structure tree now reads:
Test plan
dist/templates/*.zipaction)apify create -t ts-emptyproduces a scaffold that includes both.actor/input_schema.jsonAND.inputreference inactor.jsonjs-emptyandpython-emptyAGENTS.mdfiles are auto-updated by the CI propagation workflowRefs
🤖 Generated with Claude Code