@standardagents/spec 0.38.0 → 0.38.2
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.
- package/dist/index.d.ts +41 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -833,6 +833,10 @@ interface UserHandle extends ThreadUser {
|
|
|
833
833
|
* scope's serialization guarantee. The runtime MUST NOT require network
|
|
834
834
|
* self-addressing to fulfill this call. Rejects for user-less threads.
|
|
835
835
|
*
|
|
836
|
+
* The endpoint is always relative to the packaged user-endpoint namespace.
|
|
837
|
+
* Runtimes reject dot-segment traversal (including encoded/backslash forms)
|
|
838
|
+
* rather than allowing URL normalization to address another hub route.
|
|
839
|
+
*
|
|
836
840
|
* @param endpoint - The user endpoint path (e.g. `"standardcode/lease_acquire"`)
|
|
837
841
|
* @param payload - JSON-serializable request body (POSTed to the handler)
|
|
838
842
|
*/
|
|
@@ -952,16 +956,17 @@ declare function isUserEndpoint(value: unknown): value is MarkedUserEndpoint;
|
|
|
952
956
|
declare function defineUserEndpoint(handler: UserEndpointHandler): MarkedUserEndpoint;
|
|
953
957
|
|
|
954
958
|
/**
|
|
955
|
-
* Agent Skills —
|
|
959
|
+
* Agent Skills — principal-scoped skill store types.
|
|
956
960
|
*
|
|
957
961
|
* Skills follow the Agent Skills standard (https://agentskills.io): a folder
|
|
958
962
|
* whose root SKILL.md opens with YAML frontmatter carrying a required `name`
|
|
959
963
|
* (lowercase kebab, ≤64 chars) and `description` (≤1024 chars), optionally
|
|
960
964
|
* accompanied by scripts, references, and assets.
|
|
961
965
|
*
|
|
962
|
-
* Runtimes store skills server-side
|
|
963
|
-
*
|
|
964
|
-
*
|
|
966
|
+
* Runtimes store skills server-side and scope visibility to the calling
|
|
967
|
+
* principal. A runtime may additionally expose administrator-reviewed shared
|
|
968
|
+
* skills. One principal's private skill MUST NOT be visible to another.
|
|
969
|
+
* Progressive disclosure is the contract — agents see only each
|
|
965
970
|
* skill's name + description until a skill is judged applicable, at which
|
|
966
971
|
* point they load its SKILL.md body (and, when needed, read or execute its
|
|
967
972
|
* bundled files).
|
|
@@ -987,9 +992,9 @@ interface SkillFileInput {
|
|
|
987
992
|
content: string;
|
|
988
993
|
}
|
|
989
994
|
/**
|
|
990
|
-
* ThreadState surface for the
|
|
991
|
-
*
|
|
992
|
-
*
|
|
995
|
+
* ThreadState surface for the calling thread owner's skill library plus any
|
|
996
|
+
* explicitly shared runtime skills. Owner-scoped names take precedence over a
|
|
997
|
+
* shared skill with the same name.
|
|
993
998
|
*/
|
|
994
999
|
interface SkillsNamespace {
|
|
995
1000
|
/** Installed skills (enabled only, unless includeDisabled). */
|
|
@@ -1007,11 +1012,16 @@ interface SkillsNamespace {
|
|
|
1007
1012
|
* Install (or replace) a skill from its file set. The file set must include
|
|
1008
1013
|
* a root SKILL.md with valid frontmatter; the skill's identity comes from
|
|
1009
1014
|
* that frontmatter, never from a caller-supplied name.
|
|
1015
|
+
*
|
|
1016
|
+
* Runtimes MUST authorize mutation and confine it to the calling principal's
|
|
1017
|
+
* scope. Multi-tenant runtimes MUST NOT permit ordinary tenant agent code to
|
|
1018
|
+
* mutate shared skills; an administrative or equivalently trusted principal
|
|
1019
|
+
* is required for shared-library changes.
|
|
1010
1020
|
*/
|
|
1011
1021
|
install(files: SkillFileInput[]): Promise<SkillMetadata>;
|
|
1012
|
-
/** Enable/disable an installed skill.
|
|
1022
|
+
/** Enable/disable an installed skill. Requires mutation authorization. */
|
|
1013
1023
|
setEnabled(name: string, enabled: boolean): Promise<boolean>;
|
|
1014
|
-
/** Uninstall a skill entirely.
|
|
1024
|
+
/** Uninstall a skill entirely. Requires mutation authorization. */
|
|
1015
1025
|
remove(name: string): Promise<boolean>;
|
|
1016
1026
|
}
|
|
1017
1027
|
|
|
@@ -1961,6 +1971,21 @@ interface ThreadState {
|
|
|
1961
1971
|
* @throws If the variable is not defined in any source
|
|
1962
1972
|
*/
|
|
1963
1973
|
env(propertyName: string): Promise<string>;
|
|
1974
|
+
/**
|
|
1975
|
+
* Resolve an environment value exclusively from the runtime instance.
|
|
1976
|
+
*
|
|
1977
|
+
* Unlike `env()`, this method never considers thread, agent, prompt, or user
|
|
1978
|
+
* values. Use it for security-sensitive instance configuration such as
|
|
1979
|
+
* trusted service endpoints and the credentials sent to those endpoints.
|
|
1980
|
+
*
|
|
1981
|
+
* This capability is optional for backward compatibility with runtimes that
|
|
1982
|
+
* predate instance-scoped environment access. Consumers that require an
|
|
1983
|
+
* instance trust boundary MUST fail closed when the method is unavailable.
|
|
1984
|
+
*
|
|
1985
|
+
* @returns The instance value, or `undefined` when the key is not configured
|
|
1986
|
+
* @throws If the runtime cannot read the instance environment
|
|
1987
|
+
*/
|
|
1988
|
+
instanceEnv?(propertyName: string): Promise<string | undefined>;
|
|
1964
1989
|
/**
|
|
1965
1990
|
* Resolve the display/redaction type for an environment value.
|
|
1966
1991
|
*
|
|
@@ -2226,7 +2251,8 @@ interface ThreadState {
|
|
|
2226
2251
|
*
|
|
2227
2252
|
* Resolves a {@link UserHandle}: the identity fields (never credentials)
|
|
2228
2253
|
* plus user-scope capabilities — `call()` into packaged user endpoints
|
|
2229
|
-
* under the user scope's serialization guarantee
|
|
2254
|
+
* under the user scope's serialization guarantee (with endpoint paths
|
|
2255
|
+
* confined to that namespace), durable user values,
|
|
2230
2256
|
* `emit()` on the user event stream, and privileged `fetch()` through
|
|
2231
2257
|
* credential grants.
|
|
2232
2258
|
*
|
|
@@ -2240,10 +2266,12 @@ interface ThreadState {
|
|
|
2240
2266
|
*/
|
|
2241
2267
|
user(): Promise<UserHandle | null>;
|
|
2242
2268
|
/**
|
|
2243
|
-
* The
|
|
2269
|
+
* The thread owner's Agent Skills library plus explicitly shared skills
|
|
2270
|
+
* (https://agentskills.io format).
|
|
2244
2271
|
*
|
|
2245
|
-
*
|
|
2246
|
-
*
|
|
2272
|
+
* Private skills are visible only to the owning principal; administrator-
|
|
2273
|
+
* reviewed shared skills may also be visible. Their files live server-side
|
|
2274
|
+
* (never on a client machine). Agents should follow progressive
|
|
2247
2275
|
* disclosure: browse metadata via `skills.list()`, and load a skill's
|
|
2248
2276
|
* SKILL.md body with `skills.get()` only when it is applicable to the task.
|
|
2249
2277
|
*
|