Skip to content

Commit 14e8be3

Browse files
authored
feat: add core usage and remove semantic grep/glob (#58)
* feat: add core usage * fix(api, core): remove semantic glob and grep * fix: remove tests
1 parent e811538 commit 14e8be3

File tree

18 files changed

+92
-1635
lines changed

18 files changed

+92
-1635
lines changed

docs/api-reference/openapi.json

Lines changed: 0 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,134 +1830,6 @@
18301830
} ]
18311831
}
18321832
},
1833-
"/space/{space_id}/semantic_glob" : {
1834-
"get" : {
1835-
"description" : "Retrieve the semantic glob (glob) search results for page/folder titles within a space by its ID",
1836-
"parameters" : [ {
1837-
"description" : "Space ID",
1838-
"in" : "path",
1839-
"name" : "space_id",
1840-
"required" : true,
1841-
"schema" : {
1842-
"format" : "uuid",
1843-
"type" : "string"
1844-
}
1845-
}, {
1846-
"description" : "Search query for page/folder titles",
1847-
"in" : "query",
1848-
"name" : "query",
1849-
"required" : true,
1850-
"schema" : {
1851-
"type" : "string"
1852-
}
1853-
}, {
1854-
"description" : "Maximum number of results to return (1-50, default 10)",
1855-
"in" : "query",
1856-
"name" : "limit",
1857-
"schema" : {
1858-
"type" : "integer"
1859-
}
1860-
}, {
1861-
"description" : "Cosine distance threshold (0=identical, 2=opposite)",
1862-
"in" : "query",
1863-
"name" : "threshold",
1864-
"schema" : {
1865-
"format" : "float64",
1866-
"type" : "number"
1867-
}
1868-
} ],
1869-
"responses" : {
1870-
"200" : {
1871-
"content" : {
1872-
"application/json" : {
1873-
"schema" : {
1874-
"$ref" : "#/components/schemas/_space__space_id__semantic_glob_get_200_response"
1875-
}
1876-
}
1877-
},
1878-
"description" : "OK"
1879-
}
1880-
},
1881-
"security" : [ {
1882-
"BearerAuth" : [ ]
1883-
} ],
1884-
"summary" : "Get semantic glob",
1885-
"tags" : [ "space" ],
1886-
"x-code-samples" : [ {
1887-
"label" : "Python",
1888-
"lang" : "python",
1889-
"source" : "from acontext import AcontextClient\n\nclient = AcontextClient(api_key='sk_project_token')\n\n# Semantic glob search\nresults = client.spaces.semantic_glob(\n space_id='space-uuid',\n query='authentication and authorization pages',\n limit=10,\n threshold=1.0\n)\nfor block in results:\n print(f\"{block.title} - {block.type}\")\n"
1890-
}, {
1891-
"label" : "JavaScript",
1892-
"lang" : "javascript",
1893-
"source" : "import { AcontextClient } from '@acontext/acontext';\n\nconst client = new AcontextClient({ apiKey: 'sk_project_token' });\n\n// Semantic glob search\nconst results = await client.spaces.semanticGlobal('space-uuid', {\n query: 'authentication and authorization pages',\n limit: 10,\n threshold: 1.0\n});\nfor (const block of results) {\n console.log(`${block.title} - ${block.type}`);\n}\n"
1894-
} ]
1895-
}
1896-
},
1897-
"/space/{space_id}/semantic_grep" : {
1898-
"get" : {
1899-
"description" : "Retrieve the semantic grep search results for content blocks within a space by its ID",
1900-
"parameters" : [ {
1901-
"description" : "Space ID",
1902-
"in" : "path",
1903-
"name" : "space_id",
1904-
"required" : true,
1905-
"schema" : {
1906-
"format" : "uuid",
1907-
"type" : "string"
1908-
}
1909-
}, {
1910-
"description" : "Search query for content blocks",
1911-
"in" : "query",
1912-
"name" : "query",
1913-
"required" : true,
1914-
"schema" : {
1915-
"type" : "string"
1916-
}
1917-
}, {
1918-
"description" : "Maximum number of results to return (1-50, default 10)",
1919-
"in" : "query",
1920-
"name" : "limit",
1921-
"schema" : {
1922-
"type" : "integer"
1923-
}
1924-
}, {
1925-
"description" : "Cosine distance threshold (0=identical, 2=opposite)",
1926-
"in" : "query",
1927-
"name" : "threshold",
1928-
"schema" : {
1929-
"format" : "float64",
1930-
"type" : "number"
1931-
}
1932-
} ],
1933-
"responses" : {
1934-
"200" : {
1935-
"content" : {
1936-
"application/json" : {
1937-
"schema" : {
1938-
"$ref" : "#/components/schemas/_space__space_id__semantic_glob_get_200_response"
1939-
}
1940-
}
1941-
},
1942-
"description" : "OK"
1943-
}
1944-
},
1945-
"security" : [ {
1946-
"BearerAuth" : [ ]
1947-
} ],
1948-
"summary" : "Get semantic grep",
1949-
"tags" : [ "space" ],
1950-
"x-code-samples" : [ {
1951-
"label" : "Python",
1952-
"lang" : "python",
1953-
"source" : "from acontext import AcontextClient\n\nclient = AcontextClient(api_key='sk_project_token')\n\n# Semantic grep search\nresults = client.spaces.semantic_grep(\n space_id='space-uuid',\n query='JWT token validation code examples',\n limit=15,\n threshold=0.7\n)\nfor block in results:\n print(f\"{block.title} - distance: {block.distance}\")\n"
1954-
}, {
1955-
"label" : "JavaScript",
1956-
"lang" : "javascript",
1957-
"source" : "import { AcontextClient } from '@acontext/acontext';\n\nconst client = new AcontextClient({ apiKey: 'sk_project_token' });\n\n// Semantic grep search\nconst results = await client.spaces.semanticGrep('space-uuid', {\n query: 'JWT token validation code examples',\n limit: 15,\n threshold: 0.7\n});\nfor (const block of results) {\n console.log(`${block.title} - distance: ${block.distance}`);\n}\n"
1958-
} ]
1959-
}
1960-
},
19611833
"/tool/name" : {
19621834
"get" : {
19631835
"description" : "Get all tool names within a project",
@@ -2992,21 +2864,6 @@
29922864
"type" : "object"
29932865
} ]
29942866
},
2995-
"_space__space_id__semantic_glob_get_200_response" : {
2996-
"allOf" : [ {
2997-
"$ref" : "#/components/schemas/serializer.Response"
2998-
}, {
2999-
"properties" : {
3000-
"data" : {
3001-
"items" : {
3002-
"$ref" : "#/components/schemas/httpclient.SearchResultBlockItem"
3003-
},
3004-
"type" : "array"
3005-
}
3006-
},
3007-
"type" : "object"
3008-
} ]
3009-
},
30102867
"_tool_name_get_200_response" : {
30112868
"allOf" : [ {
30122869
"$ref" : "#/components/schemas/serializer.Response"

src/server/api/go/docs/docs.go

Lines changed: 0 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,178 +2416,6 @@ const docTemplate = `{
24162416
]
24172417
}
24182418
},
2419-
"/space/{space_id}/semantic_glob": {
2420-
"get": {
2421-
"security": [
2422-
{
2423-
"BearerAuth": []
2424-
}
2425-
],
2426-
"description": "Retrieve the semantic glob (glob) search results for page/folder titles within a space by its ID",
2427-
"consumes": [
2428-
"application/json"
2429-
],
2430-
"produces": [
2431-
"application/json"
2432-
],
2433-
"tags": [
2434-
"space"
2435-
],
2436-
"summary": "Get semantic glob",
2437-
"parameters": [
2438-
{
2439-
"type": "string",
2440-
"format": "uuid",
2441-
"example": "123e4567-e89b-12d3-a456-426614174000",
2442-
"description": "Space ID",
2443-
"name": "space_id",
2444-
"in": "path",
2445-
"required": true
2446-
},
2447-
{
2448-
"type": "string",
2449-
"description": "Search query for page/folder titles",
2450-
"name": "query",
2451-
"in": "query",
2452-
"required": true
2453-
},
2454-
{
2455-
"type": "integer",
2456-
"description": "Maximum number of results to return (1-50, default 10)",
2457-
"name": "limit",
2458-
"in": "query"
2459-
},
2460-
{
2461-
"type": "number",
2462-
"format": "float64",
2463-
"description": "Cosine distance threshold (0=identical, 2=opposite)",
2464-
"name": "threshold",
2465-
"in": "query"
2466-
}
2467-
],
2468-
"responses": {
2469-
"200": {
2470-
"description": "OK",
2471-
"schema": {
2472-
"allOf": [
2473-
{
2474-
"$ref": "#/definitions/serializer.Response"
2475-
},
2476-
{
2477-
"type": "object",
2478-
"properties": {
2479-
"data": {
2480-
"type": "array",
2481-
"items": {
2482-
"$ref": "#/definitions/httpclient.SearchResultBlockItem"
2483-
}
2484-
}
2485-
}
2486-
}
2487-
]
2488-
}
2489-
}
2490-
},
2491-
"x-code-samples": [
2492-
{
2493-
"label": "Python",
2494-
"lang": "python",
2495-
"source": "from acontext import AcontextClient\n\nclient = AcontextClient(api_key='sk_project_token')\n\n# Semantic glob search\nresults = client.spaces.semantic_glob(\n space_id='space-uuid',\n query='authentication and authorization pages',\n limit=10,\n threshold=1.0\n)\nfor block in results:\n print(f\"{block.title} - {block.type}\")\n"
2496-
},
2497-
{
2498-
"label": "JavaScript",
2499-
"lang": "javascript",
2500-
"source": "import { AcontextClient } from '@acontext/acontext';\n\nconst client = new AcontextClient({ apiKey: 'sk_project_token' });\n\n// Semantic glob search\nconst results = await client.spaces.semanticGlobal('space-uuid', {\n query: 'authentication and authorization pages',\n limit: 10,\n threshold: 1.0\n});\nfor (const block of results) {\n console.log(` + "`" + `${block.title} - ${block.type}` + "`" + `);\n}\n"
2501-
}
2502-
]
2503-
}
2504-
},
2505-
"/space/{space_id}/semantic_grep": {
2506-
"get": {
2507-
"security": [
2508-
{
2509-
"BearerAuth": []
2510-
}
2511-
],
2512-
"description": "Retrieve the semantic grep search results for content blocks within a space by its ID",
2513-
"consumes": [
2514-
"application/json"
2515-
],
2516-
"produces": [
2517-
"application/json"
2518-
],
2519-
"tags": [
2520-
"space"
2521-
],
2522-
"summary": "Get semantic grep",
2523-
"parameters": [
2524-
{
2525-
"type": "string",
2526-
"format": "uuid",
2527-
"example": "123e4567-e89b-12d3-a456-426614174000",
2528-
"description": "Space ID",
2529-
"name": "space_id",
2530-
"in": "path",
2531-
"required": true
2532-
},
2533-
{
2534-
"type": "string",
2535-
"description": "Search query for content blocks",
2536-
"name": "query",
2537-
"in": "query",
2538-
"required": true
2539-
},
2540-
{
2541-
"type": "integer",
2542-
"description": "Maximum number of results to return (1-50, default 10)",
2543-
"name": "limit",
2544-
"in": "query"
2545-
},
2546-
{
2547-
"type": "number",
2548-
"format": "float64",
2549-
"description": "Cosine distance threshold (0=identical, 2=opposite)",
2550-
"name": "threshold",
2551-
"in": "query"
2552-
}
2553-
],
2554-
"responses": {
2555-
"200": {
2556-
"description": "OK",
2557-
"schema": {
2558-
"allOf": [
2559-
{
2560-
"$ref": "#/definitions/serializer.Response"
2561-
},
2562-
{
2563-
"type": "object",
2564-
"properties": {
2565-
"data": {
2566-
"type": "array",
2567-
"items": {
2568-
"$ref": "#/definitions/httpclient.SearchResultBlockItem"
2569-
}
2570-
}
2571-
}
2572-
}
2573-
]
2574-
}
2575-
}
2576-
},
2577-
"x-code-samples": [
2578-
{
2579-
"label": "Python",
2580-
"lang": "python",
2581-
"source": "from acontext import AcontextClient\n\nclient = AcontextClient(api_key='sk_project_token')\n\n# Semantic grep search\nresults = client.spaces.semantic_grep(\n space_id='space-uuid',\n query='JWT token validation code examples',\n limit=15,\n threshold=0.7\n)\nfor block in results:\n print(f\"{block.title} - distance: {block.distance}\")\n"
2582-
},
2583-
{
2584-
"label": "JavaScript",
2585-
"lang": "javascript",
2586-
"source": "import { AcontextClient } from '@acontext/acontext';\n\nconst client = new AcontextClient({ apiKey: 'sk_project_token' });\n\n// Semantic grep search\nconst results = await client.spaces.semanticGrep('space-uuid', {\n query: 'JWT token validation code examples',\n limit: 15,\n threshold: 0.7\n});\nfor (const block of results) {\n console.log(` + "`" + `${block.title} - distance: ${block.distance}` + "`" + `);\n}\n"
2587-
}
2588-
]
2589-
}
2590-
},
25912419
"/tool/name": {
25922420
"get": {
25932421
"security": [

0 commit comments

Comments
 (0)